2015 Oct 13 11:01 AM
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 =
.
| E | RW | 609 | Error in document: BKPFF $ NCDCLNT120 |
| E | RW | 014 | FI/CO interface: Line item entered several times |
2015 Oct 13 11:19 AM
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.
2015 Oct 13 11:19 AM
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.
2015 Oct 13 11:39 AM
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..,
2015 Oct 13 11:48 AM
Hi,
Please post your code snippet again where you are passing Item number.
2015 Oct 13 11:53 AM
Dear Sir,
I Pass The Line Item In Gl Internal Table Like
wa_gl-itemno_acc = '0000000001'
Though It Is Not Working.
Regards,
uday..,
2015 Oct 13 12:46 PM
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.
2015 Oct 13 1:41 PM
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:
| E | RW | 609 | Error in document: BKPFF $ NCDCLNT120 |
| E | SG | 105 | Enter rate / INR rate type M for 11.04.2013 in the system settings |
Regards,
uday..,
2015 Oct 13 2:59 PM
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.
2015 Oct 14 5:56 AM
2015 Oct 14 6:25 AM
2015 Oct 13 11:38 AM