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

IDOC:CALL FUNCTION 'TRANSACTION_STATUS'

vallamuthu_madheswaran2
Active Contributor
0 Likes
1,323

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,080

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



5 REPLIES 5
Read only

Former Member
0 Likes
1,080

Hi,

It can only get ROLLBACK from FM TRANSACTION_ABORT. Put a break point three and check the call stack to fine out.

Read only

Former Member
0 Likes
1,081

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



Read only

0 Likes
1,080

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.

Read only

0 Likes
1,080

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

Read only

0 Likes
1,080

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.