Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_ACC_DOCUMENT_POST -

Adi_Bathineni
Participant
0 Likes
3,603

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.

6 REPLIES 6
Read only

Former Member
0 Likes
2,309

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

Read only

Former Member
0 Likes
2,309

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

Read only

Adi_Bathineni
Participant
0 Likes
2,309

used a BADI to resolve the problem and need to use the extension structures of BAPI

Read only

0 Likes
2,309

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

Read only

0 Likes
2,309

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


Read only

0 Likes
2,309

Hello Adinarayana,

Can you please help with your solution. We have a same requirement.

Thanks in Advance.