2011 Nov 23 1:27 AM
Hi All,
We have a requirement to create a credit memo from a debit memo. Can anyone share the best approach to achieve this requirement? I was thnking of asynchronous RFC, but since there is a dependency on the 2 documents, I don't think this will work. Is synchronous RFC a good bet? What about workflow, or CALL IN UPDATE TASK?
Thanks,
Louisse
Hi All,
We have a requirement to create a credit memo from a debit memo. Can anyone share the best approach to achieve this requirement? I was thnking of asynchronous RFC, but since there is a dependency on the 2 documents, I don't think this will work. Is synchronous RFC a good bet? What about workflow, or CALL IN UPDATE TASK?
Thanks,
Louisse
2011 Nov 23 4:23 AM
Hi Louisse,
Are you going to create from external system.Did the functional people explain the flow.
Regards,
Madhu.
2011 Nov 23 6:45 AM
Hi Madhu,
Only the high level requirement was given. If it is created from an external system, what would you suggest? What if not from external system?
Looking forward to your input.
Thanks,
Louisse
2011 Nov 23 8:54 AM
Hello Louisse,
I guess you need to create it at the time when the debit memo request is created.
Your approach depends on the way standard BAPI works. If the standard BAPI required that the previous document (debit memo) exists on the database, then you'll need to wait for it somehow.
I would propose trying qRFC approach for it.
In the user exit at the save of the debit memo you program a function call (write a new Z RFC-enabled function module) using qRFC technology (search in internet for an example) with destination NONE.
In the new function module you should check if the previous document is on database and implement a WAIT statement if not. When it's on database, you call the BAPI to create a credit memo with the data that you have in your Z-function.
Thus you can easily monitor if the queue is properly processed and react on errors (transaction SMQ2).
Regards,
Yuri
2011 Nov 23 9:29 AM
Hi Yuri,
If this is the approach, I guess the only concern is, what if the creation of credit memo fails? There is no way to re-trigger the mechanism but to create the document manually.
Thanks,
Louisse
2011 Nov 23 9:41 AM
Hello Louisse,
it depends how you react on the failure of the credit memo creation.
If the standard BAPI returns an error, you can generate a short dump with the message type X.
In this case your qRFC queue will become status SYSFAIL and you can reprocess it at any time once you fixed the error. If the reporocessing always fails and there is no way to correct the mistake, you can create the document manually and delete the failed entry from the queue via SMQ2 transaction.
qRFC is actually a very good solution
Regards,
Yuri
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |