Application Development 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: 

BAPI_ACC_DOCUMENT_CHECK - Error in accessing function module: FM_COM_ITEM_READ paramters: 1000

Former Member
0 Kudos

Hello all

i am getting error Error in accessing function module: FM_COM_ITEM_READ paramters: 1000

while using FM - BAPI_ACC_DOCUMENT_CHECK FOR SIMULATON MODE

1000 HERE IS PLANT AND I AM PASSING ATTACHED EXCEL

BELOW IS THE CODE , PLEASE HELP ME IDENTIFYING THE ISSUE AND WHAT CAN I DO TO CORRECT IT

HEADER DATA - BAPI

FORM fill_header_data . CLEAR: g_cnt, g_bukrs. g_bukrs = wa_filedata-bukrs. wa_bapiache09-doc_date = wa_filedata-bldat. "Document date TRANSLATE wa_filedata-blart TO UPPER CASE. wa_bapiache09-doc_type = wa_filedata-blart. "Document type wa_bapiache09-comp_code = wa_filedata-bukrs. "Company Code wa_bapiache09-pstng_date = wa_filedata-budat. "Posting date wa_bapiache09-header_txt = wa_filedata-bktxt. "Document header text wa_bapiache09-bus_act = 'RFBU'. "Business Object wa_bapiache09-ref_doc_no = wa_filedata-xblnr. wa_bapiache09-username = sy-uname. "User name wa_bapiache09-trans_date = wa_filedata-budat. wa_bapiache09-fis_period = wa_filedata-monat. *...Period determination. IF NOT wa_filedata-budat IS INITIAL. CALL FUNCTION 'FI_PERIOD_DETERMINE' EXPORTING i_budat = wa_filedata-budat i_bukrs = wa_filedata-bukrs IMPORTING e_gjahr = wa_bapiache09-fisc_year. ENDIF. ENDFORM. " FILL_HEADER_DATA

ITEM DATA

1- GL DATA

FORM fill_gl_data . wa_bapiacgl09-itemno_acc = g_cnt. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_filedata-gl_acc IMPORTING output = wa_filedata-gl_acc. wa_bapiacgl09-gl_account = wa_filedata-gl_acc. wa_bapiacgl09-cmmt_item = '103110'. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_bapiacgl09-cmmt_item IMPORTING output = wa_bapiacgl09-cmmt_item. wa_bapiacgl09-costcenter = 'SDUM1'. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_bapiacgl09-costcenter IMPORTING output = wa_bapiacgl09-costcenter. wa_bapiacgl09-profit_ctr = 'SWDUM2'. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_bapiacgl09-profit_ctr IMPORTING output = wa_bapiacgl09-profit_ctr. wa_bapiacgl09-segment = 'APPOINTED'. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_bapiacgl09-segment IMPORTING output = wa_bapiacgl09-segment. *...Translate Document type to Upper case. TRANSLATE p_dtyp TO UPPER CASE. wa_bapiacgl09-doc_type = p_dtyp ." wa_filedata-blart. wa_bapiacgl09-comp_code = p_cmcd. "wa_filedata-bukrs. * wa_bapiacgl09-bus_area = 'RFBU'. CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL' EXPORTING date_external = p_pstdt * ACCEPT_INITIAL_DATE = IMPORTING date_internal = p_pstdt EXCEPTIONS date_external_is_invalid = 1 OTHERS = 2. IF sy-subrc <> 0. * Implement suitable error handling here ENDIF. wa_bapiacgl09-pstng_date = p_pstdt. " wa_filedata-budat. *...Period determination. TRANSLATE p_pstdt TO UPPER CASE. TRANSLATE p_cmcd TO UPPER CASE. IF NOT p_pstdt IS INITIAL. CALL FUNCTION 'FI_PERIOD_DETERMINE' EXPORTING i_budat = p_pstdt i_bukrs = p_cmcd "1000 IMPORTING e_gjahr = wa_bapiacgl09-fisc_year. ENDIF. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_bapiacgl09-fisc_year IMPORTING output = wa_bapiacgl09-fisc_year. ***to be confirmed wa_bapiacgl09-item_text = wa_filedata-cs_txt4. ***to be changed also wa_bapiacgl09-acct_type = 'S' . "wa_filedata-koart. wa_bapiacgl09-value_date = sy-datum. " assumption wa_bapiacgl09-tax_code = wa_filedata-vat_cd. wa_bapiacgl09-costcenter = wa_filedata-cs_ct. * wa_bapiacgl09-wbs_element = wa_filedata-wbs. " coomented out wbs * wa_bapiacgl09-orderid = wa_filedata-aufnr. * wa_bapiacgl09-trade_id = wa_filedata-vbund. * wa_bapiacgl09-quantity = wa_filedata-menge. * wa_bapiacgl09-base_uom = wa_filedata-uom. * wa_bapiacgl09-alloc_nmbr = wa_filedata-zuonr. ****to be confimred for fields SGTXT * wa_bapiacgl09-ref_key_1 = wa_filedata-xref1. * wa_bapiacgl09-ref_key_2 wa_filedata-xref2. * wa_bapiacgl09-ref_key_3 = wa_filedata-xref3. *...Convert Debit/Credit Indicator. wa_bapiacgl09-de_cre_ind = 'S'. " because it is GL * TRANSLATE wa_bapiacgl09-shkzg TO UPPER CASE. * IF wa_filedata-shkzg EQ 'S'. * wa_bapiacgl09-de_cre_ind = 'S'. * ELSEIF wa_filedata-shkzg EQ 'H'. * wa_bapiacgl09-de_cre_ind = 'H'. * ENDIF. APPEND wa_bapiacgl09 TO t_bapiacgl09. CLEAR wa_bapiacgl09 . ENDFORM. " FILL_GL_DATA

