2007 Sep 17 9:35 AM
Hi all, I want to use BAPI_ACC_GL_POSTING_POST to do posting in F-02. And if I want to using posting key '31', how can I give the parameters? This is my code:
it_item-itemno_acc = '10'.
UNPACK '21210100' TO it_item-gl_account.
UNPACK p_lifnr TO it_item-vendor_no.
it_item-vendor_no = p_lifnr.
UNPACK p_lifnr TO it_item-alloc_nmbr.
it_item-comp_code = 'ZB09'.
it_item-costcenter = costcenter.
it_item-ref_key_3 = 'XXX'.
it_item-pstng_date = sy-datum.
it_item-doc_type = 'SA'.
it_item-fisc_year = sy-datum+0(4).
it_item-fis_period = sy-datum+4(2).
APPEND it_item.
There is an error message: Accout 21210100 in company code ZB09 cannot be directly posted to. What should I do?
2007 Sep 17 9:46 AM
Hi
Please check something for transaction F-44 for clearing vendor items...
Please check BAPI_ACC_DOCUMENT_POST and also use the correct document type...
Regards,
Arun
Yeah, thanks!
I think it it related to GL Account Configuration, but the Consultant think there is someting wrong with the program:(, so I don't know how the resolve the issue.
2007 Sep 17 9:46 AM
Hi
Please check something for transaction F-44 for clearing vendor items...
Please check BAPI_ACC_DOCUMENT_POST and also use the correct document type...
Regards,
Arun
2007 Sep 17 9:54 AM
2007 Sep 17 9:57 AM
yeah.. i guess... because reconciliation accounts cannot be directly posted to...
2007 Sep 17 10:11 AM
I have tried BAPI_ACC_DOCUMENT_POST, but it still said:
Accout 21210100 in company code ZB09 cannot be directly posted to.:(
2007 Sep 17 10:17 AM
Hi,
The error you have mentioned:
Accout 21210100 in company code ZB09 cannot be directly posted to.:(
Is related to GL Account Configuration. Talk to FI Consultant they will fix it.
And you can use any BAPI:
BAPI_ACC_DOCUMENT_POST
Or
BAPI_ACC_GL_POSTING_POST
If you are using BAPI then no need to pass the posting key. e.g. '31' etc. Based on Document type BAPI will automatically determine the Posting key.
Ashvender
2007 Sep 17 10:25 AM
Yeah, thanks!
I think it it related to GL Account Configuration, but the Consultant think there is someting wrong with the program:(, so I don't know how the resolve the issue.
2007 Sep 17 10:53 AM
Hi,
Try by passing the cost center to both the entries. Means debit entry as well as credit entry (Psoting key 31 & 40).
Ashvender
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |