on 08-05-2010 11:23 PM
Hi,
My scenario is creating a document in SAP and am using BAPI. For 3 fields the standard table in SAP is extended and to update this we need to use the EXTENSION parameter in the BAPI. I have these 3 fields in source and need to map these to the EXTENSION parameter and shud luk like:
<EXTENSION>
<ITEMS>
<STRUCTURE>KAPA</STRUCUTRE>
<VALUEPART1>90</VALUEPART1>
</ITEMS>
<ITEMS>
<STRUCTURE>KRRS</STRUCUTRE>
<VALUEPART1>90</VALUEPART1>
</ITEMS>
<ITEMS>
<STRUCTURE>SMTT</STRUCUTRE>
<VALUEPART1>90</VALUEPART1>
</ITEMS>
</EXTENSION>
my source will luk like:
<SOURCE>
<ACCOUNT>123213</ACCOUNT>
....
....
<KAPA>90</KAPA>
<KRRS>90</KRRS>
<SMTT>90>SMTT
</SOURCE>
how to work around with this request....i understand that we need to use a udf but not sure what kind of udf i need to use and how to deploy it.....any help on this?
This can be solved without any UDF.
What you have to do is just right click on ITEMS node and press duplicate subtree 2 times So you will be having total 3 ITEMS nodes at target side in your message mapping. Now do your mapping to these 3 ITMES as per your need.
If you face any issue let us know..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If need to add only three fields to ur extension structure then u can u can make three ITEM node by using copy subtree and map the <STRUCTURE> field with constant(name of the tag in source fields) for each ITEM STRUCTURE field. Also, Map the source field to the corresponding VALUEPART1 field of ITEM structure.
If you want to get the tag name from source structure at runtime then you need to go for either xslt or java mapping.
I hope i understood ur requiremetn correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
UDF does not need to be deployed.
Depend on your PI version, PI 7.1 has library which UDF inside the function can be re-used.
PI 7.0 or before, you have to create UDF in message mapping.
In your case, I would like to suggest to go "Queue" type.
Regards
Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Prabhu,
What i feel from your scenario is you have to create a Tag name on Receiver side as per your ITEM name from sender side.
Why dont you use XSLT mapping in place of graphical mapping?
I am not sure that you have those item names constant or not.
Because as per my understanding they can send anything in that ITEM name.
I had same requirement and i used XSLT, right now working fine.
Thanks,
Hetal
Edited by: hetal shah on Aug 6, 2010 1:16 AM
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.