Skip to Content
0
Former Member
Mar 18, 2009 at 12:31 PM

How to print the value if a condition is satisfied

16 Views

Hi,

Please suggest me how to print a text as 'Do not print' when a field in the selection screen is entered.

If in the selection screen (s_field1) we have entered a value as ZESM then the value filed of

wa_vbak-auart should check the the values in s_field1 then it should just print the text "'DO NOT PRINT''.

we have written the folowing code, but the condition is not working.

DATA: V_FIELD1 type z_field1. "(zdata element).

ranges: r_fIELD1 for v_field1.

SELECT-OPTIONS: S_field1 FOR v_field1 default 'ZESM'.

loop at s_field1.

r_field1-sign = 'I'.

r_field1-option = 'EQ'.

r_field1-low = s_field1-low.

append r_field1.

clear r_field1.

endloop.

if wa_vbak-auart in r_field1.

wa_final-v_text = 'DO NOT PRINT'

else.

wa_final-v_text = ' '.

endif.

Please suugest what can be done.

Thanks in advance