2007 Sep 24 9:45 AM
hello expert,
like in report: PARAMETERS: RB_SING RADIOBUTTON GROUP RAD3 DEFAULT 'X' USER-COMMAND C1.
in module pool program, hw to set user-command in screen.
srinivas
2007 Sep 24 9:50 AM
PBO.
Call subscreen <SUBSCREEN NAME> Including sy-repid(PROGRAM NAME) G_DYNNR(SCREEN NUMBER'.
PAI
module user_command.
Call subscreen <subscreen name>
Module user_command.
case sy-ucomm.
when 'BUT1'.
g_dynnr = 200.
when 'BUT2'.
g_dynnr = 300.
Endcase.
end module
****************************************
REPORT demo_dynpro_tabstrip_server.
CONTROLS mytabstrip TYPE TABSTRIP.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
DATA number TYPE sy-dynnr.
mytabstrip-activetab = 'PUSH2'.
number = '0120'.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command INPUT.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'OK'.
MESSAGE i888(sabapdocu) WITH 'MYTABSTRIP-ACTIVETAB ='
mytabstrip-activetab.
ELSE.
mytabstrip-activetab = save_ok.
CASE save_ok.
WHEN 'PUSH1'.
number = '0110'.
WHEN 'PUSH2'.
number = '0120'.
WHEN 'PUSH3'.
number = '0130'.
ENDCASE.
ENDIF.
ENDMODULE.
flow logic of the screen 100
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN SUB INCLUDING SY-REPID NUMBER.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
CALL SUBSCREEN SUB.
MODULE USER_COMMAND.
flow logic of the screen 110
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
flow logic of the screen 120
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
flow logic of the screen 130
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
******************************************
REGARDS
VASU
2007 Sep 24 9:52 AM
Hi,
In module pool programs you can set the User Command's through screen painter.
In SE51 you can design the screen and you can set the user command's for Each and Every fields.
For Example, You design one Button "Save" in Screen painter, and Double click it. It displays the Attributes menu. Here you can Enter the Function Code for that [Example "Savebutton"].
Then in your program you should write code like this,
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'savebutton'
.
Write your Code Here.
Endcase.
Thanks,
Reward If Helpful.
2007 Sep 24 9:53 AM
in module pool, no need for the addition specifically.
in the screen layout, when u create a radiobutton, pushbutton they will automatically react for the user-command .
u can code in the pai.