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

Parameter using user-command

Former Member
0 Likes
1,794

Hi All,

Can we use the USER-COMMAND for a field declared as parameter?

Like eg:

Parameters ptemp1 type hap_s_object-name OBLIGATORY user-command.

My requirement is whenever this parameter field is not initial ..i need to enable a block on the selection screen. pls suggest.

Thanks & Regards,

Padmasri.

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,069

Hi,

I Think no. What u can do is put the logic in AT SELECTION-SCREEN ON parameter event. So when ever user enters some value in selection screen parameter and press enter ur logic should be executed to enable the new block.

But if the user directly execute after entering the value in parameter this won't work.

Thanks,

Vinod.

2 REPLIES 2
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,070

Hi,

I Think no. What u can do is put the logic in AT SELECTION-SCREEN ON parameter event. So when ever user enters some value in selection screen parameter and press enter ur logic should be executed to enable the new block.

But if the user directly execute after entering the value in parameter this won't work.

Thanks,

Vinod.

Read only

Former Member
0 Likes
1,069

it is not possible to add the user command addition along with the input parameters.

after input you need to press enter.

REPORT ZTEST.

PARAMETERS: p_matnr TYPE matnr OBLIGATORY.


SELECTION-SCREEN BEGIN OF  BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_vbeln TYPE vbeln MODIF ID aaa.

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.

    IF NOT p_matnr IS INITIAL.
      IF screen-group1 = 'AAA'.
        screen-active = 1.
        MODIFY SCREEN.
      ENDIF.
    ELSE.
      IF screen-group1 = 'AAA'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.