‎2008 Aug 21 10:31 AM
Dear Freinds,
Could you tell me that how can I add Dyanamic selection screen in program........?
‎2008 Aug 21 10:35 AM
Are you talking about Executable Report or Module Pool?
You can make the screen dynamic by using LOOP AT SCREEN functionality.
You can hide/dsable various screen elements by using LOOP AT SCREEN
‎2008 Aug 21 10:34 AM
‎2008 Aug 21 10:35 AM
Are you talking about Executable Report or Module Pool?
You can make the screen dynamic by using LOOP AT SCREEN functionality.
You can hide/dsable various screen elements by using LOOP AT SCREEN
‎2008 Aug 21 10:36 AM
Hi Amar
Go through Below thread you will get all info
http://saptechnical.com/Tutorials/ABAP/DynamicSScreen/demo.htm
Regards,
Syfu
‎2008 Aug 21 10:36 AM
Hi
Please check the example
***********************************************************************
SELECTION SCREEN *
***********************************************************************
SELECTION-SCREEN: BEGIN OF BLOCK c1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_f_pc TYPE rlgrap-filename "PC file name
MODIF ID m2,
p_fname TYPE rlgrap-filename "Data file name
MODIF ID m1
DEFAULT '/data/interfaces/*',
p_server RADIOBUTTON GROUP src "Applicatn srvr
USER-COMMAND ucomm
DEFAULT 'X',
p_pc RADIOBUTTON GROUP src. "Prsntation srvr
SELECTION-SCREEN: END OF BLOCK c1.
----
At selection-screen output Event *
----
AT SELECTION-SCREEN OUTPUT.
Design selection parameters dynamically
PERFORM sub_set_file_param.
----
At selection-screen on F4 help for Server file *
----
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
Provide a F4 help for source file
PERFORM sub_serverfile_f4.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f_pc.
Provide a F4 help for source file
PERFORM sub_pcfile_f4 USING p_f_pc.
FORM sub_set_file_param.
Modify screen
LOOP AT SCREEN.
If PC file chosen then set p_f_pc otherwise p_fname
IF screen-group1 = 'M1'.
IF p_pc = c_check.
screen-active = 0.
ENDIF.
ELSEIF screen-group1 = 'M2'.
IF p_server = c_check.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. "sub_set_file_param
FORM sub_serverfile_f4 .
F4 help for application server file
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = c_path
filemask = space
IMPORTING
serverfile = p_fname
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
Message 'Unable to find filepath'.
MESSAGE i000(z_zzz_ca_messages) WITH 'Unable to find filepath'(003).
ENDIF.
ENDFORM. "sub_serverfile_f4
FORM sub_pcfile_f4 USING l_file.
This function module provides the F4 help for PC file
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = l_file
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
If the help funtion has an error, display a message.
IF sy-subrc NE 0.
Message 'Unable to find filepath'.
MESSAGE i000(z_zzz_ca_messages) WITH 'Unable to find filepath'(082).
ENDIF.
ENDFORM. "sub_pcfile_f4
‎2008 Aug 21 10:39 AM
‎2008 Aug 21 10:40 AM
‎2008 Aug 21 10:52 AM
Ok,
Now I Tell you, I have to apply authority check in all Z programs.....But in some z programs there dynamic selection screen has been used..........so how can i find those key field which is use in dynamic selection screen........