We have seen in the previous posts of this Blog series about the new SALV model to Create ALV:
SALV Model 1: Normal ALV Table Display
SALV Model 2: Adding default PF STATUS in ALV
Sometimes we need to create our own PF Status (GUI Stauts) with more buttons which can provide the users more ways to interact with the ALV. To set our custom PF status we need to:
First create a PF status: We need to create a PF status with our own buttons as well as the ALV standard buttons. If we don't add the ALV buttons than it would not provide the standard functions of ALVs. On the other hand it is very tedious to add all the ALV buttons in our PF status manually. So here is the easy way: We will copy the PF-Status using of any standard SALV_DEMO report using the transaction SE41: Menu Painter. After Copying the PF-Status we can add our own buttons.
Call Method of SALV to display PF: Now we will call this newly created PF status in our ALV using the method SET_SCREEN_STATUS of the reference of the class CL_SALV_TABLE.
Here is the code snippet to which provides the ADD-ON code to our Base program. The base program can be found in the SALV Model 1: Normal ALV Table Display.
UML diagram is same as the post SALV Model 2: Adding default PF STATUS in ALV.
Code Snippet to Add custom PF Status |
|
For sake of simplicity, I have used the pfstaus SALV_STANDARD of the Report SALV_DEMO_TABLE_SELECTIONS.
This code will generate output like:
0 comments
Post a Comment