‎2009 Sep 09 11:02 AM
Hi,
I have searched SDN and was unable to find any BAPI for posting into Tcode FAGLSKF.
When I decided that i need to go with BDC, unfortunately it is not a table container and a ALV container.
Let me know how to deal with it.
I have found some FM for this but doesnt do any validations and directly write into the table .
Regards
Krish
‎2009 Sep 09 11:08 AM
Try these FMs
FAGL_COEJRA_UPDATE
FAGL_COEPR_UPDATE
FAGL_STATKEYFIG_CALC_FI
FAGL_FAGLSKF_PN_POST
FAGL_FAGLSKF_POST
‎2009 Sep 09 11:08 AM
Try these FMs
FAGL_COEJRA_UPDATE
FAGL_COEPR_UPDATE
FAGL_STATKEYFIG_CALC_FI
FAGL_FAGLSKF_PN_POST
FAGL_FAGLSKF_POST
‎2009 Sep 09 11:22 AM
I have tried all these FM;s, they just update directly into the DB rather than doing any validations.
Please do let me know for any other alternatives!
‎2012 Feb 22 10:54 AM
Hello Please let me know you resolution for the thread.....
Thanks ..
‎2013 Oct 29 7:24 AM
Try 'BAPI_ACC_POST_STAT_KEYFIGURE'
Find Sample code for the same
DATA :
ls_doc_header TYPE bapifaglskf01,
ls_item_file_content TYPE zst_fi_upload_format,
lt_extension TYPE TABLE OF bapifaglskf03,
lt_doc_items TYPE TABLE OF bapifaglskf02,
ls_doc_items TYPE bapifaglskf02,
ls_return TYPE bapiret2.
********Form Document Header.
CLEAR ls_doc_header.
ls_doc_header-comp_code = iv_company_code.
ls_doc_header-date_from = iv_date_from.
ls_doc_header-date_to = iv_date_to.
ls_doc_header-version = '1'.
ls_doc_header-act_plan_indicator = '0'."Actual
* Form document Item
REFRESH lt_doc_items[].
LOOP AT it_item_file_content INTO ls_item_file_content.
ls_doc_items-statkeyfig = ls_item_file_content-stagr.
ls_doc_items-profit_ctr = ls_item_file_content-prctr.
ls_doc_items-quantity = ls_item_file_content-mbgbtr.
APPEND ls_doc_items TO lt_doc_items.
CLEAR ls_doc_items .
ENDLOOP.
**Call BAPI to creat the Document
CALL FUNCTION 'BAPI_ACC_POST_STAT_KEYFIGURE'
EXPORTING
documentheader = ls_doc_header
TABLES
linedata = lt_doc_items
extension1 = lt_extension
return = et_return.
CLEAR ls_return.
READ TABLE et_return INTO ls_return WITH KEY type = 'S'.
IF sy-subrc EQ 0.
ev_doc_no = ls_return-message_v1.
ENDIF.