Application Development 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: 

Display text based on material number ranges

sandeep_reddy24
Participant
0 Kudos

Dear All,

I have a requirement to display text in smart forms based on material numbers.

My material number range is like 100000, 200000,900000.

if MATNR is 100001 then text has to display.

If MATNR = 400000 then text should not display.

I tried with 3 different logics but its not working.

Please suggest me

loop at lt_ekpo into ls_ekpo.

1) if ls_ekpo-matnr between 000000000000100000 and 000000000000299999.

  ELSEIF ls_ekpo-matnr between 000000000000900000 and 000000000000999999.



2) if ls_ekpo-matnr <= '000000000000100000' and

   ls_ekpo-matnr > '000000000000300000'

   and ls_ekpo-matnr <= '000000000000900000' and

  ls_ekpo-matnr > '000000000001000000'.

c_flag = 'X'.
else.
   c_flag = ' '.
endif.

3) In smartforms, created a node Text -> conditions tab.

1 ACCEPTED SOLUTION

sandeep_reddy24
Participant
0 Kudos

issue solved.

if ls_ekpo-matnr between 000000000000100000 and 000000000000299999

or ls_ekpo-matnr between 000000000000900000 and 000000000000999999.

c_flag = 'X'.

else.

   c_flag = ' '.

endif.

1 REPLY 1

sandeep_reddy24
Participant
0 Kudos

issue solved.

if ls_ekpo-matnr between 000000000000100000 and 000000000000299999

or ls_ekpo-matnr between 000000000000900000 and 000000000000999999.

c_flag = 'X'.

else.

   c_flag = ' '.

endif.