on 06-23-2007 11:48 AM
Hi,
I am tring to send customer master data from SAP to local DB through XI. I have scheduled the whole process in sm36.
My problem is when i create and edit the data in SAP with the job scheduling period it creates 2 IDOCs of the same master data. When I perform a JDBC look up of the master data, it will not be available in my local DB and hence they go in as two separate entries in my local DB.
How can I avoid this situation?
Regards,
Venkatesh
Hi Venkatesh,
When I perform a JDBC look up of the master data, it will not be available in my local DB and hence they go in as two separate entries in my local DB.
Can you elaborate on this?
Also the following may help you..in your local db in the table in which you are inserting customer master data create the table with the customer number as primary key. And in your sql statement use update_insert. i.e if entry doesnt exist it will insert and if entry exists in db it will modify the record.
Regards,
Sumit
ps : award points if that solved your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumit,
In the sense I have to check if the particular SAP Customer Number exists in local DB and this SAP Customer Number is available only in one table. There are three tables that has to be inserted/updated based on this check.
How do i do this is if the primary key cannot be set on this table now?
Regards,
Venkatesh
Hi Raj,
A synch call is usefull if the value exists in the database. Both the IDOCs are processed together and hence those values will not available in the database.
I know that primary key setting will be a better solution. But those columns have to be added in the other tables involved and I want to avoid this.
Regards,
Venkatesh
Ram,
You said both IDOCS come together, both the IDOCS are getting processed in the same time by XI. Why i'm askin this bcoz even though u are sending two IDOCS to XI, it will be processed one after another am I right, Please correct me if i'm worng. How the flow happens, can u please clarify it.
Best regards,
raj.
Hi,
When the IDOCs are getting processed, I perform a JDBC look up into one table and check if the SAP Customer Number is available in my local DB. If it is available, I update the 3 tables involved with the record else I insert it.
If the adapter engine has not performed the JDBC Operations, the data will be still persisting in the Adapter Engine. Only if the first record reaches the database, my second record knows that the data has already come and then it will perform an update.
How do I check with the data that is available in the adapter engine or the datas that are being currently being processed?
Regards,
Venkatesh
Hi,
To understand better, everytime you get only 2 iDOCs ? or many??
Using ccBPM with wait step you can achieve for some extent.
For e.g You have got 2 idocs with for a same customer no.
1) First IDOC u got into BPM. you are calling jdbc lookup. It returns that, data does not exist. Now it will send the idoc to jdbc.
2) then execute wait step in ccBPM
3) now call lookup for second IDOC .. It returns you the false.. hence you need to call update into jdbc.
Now as per my understanding, at first time you need to insert everything.so i think you can handle like this. Else you need to have 2nd sync call to JDBC to insert/update the records. After successful insert/update you will get the response then you can call lookup again for the second IDOC. btw, all this should be in loop for no. of IDOCs.
Btw, this will be a huge performance hit for the scenario.If possible, just use MODIFY statement in the JDBC so that any IDOC comes it will just insert/or update if it exists. but you need to make sure that, you are passing only one IDOC at a time to JDBC. Can be handled via EOIO in BPM.
Hope this will give some hints
rgds,
Moorthy
Thank you Moorthy, Raj and Sumit. Those replies were helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
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.