2011 Sep 06 8:27 AM
Dear Guru's,
I have a problem when using BAPI_INCOMINGINVOICE_CREATE, I have a requirement that I can create IR and adding tax, freight etc. through GL Account.
Because this is standard PO, I left blank field serial number in ACCOUNTINGDATA it comes with and error return message
"Account assignment 00 for purchasing document does not exist"
So I try to fill the GLACCOUNTDATA table but always have a short dump
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught in
procedure "CO_FILL" "(FORM)", nor was it propagated by a RAISING clause.
The call to the function module "FUNC_AREA_CONVERSION_INBOUND" is incorrect:
The function module interface allows you to specify only
fields of a particular type under "I_FUNC_AREA".
The field "S_GLACCOUNTDATA-FUNC_AREA" specified here is a different
field type
.
Is there any notes that I can apply to solve this problem, or are there other solutions for the requirement.
Thanks in advance
AT
2011 Sep 06 8:43 AM
Hi Allan,
Wecome to scn.Are you able to create it manually.
Regards,
Madhu.
2011 Sep 06 8:51 AM
Hi,
Yes we can create manually through MIRO transaction
Regards,
AT
2011 Sep 06 9:30 AM
Hi Allan,
You've rightly considered that Accounting Data being standard PO data, it should automatically flow. Once Account Assignment is done in PR, it gets automatically reflected in the PO as well as the Invoice. You need not pass it.
About the Account Assignment error, I suppose you need to verify your Line Item data in correspondence to your Schedule Line Item Data. If that is in sync., your BAPI will work successfully.
If still there is an element of doubt, then, please post your code for reference.
Regards,
Pranav.
2011 Sep 06 9:42 AM
Hi,
Please check the source and target strcure having same type or not?
Regards,
Nagaraj
2011 Sep 06 10:02 AM
Hi,
If i understand correctly, you need to pass item no and serial no also.
like,
AccountingData table
1st line: Change account assignment data
INVOICE_DOC_ITEM (Document item in invoice document): 0001
SERIAL_NO (Serial number for the accont assignment): 01
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 30
GL_ACCOUNT (G/L account number): 890000
COSTCENTER (Cost center): 1200
check documentation of FM BAPI_INCOMINGINVOICE_CREATE for further understanding..
Regards,
Ravi.
2011 Sep 06 10:23 AM
Thanks for all the prompt input
It appears that the short dump is caused because of modification of the bapi structure.
It's solved now many thanks
Regards,
AT
2011 Sep 06 10:25 AM
2012 Jan 13 7:27 PM
Hi Allan,
I am getting an error when calling this BAPI. The error is CX_SY_DYN_CALL_ILLEGAL_TYPE.
In the function module interface, you can specify only
fields of a specific type and length under "HEADERDATA".
Although the currently specified field
"IT_HEADERDATA" is the correct type, its length is incorrect.
I know I have populated the IT_HEADERDATA correctly, as far as I know. May I know how you resolved your error? I am hoping your solution could help me with my issue.
Thank you in advance.
Hoops
Edited by: Hoops on Jan 14, 2012 3:27 AM
2014 Jun 18 1:44 PM