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: 

IDOC number from FI Document number

Former Member
0 Kudos

Hi,

I have a situation, we have been given an FI document number, which has been created by an IDOC. Now we have to find the IDOC number from which it was created.

in the relationship browser i check but the idoc number mentiond there is incorrect, it concatenated date and time.

How do i establish a relationship between Idoc and FI document no?

Regards,

Shraddha

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Shraddha,

To get the Idoc number, go to the table EDIDS. Pass your FI document number to the field STAPA2 then the Idoc number will be returned in the field DOCNUM.

Hope this helps you.

Regards,

Sindhu Pulluru.

9 REPLIES 9

Former Member
0 Kudos

Hi Shraddha,

To get the Idoc number, go to the table EDIDS. Pass your FI document number to the field STAPA2 then the Idoc number will be returned in the field DOCNUM.

Hope this helps you.

Regards,

Sindhu Pulluru.

0 Kudos

Hi,

thanks for your reply. But for certain Document numbers i am not getting any entry in th table.

regards

0 Kudos

Hi,

Did you check my post?? You can try that method also ...

Regards,

Nagaraj

0 Kudos

Hi,

Thanks for your reply. but i could understand it thru ur suggestion.

Actuall i dont know the idoc number. i have to search it on the basis of the accounting document no.

Regards,

0 Kudos

ok if you have the ID of object and you are looking for the idoc, then call function module SREL_GET_NEXT_RELATIONS

0 Kudos

Hi,

You can get the idocs from we02 if you know message type or basic type... You need to specify the date and either message type or basic type .. Once you get the idoc in the data records you can find the accounting document number, However to know which segment is having accounting document number, you need to look the documentation of the message type.. This way you can find the idoc related to accounting document.

Regards,

Nagaraj

former_member585060
Active Contributor
0 Kudos

have a try on the table EDIDS there is field STAPA2 which will hold the document numbers which are created with Idocs. You can get the Idoc number by giving the FI document number there, but the performance will be very high in accessing this table. Restrict the search providing the STATUS = '53' and providing STAPA2 = 'FI Document' number. This field is character 50, so leading spaces and zeros will also be counted. 

former_member404244
Active Contributor
0 Kudos

Hi,

First you should know what is the message type, idoc type used for the idoc..Once you get it then go to WE02 transaction code and specify the date along with idoc type.. You will get list of idocs. To know the FI document number, you need to check the documentenation of the message type in WE60. Now take the idoc which you get in WE02 and then check the data record of the idoc and then teh field where the FI document exists which you will know by reading the documentation.

Regards,

Nagaraj

franois_henrotte
Active Contributor
0 Kudos

call function module IDOC_READ_COMPLETELY

if you get info from EDIDS structure, then take it from there (more efficient)

if you don't get it, then read table parameter EDIDD with the segment name E1BPACHE09 (or the one that you are using to pass the document key) and you will get the original values