In our current project, we have to trigger e-mails to shared folder of IS-U inbox in case the files that are pumped in for posting Idocs are invalid. XI file adapter picks the files and validates the file through java mapping and passes it to Idoc adapter if the file is valid or passes it to RFC adapter, which will trigger mails to IS-U by calling RFC SO_OBJECT_INSERT.I will provide the configuration to achieve the same.
Let me depict the scenario graphically:
I will explain the steps involved for triggering an e-mail when the validation mapping produces the XML file with rejection details of the invalid file that is pumped into XI.
Configuration Steps in SAP IS-U:
1.Goto tcode SO01 and create folder XIWEBLOG from the menu as shown below.
2.Goto tcode SE16 and give the table name SOFD and take a note of 3 attributes Folder Type, Folder Name and Year for the folder XIWEBLOG created. These details
are required in RFC structure of SO_OBJECT_INSERT for triggering mails to the appropriate folders.
With this SAP IS-U is ready to receive mails in the XIWEBLOG shared folder.
Configuration Steps in SAP XI:
1.Import the RFC SO_OBJECT_INSERT into XI.
2.We are going to send the e-mail asynchronously to SAP IS-U so we are going to use only the the request structure of the imported RFC.
3.The output of Java validation mapping is an XML with the following XSD structure.
“ROW” corresponds to each record in the file.
“FILE_TYPE” corresponds to the file type of a file (Ex: MRI, MIO).
“ERR_RECORD” corresponds to error records in the file.
“STATUS” corresponds to the result of file validation.
4.I listed down the parameters that have to be passed to SO_OBJECT_INSERT in order to trigger e-mails to SAP IS-U inbox.
1.OBJTP-Folder Type retrieved from SOFD.
2.OBJYR-Year retrieved from SOFD.
3.OBJNR-Folder Number retrieved from SOFD.
1.LINE-Mail Content (“ROW”+”ERR_RECORD”)
I have not detailed the required mapping, as the scope of the blog doesn’t pertain to that. Once we designed the appropriate mapping and required configuration is done in the ID and IR, mails can be triggered to SAP IS-U XIWEBLOG folder. We are able to successfully send file level rejections as e-mails to our SAP IS-U inbox by using the above approach.
We can check the mails in XIWEBLOG folder using SO01 once the message has been successfully delivered to RFC adapter.