2007 Oct 03 5:06 AM
Hello Experts,
I want to write bdc program for fb01. to do recording , when i am entering vallues i am getting error as 'in company code 1000 the number 16 is missing in the year 2007' irrespective of the document type. what should i do?
2007 Oct 03 5:12 AM
Hi,
Do not write a BDC on FB01. Instead use BAPI
'BAPI_ACC_GL_POSTING_POST' OR BAPI_ACC_DOCUMENT_POST'.
Regards,
Atish
Hello Experts,
I want to write bdc program for fb01. to do recording , when i am entering vallues i am getting error as 'in company code 1000 the number 16 is missing in the year 2007' irrespective of the document type. what should i do?
2007 Oct 03 5:12 AM
Hi,
Do not write a BDC on FB01. Instead use BAPI
'BAPI_ACC_GL_POSTING_POST' OR BAPI_ACC_DOCUMENT_POST'.
Regards,
Atish
2007 Oct 03 7:02 AM
may be there is some problem in code...try to run it in A mode and see the fieild in which error is coming..
its better to use BAPI for this purpose.
MOVE sy-uname TO wa_export_header-username.
MOVE c_header_txt TO wa_export_header-header_txt.
MOVE wa_unbilled-company_code TO wa_export_header-comp_code.
"MOVE WA_UNBILLED-ACC_YEAR TO WA_EXPORT_HEADER-FISC_YEAR. "--Might be uncommented
MOVE wa_unbilled-document_date TO wa_export_header-doc_date.
MOVE wa_unbilled-posting_date TO wa_export_header-pstng_date.
MOVE wa_unbilled-period TO wa_export_header-fis_period.
"MOVE wa_unbilled-document_type TO wa_export_header-doc_type.
MOVE c_doctype_value TO wa_export_header-doc_type.
Filtering data (empty spaces into Zeros)
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_unbilled-account1
IMPORTING
output = wa_unbilled-account1.
_____________________________________________________________________________
_____________________________________________________________________________
ACCOUNT GL - (DEBIT)
MOVE c_itemno_dr TO wa_bapi_accountgl-itemno_acc.
MOVE wa_unbilled-company_code TO wa_bapi_accountgl-comp_code.
MOVE wa_unbilled-posting_date TO wa_bapi_accountgl-pstng_date.
MOVE wa_unbilled-account1 TO wa_bapi_accountgl-gl_account.
"MOVE wa_unbilled-document_type TO wa_bapi_accountgl-doc_type.
MOVE c_doctype_value TO wa_bapi_accountgl-doc_type.
MOVE wa_unbilled-text1 TO wa_bapi_accountgl-item_text.
" MOVE wa_unbilled-cost_center_1 TO wa_bapi_accountgl-costcenter.
APPEND wa_bapi_accountgl TO t_bapi_accountgl.
Filtering data (empty spaces into Zeros)
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_unbilled-account2
IMPORTING
output = wa_unbilled-account2.
ACCOUNT GL - (CREDIT)
MOVE c_itemno_cr TO wa_bapi_accountgl-itemno_acc.
MOVE wa_unbilled-company_code TO wa_bapi_accountgl-comp_code.
MOVE wa_unbilled-posting_date TO wa_bapi_accountgl-pstng_date.
MOVE wa_unbilled-account2 TO wa_bapi_accountgl-gl_account.
MOVE wa_unbilled-text2 TO wa_bapi_accountgl-item_text.
"MOVE wa_unbilled-cost_center_2 TO wa_bapi_accountgl-costcenter.
APPEND wa_bapi_accountgl TO t_bapi_accountgl.
_____________________________________________________________________________
_____________________________________________________________________________
CURRENCY - (DEBIT)
MOVE c_itemno_dr TO wa_bapi_currency-itemno_acc.
MOVE wa_unbilled-curr_code TO wa_bapi_currency-currency.
MOVE wa_unbilled-amt_curr_doc1 TO wa_bapi_currency-amt_doccur.
APPEND wa_bapi_currency TO t_bapi_currency.
CURRENCY - (CREDIT)
MOVE c_itemno_cr TO wa_bapi_currency-itemno_acc.
MOVE wa_unbilled-curr_code TO wa_bapi_currency-currency.
"Conversion from positive into negative for credit
wa_bapi_currency-amt_doccur = ( wa_unbilled-amt_curr_doc2 * -1 ). APPEND wa_bapi_currency TO t_bapi_currency.
_____________________________________________________________________________
_____________________________________________________________________________
Calling function module bapi and passing data.
CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'
EXPORTING
documentheader = wa_export_header
TABLES
accountgl = t_bapi_accountgl
currencyamount = t_bapi_currency
return = t_bapi_return.
Calling function module bapi for commit.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
2007 Oct 03 10:04 AM
Dear Maaka,
Kindly go through the code in the following link.
http://www.erpgenie.com/abap/bdc_and_idoc_status.htm
Regards,
Abir
***************************************
Don't forget to Reward Points *
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |