Skip to Content
0
Jul 13, 2010 at 11:17 AM

How to pass the field XMWST to BAPI_ACC_DOCUMENT_POST

1366 Views

Hi,

I am uploading data using BAPI_ACC_DOCUMENT_POST to FB50 . I need to pass the check box Calculate Tax for calculating tax automatically . But i did not find any field XMWST in BAPI_ACC_DOCUMENT_POST.

I searched in SDN i found one thread

updating-bkpf-xmwst-calculate-tax

In this they said use BADI is ACC_DOCUMENT .

For that i created Local Memory in program like

CONSTANTS: LC_MEMID_1 TYPE CHAR30 .

using EXPORT i exported to memory id and imported in ACC_DOCUMENT using IMPORT and i change the c_accit .

Please see the below code .

CONSTANTS: LC_MEMID_1 TYPE CHAR30 VALUE 'ZI_FI_JNL_UPLOAD_925_CN_SUB'.

DATA: W_ACCIT LIKE LINE OF c_accit.

LOOP AT C_ACCIT INTO W_ACCIT.

IMPORT W_ACCIT-XMWST TO W_ACCIT-XMWST FROM MEMORY ID LC_MEMID_1.

MODIFY C_ACCIT FROM W_ACCIT TRANSPORTING XMWST.

CLEAR W_ACCIT.

ENDLOOP.

But badi is not triggering .

I see the note 487722 also i applied the same procedure but that is also not calculating tax automatically.

Regards

Srihari Nerella