Hi guru,
My select statement failing for some materials due to the left outer join syntax.where is probleam when compare with giving data in BDCP2 table with proving value tabname = 'MARA' OR 'MARC' or 'DMKAL', then getting no values other than its coming...How can I modify the below select to resolve the issue???
Please help me.
SELECT bdcp2~CDOBJID "Material
bdcp2~CRETIME "DATE & TIME
bdcp2~TABKEY "KEY
bdcp2~CDCHGID "Change ID "DMT-616_2++
MARC~WERKS "PLANT
MARC~BESKZ "Procurement Type
MARC~SOBSL "Special Procurement
MARC~STAWN "Commodity Code
MAKT~MAKTX "Description
MARA~MTART "Material Type
MARA~MEINS "UOM
MARA~EXTWG "External material group
INTO TABLE I_bdcp2
FROM bdcp2 "Change pointer
LEFT OUTER JOIN MARA ON bdcp2CDOBJID = MARAMATNR
LEFT OUTER JOIN MAKT ON bdcp2CDOBJID = MAKTMATNR
LEFT OUTER JOIN MARC ON bdcp2CDOBJID = MARCMATNR
WHERE ( TABNAME = 'MARC' OR TABNAME = 'MARA' OR TABNAME = 'DMKAL')"P04-0270 - 1283 added DMKAL
AND FLDNAME = 'KEY' "DMT-1116_1--
AND CRETIME >= WF_CREATE_TIME_FROM
AND CRETIME <= WF_CREATE_TIME_TO
AND CDOBJCL = 'MATERIAL'
AND CDCHGID = 'I'. "DMT-1116--
AND ( ( FLDNAME = 'KEY' AND CDCHGID = 'I' ) "DMT-1116_1++
OR CDCHGID = 'U' ).
hi ,
what you want to do using table bdcp2
don't join bdcp2 table with other tables such as mara , makt , marc
which are related to material master , plant and material Description details
Instead use inner join for marc,mara,makt
and then use that internal table .
REgards
Deepak.
Hi Subhasis,
The CDOBJID fld of BDCP2 is of 90 char length and matnr fld of MARA, MARC, MAKT are of 18 char length. Sp joining is not possible.
U just collect the matnr from BDCP2 ... then use it for the joining from MARA,MARC,MAKT.
Regards,
Amitava
Moderator message: please do not use SMS speak.
Edited by: Thomas Zloch on Sep 30, 2010 12:38 PM
Add a comment