on 07-22-2009 11:41 AM
Hi,
We have been asked to develop and interface between R3 (Sender) and JDBC (Receiver). We have been asked to check the data currently in the database before we insert our data. So if the record in the IDOC currently exists in the database we should update that record. If the data doesn't exist then we should insert this data.
We are currently on XI 3 SP9.
Can anyone tell me if this is possible?
Thanks
Thanks for all your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is UPDATE_INSERT supported on XI 3.0?
--> Yes..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gareth,
That's O.k...even using stored procedure you can perform the same activity..with in the stored procedure just have a look whether record exists with the same key if not then use insert query there..
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Gareth,
Use "UPDATE_INSERT" functionality . It will update the record with the same key, if exits, else will make a new entry.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gareth,
To clarify and to help you to take the good decision.
1st solution :
With XI 3.0, you can directlyuse the option UPDATE_INSERT for your SLQ request with JDBC adpater.
Pro : This solution is easy to apply for PI and there is nothing to do on the database.
Cons : (to be confirmed). According to me, the INSERT, UPDATE, UPDATE_INSERT option can be done only if all your KEY fields (the fields on which you want to do your control) are inside the same table in your database. So if it's the case (certainly), apply this solution.
2nd solution:
The use of stored procedure allow you to make control on different tables (e.g check a status from one table and then check if a material exist in another table) and then to take the decision to update / insert / add a flag. All this code is done directly inside the stored procedure and for PI is totally transparent.... PI call just a stored procedure name (like a function module in ECC) by passing the data.
For both solutions, have a look on the SAP help and SND blogs to know how to define it in PI (Data Type and mapping).
So if your need is just to be sure to do an update or an insert inside one table, the UPDATE_INSERT is THE solution because it's standard.
regards.
Mickael
Hi,
yes it's possible. but your choice update / insert should be done directly in Data base... For that a STORED PROCEDURE has be created in the Data Base and in PI, you, you provide all info to this stored procedure.
Remind: a stored procedure is developped in the data base and it's like a functin module of ECC (like !!). The goal is the same and inside it you can do each SQL request that you want: update / select / insert etc...
regards
Mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use UPDATE_INSERT as action. It performs the same activity. Use the Key value as the primary value based on which condition has to be checked.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.