‎2008 Dec 18 8:42 PM
Hi guys,
I am using the BAPI "BAPI_ACC_DOCUMENT_POST". It was working fine until the field "Commitment Item" was changed to OBLIGATORY. I tried so many times to add it to the bapi, but it doesnt work, it gives me an error F5 808, Field Cmmt Item is a required field for G/L account 1000 22200406.
this is the estructure that i am using with this BAPI.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = ti_header
customercpd = ti_cus_ven2
CONTRACTHEADER =
IMPORTING
obj_type = obj_type2
obj_key = obj_key2
obj_sys = obj_sys2
TABLES
accountgl = ti_mayor
accountreceivable = ti_deudor
accountpayable = ti_acreedor
accounttax = ti_impto
currencyamount = ti_monto
criteria = ti_criterio
VALUEFIELD =
EXTENSION1 =
return = ti_mensaje
PAYMENTCARD =
CONTRACTITEM =
extension2 = ti_exten
REALESTATE =
accountwt = ti_imptowt.
i was able to add it in :
ti_mayor-cmmt_item = ti_datofi-fipos.
ti_mayor-CMMT_ITEM_LONG = ti_datofi-fipos.
but i couldnt find the way to add it at it_acreedor. So, probably that's why it doesnt work.
Please, give me some advice.
Where can i add that field to the bapi?? thanks
Regards
‎2008 Dec 19 1:47 PM
‎2008 Dec 18 8:46 PM
I don't think you need to add it to the vendor - just the GL items.
Rob
‎2008 Dec 18 10:05 PM
Hi Rob,
I added to the accountgl item, but it doesnt work.
Do u have any idea why? if i post a document by f-02 it askes me for the cmmt item twice, for example i do a mov. 40 and askes it and then the second mov. 31 and it askes me again, because it is an obligatory field. but in the bapi i added to the accountgl where just one mov is on it, so i thought that i must add it in another table.
is it correct?
Thanks in advice.
PD: Before, i didnt use the commy field and the bapi worked fine.
‎2008 Dec 19 1:47 PM
‎2008 Dec 19 1:54 PM
Hi Rob,
thanks for ur replies, but the problem was sth in customizing, so now it is working fine.
thanks, bye bye