on 02-11-2011 7:41 PM
Hi,
In my current project, we are facing a issue where we have to perform the following steps in below order in PI. Can this be achived using the PI by writing the Processing Logic in PI iteself.
Scenario Diagram:
SAP -
(IDOC)-> SAP PI(Inserts the data in Legacy Server, using Insert Statement)--> LEGACY
SAP IDOC is having the structure let say
(1) Field1 - Number
(2) Field2 - Description
Example Values:
FIELD1 FIELD2
A1 Toys
A2 Bicycles
A3 T-Shirts
Legacy system is having a Table (Lets Say - ZTABL1) with 3 Columns:
(a) COL1 - PRIMARY Key
(b) COL 2 - MATNR
(c) COL 3 - Description
COL1 COL2 COL3
1224 A1 Boys Toys
1225 A2 Girls Bicycles
1226 A3 Kids T-Shirts
1227 A4 Kids Toys
Steps:
1. SAP Sends the IDOC - to SAP PI using tRFC Port.(The IDOC is triggerd on changes in Description)
2. SAP PI receives the data.
3. SAP PI goes to the Legacy system and using JCO connection, reads the last entry from table mentioned above - ZTABL1.
4. SAP PI formulates the data receieved from the IDOC and merges it with the ZTABL1 enteries in a temporary storage, something like this:
(1) Field1 - Number
(2) Field2 - Description
(3) NEW Field (in SAP PI) - Increment the Value from ZTABLE1-COL1( if in legacy Value of COL1's last entry was 1227, then in SAP PI it should be 1228 ; that is incremented by 1)
5. After doing the above processing, sends the INSERT Statement back in Legacy Table - ZTABL1 and makes a new entry there.
COL1 COL2 COL3
1224 A1 Boys Toys
1225 A2 Girls Bicycles
1226 A3 Kids T-Shirts
1227 A4 Kids Toys
1228 A1 Toys
1229 A2 Bicycles
Hi,
PI can do look up. With PI 7.11, in graphical mapping you are having the option of JDBC Look Up and RFC Look Up as standard function. If the LEGACY is something other system, write some UDF and do the same.
Regards,
Vineetha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurabh,
It is not good idea to write processing logic in PI. But If you have no other option then,
You can write User Defined Function at the root level in the message mapping, where you pass the all
the values of the IDOC that needs to be updated, and update the Z table.
I don't know which is your Legacy system
If it is ECC, then you can make call RFC
If it is any database, then you can make JDBC call to update the table.
Thanks,
Thanks Chetan and Veenetha for you suggestions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.