05-04-2009 1:32 PM
Hi,
I am doing interactive report where i am using user command for PF-Status again in the
same program i need to use user command for interactive report.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
IS_LAYOUT = S_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
I_CALLBACK_PF_STATUS_SET = 'ZFOREIGN'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_SAVE = 'X'
TABLES
T_OUTTAB = IT_FINAL[].
FORM ZFOREIGN USING T_MENU TYPE SLIS_T_EXTAB.
SET PF-STATUS 'ZFOREIGN'.
ENDFORM. "ZDISP_BAS
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'ENTER'.
LOOP AT IT_FINAL.
IT_FINAL-TLC = IT_FINAL-EX_RATE * IT_FINAL-TFC.
MODIFY IT_FINAL.
ENDLOOP.
ENDCASE.
ENDFORM.
In the same program i need interactive report where i declared user command already.
How to declare one more user command.
Suggest some ideas.
With Regards,
Bathri.
05-04-2009 1:35 PM
Hi ,
Wat i would suggest is that instead of using two routines its better to use the same routine and then inside the routine differentiate it with respect to the sel field.
Regards,
Varghese
05-04-2009 1:41 PM
Hi
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN 'ENTER'.
LOOP AT IT_FINAL.
IT_FINAL-TLC = IT_FINAL-EX_RATE * IT_FINAL-TFC.
MODIFY IT_FINAL.
ENDLOOP.
When '&IC1'
U r code
......
.....
ENDCASE.
ENDFORM.
Kiran....
05-04-2009 1:43 PM
Hi Friend,
try this user command u ill get idea, if u have dought please let me ,
FORM user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CLEAR rs_selfield.
READ TABLE iekpo INDEX rs_selfield-tabindex.
CASE rs_selfield-fieldname.
WHEN 'EBELP'.
PERFORM iebelp USING rs_selfield-value.
WHEN 'MATNR'.
PERFORM imard USING rs_selfield-value.
ENDCASE.
Regards
jinku
05-05-2009 12:05 PM