2012 Jun 07 10:47 AM
Dear all,
When I made posting document using 'BAPI_ACC_DOCUMENT_POST', WBS element is incorrect for only withholding tax lines like the below figure.
Actually, wbs should be A/D02 & B/D02 respectively.
Your reply would be great help for me.
The coding using for posting document is:
CLEAR IT_ACCOUNTGL1.
IT_ACCOUNTGL1-ITEMNO_ACC = CN.
IT_ACCOUNTGL1-GL_ACCOUNT = GT_100-KSTAR.
IT_ACCOUNTGL1-WBS_ELEMENT = GT_100-RECV_POSID.
IT_ACCOUNTGL1-COSTCENTER = GT_100-KOSTL.
IT_ACCOUNTGL1-BUS_AREA = GT_100-GSBER.
APPEND IT_ACCOUNTGL1.
CLEAR IT_CURRENCYAMOUNT1.
IT_CURRENCYAMOUNT1-ITEMNO_ACC = CN.
IT_CURRENCYAMOUNT1-CURR_TYPE = '00'.
IT_CURRENCYAMOUNT1-CURRENCY = GT_100-OWAER.
IT_CURRENCYAMOUNT1-AMT_DOCCUR = LV_AMT.
APPEND IT_CURRENCYAMOUNT1.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
DOCUMENTHEADER = GD_DOCUMENTHEADER
TABLES
ACCOUNTGL = IT_ACCOUNTGL1
CURRENCYAMOUNT = IT_CURRENCYAMOUNT1
RETURN = IT_RETURN.
In the table IT_RETURN, shows the information that changed wbs element.
| 2 | W | KI | 188 | T/D01-A-2100000 WBS belong to business area 9100 not 9200 | 0 | WBS | T/D01-A-2100000 | 9100 | 9200 | |
| 3 | I | KI | 163 | Business area 9200 changed to 9100 | 0 | 9200 | 9100 |
Thanks advance.
Regards,
Thi Tra
2012 Jun 07 12:24 PM
Hi
Please check that the corresponding PROFIT CENTER are posted correctly or not.
WBS_ELEMENT could come from PROFIT CENTER.
Regards,
ManuB
2012 Jun 07 12:24 PM
Hi
Please check that the corresponding PROFIT CENTER are posted correctly or not.
WBS_ELEMENT could come from PROFIT CENTER.
Regards,
ManuB
2012 Jun 08 3:02 AM
Dear ManuB,
The business area,profit center & cost center are changed automatically when wbs_element T/D01-2100000 is changed in posting document.(like the attached picture in original post)
Thanks for your reply.
Regards,
Thi Tra
2012 Jun 12 4:44 AM
Dear ManuB,
The above inconsistencies is caused by the substitution enhancement in our system. Thus, I made changes in it. After that, it works well & my problem also solved.
Thanks you.
Regards,
Tra.