‎2009 Jul 23 7:58 PM
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!
‎2009 Jul 23 8:34 PM
Hi ,
You can try these for F-02,
BAPI_ACC_GL_POSTING_POST
BAPI_ACC_DOCUMENT_POST
Thanks & Regrads,
Satish
‎2009 Jul 23 8:44 PM
‎2009 Jul 23 8:44 PM
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
‎2009 Jul 28 10:31 PM
‎2009 Jul 23 8:44 PM
‎2009 Jul 28 10:52 PM
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.