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

Is it possible to call parameter on same screen using push-button (Add+)

Former Member
0 Likes
1,207

PARAMETERS : p_in TYPE c MODIF ID m1 .
SELECTION-SCREEN PUSHBUTTON 50(20) text-001 USER-COMMAND btn .
PARAMETERS p_op TYPE i MODIF ID m2.

i want a push-button to increase parameters in same screen..

Help me ..

Thank you...

6 REPLIES 6
Read only

Former Member
1,066

It is:

TABLES sscrfields.

PARAMETERS : p_in TYPE c MODIF ID m1 .
SELECTION-SCREEN PUSHBUTTON 50(20) text-001 USER-COMMAND btn .
PARAMETERS p_op TYPE i MODIF ID m2.

AT SELECTION-SCREEN.
  CASE sscrfields-ucomm.
    WHEN 'BTN'.
      p_op = p_op + 1.
  ENDCASE.
Read only

0 Likes
1,066

In case you want to count the absolute number of clicks adapt the code like so

TABLES sscrfields.
DATA gv_clicks TYPE i.
PARAMETERS : p_in TYPE c MODIF ID m1 .
SELECTION-SCREEN PUSHBUTTON 50(20) text-001 USER-COMMAND btn .
PARAMETERS p_op TYPE i MODIF ID m2.

AT SELECTION-SCREEN.
  CASE sscrfields-ucomm.
    WHEN 'BTN'.
      gv_clicks = gv_clicks + 1.
      p_op = gv_clicks.
  ENDCASE.
Read only

0 Likes
1,066

thanks for your reply...

But i want to increase parameters not values....

that means .........

if you click on that Button(ADD+) ...

p_in ......... (ADD+)

p_op ......

p_in........

p_op.......

i'm expecting like this ....

Read only

Sathya_Gunasekaran
Contributor
0 Likes
1,066

If you know the number of additional input fileds, you can make them visible on user action (Default : invisible)

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,066

I finally understand what you mean, by reading your latest comment. So, you want to add additional fields in the selection screen, dynamically at runtime.

cf Sathya's answer.

Either use a static selection screen with hidden parameters p_in2, p_op2, p_in3, p_op3, etc. Make them invisible by default (loop at screen..., screen-active='0' or '1', modify screen...), and make them visible when you press the button.

You may use a dynamic selection screen by using function modules FREE_SELECTIONS_INIT, FREE_SELECTIONS_DIALOG...

Search the web for more information about these concepts.

Read only

0 Likes
1,066

Thank You .... Jörgen Lindqvist