‎2014 Dec 19 10:54 AM
Hi
I have used USER_COMMAND in my ALV list and done coding there. But in outut it s not reflecting. Condition for PF is working fine but not for USER_COMMAND.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'.
EXPORTING.
I_CALLBACK_PROGRAM = SY-REPID.
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_PF_STATUS = 'PF_STATUS.
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
RS_UCOMM TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN....
......
ENDCASE.
Please help....
‎2014 Dec 19 11:00 AM
Hi Bharani,
Put the Break-point inside the FORM (as first line). and check, may be the 'BACK' SY-UCOMM is not exist in system.
Regards.
Praveer.
‎2014 Dec 19 11:15 AM
Hi Praveer
Thanks for your prompt response.
But my main draw bak is .....i have assigned TOOL BAR keys like BACK, SAVE & CANCEL in a screen caled by PF status.
But in ALV only APPLICATION TOOLBAR keys are displaying not the Function Keys where i declared BACK, SAVE & CANCEL
‎2014 Dec 19 11:23 AM
Hi Bharani,
Basically you can use
either REUSE_ALV_GRID_DISPLAY
or CL_GUI_ALV_GRID.
1. REUSE_ALV_GRID_DISPLAY
is having inbuilt command for BACK / CANCEL and EXIT, you not need to declare these again in you PF-STATUS,
either of this, if you declaring something in not exist or something which is require in your business function, those only you have to declare in PF-STATUS and based on that you have to write the code in USER_COMMAND.
2. CL_GUI_ALV_GRID,
Since it's a class based ALV grid, to display this alv you have to declare a new screen and a container object.
Since, it's on screen level, so you have to write the code on PBO on screen event for back / cancel and exit.
Regards.
Praveer.
‎2014 Dec 19 11:29 AM
I have already declared these things in PF....but also ot reflecting in the op
‎2014 Dec 19 11:11 AM
Hi,
Provide the complete parameters of ALV FM
& check the pf_status is activated or not.
Regards,
Pavan
‎2014 Dec 19 11:12 AM
hii Bharani
please check if your pf status is activated
Regards
Gaurav
‎2014 Dec 19 11:12 AM
Hi Bharani,
Did you implemented the PF-STATUS method??
Regards,
Krishna
‎2014 Dec 19 11:21 AM
HI Bharani,
does your pf_status subroutine is same as this
FORM PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'ZSTATUS'.
REFRESH extab[].
ENDFORM.
‎2014 Dec 19 11:27 AM
‎2014 Dec 19 11:33 AM
‎2014 Dec 19 11:43 AM
like this way only i have given but same only....Application status only executing not Function Keys
‎2014 Dec 19 12:06 PM
Hi Bharani,
To use the Function keys, you need to assign them with user commands first.
Do the following steps:
1. Double click on you GUI status
2. Go to screen menu: Utillities --> F Key Consistency
3. Enter the command for the Function keys you desire to use.
4. Save and Activate it
Note the F keys assignment will be visible in black colour in the GUI status screen here after.
Please try and let me know if it helps
‎2014 Dec 19 11:30 AM
Hi Bharani,
Can you please put your exact code here for the ALV LIST call and the user_command function?
Also, you may refer the standard program to check if your other parameters like button settings in GUI Status, etc as needed or not.
BCALV_TEST_LIST
Hope this helps!
Regards,
Gayatri
‎2014 Dec 19 11:50 AM
‎2014 Dec 19 11:56 AM
Hi Bharani,
Please take any standard program PF-STATUS, where the same has been used for the REUSE_ALV_GRID_DISPLAY function module.
And after apply the same in your program check the Command for the BACK/EXIT or CANCEL.
and based on that you can write your logic.
Regards.
Praveer.
‎2014 Dec 19 12:01 PM
Correct your code, replace
I_CALLBACK_PROGRAM = SY-REPID.
With a local variable initialized with SY-REPID, else the value will become SAPLSALV...
I_CALLBACK_PROGRAM = LV_REPID.
This is written in FM documentation...
Note: Never pass SY-REPID directly in the interface. If the desired program name is in SY-REPID, it must be assigned to an intermediate variable which is then passed to the interface.
Regards,
Raymond