Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic selection screen

Former Member
0 Likes
1,734

Dear Freinds,

Could you tell me that how can I add Dyanamic selection screen in program........?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
811

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

7 REPLIES 7
Read only

Former Member
0 Likes
811

Amar,

[Did you search in SDN?|;

Read only

Former Member
0 Likes
812

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

Read only

Former Member
0 Likes
811

Hi Amar

Go through Below thread you will get all info

http://saptechnical.com/Tutorials/ABAP/DynamicSScreen/demo.htm

Regards,

Syfu

Read only

Subhankar
Active Contributor
0 Likes
811

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

Read only

Former Member
0 Likes
811

check the link below:

With luck,

Pritam.

Read only

Former Member
0 Likes
811

What actually is your requirement??

Read only

0 Likes
811

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........