cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in IDOC-File Scenario

Former Member
0 Kudos

Hallo Everybody,

In one of the requirements,for the interface design which involves IDOC-FILE scenario we have a req as:-

Multiple IDOCs would be sent from SAP R/3 to SAP XI. Each IDOC can have 0-4 segments and for each segment a file needs to created.

The files needs to be FTPed to a location, only if all the IDOCs have been processed successfully.

Requirement:

1) Even if a single IDOC fails,the files should not be FTPed. --> How do we handle this in XI.

2) We need to send a notification from XI, in case any IDOC processing fails.

3) How do we check in XI, if all the IDOCs have been processed successfully.

Please suggest me with some good stategies to resolve this issue.

Appreciations and Rewards in line.

Regards,

Younus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

You can try and collect all Idocs in an XML file using XML port.

Option 1:

In Mapping you can check the status of all the Idocs, from the status value in control record.

If any value is showing as error state, u can generate the notification otherwise compute mapping which would be having occurance as 0....unbounded.

Option 2: In case you are not getting the status value from control records:

You can read all the Idoc numbers from the xml files, then do RFC lookup and read status of all the Idocs, and check if all of them are posted successfully. If not than generate the notification.

Also, u can use Alert configuration for notifying the error state.

BR,

Rahul

Answers (5)

Answers (5)

Former Member
0 Kudos

Dear all,

Thanks for your the response.

The answers were really helpful, i'll try to use anyone of the solution and will update if it works or not.

Thanks,

Younus

Former Member
0 Kudos

Hello Experts,

Let me clarify some more things.

1. With IDOC processing successfully in XI, I mean the completion of message mapping and files getting generated.

2. The strategy to collect IDOC's is not needed.

Since we are planning to create the files as and when the IDOCs come and the mapping happened successfully.

If in case the mapping for any IDOC fails, the files generated prior to this failure step and the files generated after this failure step should not be sent to the target system.

Now our requirement is how to be come to know, whether the mapping for an IDOC has failed, and in case it fails, how do we send a notification to the SAP R/3 system.

Please pour in your comments on this design..

Regards,

Younus

Former Member
0 Kudos

Hello,

If it sounds feasible, you can give a try to this long method.

For every outbound idocs, there are acknowledgement idocs sent to R/3 i.e ALEAUD idoc.

You can check in table IDXNOALE, the message type should not be entered, for the Idoc you are using.

You can create a program in R/3, which will read all the Idoc numbers sent to XI .

These Idoc numbers would be checked in the Acknowledgment IDocs sent by XI. The segment E1STATE contains the Idoc number in field name 'DOCNUM', its status as field name 'STATUS' and a status text as field name 'STATXT'.

If all the ALEAUD idocs status found 53, than its fine otherwise if status found as 51, then

You have to search for the files created by the Idocs i.e. by adding timestamp to files created. So search criteria would be to read and delete all the files which are created today.

You need to create partner profile for the incoming ALEAUD idocs in R/3.

BR,

Rahul

Former Member
0 Kudos

>>The files needs to be FTPed to a location, only if all the IDOCs have been processed successfully

What exactly does "IDOC processed successfully" means?

Does it means that all IDOC's should reach XI successfully or the message mapping is successful or something else?

Thanx

Aamir

Former Member
0 Kudos

Hi Gaurav,

Thanks for your response,

First of all,

1) We are no way concerned with collecting the IDOC's in XI, that is not our requirement.

2) Moreover we are not supposed to use BPM. since the IDOC coming from SAP are bulky and holding them in XI can impact the performance.

Experts, any similar issue encountered, please respond.

Regards,

Younus

Former Member
0 Kudos

Hi

Ok..

As you said you have a segment 0-4 and that need to be processed in a file. I suggested that if you bundle them its directly can be moved to a file.

1) Even if a single IDOC fails,the files should not be FTPed. --> How do we handle this in XI.

2) We need to send a notification from XI, in case any IDOC processing fails.

3) How do we check in XI, if all the IDOCs have been processed successfully.

IDOC are separate but you want XI not to generate files till even last one send data to XI successfully right ? Then if it failed you want to send notification and not generate files. With this if all is fine you want to check if IDOC send Successfully to XI right ?

- Gaurav

Former Member
0 Kudos

Hi

Are you planning to use BPM as it suits your requirement.

To collect the idocs in small bunches refer

1) Even if a single IDOC fails,the files should not be FTPed. --> How do we handle this in XI.

BPM will allow you to wait for the time all IDOC are processed

2) We need to send a notification from XI, in case any IDOC processing fails.

BPM exception handling will allow this functionality even to the exact field you want to send notification

3) How do we check in XI, if all the IDOCs have been processed successfully.

Set Acknowledgment for IDOC's

refer

Thanks

Gaurav