‎2007 Dec 27 8:04 PM
Hi,
I'm using BAPI_ACC_GL_POSTING_POST and I need to update PERNR in BSEG.
As far as I can see I have to use extension2 for this job. Don't know if there is a BADI involved as well.
Can anyone help me with some sample code and explanation of how to do this.
Thanks!
Best Regards,
Vibeke
‎2007 Dec 27 10:00 PM
Hi ,
Try to write the code in this type of format.
I think this may help you.
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 =
Thanks & Regards,
Ravi Kanth Yechuri.
‎2007 Dec 27 10:22 PM
Hi Ravi,
Thanks, but I know how to fill and call the BAPI as it is.
My question is how to use the extension, so I can update BSEG-PERNR. This field is not in any of the predefined structures for the BAPI.
Regards,
Vibeke