2008 Aug 26 12:33 PM
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
2009 Mar 20 7:23 PM
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
2009 Mar 20 7:23 PM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |