Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Display text based on material number ranges

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.

issue 6.PNG (18801 B)
Tags:
replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question