2- VENDOR DATA

FORM fill_vendor_data . wa_bapiacap09-itemno_acc = g_cnt. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_filedata-acc_no IMPORTING output = wa_filedata-acc_no. wa_bapiacap09-vendor_no = wa_filedata-acc_no. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_filedata-gl_acc IMPORTING output = wa_filedata-gl_acc. wa_bapiacap09-gl_account = wa_filedata-gl_acc. ""assumption wa_bapiacap09-comp_code = p_cmcd. "wa_filedata-bukrs. wa_bapiacap09-item_text = wa_filedata-cs_txt4. " remit text 3 wa_bapiacap09-tax_code = wa_filedata-vat_cd. wa_bapiacap09-profit_ctr = 'SWDUM2'. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_bapiacap09-profit_ctr IMPORTING output = wa_bapiacap09-profit_ctr. * wa_bapiacap09-alloc_nmbr = wa_filedata-zuonr. *****to be confimred **** ** wa_bapiacap09-ref_key_1 = wa_filedata-xref1. ** wa_bapiacap09-ref_key_2 = wa_filedata-xref2. ** wa_bapiacap09-ref_key_3 = wa_filedata-xref3. **** **********changes included by Deepak on 23.06.2009 ECDK907586 start*********** *** wa_bapiacap09-pmnttrms = wa_filedata-zterm. " Changes required as part of stack upgrade **********changes included by Deepak on 23.06.2009 ECDK907586 end************* APPEND wa_bapiacap09 TO t_bapiacap09. CLEAR wa_bapiacap09. ENDFORM. " FILL_VENDOR_DATA

Please help me correct the code and write values which i need to pass to BAPI structure

3 REPLIES 3

Lakshmipathi
Active Contributor
0 Kudos

Carry out the required customizing as recommended in OSS note 332685

0 Kudos

is it possible via code ?

0 Kudos

Did you go through the solution provided in the OSS note ? Is there any challenge in following that ? If so, you need to take it up with your client. I just shared based on the error message text and not sure, whether it will address your requirement.