on 08-02-2013 6:49 AM
Hi Experts,
My scenario is JDBC to IDOC.
Here the requirement is i need to create an idoc for every record in the database.
Suppose if i fetch 25 records from database, at the target end i need to generate 25 idocs.
Need your valuable inputs on this requirement.
Thanks,
Kishore.
as far i understand, you want to split the source message into N Idocs and avoid the interface fails if mandatory if not completed with data.
If I am OK, so you cannot handle it in a simple way.
The solution i can see is to agree with the sender side to send one record, so one IDOC will be generated and in case this fails you only need to resend only one record.
If this cannot be a possible solution you need to check if exists the possibility that a mandatory field forthe IDOC doest come in the request so agree to create a validation in the Message Mapping ussing the funtion EXIST or a simple IF that sends a constant value in the target field.
If you can agree this terms with the client, in case of error they shpuld be able to resend the whole data again.
SO check those point with the client and go ahead.
Regards
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kishore,
For this particular case, to generate an IDoc for each record that brings the query, you must export the IDoc in XSD format and modify the occurrence of IDOC node (0 to 999999999). Then you import the XSD as an External Definition, which we use in the Message Mapping, in Operation Mapping and in the Integration Builder (Configuration) use the IDoc.
Message Mapping --> use the External Definition
Operation Mapping --> Use the IDoc
Test Mapping
Regards,
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
It's a common scenario and it can be easily achieved by changing the occurrence of idoc element to unbounded in the Idoc XSD.
Check this:
http://wiki.sdn.sap.com/wiki/display/XI/File+to+Multiple+IDOC+Splitting+without+BPM
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Amit,
Here my concern is, if it fails in integration engine due to data inconsistency, the particular records needs to fail and remaining records needs to generate idocs.
here is the challenge.
AS far as i know if any integration failure happens due to mandatory field missing the complete set of transaction get fails, is there any way to handle such case.
Thanks,
--Kishore
Hi Kishore,
Failing the messages in PI is not a good design.
However, if you want to go ahead and implement such a design, you will need to pick the messages one by one from database or split the messages in PI in first step and then do the IDoc mapping in second step and fail it there.
hope it helps!
Ambrish
Hi Kishore,
For mapping related thing, if you don't want to get it failed in case of mandatory field, then add mapwithdefault function, else write a select query passing mandatory field in where condition.
If it is a generic failure other than mandatory field case, please proceed with splitting messages in Pi first before you send as Idocs.
Thanks,
SPMD
Hello,
Which version of PI you are using?
What u can do is validate the records at mapping level (which u think can fail the mapping) and then probably ignore that invalid record and create idoc for rest of the valid ones. In case u r using java idoc adapter then go one step ahead and use multimapping concept and for those invalid records create a error file/mail.
Thanks
Amit Srivastava
Hello,
While transforming source data into target mapping generally gets failed due to:
missing source values for a mandatory target field, Length of the integrated source field is less than its permissible length, , error occurred in the developed business rule (as per ur scenario) etc.
So in ur mapping program u can have two target Structures (one is for Idoc and the other one for File (replica of source str.) or Mail) and then u can validate ur mapping at first level and if the record is valid then map the same to Idoc and if not then pass that invalid record to file/Mail interface
(in case u want to ignore invalid records then just use idoc structure in ur mapping program and ignore the records which does not satisfy the validations which u will perform at mapping level)
Thanks
Amit Srivastava
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.