Skip to Content

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

Validation

Hi Guys,

I have a condition where I need to check each of record in my it_item table with field "ID No." against the material no. in MARA, and if I found any entry in mara with same Id no. then I have to execute an write statement" Material" otherwise I have to execute a write statement" Not a material"

Thanks

Rajeev Gupta

Tags:
Former Member
Former Member replied

Hi Rajeev,

LOOP AT it_item.

SELECT single matnr from mara where matnr = it_itam-id_no .

IF sy-subrc = 0.

WRITE 'Material'.

ELSE.

WRITE 'Not a material'.

ENDIF.

ENDLOOP.

Regards,

Atish

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