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

Screen filed display

Former Member
0 Likes
382

Hi,

I have to display some fileds at slection screen. But based on some condition I have to display fields.

I mean to say that based on condition the filed description and value input should be enabled and based on condition oth should be disabled.

Example. P_MATNR like MARA-MATNR.

Filed desc- Material Number

Now on some condition Material should not be displayed and it should not be input enabled.

I tried with loop at screen but I am able to disable as input disable but filed description is still there.

Please suggest me.

Thanks.

Edited by: Sandeep Garg on Mar 20, 2009 7:42 PM

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
355

Try this way:



PARAMETERS: p_test  TYPE flag USER-COMMAND chk1,
            p_matnr TYPE mara-matnr.

INITIALIZATION.
  %_p_matnr_%_app_% = 'Material number'.
  %_p_test_%_app_% = 'Test'.

AT SELECTION-SCREEN OUTPUT.
  IF p_test = 'X'.
    LOOP AT SCREEN.
      IF screen-name = 'P_MATNR'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    %_p_matnr_%_app_% = ' '.
  else.
    %_p_matnr_%_app_% = 'Material number'.
  ENDIF.

In this test program, when you select the Test check box, it would make the material field disable and remove the description "Material number" .

Regards,

Naimesh Patel

Hi,

I have to display some fileds at slection screen. But based on some condition I have to display fields.

I mean to say that based on condition the filed description and value input should be enabled and based on condition oth should be disabled.

Example. P_MATNR like MARA-MATNR.

Filed desc- Material Number

Now on some condition Material should not be displayed and it should not be input enabled.

I tried with loop at screen but I am able to disable as input disable but filed description is still there.

Please suggest me.

Thanks.

Edited by: Sandeep Garg on Mar 20, 2009 7:42 PM

1 REPLY 1
Read only

naimesh_patel
Active Contributor
0 Likes
356

Try this way:



PARAMETERS: p_test  TYPE flag USER-COMMAND chk1,
            p_matnr TYPE mara-matnr.

INITIALIZATION.
  %_p_matnr_%_app_% = 'Material number'.
  %_p_test_%_app_% = 'Test'.

AT SELECTION-SCREEN OUTPUT.
  IF p_test = 'X'.
    LOOP AT SCREEN.
      IF screen-name = 'P_MATNR'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    %_p_matnr_%_app_% = ' '.
  else.
    %_p_matnr_%_app_% = 'Material number'.
  ENDIF.

In this test program, when you select the Test check box, it would make the material field disable and remove the description "Material number" .

Regards,

Naimesh Patel