‎2007 Feb 13 9:03 AM
Hi all,
I am trying to post GR on ASSET through BAPI.
It was throughing error that GL was not a reconcile account.
But when go through FB01 with the same GL it is working fine.
Could anybody give me some suggestions.
Thanks in advance.
Message was edited by:
KDeepak
Message was edited by:
KDeepak
‎2007 Feb 13 9:09 AM
Goto FS00. Put the account number.
Press enter.
Goto tab Create/bank/interest. Click on checkbox Reconn. acct. ready for input.
Goto tab Control data. Put account type as Asset.
Save this.
Your problem will be solved.
Regards,
Navin
‎2007 Feb 13 9:16 AM
Hi Navin,
Actually I am creating the ASSET. For the created ASSET iam posting accounting document.
So my GL will be ASSET and offset GL will be the normal GL.
Here i am facing 2 errors.
1st is when i tried with reconcile account iam getting error that asset number not found in chart of accounts.
2nd is we have offset account for thst it is giving the account is not recocile account.
If you have any sample code on this can have it.
Thanks once again,
Deepak.
‎2007 Feb 13 9:25 AM
Deepak
u have to pass complete length of g/l account , like this
G/L = 32506
then u have to pass this data to bapi
<b>g/l = 0000032506</b>
regards
prabhu
‎2007 Feb 13 9:32 AM
Hi,
Here's how it is in F-02. My first line item is to credit from a clearing account using psting key 50 and then debit into an asset account with posting key 70 using transaction type 100.
The two tables that I am maintaining are ACCOUNTGL and CURRENCYAMOUNT. I make the BAPI determine the posting key and whether it's debit or credit by:
For the above i am getting the error that GL is not a reconcile account.
For the 1st line item i am passing GL as ASSET number which i am creating.
2nd line item i will be passing the GL which is offset for the above line item.
Please suggest some thing.
*********************************************
on change of it_polin-recpid.
write it_po-budat to date yymmdd.
clear jv_po. "
line_item = 0.
clear v_bktxt.
concatenate it_polin-recpid it_polin-bukrs
it_po-budat(04) into v_bktxt.
Header Data " Sending comp code
it_hdr-comp_code = it_polin-bukrs.
it_hdr-doc_date = it_po-budat.
it_hdr-pstng_date = sy-datum.
it_hdr-doc_type = v_blart.
it_hdr-ref_doc_no = it_polin-recpid.
it_hdr-BUS_ACT = 'RFBU'.
it_hdr-USERNAME = sy-uname.
it_hdr-header_txt = v_bktxt.
append it_hdr.
move: it_polin-recpid to jv_po-mblnr,
it_polin-bukrs to jv_po-bukrs,
it_polin-ebeln to jv_po-ebeln,
it_amr-anln1 to jv_po-anln1.
endon.
line_item = line_item + 1.
if not it_sactno-aufnr is initial.
clear: v_sgtxt.
concatenate it_sactno-recpid '/' it_sactno-rclno into v_sgtxt.
First Item
Account number
it_gl-itemno_acc = line_item.
it_gl-gl_account = it_amr-anln1+2(10)."asset#
it_gl-ASSET_NO = it_amr-anln1.
it_gl-item_text = v_sgtxt.
it_gl-COSTCENTER = it_sactno-kostl.
it_gl-ACCT_TYPE = 'A'.
it_gl-COMP_CODE = it_polin-bukrs.
it_gl-BUS_AREA = ekkn_it-gsber.
it_gl-PSTNG_DATE = sy-datum.
it_gl-fis_period = v_monat.
it_gl-fisc_year = v_gjahr.
it_gl-tax_code = podoc_it-mwskz.
it_gl-acct_key = 'ANL'.
it_gl-CS_TRANS_T = '120'.
append it_gl.
Set amount
it_curr-itemno_acc = line_item.
it_curr-currency = it_polin-waers.
it_curr-amt_doccur = it_polin-wrbtr.
append it_curr.
**********Balancing the line item amnt
clear it_gl.
line_item = line_item + 1.
it_gl-itemno_acc = line_item.
it_gl-gl_account = '0000020010'. "credit
it_gl-item_text = v_sgtxt.
it_gl-COSTCENTER = it_sactno-kostl.
it_gl-ACCT_TYPE = 'A'.
it_gl-COMP_CODE = it_polin-bukrs.
it_gl-BUS_AREA = ekkn_it-gsber.
it_gl-PSTNG_DATE = sy-datum.
it_gl-fis_period = v_monat.
it_gl-fisc_year = v_gjahr.
it_gl-tax_code = podoc_it-mwskz.
it_gl-acct_key = 'ANL'.
it_gl-CS_TRANS_T = '120'.
append it_gl.
Set amount
clear it_curr.
it_curr-itemno_acc = line_item.
it_curr-currency = it_polin-waers.
it_curr-amt_doccur = it_polin-wrbtr.
it_curr-amt_doccur = it_curr-amt_doccur * -1.
append it_curr.
endif.
if it_sactno-aufnr = space.
clear: v_sgtxt.
concatenate it_polin-recpid '/' it_polin-rclno into v_sgtxt.
First Item
Account number
it_gl-itemno_acc = line_item.
it_gl-gl_account = it_sactno-genlg.
it_gl-item_text = v_sgtxt.
it_gl-COSTCENTER = it_sactno-kostl.
it_gl-ACCT_TYPE = 'S'.
it_gl-COMP_CODE = it_polin-bukrs.
it_gl-BUS_AREA = ekkn_it-gsber.
it_gl-PSTNG_DATE = sy-datum.
it_gl-fis_period = v_monat.
it_gl-fisc_year = v_gjahr.
it_gl-tax_code = podoc_it-mwskz.
it_gl-acct_key = 'A00'.
append it_gl.
Set amount
it_curr-itemno_acc = line_item.
it_curr-currency = it_polin-waers.
it_curr-amt_doccur = it_polin-wrbtr.
append it_curr.
**********Balancing the line item amnt
clear it_gl.
line_item = line_item + 1.
it_gl-itemno_acc = line_item.
it_gl-gl_account = '0000020010'. "credit
it_gl-item_text = v_sgtxt.
it_gl-COSTCENTER = it_sactno-kostl.
it_gl-ACCT_TYPE = 'S'.
it_gl-COMP_CODE = it_polin-bukrs.
it_gl-BUS_AREA = ekkn_it-gsber.
it_gl-PSTNG_DATE = sy-datum.
it_gl-fis_period = v_monat.
it_gl-fisc_year = v_gjahr.
it_gl-tax_code = podoc_it-mwskz.
it_gl-acct_key = 'A00'.
append it_gl.
Set amount
clear it_curr.
it_curr-itemno_acc = line_item.
it_curr-currency = it_polin-waers.
it_curr-amt_doccur = it_polin-wrbtr.
it_curr-amt_doccur = it_curr-amt_doccur * -1.
append it_curr.
endif.
at end of recpid.
refresh t_result. clear t_result.
call function 'BAPI_ACC_DOCUMENT_CHECK'
exporting
documentheader = it_hdr
tables
accountgl = it_gl
ACCOUNTPAYABLE = act_pay
currencyamount = it_curr
return = t_result.
loop at t_result where ( type = 'E' or
type = 'A' ).
exit.
endloop.
if sy-subrc <> 0.
refresh t_result.
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
documentheader = it_hdr
tables
accountgl = it_gl
ACCOUNTPAYABLE = act_pay
currencyamount = it_curr
return = t_result.
*
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
*********************************************
Thanks once again,
Deepak.
Message was edited by:
KDeepak
‎2007 Feb 13 10:01 AM
Hi deepak,
The problem seems to be with the sign of the amount (i.e posting key) and GL account mismatch.
just interchange the GL accounts while passing to credits and Assets in ur program...
Lets see....
‎2007 Feb 13 10:36 AM
Hi Arun,
I interchanged GL and ASSET while passing to BAPI but i got the same error.
One more thing, that right now iam using posting key as 70 and 75. when i post through tranx i think they are 70 and 50.
But in table T030B i dont find that 70 and 50 combination.
Thanks,
Deepak.
Message was edited by:
KDeepak
‎2007 Feb 13 12:00 PM
Hi,
Now i got new error.
That is I was passing ASSET to GL in BAPI.
Now it is giving that 'number is not defined in chart of accounts'.
Any suggestions please..
Thanks,
Deepak.
‎2007 Feb 13 2:16 PM
HI,
Try to simulate the same values manually to F-02 and check the results.
I think the posting keys are not maintained or the G/L account no. is invalid.
Regards
Subramanian
‎2007 Feb 13 2:25 PM
Hi,
I tried through TRANX:ABZON and it worked fine.
But i dont have option to use the posting key 70 and 50.
I have only 70 and 75.
Is there any option to post JV via BAPI on ASSET.
Thanks,
Deepak.