‎2008 Jan 04 11:46 AM
hi all,
I have the data declared as per below:
DATA : BEGIN OF wa_dfkk.
INCLUDE STRUCTURE dfkkcrh.
DATA: datum LIKE dfkkcrp-datum,
bonit LIKE dfkkcrp-bonit,
END OF wa_dfkk.
and have the below query
SELECT SINGLE b~gpart
b~kjahr
b~bon01
b~bon02
b~bon03
b~bon04
b~bon05
b~bon06
b~bon07
b~bon08
b~bon09
b~bon10
b~bon11
b~bon12
b~bonma
b~bonvh
b~bmadt
b~lfdnr
b~bonfr
b~bfrdt
b~brldt
b~bnext
b~bexdt
b~bcmtf
a~datum
a~bonit
FROM dfkkcrp AS a
INNER JOIN dfkkcrh AS b
ON agpart = bgpart
AND akjahr = bkjahr
INTO CORRESPONDING FIELDS OF wa_dfkk
WHERE a~gpart EQ p_gpart
AND a~kjahr EQ p_kjahr
AND a~lfdnr EQ p_lfdnr.
the execution leads to dump for mismatch target fields.whereas the fields are in the same order in the declaration as well.
What can be the reason?Appreciate your inputs.
Regards,
Stock
‎2008 Jan 04 11:52 AM
hi,
try this
SELECT SINGLE b~gpart
b~kjahr
b~bon01
b~bon02
b~bon03
b~bon04
b~bon05
b~bon06
b~bon07
b~bon08
b~bon09
b~bon10
b~bon11
b~bon12
b~bonma
b~bonvh
b~bmadt
b~lfdnr
b~bonfr
b~bfrdt
b~brldt
b~bnext
b~bexdt
b~bcmtf
a~datum
a~bonit
FROM dfkkcrp AS a
INNER JOIN dfkkcrh AS b
ON agpart = bgpart
AND akjahr = bkjahr
wa_dfkk remove corresponding flds and select as in the same order as the work area
WHERE a~gpart EQ p_gpart
AND a~kjahr EQ p_kjahr
AND a~lfdnr EQ p_lfdnr.
this once happened 2 me..
‎2008 Jan 04 11:52 AM
hi,
try this
SELECT SINGLE b~gpart
b~kjahr
b~bon01
b~bon02
b~bon03
b~bon04
b~bon05
b~bon06
b~bon07
b~bon08
b~bon09
b~bon10
b~bon11
b~bon12
b~bonma
b~bonvh
b~bmadt
b~lfdnr
b~bonfr
b~bfrdt
b~brldt
b~bnext
b~bexdt
b~bcmtf
a~datum
a~bonit
FROM dfkkcrp AS a
INNER JOIN dfkkcrh AS b
ON agpart = bgpart
AND akjahr = bkjahr
wa_dfkk remove corresponding flds and select as in the same order as the work area
WHERE a~gpart EQ p_gpart
AND a~kjahr EQ p_kjahr
AND a~lfdnr EQ p_lfdnr.
this once happened 2 me..
‎2008 Jan 04 11:58 AM
hi
good
i think you r trying to join one structure with on database table.and that may be the reason it is going for dump
dfkkcrh is a structure
dfkkcrp is a database table i guess
FROM dfkkcrp AS a
INNER JOIN dfkkcrh AS b
ON agpart = bgpart
AND akjahr = bkjahr
INTO CORRESPONDING FIELDS OF wa_dfkk
WHERE a~gpart EQ p_gpart
AND a~kjahr EQ p_kjahr
AND a~lfdnr EQ p_lfdnr.
check this joining statement and do the correction.
thanks
mrutyun^
‎2008 Jan 04 12:00 PM
Hi Stock
I have Copied the Code which you have given and its working fine for me.. as in no Dump is generated. I have just added the Parameters declarations
PARAMETERS : p_gpart TYPE gpart,
p_kjahr TYPE kjahr,
p_lfdnr TYPE lfdnr.
Please check the data in the tables if possible. I see no problem with the declaration or the Query.
-
Santosh
‎2008 Jan 04 12:14 PM
hi Santosh,
you are right..
I double checked the query and the dump version is with INTO WA_DFKK statement and not the INTO CORRESPONDING fields of WA_DFKK statement as in the post. Sorry for that as i gave the working query.
Moreover unable to understand the dump behind INTO WA_DFKK as the field info and the order remains the same as per the declarartion and both DFKKCRP and DFKKCRH are transparent tables.
Can youpls check again in your codes.
Regards,
stock
‎2008 Jan 04 12:27 PM
Hi stock,
SELECT SINGLE b~gpart
b~kjahr
b~bon01
b~bon02
b~bon03
b~bon04
b~bon05
b~bon06
b~bon07
b~bon08
b~bon09
b~bon10
b~bon11
b~bon12
b~bonma
b~bonvh
b~bmadt
b~lfdnr
b~bonfr
b~bfrdt
b~brldt
b~bnext
b~bexdt
b~bcmtf
a~datum
a~bonit
FROM dfkkcrp AS a
INNER JOIN dfkkcrh AS b
ON agpart = bgpart
AND akjahr = bkjahr
INTO CORRESPONDING FIELDS OF wa_dfkk
WHERE a~gpart in p_gpart
AND a~kjahr in p_kjahr
AND a~lfdnr in p_lfdnr.
you have not given any select options if p_gpart is a select option the above one will be useful
Reward points if useful
thanks
swaroop