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
726

Hi Forums,

Can this FM be used to simulate functionality of T-CODE f-02?

I am currently using it for FB50 and it works well, I was wondering if I can still use it for this transaction as well?

thanks!

6 REPLIES 6
Read only

Former Member
0 Likes
684

Hi ,

You can try these for F-02,

BAPI_ACC_GL_POSTING_POST

BAPI_ACC_DOCUMENT_POST

Thanks & Regrads,

Satish

Read only

0 Likes
684

YES i did it for F-02 postings

regards

Read only

0 Likes
684

thanks to both of you did it determine the posting keys based on dollar amounts as well?

Edited by: keith warnock on Jul 23, 2009 9:44 PM

Read only

0 Likes
684

This message was moderated.

Read only

Former Member
0 Likes
684

YES i did it for F-02 postings

regards

Read only

Former Member
0 Likes
684

g_docheader-obj_type = 'BKPFF'.

g_docheader-obj_key = '1'.

g_docheader-obj_sys = 'B3TCLNT800'.

g_docheader-username = sy-uname.

g_docheader-header_txt = 'BAPI test'.

g_docheader-comp_code = '1000'.

g_docheader-doc_date = sy-datum.

APPEND g_amount TO gi_amount.

*----


  • LINE ITEMS

*----


  • Item 1

g_accountgl-itemno_acc = '0000000001'.

g_accountgl-gl_account = '0000192600'.

g_accountgl-pstng_date = sy-datum.

APPEND g_accountgl TO gi_accountgl.

  • Item 2

g_accountgl-itemno_acc = '0000000002'.

g_accountgl-gl_account = '0000192600'.

g_accountgl-pstng_date = sy-datum.

APPEND g_accountgl TO gi_accountgl.

*----


  • CURRENCY AND AMOUNT

*----


  • Item 1

g_amount-itemno_acc = '0000000001'.

g_amount-currency = 'EUR'.

g_amount-amt_doccur = 5000.

APPEND g_amount TO gi_amount.

  • Item 2

g_amount-itemno_acc = '0000000002'.

g_amount-currency = 'EUR'.

g_amount-amt_doccur = -5000.

APPEND g_amount TO gi_amount.

END-OF-SELECTION.

  • Call the BAPI function

CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'

EXPORTING

documentheader = g_docheader

  • IMPORTING

  • OBJ_TYPE =

  • OBJ_KEY =

  • OBJ_SYS =

TABLES

accountgl = gi_accountgl

currencyamount = gi_amount

return = gi_return

  • EXTENSION1 =

.

LOOP AT gi_return INTO g_return.

WRITE: / g_return-message.

ENDLOOP.