‎2011 Sep 19 8:48 AM
Hi Experts,
Hope all are doing greatu2026
I need you help to resolve the below issue.
We have on Z-Tcode to posting the document (FB01) using BAPI u2018BAPI_ACC_DOCUMENT_POST' and this program is successfully posted from the source file.
But the problem is, when we see the document (FB03) the field u2018TRANSACTION TYPEu2019 (COBL-RMVCT) not updated in second line item hence we are passing the value for u2018TRANSACTION TYPEu2019 (COBL-RMVCT) in source file.
I have checked the program in Debug mode and checked the BAPI structures before calling the BAPI and found that the field i_accountg-cs-trans_t is populated with value but it not updated in document.
Please help on this regards,
Thanks & Regards,
Amjad Hussain.
‎2011 Sep 19 9:15 AM
‎2011 Sep 19 10:40 AM
Hi Raymond
Thanks for your responce..
I just run t-code FB01 using test data, it seems it option filed. Please advise what we need to da if this field is optional.
Thanks in advance.
Amjad.
‎2011 Sep 19 10:19 AM
Hi
See SAP Note 487722 - Using EXTENSION1 for accounting BAPIs. You can use an extension for fields missing in the transfer structure. This note suggests you to use a BTE.
I hope this helps you
Regards
Eduardo
‎2011 Sep 20 9:51 AM
Hi Eduardo
Thanks for your responce..
Could you please explain me step-by-step, how to proceed to enhance code.
Thanks & Regards,
Amjad Hussain
‎2011 Sep 20 10:09 AM
Hi
The BAPI field should be BAPIACGL09-CS_TRANS_T, so you should set your value here (just as you'va said)
If thar value is not moved to accounting table you should check where that value is lost.
I don't think you need to use an enhancement, anyway if you want to try you can implement the BADI acc_document, methiod CHANGE in order to force a value in ACCIT-RMVCT
Max
‎2011 Sep 20 11:14 AM
Hi
You can use the BTE or the BADI as Max suggests you. I explain you how to do it with note 487722. If you don't know how to works BTE, see this [article|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7] by Lakshman Tandra.
I call the BAPI (with EXTENSIONIN) and I populate extensionin in a sample :
data: w_extension type bapiextc,.
w_extension(3) = '001'.
w_extension+3(10) = itab-sold_to.
append w_extension to t_extension.
after, create a project with enhancement ACBAPI01 and in EXIT_SAPLACC4_001 for the include ZXACCU15, write an ABAP code as this:
data: wa_extension type bapiextc,
lt_extencion type standard table of bapiextc.
if sy-cprog = 'Z*'
and sy-ucomm = 'ZYXI'. "set your filters
read table extension with key field1(3) = '001'.
if sy-subrc = 0.
move-corresponding extension to wa_extension.
endif.
read table t_accit with key posnr = wa_extension(3).
if sy-subrc = 0.
t_accit-filkd = wa_extension+3(10).
modify t_accit index sy-tabix.
endif.
endif.
In this case, I populate field FILKD because it isn't in the interface for the BAPI.
I hope this helps you
Regards
Eduardo