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 FB65

Former Member
0 Likes
1,518

Dear All,

I am Facing A Problem When I am Trying To Post A Document Through FB65 Transaction Following Error Has Been Occured Please Help Me Out Of This..Below Is My Code And Error

       READ TABLE it_final INTO wa_final INDEX 1.

*      wa_header-bus_act        =   'RMRP'.

       wa_header-bus_act        =   'RFBU'.

       wa_header-comp_code      = wa_final-bukrs.

       wa_header-doc_date       =   wa_final-bldat.

       wa_header-pstng_date     =   wa_final-budat.

       wa_header-ref_doc_no     =   wa_final-dnumber.

       wa_header-header_txt     =   'Debit Note Auto Post'.

       wa_header-username       =   sy-uname.

       wa_header-obj_type = 'BKPFF'.

       CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'

         IMPORTING

           own_logical_system             = wa_header-obj_sys

         EXCEPTIONS

           own_logical_system_not_defined = 1

           OTHERS                         = 2.

       IF sy-subrc <> 0.

* Implement suitable error handling here

       ENDIF.

       wa_header-obj_key = '$'.

       LOOP AT it_final INTO wa_final WHERE dnumber = wa_final-dnumber.

         CONCATENATE wa_final-refbn 'Debit' INTO wa_gl-item_text SEPARATED BY '-'.

         wa_gl-gl_account         =        wa_final-gkont.

         wa_gl-bus_area           =        wa_final-gsber.

         wa_gl-plant              =        wa_final-werks.

         wa_gl-vendor_no          =        wa_final-lifnr.

         wa_gl-orderid            =        wa_final-aufnr.

         wa_gl-quantity           =        wa_final-mbgbtr.

         wa_gl-material           =        wa_final-matnr.

         wa_gl-base_uom           =        wa_final-meinb.

         wa_gl-comp_code          =        wa_final-bukrs.

         APPEND wa_gl   TO     it_gl.

         CLEAR: wa_gl.

         lv_amount  lv_amount + wa_final-wkgbtr.

         wa_payable-pymt_amt      =        wa_final-wkgbtr.

         wa_payable-comp_code     =        wa_final-bukrs.

         wa_payable-vendor_no     =        wa_final-lifnr.

         wa_payable-pymt_cur      =        'INR'.

         APPEND wa_payable TO it_payable.

         CLEAR: wa_payable.

         wa_amount-amt_doccur     =    lv_amount.

         wa_amount-currency       =    'INR'.

         wa_amount-curr_type      =    '10'.

         APPEND wa_amount TO it_amount.

         CLEAR:wa_amount.

       ENDLOOP.

       CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

         EXPORTING

           documentheader    = wa_header

*         CUSTOMERCPD       =

*         CONTRACTHEADER    =

         IMPORTING

           obj_type          = wa_header-obj_type

           obj_key           = wa_header-obj_key

           obj_sys           = wa_header-obj_sys

         TABLES

           accountgl         = it_gl

*         ACCOUNTRECEIVABLE =

           accountpayable    = it_payable

*         ACCOUNTTAX        =

           currencyamount    = it_amount

*         CRITERIA          =

*         VALUEFIELD        =

*         EXTENSION1        =

           return            = it_return

*         PAYMENTCARD       =

*         CONTRACTITEM      =

*         EXTENSION2        =

*         REALESTATE        =

*         ACCOUNTWT         =

         .

ERW609Error in document: BKPFF $ NCDCLNT120
ERW014FI/CO interface: Line item entered several times
1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,404

Hi,

It seems you are not passing Item Number in any of the table (GL, PAYABLE or amount).

Please pass the same and it should work fine.

Hope this helps.

10 REPLIES 10
Read only

Former Member
0 Likes
1,405

Hi,

It seems you are not passing Item Number in any of the table (GL, PAYABLE or amount).

Please pass the same and it should work fine.

Hope this helps.

Read only

0 Likes
1,404

Dear Sir,

Thank You For The Replay Well I am Trying To Do That But The Same error Has Been Occurred Again. Could You Please Help Me Out

Thanks & Regards,

uday..,

Read only

0 Likes
1,404

Hi,

Please post your code snippet again where you are passing Item number.

Read only

0 Likes
1,404

Dear Sir,

I Pass The Line Item In Gl Internal Table Like

wa_gl-itemno_acc         =        '0000000001'


Though It Is Not Working.


Regards,


uday..,

Read only

0 Likes
1,404

Hi,

Are you passing the item no in payable table as well , also in amount table too.

