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

0 Likes
850

Hello,

I am creating accounting document using BAPI 'BAPI_ACC_DOCUMENT_POST'.

This creates a record in BSEG table. I need to capture this BSEG record and save in another Z-table after BAPI has posted accounting document successfully.

I don't want to read BSEG table after Sy-Subrc = 0. I want to <b>avoid reading BSEG</b> table after BAPI post.

Is there any User exit, BADI or BTE which can return BSEG record <b>just after document is posted</b> <b>thru BAPI</b>? Please let me know. It is bit urgent.

Regards,

Umesh

3 REPLIES 3
Read only

Former Member
0 Likes
661

humm.

Can we know why you don't want to read BSEG, whereas you'll get the primary key after the BAPI post ?

Regards,

Erwan.

Read only

0 Likes
661

HI,

Program is posting thousands of documents. And reading BSEG after every BAPI call will affect performance of the program. Program is very slow currently.

Documets posted by this program are accessed by another program using select on BSEG. This second program is becoming slow day by day as BSEG is expanding. So instead of reading BSEG, second program will read Z-table (Structure same as that of BSEG) which is filled by first program.

Regards,

Umesh

Read only

0 Likes
661

Umesh,

I suggest you to take a look at the following extension : ACBAPI01 which is "Accounting: User Exit for Posting BAPI" ( T-code smod ) but I doubt...

Regards,

Erwan.