Sunday 11 August 2013

Displaying ICON On Module Pool Screen


Description: Displaying ICON on the Screen based on some Condition. All Icon names can be obtained from Tcode - ICON.

Step 0. Create a Module Pool program Type 'M'  and declare some variables and activate the program.














Step 1. create a screen '0001' and click on the continue button.













Step 2.Provide some description and select the Normal screen radio button and at last click on the Layout Button as marked .

















Step 3. Create some  input field as shown below and a Push button with F-code 'DISP'.
























Step 4. Design some Output fields from the SFLIGHT table and set the property of each field as output only.




























Step 5. Now select the ICON element from the Screen painter Element list and Put it on the screen and provide a name to it as mentioned.

























Step 6. Define the Modules in the main program from the Screen Flow Logic.


















Step 7. Put some code in the Modules as given below.





















Step 8. Create a T-Code for the module pool program.

























Step 9. Run the Program.























Step 10. Give the Input and click on the Get Details Button and the RED Icon is visible as per the Max Seat and Occ Seat.
























Step 11. Change the input details and click on the Get Details Button and as per the Max seat and Occ seat the Green icon is displayed.























________________________________________________________________________________

Process On Value-Request [POV] Event in Module Pool Program

Description: The event POV in module pool program is used to display the F4 values for a field if there is no search help is assigned to the Input field.
Step 1. Create a module pool program [Type 'M'] and declare some variables and activate the program.









Step 2. Create a screen '0001' and click on the continue button.















Step 3. Provide the short text and select the Normal Screen Radio Button and then click on the Layout Tab.





















Step 4. Create an Input field as Bill_No, create a push button with function code 'DISP' and  display some fields of the 'VBRK' table. For teh Field 'BILL_NO' the search help box is left empty as marked below.
































Step 5. Define the modules in the PBO and PAI of the screen '0001'.




















Step 6. Provide some code in the modules as shown below.





















Step 7. Create a T-Code for the Program as shown below.






















  

Step 8. Run the program and there is no F4 help for the input field 'BILL_NO'.































Step 9. Check the VBRK table entries in the SE11 and give one billing document number and the corresponding Billing details is displayed in the screen.





























Step 10. To help the user for the Billing Document number, lets get the Search help for the billing document from the VBRK table in SE11.














Step 11. Go to the Layout of the screen and double click on the Bill_No input field and fill the Search Help field as shown below.






























Step 12. Now Run the program and The F4 help is appeared for the Input Field.
































Step 13. Lets remove the Search Help assigned to the Input Field and populate the data by the POV event.































Step 14. Go to the Flow Logic of the screen and add another POV event as shown below.
Mention the field name against which you want to display F4 help with the Module name an define the module by double clicking on it.





















Step 15. Use the Below code to fill the 'BILL_NO' FIELD.




























Step 16. Now activate the Program and Run it. The F4 values for the Billing Document is displayed by the POV event.




_________________________________________________________________________________

Creation of Table Control in Module Pool Program

Description: Table Control generally used to display Multiple records in a single screen.

Step 1. Create a Module Pool Program , declare some variables and activate the program.














 Step 2. Create a screen '0001'.















Step 3. Provide a short text and select Normal Screen Radio Button and then click on the Layout Button as shown.

















Step 4. Select the Table Control Element from the left column of the screen painter, Drag and Drop it on the screen. Adjust the Height and Width as per required. Now Double click on it and provide the name of the
table control as 'TBL_CTRL' as declared in the main program. Check the Vertical and Horizontal resizing button. Select the Horizontal and vertical separators. Select the w/SelColumn check box and Provide the name as LS-SEL. [LS- is declared as a work area in the main program]. This LS_SEL works as a select button for each row in the table control.





























Step 5. Click on the top button marked as red and in the pop up window provide the work area name as 'LS' and click on the Get from Program button. Select some fields that you want to show in the table control columns. At last click on the Continue button.






















Step 6. All the selected columns appear in the table control .
























Step  7. Now lets provide the column text to every column on the table control. Select the text box element from the element list, drag and drop it on the header of the table control. Double click on the text element and Provided the required column text as shown below.





















Step 8. Double click on the first column [LS-BUKRS]. As it is the primary key field of the table, lets make it as read only field. Set the property as 'Output only'.
























Step 9. Provide the flow logic of the screen '0001' containing the table control. Add the Loop and Endloop statement in the PBO and PAI of the screen which contains the table control. The Loop and Endloop statement in the PBO is used to read the value from the internal table and fill the table control through the work area. The Loop and Endloop statement in the PAI is used to process the record that are in the table control if the user performs some action like updating or modifying the existing records.















 

Step 10. Define the modules in the flow logic of the screen and provide some code in it as shown below.


















Step 11. Lets create a T-Code for the Module pool program.
























Step 12. Run the program  and the table control is displayed on the screen.






















 

Step 13. The table control and tab strip controls structures are defined in the type group 'CXTAB'.
Go to - SE11 and provide the type group name and click on display button.



















Step 14. The table control follows the type 'SCXTAB_CONTROL' and the tab strip control follows type 'SCXTAB_TABSTRIP'.















______________________________________________________________________________

Comments system

Disqus Shortname