‎2007 May 14 11:27 AM
Hi friends,
I created two fields in dialogprogramming (one is NAME and another one is NUMBER. the NUMBER field is auto generated field) and i created a application toolbar it contains create, change, display & delete icons.
now i want that if i click the CREATE icon then the NUMBER field is in Diplay mode. otherwise if i click change icon then the number field change as entry mode/level.
if it is possible then please tell me how it is possible.
THANKS & REGARDS,
vallamuthu.M
‎2007 May 14 11:28 AM
yes it is possible.
see the two programs.
demo_dynpro_modify_simple
demo_dynpro_modify_screen
Their will be an auto generated table callled SCREEN, which contains all the attributes of the fields in the screen, By modifying this u can do that.
u will use the below statements.
Loop at screen. "screen is a table with header
if (condition)
"some scree modifications i.e., u will modify the screen table
Modify Screen.
endif
Endloop
‎2007 May 14 11:28 AM
yes it is possible.
see the two programs.
demo_dynpro_modify_simple
demo_dynpro_modify_screen
Their will be an auto generated table callled SCREEN, which contains all the attributes of the fields in the screen, By modifying this u can do that.
u will use the below statements.
Loop at screen. "screen is a table with header
if (condition)
"some scree modifications i.e., u will modify the screen table
Modify Screen.
endif
Endloop
‎2007 May 14 11:30 AM
HOW IS IT POSSIBLE?PLEASE IVE ME AS EXAMPLE (SOME SAMPLE CODINGS)
‎2007 May 14 11:34 AM
go through the below prgrams.
demo_dynpro_modify_simple
demo_dynpro_modify_screen
first one is the simple one and second one is the complex one.
<u><b>Award if useful</b></u>
Regards,
Sudheer
‎2007 May 14 11:35 AM
write the code in PAI
say P_NUM is the name of screen field for number
MODULE USER_COMMAND.
MODULE USER_COMMAND.
WHEN 'DISPLAY'.
loop at screen.
if screen-name eq 'P_NUM'.
screen-input = '0'.
modify screen.
endif.
endloop.
WHEN 'CHANGE'.
loop at screen.
if screen-name eq 'P_NUM'.
screen-input = '1'.
modify screen.
endif.
endloop.
ENDMODULE.