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

FM or BAPI for Tcode: FAGLSKF

Former Member
0 Likes
1,541

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,108

Try these FMs

FAGL_COEJRA_UPDATE

FAGL_COEPR_UPDATE

FAGL_STATKEYFIG_CALC_FI

FAGL_FAGLSKF_PN_POST

FAGL_FAGLSKF_POST

4 REPLIES 4
Read only

Former Member
0 Likes
1,109

Try these FMs

FAGL_COEJRA_UPDATE

FAGL_COEPR_UPDATE

FAGL_STATKEYFIG_CALC_FI

FAGL_FAGLSKF_PN_POST

FAGL_FAGLSKF_POST

Read only

0 Likes
1,108

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!

Read only

0 Likes
1,108

Hello Please let me know you resolution for the thread.....

Thanks ..

Read only

0 Likes
1,108

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.