2006 Feb 08 10:21 PM
hello ..people
i am using the badi AC_DOCUMENT, Method CHANGE_INITIAL and i want to read parameter IM_DOCUMENT.
i have ready to entry code in method only want to know...what code i need for to read an object ?
i need to read ITEM and ITEM_AMOUNTS.
greetigs ... Ramiro
hello ..people
i am using the badi AC_DOCUMENT, Method CHANGE_INITIAL and i want to read parameter IM_DOCUMENT.
i have ready to entry code in method only want to know...what code i need for to read an object ?
i need to read ITEM and ITEM_AMOUNTS.
greetigs ... Ramiro
2006 Feb 08 11:50 PM
Implement this code in CHANGE_INITIAL.
DATA: t_items TYPE accit_t,
wa_item TYPE accit,
t_amounts TYPE acccr_t,
wa_amount TYPE acccr.
t_items = im_document-item.
t_amounts = im_document-item_amounts.
LOOP AT i_items INTO wa_item.
...
...
ENDLOOP.
LOOP AT t_amounts INTO wa_amount.
...
...
ENDLOOP.
Connect the two tables (items & item_amounts) using the following fields:
AWTYP
AWREF
AWORG
POSNR
2006 Sep 13 1:39 PM
Hello Sam,
Your sample code for CHANGE_INITIAL is very helpful for me.
I am now on developing "Change Accounting Document" using interface name "IF_EX_AC_DOCUMENT" for call-up point 3 level substitution.
Unfortunately it isn't working after I implemented below code.
method IF_EX_AC_DOCUMENT~CHANGE_AFTER_CHECK.
data: t_items type accit_t,
wa_item type accit,
t_amounts type acccr_t,
wa_amount type acccr,
ex_item type ACCIT_SUB_T,
wo_item type ACCIT_SUB.
t_items = im_document-item.
t_amounts = im_document-item_amounts.
loop at t_items into wa_item.
wa_item-xref3 = 'test'.
endloop.
ex_item = ex_document-item.
loop at ex_document-item into wo_item.
wo_item-xref3 = 'test'.
modify ex_document-item from wo_item.
endloop.
endmethod.
Where is the problem in above source code?
Please help me.
Best regards,
JK.Kim
2010 May 14 5:18 PM
Hello JinKoo,
Its a very old thread, but: did you solve your issue?
I got similar problem trying to change KOSTL in a Parked FI document, so, It seems that this BAdI is not suitable for document changes.
Regards,
José Gabriel.
2006 Feb 09 12:19 AM
thanks ..SAM ..
it`s correct your code ...
i was try with the next code:
FIELD-SYMBOLS: <ITEM> TYPE ANY,
<ITEM_AMOUNTS> TYPE ANY.
DATA: a_im_document-item type acc_document-item,
a_im_document-item_amounts type acc_document-item_amounts.
a_im_document-item = im_document-item.
a_im_document-item_amounts = im_document-item_amounts.
read table a_im_document-item assigning <ITEM>
index 1.
.....
read table a_im_document-item_amounts
assigning<ITEM_AMOUNTS> index 1.
......
greetings
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |