Hi
Could someone please assist me. I would like to change certain things on the line of the Finance document when being created.
I'm writing code in a user exit, the enhancement is F180A001, I have then used the exit program ZXF48U01.
I have written the below code, goes through and changes the values but the FI document when created does not have the changes. Can someone please let me know what I'm doing wrong?
LOOP AT RELATION_TAB INTO I_RELATION.
READ TABLE DOC_HEAD_TAB INTO I_DOC_HEAD with key
BUKRS = I_RELATION-BUKRS
BELNR = I_RELATION-BELNR.
.
LOOP AT DOC_ITEM_TAB INTO I_DOC_ITEM
WHERE BUKRS = I_RELATION-BUKRS
AND BELNR = I_RELATION-BELNR
AND GJAHR = I_RELATION-GJAHR.
if I_DOC_ITEM-HKONT = '0000681030'.
I_DOC_ITEM-KOSTL = '1000ZA'.
I_DOC_ITEM-PRCTR = '2000ZA'.
I_DOC_ITEM-SGTXT = 'Text Changed'.
MODIFY RELATION_TAB FROM I_RELATION.
ENDIF.
ENDLOOP.
ENDLOOP.
Thanks in advance 😉