Monday 15 September 2014

List Box At selection- Screen



Step1. Create a report and pass some values to the Fm VRM_SET_VALUES that will display the list of values in the list box.





















Step2. The FM input parameters types are highlighted.












Step3. VRM_values is an internal table of type VRM_VALUE structure.
















Step4. VRM_VALUE contains two fields.

















Step5. Execute the program. For the first fields the values are coming from the DB table by the help of search help associated with the reference field and displayed in the form of drop down values.
For the second screen , it refers to char data type so no values are coming automatically. So we have to manually populate the values by using the standard FM.





























Step6. Select particular value from the drop down list and execute it.












Step7. Here is the O/P.












-----------------------------------------------------------------------------------------------------------------------

Thursday 11 September 2014

Use of LEAVE LIST-PROCESSING.

LEAVE LIST-PROCESSING: This statement immediately exits the list processor. This statement can be used in various purposes. Let's take one case where it can be sued.


Suppose a user provides any value in the selection-screen parameter and once press F8 , then in the START-OF-SELECTION event let's we validate the value and raise an error message if it is not a valid one. Then the user perspective the selection-screen should appear again where he can specify the correct value but this is not the case. As soon as the error message is raised then the selection screen disappears. In such a situation Leave List-Processing can be used.

Step1. Crate the below report and have an error message.















Step2. Execute and provide the correct value.










Step3. We receive the o/p.











Step4. Provide a different value.













Step5. Well the raised error disappears the selection-screen. Go back.

















Step6. Well home screen is reached.


















Step7. In the validation change the message type and put the statement 'Leave list-processing'.















Step8. run and provide a value.














Step9. The O/P appears.












Step10. Provide a different value.












Step11. We receive the message but still the selection-screen appears enabling the user to provide a correct value.


















-------------------------------------------------------------------------------------------------------------------------

Use of LEAVE TO LIST-PROCESSING .


 LEAVE TO LIST-PROCESSING :  This statement is used when we are processing a screen and want to print our output in a list. In order to navigate from a screen to list LEAVE TO LIST-PROCESSING statement is used with some conditions. The below post describes some of those:

------------------------------------------------------------------------------------------------------------------------
Step1.  Create a report program and create a screen 9999 to take the input & result screen is 9998.






















Step2. Flow logic of 9999 screen.














Step3. The flow logic of screen 9998.
















Step4. Screen design of 9999 that takes input of the field SCARR-CARRID.


















Step5. The pf status of screen 9999.

















Step6. Execute the report & provide an input value AA and Hit the Enter key to trigger the PAI of screen 9999 which calls the screen 9998 and the PBO of the screen 9998 triggers.















Step7.  This is the screen 9998. Click on the Back button.






















Step8. Here the list appears and hit the back button.














Step9. The plain screen of the list still appears. Now click on the back button.













Step10. Again the list with values appears. Hit again the back button.














Step11. Again the Plain list appears.














Conclusion: If in a PBO of the screen we mention : Leave to list-processing, then we unconditionally leave the calling screen ( here the calling screen is - 9999) and the called screen appears( here the called screen is 9998). As we unconditionally left the calling screen, after reaching the called screen (here from 9998 we move to the list ) we can not go back . That why after a several back we can not reach the calling screen.

-------------------------------------------------------------------------------------------------------------------------


Step12. Let's make some change to the statement  LEAVE TO LIST-PROCESSING and add some extra to it :  LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0. Execute the report.
This is a conditional call from the calling screen 9999 and after reaching the called screen 9998 it can reach the calling screen by the keyword :  RETURN TO SCREEN 0. This keyword  RETURN TO SCREEN 0 makes the control reach from the list to the calling screen.
























Step13. Provide the I/P and hot enter key.
















Step14. The below screen 9998 appears. Click on Back button.













Step15. Hence the list appears. now again click on the back button.















Step16. Oh great it calls the I/P screen.

















 
Conclusion: Hence the Leave to screen 0 calls the calling screen from the list so the user can provide again a different value in the I/P screen and see the details of the records in the list output. But here also facing some issue.After providing the I/P in the first screen when we hit enter a blank screen of 9998 appears and if we then select the back button then the list appears. So this is not the ideal O/P the user want to accept. So we have to skip this blank screen 9998 and direct proceed to the list O/P.
________________________________________________________________________________


Step17. Then put one extra statement SUPPRESS DIALOG & Execute the report.
























Step18. Provide the i/P and hit enter key from keyboard.
















Step19. So the first  blank screen of 9998 is suppressed ad directly the list appears. click the back button.

















Step20. Again the I/P screen appears bcoz we have mentioned a conditional call Leave to Screen 0.
Again change the I/P and hit Enter key.

















Step21. Again the List appears with fresh set of records.
















 


---------------------------------------------------------------------------------------------------------------------------

Tuesday 9 September 2014

Executing a report with a Transaction start Variant


Step1. Go to Tcode- SE38 and create a report program.



















Step2. Provide the description.





















Step3. Choose type as Executable program.





















Step4. Select the check box: Start using Variant and this appears only for type 1 program.





















Step5. Create some parameters and execute it.




















Step6. Well we receive the below output i.e it can only be executed by a variant.



















Step7. Navigate along the path to create a Variant for the report. Usually we create the variant from the selection screen of the report by providing some values to the input fields and then saving it. But here in this case while executing the selection doesn't appear.





















Step8. Provide the parameter value and click on attributes button.











Step9. The variant name comes automatically from the program name and in display mode. Provide the description and save it.














Step10. So variant created and saved.
















Step11. Again run the program yet still receiving the same error. So it can only be run by a report transaction code.



















Step12. Go to Tcode- SE93.






Step13. Provide a Tcode name and click on create button.

















Step14. Provide the short text and select the second radio button for the report transaction and continue.

























Step15. Provide the report name and the start variant name from the F4 value. Save it.




























Step16. Launch the report transaction  created above.





Step17. So the value comes from the start variant.









Step18. From the variant button we can see our above created variant.
























Step19. Execute and the below o/p appears.














---------------------------------------------------------------------------------------------------------------------------

Comments system

Disqus Shortname