Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_INCOMINGINVOICE_CREATE Short Dump

manukapur
Active Participant
0 Likes
1,116

Hello Experts,

I am trying to create a MIRO Document when saving the PO. I am using the BADI's ME_PURCHDOC_POSTED -POSTED interface to call the

standard BAPI BAPI_INCOMINGINVOICE_CREATE to create the Invoice for the same in Update Task.

When I am executing the BAPI with all the data populated into relevant internal tables, I am getting a short dump on FM CALCULATE_TAX_DOCUMENT.

The dump comes up with Runtime Error POSTING_ILLEGAL_STATEMENT. Upon investigation looks like it is trying to call a screen 301/300.

I have created a FM ZICA_CREATE_INV_FROM_PO which calls the standard BAPI BAPI_INCOMINGINVOICE_CREATE. This Z FM is called in an update task.

Any pointers to the solution would be helpful.

Regards,

Manu

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
836

Try to change your Z_FM to a RFC enabled FM, and don't call it IN UPDATE TASK but in BACKGROUND TASK?

Regards,

Raymond

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
837

Try to change your Z_FM to a RFC enabled FM, and don't call it IN UPDATE TASK but in BACKGROUND TASK?

Regards,

Raymond

Read only

0 Likes
836

Spot On. Worked in first instance.


Thanks a lot.