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

Error while posting FB60 BDC in RFC Function Module

Former Member
0 Likes
974

Hi,

I have error (Dump) in the system, when posting data using RFC Function module.

The data is coming from Jco Connection, one RFC Function module is executing.

In that RFC Function Module, we are using BDC for posting the data in FB60.

The error is "ERROR_CNTL_INIT"

How I can solve this problem or post data for FB60 ?

Regards,

Sandeep

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
861

- Look at your Dump, are there any reference to a RFC back destination ?

- You could also replace the old BDC with a BAPI call (BAPI_ACC_DOCUMENT_POST or BAPI_INCOMINGINVOICE_CREATE)

Regards,

Raymond

Read only

0 Likes
861

Thanks Raymond,

The dump is in Method : Constructor of class : C_TEXTEDIT_CONTROL, when calling "Control_init" Function Module.

I am also trying to post data using BAPI_ACC_DOCUMENT_POST, but no success.

Can you please help me by giving some link or code for FB60 posting using this function module ?

Regards,

Sandeep

Read only

Read only

0 Likes
861

Hi Raymond,

Thanks for your reply, it is helpful, but when we are posting data for tax also, the entries are not found in table BSET.

What can be the reason ?

Help us in tax posting also in FB60 data.

Regards,

Sandeep

Read only

0 Likes
861

Hi,

For updating the tax data via BAPI_ACC_DOCUMENT_POST, use the below FM for calculating the tax.

  CALCULATE_TAX_FROM_GROSSAMOUNT

      CALL FUNCTION 'CALCULATE_TAX_FROM_GROSSAMOUNT'
      EXPORTING
        i_bukrs                    = us_gv_bukrs
        i_mwskz                  = us_gs_itab_mwskz
        i_waers                    = us_gv_currency
        i_wrbtr                     = lv_wrbtr
      TABLES
        t_mwdat                  = ch_lt_mwdat
      EXCEPTIONS
        bukrs_not_found         = 1
        country_not_found       = 2
        mwskz_not_defined       = 3
        mwskz_not_valid         = 4
        account_not_found       = 5
        different_discount_base = 6
        different_tax_base      = 7
        txjcd_not_valid         = 8
        not_found               = 9
        ktosl_not_found         = 10
        kalsm_not_found         = 11
        parameter_error         = 12
        knumh_not_found         = 13
        kschl_not_found         = 14
        unknown_error           = 15
        OTHERS                  = 16.
    IF sy-subrc <> 0.
* Implement suitable error handling here
    ENDIF.

Based on the tax classification recieved from the above FM you can populate the

currencyamount table.

Regards,

Rajesh Akarte