2005 Mar 30 12:01 PM
Hi,
in SQ02 I want to select all materials from MARA that do NOT exist in MCHB. I know how to code it simply in abap (probably not the most efficeint:
.
.
.
select * from mara into wa_mara.
select single matnr from mchb into wa_mchb-matnr where matnr = wa_mara-matnr.
if sy-subrc ne 0.
append wa_mara to imara.
endif.
endselect.
)
but where do I put code like this in SQ02 and how do I tell the tool that the only materials that should be used are the ones in imara?
Thanks,
Aidan.
2005 Mar 30 12:15 PM
Hi,
1)Data Source is direct read of table Mara
2)
you've to place the follow. code in
SQ02-Goto-Code-Record processing:
select count( * ) from mchb into sy-dbcnt
where matnr = mara-matnr.
check sy-dbcnt = 0.regards Andreas
Hi,
in SQ02 I want to select all materials from MARA that do NOT exist in MCHB. I know how to code it simply in abap (probably not the most efficeint:
.
.
.
select * from mara into wa_mara.
select single matnr from mchb into wa_mchb-matnr where matnr = wa_mara-matnr.
if sy-subrc ne 0.
append wa_mara to imara.
endif.
endselect.
)
but where do I put code like this in SQ02 and how do I tell the tool that the only materials that should be used are the ones in imara?
Thanks,
Aidan.
2005 Mar 30 12:15 PM
Hi,
1)Data Source is direct read of table Mara
2)
you've to place the follow. code in
SQ02-Goto-Code-Record processing:
select count( * ) from mchb into sy-dbcnt
where matnr = mara-matnr.
check sy-dbcnt = 0.regards Andreas
2005 Mar 30 1:56 PM
Andreas,
thanks....looks like that did it. Never used SAP Query before.
Aidan.