The list of origins for asset transactions showed the bank account posted to during the down payment instead of the vendor as the origin of the down payments on assets under construction.
Key words: RAHERK01, AuC, down payment clearing, plausibility
Insufficient program.
SolutionPlease implement the following preliminary correction in program RAHERK01:
:
:
FORM HERKUNFT_ERMITTELN.
:
:
* FI-Beleg lesen.
CHECK L_FOUND EQ OFF.
SELECT * FROM BSEG INTO TABLE XBSEG
WHERE BUKRS EQ ANLAV-BUKRS
AND BELNR EQ ANEPV-BELNR
AND GJAHR EQ ANEPV-GJAHR
ORDER BY PRIMARY KEY.
* 1. Fall: Genau eine Gegenbuchungszeile.
IF SY-DBCNT EQ 2.
LOOP AT XBSEG
WHERE BUZEI NE ANEPV-BUZEI.
L_FOUND = ON.
EXIT.
ENDLOOP.
* 2. Fall: Mehrere Gegenbuchungszeilen.
ELSE.
* Buchungszeile die zum ANEPV gehört in *BSEG bereitstellen.
LOOP AT XBSEG
WHERE BUZEI EQ ANEPV-BUZEI.
MOVE XBSEG TO *BSEG.
EXIT.
ENDLOOP.
LOOP AT XBSEG <<< INSERT
WHERE KOART EQ 'K' <<< INSERT
AND NOT UMSKZ IS INITIAL <<< INSERT
AND ANLN1 EQ *BSEG-ANLN1 <<< INSERT
AND ANLN2 EQ *BSEG-ANLN2. <<< INSERT
POST-HKTYP = TEXT-T06. <<< INSERT
WRITE XBSEG-LIFNR TO POST-HKOBJ. <<< INSERT
L_FOUND = ON. <<< INSERT
ENDLOOP. <<< INSERT
CHECK L_FOUND EQ OFF. <<< INSERT
L_DMBTR_ANL = *BSEG-DMBTR + *BSEG-MWSTS.
:
:
ENDFORM.
:
:
No comments:
Post a Comment