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

Extending BAPI BAPI_ACC_DOCUMENT_POST to include posting key

Former Member
0 Likes
2,727

Hi,

I want to extend the standard BAPI to include posting key which is not available. Please help me in this. Helpful answers will be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,475

Bob,

I understood that you need to extend the standard BAPI. I have also done the same thing recently. You can create a BTE to extend the BAPI.

Here I am providing the steps to create a BTE. ( one I used for my requirement)

To create Business Transaction Event, please follow the guideline below.

Step 1: Go to TCode "FIBF".

Step 2: Go to Settings -> Products -> ... of a customer

Step 3: Create a new entry and check the box to activate the product

Step 4: Create a new function module based on the sample(SAMPLE_INTERFACE_RWBAPI01) given by SAP.

Step 5: Go to Settings -> Process Modules -> ... of a customer

Step 6: Create a new entry by specifying the name of the function module name and product name created earlier.

Once the Function Module (FM) is created, You will have to code inside that FM.

Inside that FM, code like this:

IF NOT extension IS INITIAL.

LOOP AT extension.

READ TABLE it_accit WITH KEY posnr = extension(3).

IF sy-subrc IS INITIAL.

it_accit-bschl = extension+3(2).

MODIFY it_accit INDEX sy-tabix.

ENDIF.

ENDLOOP.

ENDIF.

Please ask if you have any questions. Hope you got some idea. Please rewards if it is helpful.

Edited by: dossgs on Jun 29, 2010 12:20 PM

3 REPLIES 3
Read only

Former Member
0 Likes
1,476

Bob,

I understood that you need to extend the standard BAPI. I have also done the same thing recently. You can create a BTE to extend the BAPI.

Here I am providing the steps to create a BTE. ( one I used for my requirement)

To create Business Transaction Event, please follow the guideline below.

Step 1: Go to TCode "FIBF".

Step 2: Go to Settings -> Products -> ... of a customer

Step 3: Create a new entry and check the box to activate the product

Step 4: Create a new function module based on the sample(SAMPLE_INTERFACE_RWBAPI01) given by SAP.

Step 5: Go to Settings -> Process Modules -> ... of a customer

Step 6: Create a new entry by specifying the name of the function module name and product name created earlier.

Once the Function Module (FM) is created, You will have to code inside that FM.

Inside that FM, code like this:

IF NOT extension IS INITIAL.

LOOP AT extension.

READ TABLE it_accit WITH KEY posnr = extension(3).

IF sy-subrc IS INITIAL.

it_accit-bschl = extension+3(2).

MODIFY it_accit INDEX sy-tabix.

ENDIF.

ENDLOOP.

ENDIF.

Please ask if you have any questions. Hope you got some idea. Please rewards if it is helpful.

Edited by: dossgs on Jun 29, 2010 12:20 PM

Read only

0 Likes
1,475

Hi dossgs, Thanks for your immediate reply. I will try this approach.

Read only

Former Member
0 Likes
1,475

Hello,

I have a similar requirement to extend the standard Bapi to fill ACCIT_PA, ACCCR_PA fields (COPA characteristics and values); I have searched for a similar BTE, but didn't found.

Have you ever dealt with this issue?

Thanks in advance,

Massimo