wa_gl-itemno_acc = '000010'.

wa_payable-itemno_acc = 000020'.

wa_amount-itemno_acc = '000010'

wa_amount-amt_doccur = 100. " amount for GL

wa_amount-itemno_acc = '000020'.

wa_amount-amt_doccur = -100 . " Amount for payable.

Hope this helps.

Read only

0 Likes
1,404

Hi Sir,

Thank You For The Replay Below Is The Modification Which I Made As You Said again It Is Not Allowing Me To Do Posting

READ TABLE it_final INTO wa_final INDEX 1."""""""""""''header details

       wa_header-obj_type = 'BKPFF'.

       wa_header-obj_key = '$'.

       CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'

         IMPORTING

           own_logical_system             = wa_header-obj_sys

         EXCEPTIONS

           own_logical_system_not_defined = 1

           OTHERS                         = 2.

       IF sy-subrc <> 0.

* Implement suitable error handling here

       ENDIF.

      wa_header-bus_act        =   'RFBU'.

      wa_header-comp_code      =   wa_final-bukrs.

      wa_header-username       =   sy-uname.

      wa_header-header_txt     =   'Debit Note Auto Post'.

      wa_header-doc_date       =   wa_final-bldat.

      wa_header-pstng_date     =   wa_final-budat.

      wa_header-ref_doc_no     =   wa_final-dnumber.

       LOOP AT it_final INTO wa_final WHERE dnumber = wa_final-dnumber.

         rlv_counter = rlv_counter + 1.

         wa_payable-itemno_acc     =       '0000000001'."rlv_counter.

         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

           EXPORTING

             input         = wa_final-lifnr

          IMPORTING

            OUTPUT        = wa_final-lifnr.

         wa_payable-vendor_no     =        wa_final-lifnr.

         wa_payable-pymt_amt      =        wa_final-famount.

         wa_payable-comp_code     =        wa_final-bukrs.

         wa_payable-pymt_cur      =        'INR'.

         APPEND wa_payable TO it_payable.

         wa_gl-itemno_acc         =        '0000000002'."rlv_counter.

         wa_gl-gl_account         =        wa_final-gkont.

         wa_gl-item_text          =        'GL Text'.

         wa_gl-bus_area           =        wa_final-gsber.

         wa_gl-plant              =        wa_final-werks.

         wa_gl-orderid            =        wa_final-aufnr.

         wa_gl-quantity           =        wa_final-mbgbtr.

         wa_gl-material           =        wa_final-matnr.

         wa_gl-base_uom           =        wa_final-meinb.

         CONCATENATE wa_final-refbn 'Debit' INTO wa_gl-item_text SEPARATED BY '-'.

         APPEND wa_gl   TO     it_gl.

         CLEAR: wa_gl.

         lv_amount  wa_final-famount * -1.

         wa_amount-itemno_acc     =    '0000000001'.

         wa_amount-amt_doccur     =    wa_final-famount.

         wa_amount-currency       =    'INR'.

         wa_amount-curr_type      =    '10'.

         APPEND wa_amount TO it_amount.

         CLEAR:wa_amount.

         wa_amount-itemno_acc     =    '0000000002'.

         wa_amount-amt_doccur     =    lv_amount .

         wa_amount-currency       =    'INR'.

         wa_amount-curr_type      =    '10'.

         APPEND wa_amount TO it_amount.

         CLEAR:wa_amount,wa_gl,wa_payable.

       ENDLOOP.

      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

         EXPORTING

           documentheader    = wa_header

         IMPORTING

           obj_type          = wa_header-obj_type

           obj_key           = wa_header-obj_key

           obj_sys           = wa_header-obj_sys

         TABLES

           accountgl         = it_gl

           accountpayable    = it_payable

           currencyamount    = it_amount

           return            = it_return.


Error:   

ERW609Error in document: BKPFF $ NCDCLNT120
ESG105Enter rate  / INR rate type M for 11.04.2013 in the system settings

Regards,

uday..,

Read only

0 Likes
1,404

FOr this you can consult your functional person.

seems like table TCURR is not maintained for the said date and currency type.

Hope this helps.

Read only

0 Likes
1,404

Hi Sir,

Issue Has Been Fixed  Thank You

Regards,

uday..,

Read only

0 Likes
1,404

Hi,

If it is so, please mark the correct answer and close the thread.

.

Regards,

Gaurav

Read only

andrea_previati
Contributor
0 Likes
1,404

Hi

check the OBJ_key in your BAPI_ACC_DOCUMENT_POST