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_GL_POSTING_POST

Former Member
0 Likes
693

hai friends,

I need the help to solve my problem.

I have posting the Accounting document using this bapi.

BAPI_TRANSACTION_COMMIT is used to commit the work.

In the return parameter i am geting the message 'Document posted successfuly', but no new document is created in table bkpf.

Where i could see the Newly generated Document and which table it will effect.

5 REPLIES 5
Read only

Former Member
0 Likes
655

You need to check Table BKPF and BSEG to see if your document are created.

Read only

0 Likes
655

Did you perform a test sequence in se37 chaining the 2 BAPI's ?

Read only

Former Member
0 Likes
655

Thanks for ur information.

BAPI_ACC_GL_POSTING_POST.

I have executed the above Bapi funtion module with the following field values:

TABLES: bapiache08, bapiacgl08,bapiaccr08, bapiret2.

DATA: t_bapiache08 LIKE TABLE OF bapiache08 WITH HEADER LINE,

t_bapiacgl08 LIKE TABLE OF bapiacgl08 WITH HEADER LINE,

t_bapiaccr08 LIKE TABLE OF bapiaccr08 WITH HEADER LINE,

t_bapiret2 LIKE TABLE OF bapiret2 WITH HEADER LINE,

ct_bapiret2 LIKE TABLE OF bapiret2 WITH HEADER LINE.

t_bapiache08-obj_type = 'BKPFF'. "BKPFF

t_bapiache08-obj_key = '010000000000062005'.

t_bapiache08-obj_sys = 'T90CLNT800'. "T09CLNT800

t_bapiache08-username = 'SSI4'.

t_bapiache08-header_txt = 'DOCUMENT POSTING'.

t_bapiache08-comp_code = '1000'.

t_bapiache08-fisc_year = '2005'.

t_bapiache08-doc_date = '20050805'.

t_bapiache08-pstng_date = '20050805'.

t_bapiache08-fis_period = '07'.

t_bapiache08-doc_type = 'SA'.

t_bapiache08-compo_acc = 'FI'. "GL

APPEND t_bapiache08.

t_bapiacgl08-itemno_acc = '031'.

t_bapiacgl08-gl_account = '160000'.

t_bapiacgl08-comp_code = '1000'.

t_bapiacgl08-pstng_date = '20050805'.

t_bapiacgl08-doc_type = 'SA'.

t_bapiacgl08-fisc_year = '2005'.

t_bapiacgl08-fis_period = '07'.

t_bapiacgl08-stat_con = 'X'.

t_bapiacgl08-vendor_no = '1920'. "ACCOUNTING NO.FOR VENDOR/CREDITOR.

t_bapiacgl08-item_text = 'LINE ITEM TEXT BY VIN'.

APPEND t_bapiacgl08.

t_bapiaccr08-itemno_acc = '031'.

t_bapiaccr08-currency_iso = 'EUR'.

t_bapiaccr08-amt_doccur = '2000'.

APPEND t_bapiaccr08.

CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'

EXPORTING

documentheader = t_bapiache08

  • IMPORTING

  • OBJ_TYPE =

  • OBJ_KEY =

  • OBJ_SYS =

TABLES

accountgl = t_bapiacgl08

currencyamount = t_bapiaccr08

return = t_bapiret2

  • EXTENSION1 =

.

LOOP AT t_bapiret2.

WRITE 😕 t_bapiret2-type, t_bapiret2-id, t_bapiret2-number,

t_bapiret2-message,t_bapiret2-parameter,

t_bapiret2-row, t_bapiret2-field, t_bapiret2-system.

ENDLOOP.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = ' '

IMPORTING

return = ct_bapiret2.

LOOP AT ct_bapiret2.

WRITE 😕 ct_bapiret2-type, ct_bapiret2-id, ct_bapiret2-number,

ct_bapiret2-message,ct_bapiret2-log_no, ct_bapiret2-parameter,

ct_bapiret2-row, ct_bapiret2-field, ct_bapiret2-system.

ENDLOOP.

After execution i got the following ouput:

Document Posted Successfully: BKPFF 010000000000062005 T90CLNT800

0 T90CLNT800

But no new document found in BKPF and BSEG table. Is there any other table it will be created?

Or If there is other way.

Read only

0 Likes
655

Nope,Your entry must be in BKPF and BSEG.

Your error is here.

bapiache08-objtype = 'BKPFF'. "BKPFF

t_bapiache08-obj_key = '010000000000062005'.

t_bapiache08-obj_sys = 'T90CLNT800'. "T09CLNT800

You shouldn't fill those values.Leave them empty and try your Bapi.You must enter Document number(belnr) if Document type has an external numbering.

Read oss note 561175 for more information.

Read only

0 Likes
655

I got same error , please tell how you fixed .

Regards

Nagesh