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

Verify syntax in idoc

Former Member
0 Likes
1,119

Hellow everybody!!

I am using the function MASTER_IDOC_DISTRIBUTE for creating an idoc, but i don´t want to create it, i only want to verify if it would be created without any syntax error or disordered segments in idoc or problems in the hierarchy.., is there any option in this function for it, or is there another function for my requirement.

Thanks in advance

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,067

The best thing to do. Get an existing IDoc from the system and using the test tool (WE19) amend it so that the structure is invalid. Then debug to see where the status gets set to '26'.

The best thing to do. Get an existing IDoc from the system and using the test tool (WE19) amend it so that the structure is invalid. Then debug to see where the status gets set to '26'.

7 REPLIES 7
Read only

Former Member
0 Likes
1,067

Without creating the IDOC, how can you check if its created properly or not?

After Function Call, write "ROLLBACK WORK" , I hope the IDOC wont get created.

Read only

Former Member
0 Likes
1,067

Hello,

What you can do is, after issuing the Function Module Call "MASTER_IDOC_DISTRIBUTE", you can query the EDIDC table with the Selection Criteria being the Message Type and the IDoc Type and pick up the most recently created IDoc. Check the Status for the same IDoc and if it is in error status, then there is a Syntax Error occured in your IDoc. If it is Successful, then there are no syntax errors in the IDoc. After that, you can Roll Back the updates.

Hope it was clear.

Thanks and Regards,

Venkat Phani Prasad Konduri

Read only

asik_shameem
Active Contributor
0 Likes
1,067

Hi

It is not possible by the system. But you can check it manually by checking the entries MASTER_IDOC_DATA table in th FM MASTER_IDOC_DISTRIBUTE and hierarchy of IDoc segments in WE30. Make sure mandatory segments are filled.

Read only

Former Member
0 Likes
1,068

The best thing to do. Get an existing IDoc from the system and using the test tool (WE19) amend it so that the structure is invalid. Then debug to see where the status gets set to '26'.

Read only

0 Likes
1,067

Would it be possible please not to consume a number of idoc range?

Thanks in advance.

regards

Read only

0 Likes
1,067

You are only using WE19 to investigate as to how SAP decides if an IDoc has a syntax error or not.

Read only

0 Likes
1,067

My real problem is that i have a very compex hierarchy idoc, and sometimes it has correct data, but i need to know if it has syntax error before doing a z action, but i don´t want to store this idoc in the system if it has syntax errors..

Thanks in advance

regards