‎2009 Jan 06 7:43 PM
Hi Guru's,
I'm using the following BAPI for the Customer/Vendor Uploads (AR & AP).
BAPI_ACC_DOCUMENT_POST
Using this BAPI i want to update the following fields of the BSEG Table.
BSEG-DMBTR - Amount in Local Currency.
BSEG-DMBE2 - Amount in 2nd Local Currency
BSEG-DMBE3 - Amount in 3rd Local Currency
I'm not able to find the those fileds in the BAPI -Currency Items structure (BAPIACCR09).
Please suggest me how to update those fileds using the above BAPI.
If it is not possible what is the alternative procedure to update those fields.
Thanks in advance.
Adi.
‎2009 Jan 07 9:25 AM
Hi,
Try using the function module 'POSTING_INTERFACE_DOCUMENT'.
You'll find a structure called FTTAX, which has all the 3 fields for tax amount in local currency, that you have mentioned.
Before using this FM, use the function module 'POSTING_INTERFACE_START', in which you need to pass all the session related information like session name, lock indicator etc.
The FM 'POSTING_INTERFACE_DOCUMENT' will create a batch input session for transactions FB01 or FBB1.
Data for the session should be passed to the table T_FTPOS.
FTPOS-STYPE ---> indicator for header or line item data
FTPOS-FNAM ---> BDC field name
FTPOS-FVAL ---> Data
Regards,
Raj
‎2009 Jan 07 10:24 AM
Hi Adi,
The field AMT_DOCCUR in structure (BAPIACCR09) refers to amount in document currency.So map the BSEG-WRBTR value to this field and post the document.
Once u posted the document the below amounts will be calculated automatically.
BSEG-DMBTR
BSEG-DMBE2
BSEG-DMBE3
Regards,
Savitha
‎2010 Dec 23 2:41 PM
used a BADI to resolve the problem and need to use the extension structures of BAPI
‎2013 Aug 19 6:14 PM
Hi Bathineni,
I'm trying to apply the BADI, but in structure ACCIT there is no DMBE2 did you expanded the standard ACCIT structure for this requirement?
Kind regards,
César
‎2013 Aug 20 2:58 PM
Hi Bathineni,
No need for BADI, this values are calculates automatically by the BAPI.
In the Currency table you just have to pass CURR_TY = 00 document currency and CURR_TY = 40 strong currency with their amount for each record.
For example:
gs_currencyamount-currency = gs_bkpf-waers.
gs_currencyamount-curr_type = '00'.
gs_currencyamount-amt_doccur = gs_bseg-wrbtr.
gs_currencyamount-amt_base = gs_bseg-wrbtr.
APPEND gs_currencyamount TO gt_currencyamount.
gs_currencyamount-currency = gs_bkpf-hwae2.
gs_currencyamount-curr_type = '40'.
gs_currencyamount-amt_doccur = gs_bseg-dmbe2.
gs_currencyamount-amt_base = gs_bseg-dmbe2.
APPEND gs_currencyamount TO gt_currencyamount.
Kind Regards,
César
‎2016 Apr 11 10:25 PM
Hello Adinarayana,
Can you please help with your solution. We have a same requirement.
Thanks in Advance.