Application Development 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: 

Fetching the IDOC Status

Former Member
0 Kudos

Hi,

For each idoc number in the table edids four records exist but I want to capture the status in my program I want to display the message like if it is error message then error message. How to write a query as it contains four records with same idoc number let us say in my idoc contains four records with 50 64 62 51

But I want to pick the error one. Some times 50 64 62 53 that time I want to pick 53. Please help me how to write the query for this.

Thanks a lot.

2 REPLIES 2

former_member404244
Active Contributor
0 Kudos

Hi,

u can do like this

select docnum status from edids into it_edids where docunum = <idoc number>

and status = '51'.

Now u will get the idoc with status 51...

similarly if u want for status 53 u can do like this..

select docnum status from edids into it_edids where docunum = <idoc number>

and status = '53'.

Reward points if u find useful..

Regards,

nagaraj

varma_narayana
Active Contributor
0 Kudos

hI Babji..

For this purpose dont read the table EDIDS Directly. instead Select STATUS from the EDIDC table . It will only store the Current status of IDOC.

select STATUS FROM EDIDC WHERE DOCNUM = <IDOCno>.

<b>REWARD IF HELPFUL.</b>