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 in FI- GL Upload using BAPI

Former Member
0 Likes
1,415

Hi,

I tried to upload FI- GL accounts  using BAPI  from execl sheet using FB50 transaction

  

  1. BAPI_ACC_GL_POSTING_POST
  2. BAPI_TRANSACTION_COMMIT

I am getting  error as like below

Error in document: BKPFF $ DEVCLNT300

FI/CO interface: Line item entered several times

Account 97130410 is not defined in chart of accounts 4004

Account 97130410 does not exist in chart of accounts 4004

Account 97130410 does not exist in chart of accounts 4004.

The above account number already exist in the chart of accounts .

Can anyone help me to solve the issue?

Thanks & Regards,

Priya.

10 REPLIES 10
Read only

venkateswarareddy_medam
Active Participant
0 Likes
1,303

Hi Priya,

Please took the same data and try to post directly in FB50.Then check the error's.If still you are getting any error contact your functional team memeber.

Regards,

Venkat.

Read only

0 Likes
1,303

Hi,

Thanks for the response.

I  have  Psoted the same data manually in FB50.

It is working manually. Please help me to solve the issue.

Regards,

Priya.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,303

Some hints :

FI/CO interface: Line item entered several times

Did you increment field ITEMNO_ACC in table parameter ACCOUNTGL.

Account 97130410 is not defined in chart of accounts 4004

Did you fill the field GL_ACCOUNT in internal format (with leading zeroes).

Regards,

Raymond

Read only

0 Likes
1,303

Hi,

FI/CO interface: Line item entered several times -  for this  i have given the hard coded number as like below

gs_data-itemno_acc = '0000000001'.

i have given the code as like this for GL - account

"Document Header Details

    document_header-username = sy-uname.
    document_header-comp_code = gs_itgl-bukrs.

    WRITE gs_itgl-bldat TO lv_date.
    document_header-doc_date = lv_date.

    CLEAR: lv_date.
    WRITE gs_itgl-budat TO lv_date.
    document_header-pstng_date = lv_date.
    document_header-fisc_year = sy-datum+0(4).
    document_header-fis_period = sy-datum+4(2).
    document_header-doc_type = 'SA'.

    "Document Item details

    gs_data-itemno_acc = '0000000001'.
    gs_data-gl_account = gs_itgl-hkont.
    gs_data-comp_code = gs_itgl-bukrs.

    CLEAR: lv_date.
    lv_date = gs_itgl-budat.
    gs_data-pstng_date = lv_date.

    gs_data-doc_type = 'SA'.
    "gs_data-AC_DOC_NO
    gs_data-fisc_year = sy-datum+0(4).
    gs_data-fis_period = sy-datum+4(2).
    gs_data-stat_con = gs_itgl-shkzg.
    gs_data-item_text = gs_itgl-sgtxt.
    gs_data-costcenter = gs_itgl-kostl.
    APPEND gs_data to gt_data.

Regards,

Priya

Read only

0 Likes
1,303

gs_data-itemno_acc = '0000000001'.

Use a variable NUMC length 10, and increment each time you add a new item

(Use the same value for ACCOUNTGL and CURRENCYAMOUNT records.)

Regards,

Raymond

Read only

0 Likes
1,303

Hi,

Thanks , now i didn't ge the below error

FI/CO interface: Line item entered several times

but still i am getting other erros.

Please help me to solve the same too.

Read only

0 Likes
1,303

You already have the answer - make sure that field  gs_itgl-hkont is defined with the correct conversion exit so that it is padded with leading zeroes.

Declare it like BAPIACGL08-GL_ACCOUNT should be all you need.

Rob

Read only

0 Likes
1,303

Hi,

Thank you very much. it is solved now.

now i didn't get any error.

but after complets this BABI  , i used  BAPI_TRANSACTION_COMMIT , this BABI to commit work .

But now, i didn't get any error message, but the data is not updated in table.

this is my code which i used for

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

   WAIT          = 'X'

   IMPORTING

     return        = gs_return.

  WRITE: / 'BAPI call worked!!'.

  WRITE: / document_header-obj_key, ' posted'.

ENDIF.

Please help me to solve the same.

Regards,

Priya.

Read only

0 Likes
1,303

- Does BAPI_TRANSACTION_COMMIT returns an error (it can if WAIT set)

- Are there errors in SM13

Regards,

Raymond

Read only

0 Likes
1,303

Hi,

BABI didn't return any error.

I checked in SM13 , it shows  "O records updated ".

Regards,

Priya.