2008 May 19 7:03 AM
Hi friends
I have one internal table with material no.,i want o check wheather that data is there in standard table or not..
how to check..?
and after checking if that particular material is not there i have to move the data in other internal table..
plz give me one example also..
2008 May 19 7:08 AM
Hi,
Loop at itab1.
select single matnr into itab1-matnr
from mara
where matnr = itab1-matnr.
if sy-subrc ne 0
move itab1 to itab2.
append itab2.
endif.
endloop.
Cheers.
...Reward if useful.
For material MARA is the master table.
Check the table before selecting the data.
whether the material avilable or not?
tables : mara.
selection-screen begin................
parameter p_matnr like mara-matnr.
selection-screen end of..................
if p_matnr is not initial.
at selection-screen on p_matnr.
select single * from mara into mara where matnr = p_matnr.
if sy-subrc <> 0.
Raise the message.
endif.
endif.
Hope it will help you.
Regards,
Madan.
Edited by: Madan kurapati on May 19, 2008 11:36 AM
2008 May 19 7:05 AM
For material MARA is the master table.
Check the table before selecting the data.
whether the material avilable or not?
tables : mara.
selection-screen begin................
parameter p_matnr like mara-matnr.
selection-screen end of..................
if p_matnr is not initial.
at selection-screen on p_matnr.
select single * from mara into mara where matnr = p_matnr.
if sy-subrc <> 0.
Raise the message.
endif.
endif.
Hope it will help you.
Regards,
Madan.
Edited by: Madan kurapati on May 19, 2008 11:36 AM
2008 May 19 7:06 AM
Hi,
Loop at itab1.
select single matnr into itab1-matnr
from mara
where matnr = itab1-matnr.
if sy-subrc <> 0
move itab1 to itab2.
append itab2.
endif.
endloop.
Cheers.
...Reward if useful.
2008 May 19 7:08 AM
Hi,
Loop at itab1.
select single matnr into itab1-matnr
from mara
where matnr = itab1-matnr.
if sy-subrc ne 0
move itab1 to itab2.
append itab2.
endif.
endloop.
Cheers.
...Reward if useful.
2008 May 19 7:09 AM
hi,
after u select data from mara ,give condition as ,if itab1 is initial.message e000(zmsg).create 1 more itab and move data into it.
ex:itab2-matnr = itab1-matnr.append itab2.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |