04-24-2006 6:35 AM
Hello Everyone,
Does anyone knows how to trigger user command in ALV?
I am using FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' and i add one self-defined button on ALV toolbar.
The problem arises: When i try to click on my self define button on ALV toolbar, the control is not going inside this perform.
FORM user_command USING r_ucomm TYPE syucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'PICK'.
ENDCASE.
ENDFORM.
Any idea how the control will go inside this perform when i click on my self-defined button.
Thanks in advance.
Regards,
Tarun
04-24-2006 6:38 AM
FORM user_command USING r_ucomm TYPE <b>syucomm</b>
rs_selfield TYPE slis_selfield.
<b>sy-ucomm</b> change above syucomm like this
04-24-2006 6:40 AM
Hi Tarun,
change syucomm to SY-UCOMM and try it.
Regards,
Raghavendra
04-24-2006 6:43 AM
change syucomm to SY-UCOMM
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
case r_ucomm.
when 'BACK' or 'CANC' or 'EXIT'.
leave to screen 0.
when '&IC1'.
set parameter id 'AUN' field rs_selfield-value.
call transaction 'VA03' and skip first screen.
endcase.
ENDFORM. "USER_COMMAND
Message was edited by: kishan negi
04-24-2006 6:46 AM
04-24-2006 6:56 AM
Hi Tarun,
Looked up an example for adding a self defined button to ALV. There it specifies that the type for r_ucomm is syucomm. So, that might not be a problem. There are some small mistakes possible.
1. Adding function code to the button
2. Setting the button as 'disabled'.
3. Button type ( normal )
Do try these.
Regards,
Aniket
Please mark helpful answers.
04-24-2006 7:01 AM
Hi Aniket,
May be you are right.
I tried the various options suggested by everyone regarding the setting of the r_ucomm.
Might be the problem arises in setting up the properties of the button.
Can you please elaborate more on this.
Do or anyone have sample code for this.
If you pass sample code to me it would be great help to me.
Thanks in advance again for your great help.
Regards,
Tarun
04-24-2006 7:04 AM
PICK is an internal command, so try giving another name for ur self defined button in SET PF STATUS and try checking.
activate the set pf status.
04-24-2006 7:06 AM
Tarun
Take a look at BCALV_TEST_HIERSEQ_LIST_EVENTS
Regards,
Ravi
Note : Please mark the helpful answers
04-24-2006 7:13 AM
Hi again Tarun,
Please post you email ID. Will mail you some stuff that will be useful.
Regards,
Aniket