‎2015 Jun 01 2:45 PM
Hi Abaper's
I am creating IDOC program using the function module IDOC_INPUT_DESADV1.
IDOC and Inbound delivery has been created successfully created but not able to view inbound delivery. I getting an error like "Delivery XXXXXX(DELV NO.) does not exist in the database or in the archive". No dump in st22. But I am able to create IBD via VL31N.
I have debug the standard function module. IDOC_INPUT_DESADV1. inside that function module, CALL FUNCTION 'TRANSACTION_STATUS' is there.
it gives transaction status is "ROLLBACK". How It gets the ROLLBACK/COMMIT WORK status
Thanks with Regards,
Vallamuthu M.
‎2015 Jun 01 3:14 PM
Vallamuthu,
I was not able to track where the FM is called, not directly with the search inside input_deadv1 or thru the where used list.
vallamuthu madheswaran wrote:
IDOC and Inbound delivery has been created successfully created but not able to view inbound delivery.
I don't think the above statement is correct. If you are not able to view the doc, then a rollback should have been performed due to an error.
Why don't you check the routine "perform delivery_create" in IDOC_INPUT_DESADV1 and check the subrc value of the FM GN_DELIVERY_CREATE? This should tell you the problem or you can also run a watchpoint on the variable workflow_result.
Let know if this works.
Thanks,
Vikram.M
‎2015 Jun 01 3:02 PM
Hi,
It can only get ROLLBACK from FM TRANSACTION_ABORT. Put a break point three and check the call stack to fine out.
‎2015 Jun 01 3:14 PM
Vallamuthu,
I was not able to track where the FM is called, not directly with the search inside input_deadv1 or thru the where used list.
vallamuthu madheswaran wrote:
IDOC and Inbound delivery has been created successfully created but not able to view inbound delivery.
I don't think the above statement is correct. If you are not able to view the doc, then a rollback should have been performed due to an error.
Why don't you check the routine "perform delivery_create" in IDOC_INPUT_DESADV1 and check the subrc value of the FM GN_DELIVERY_CREATE? This should tell you the problem or you can also run a watchpoint on the variable workflow_result.
Let know if this works.
Thanks,
Vikram.M
‎2015 Jun 01 4:19 PM
Hi Vikram,
Thanks for your update.
In se38, I am using,
function module 'IDOC_INBOUND_WRITE_TO_DB' and 'IDOC_START_INBOUND'.
In IBD, they implemented the badi LE_SHP_DELIVERY_PROC. in that badi they are using FM 'BAPI_BATCH_CREATE'. It returns error message.
If I comment the function module 'BAPI_BATCH_CREATE' and execute my IDOC program then the FM 'TRANSACTION_STATUS' gives COMMIT_WORK value. otherwise it gives "ROLLBACK" value. but we need the IBD BATCH(BADI) validation also.
Note: IDOC and Inbound delivery has been created successfully created but not able to view inbound delivery. I getting an error like "Delivery XXXXXX(DELV NO.) does not exist in the database or in the archive". No dump in st22. But I am able to create IBD via VL31N.
Thanks with Regards,
Vallamuthu M.
‎2015 Jun 01 4:35 PM
If I comment the function module 'BAPI_BATCH_CREATE' and execute my IDOC
from the above statement, I assume that you have a Z implementation of the BADI. If the FM fails, is there a status or a return code (error code) set in the BADI. If yes, that is your problem. If the BADI fails, the I/B delivery will not be created since a rollback will be performed.
If my above statement is true, you need to figure out why the batch FM fails. It could be as simple as not passing some required fields in your idoc which would be used by the batch FM.
Thanks,
Vikram.M
‎2015 Jun 02 5:11 AM
Hi Vikram,
If the material has batch, then the BATCH function module gives the return message "BATCH XX exist for this material". in vl31n/VL32N the message displays like status message. But in IDOC it's not created how to rectify it.
Thanks with Regards,
Vallamuthu M.