2007 Aug 16 8:49 PM
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
2007 Aug 16 8:55 PM
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
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
2007 Aug 16 8:55 PM
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
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |