cancel
Showing results for 
Search instead for 
Did you mean: 

UDF - Queue or context?

prabhu_s2
Active Contributor
0 Kudos

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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..

samiullah_qureshi
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

prabhu_s2
Active Contributor
0 Kudos

okay....i did not mention tht i'm running on 7.0 only

Former Member
0 Kudos

Then there is button in lower left corner of data flow editor which is used to create UDF.

Once you created your UDF, you can use it same way as you use other standard functions.

Not sure if this clear your doubt.

Liang

Former Member
0 Kudos

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

prabhu_s2
Active Contributor
0 Kudos

i shud not and its not sap std....thts the reason sap has given extensions in bapi's. using this i can map the value...now i'm looking on how to use itin udf (queue)...but why very spcific on xslt?