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 'BAPI_ACC_GL_POSTING_POST'

Former Member
0 Likes
788

hi all.

I want to run the 'FB01' thru a report whose input data will inserted from an external file. BDC wud be the last option , I want to do it using BAPI.

I have tried it thru BAPI 'BAPI_ACC_GL_POSTING_POST' but in that case no document no is generated and nothing gets updated in BKPF table even using 'BAPI_TRANSACTION_COMMIT'.

While using the BAPI_ACC_DOCUMENT_POST what shud i use the object type when i use BSEG it says BSEG is undefined.

Pl help what to do???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
668

Why not use POSTING_INTERFACE* - it generates the code for you so you donthave to create the BDC session yourself and avoid problems associated withcost centres/transaction types etc

Edited by: Chaitanya Raju on Feb 27, 2008 6:07 AM

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
668

hi Mukesh,

try with BKPFF

hope this helps

ec

Read only

Former Member
0 Likes
669

Why not use POSTING_INTERFACE* - it generates the code for you so you donthave to create the BDC session yourself and avoid problems associated withcost centres/transaction types etc

Edited by: Chaitanya Raju on Feb 27, 2008 6:07 AM

Read only

Former Member
0 Likes
668

Just use BDC (Session or Call transaction) you may have solved your problem by now or if you have trouble with screen flow use SXDB.

Jeffrey Satriadi

Read only

Former Member
0 Likes
668

hi

hope this code will help you,.

Pls reward if help.

BAPI_ACC_GL_POSTING_CHECK

CALL FUNCTION 'BAPI_ACC_GL_POSTING_CHECK'

EXPORTING

documentheader = w_documentheader

TABLES

accountgl = it_accountgl

currencyamount = it_currencyamount

return = it_return.

Populate the corresponding tables with the data you have.

For the Date do convert it.

PERFORM convert_date USING it_header-bldat

CHANGING w_documentheader-doc_date.

w_documentheader-comp_code = 'z998'

w_documentheader-doc_type = 'SA'

"and fill the respective tables this way .

<b>

BAPI_ACC_GL_POSTING_POST

</b>

call function 'BAPI_ACC_GL_POSTING_POST'

exporting

documentheader = doc_header

IMPORTING

OBJ_TYPE = l_objtype

  • OBJ_KEY =

  • OBJ_SYS =

tables

accountgl = t_accountgl

currencyamount = t_curramt

return = t_return

  • EXTENSION1 =

.

Read only

0 Likes
668

Thanks for sending the list to sdn@sap.com.

Unfortunately for you, one of your colleagues got there first and sent a very similar list with your name on it.

So, we cannot add you to the witness protection program.

Sorry...

Julius