Mapping logic required-UDF

Hi,
My sender structure is as follows
<zaction>(1:1)
--Trans
<Zcode>(0:999)
--Code
--Id
My target field is
<code>(0:999)
--ID
My requirement is
if code= CE,CB,CH,CJ,CI,CO then don't create target field ID.
else
if code=AF and Trans=01 then ID=axv0001
or
if code=AF and Trans=02 then ID=axv0002
if none of the above conditions matches pass ID received from sender.
I am confused at using context type UDF. As suppress result is completely supressing the target field. it's not looking into the rest of logic. Can you provide me an appropraite UDF for this logic please.
TIA,
Mahesh

Hello,
You can use this context type UDF:
Arguments: inTrans
inCode
inID
for(int a=0;a<inCode.length;a++){
     if(inCode[a].equals("CE")|inCode[a].equals("CB")|inCode[a].equals("CH")|inCode[a].equals("CJ")|inCode[a].equals("CI")|inCode[a].equals("CO")){
          result.addSuppress();
     else if(inCode[a].equals("AF")&inTrans[0].equals("01")){
          result.addValue("axv0001");
     else if(inCode[a].equals("AF")&inTrans[0].equals("02")){
          result.addValue("axv0002");
     else{
          result.addValue(inID[a]);
Logic is like this:
For code
Trans -> removeContext -> \
Code --> removeContext -> UDF -> code
ID ----> removeContext -> /
For ID
Trans -> removeContext -> \
Code --> removeContext -> UDF -> splitByValue:eachValue -> ID
ID -----> removeContext -> /
Hope this helps,
Mark
Edited by: Mark Dihiansan on Nov 9, 2011 3:47 AM

Similar Messages

  • Mapping logic required--Counter

    Hi Experts,
    How to increment the counter value by 5 every time, I tried using counter arithmetic function it is now working for my requirement.
    My Source structure
    <Elemica_Order>
        <HItem>1..to unbouded
              <LItem>
                   <Item>1..to unbounded
    Target
              <Order>1..to unbounded
                   <OItem>1 to unbouded
                        <id>
    Order mapped with HItem and OItem mapped with lItem.suppose my source having 2 hitem records then target side I will have 2 orders.
    my Hitem record having 3 LItems then my first order will have 3 order Items , in this case my I want to increment the ID value by each time  by20, initial value is going to be 10.
    Second Hitem having only one Litem then I want to increment value by 20.
    I tried using counter arithmentic function, it is working for only one Hitem, second Hitem it is not reseting value to 20.
    I think UDF required for this, help me
    Regards,
    Jam

    Hi Jam,
    If you looking to get the target like this:
    <Order>
        <OItem>
             <id>10</id>
        <OItem>
             <id>30</id>
        <OItem>
             <id>50</id>
    </Order>
        <OItem>
             <id>10</id>
    </Order>
    You can achieve this by using the "index" function from Static Functions list.
    LItem -> index -> formatByExample (first input)
                                            formatByExample(out put)  -> id    
    Item ->           formatByExample (Second input)
    for the index function parameters set Initial Value = 10; Increment = 20;
    Tick the option of "Reset Index to Initial Value with each new context".
    Regards,
    Aravind

  • Mapping logic required

    Hi All,
    A segment E1BLINE in the source IDOC can repeat multiple times(0..999) and at the target that many times the record needs to be generated.
    In the target record strucutre a field say ABC is mapped to a feild in XYZ in segment   E2ES (0..999) .But the test IDOC doesnt have these segment data ,suppose if segmnt E1BLINE repeats 2 times i am getting 2 records in target structure but the field ABC should have blank values in each record as  if there is no data in the source.I am unable to get the logic .
    Thanks in advance

    Hi Priyanka,
    my actual requirement is as follows
    for example:
    There are 2 segments  LINE Segment     E2ES Segment.   I need to generate target file records based on LINE SEgmentIn my input data I am getting 2 LINE SEGMENTS so I am generating 2 records in the output file. But some of the fields in target comes from E2ES Segment.
    LINE  segment 2 times so no of recordsets =2 .(which i am able to generate)
    E2ES  segment has 4 fields.     QUALI1 , FIELD1,QUALI2 , FIELD2
    If QUALI1 = 100 ,  FIELD1--> ABC
    If QUALI2 = 200 ,  FIELD2--> HBY
    If QUALI2 = 200 ,  FIELD2--> HBY
    If QUALI2 is used i can easily get 2 HBY fields at target .But how do i get two  ABC  fields

  • Regarding Message Mapping Logic ...!

    Hi Experts ,
    I am working on the the below requirement  JDBC to IDoc scenarion in the mapping i need the below logic
    based on the existence of the Transaciton ID . the idoc followed by the segments should be created . for ex
    If Interface_Trasaction_ID= 456  THEN   Idoc 1 followed by Segments and line items
                                                                    E1BPACHE09,
                                                                    E1BPACCR09
                                                                    E1BPACCR09,
                                                                    E1PACEXTC  .
                                                                        Field value=456
    If Interface_Transaction_ID =457 THEN  Idoc  2 followed by Segments and  line items
                                                                   E1BPACHE09,
                                                                   E1BPACCR09
                                                                   E1BPACCR09,
                                                                   E1PACEXTC  .
                                                                        Field value=457
    To satisfy the above logic i have mapped Transaction id > SplitByValue->CollapseContext--->Idoc
    But the same Mapping Logic is not working when Sender payload is triggred having  Repeated Transcation_Id value ias given below if Transaction ID= 456 ,
                  Transaction ID= 457,
                  Transaction ID= 457,
                  Transaction ID= 456 .
    then  output should have only 2 Idoc  Followed by segments where Field Value will be 456, 457
    I have mapped Transaction id -->Field Value .
    let me know how can achive the above logic ...!!

    Hi Aziz,
    you can use UDF
    Transaction IDRemoveContext-->sortUDF- SplitByValue->CollapseContext--->Idoc
    public void removeDuplicate(String[] Value, ResultList result, Container container) throws StreamTransformationException{
    String temp = Value[0];
    result.addValue(Value[0]);
    for(int i=0;i<Value.length;i++)
       if(!(Value<i>.equals(temp)))
            result.addValue(Value<i>);
       temp=Value<i>;

  • Message Mapping logic ...!!

    Hi Experts ,
    I am working on the below scenario where my Sender System is the Oracle Database system and Receiver System is SAP ECC
    basically JDBC->PI->IDOC  channels i am using . I need to create the below Mapping logic in order to satisfy the Interface Requirement
    Based on the Interface_Transaction_ID  each Idoc has to be Created and each Idoc should have corresponding Segments and line items . based on th value of GLAccount and Vendor Account
    My sender Payload is
    <row>
      <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
      <DOC_HEADER_TEXT>5251/0115/000000/0000</DOC_HEADER_TEXT>
      <COMPANY_CODE>1610</COMPANY_CODE>
      <DOCUMENT_DATE>20110707</DOCUMENT_DATE>
      <POSTING_DATE>20110305</POSTING_DATE>
      <PERIOD>3</PERIOD>
      <DOCUMENT_TYPE>ZF</DOCUMENT_TYPE>
      <REFERENCE>45720-T</REFERENCE>
      <VENDOR_ACCOUNT></VENDOR_ACCOUNT> 
      <CF_MATERIAL_TYPE>MATTE</CF_MATERIAL_TYPE>
      <CF_ENTRY_POINT>610 Tank</CF_ENTRY_POINT>
      <CF_SOURCE>XNN</CF_SOURCE>
      <PAYMENT_TERMS></PAYMENT_TERMS>
      <BASELINE_DATE>20110305</BASELINE_DATE>
      <ASSIGNMENT>5251/0115/000</ASSIGNMENT>
       <TEXT>USD </TEXT>
       <GL_ACCOUNT>111810</GL_ACCOUNT>   
       <SPECIAL_GL_IND></SPECIAL_GL_IND>
        <PREV_DOC_NUMBER></PREV_DOC_NUMBER>
       <PREV_POSTING_DATE></PREV_POSTING_DATE>
    </row> 
    <row>
      <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
      <DOC_HEADER_TEXT>5251/0115/000000/0000</DOC_HEADER_TEXT>
    <ASSIGNMENT>5251/0115/000</ASSIGNMENT>
       <TEXT>USD </TEXT>
       <GL_ACCOUNT>111821</GL_ACCOUNT>   
       <SPECIAL_GL_IND></SPECIAL_GL_IND>
        <PREV_DOC_NUMBER></PREV_DOC_NUMBER>
       <PREV_POSTING_DATE></PREV_POSTING_DATE>
    </row> 
    Row having GL_Account Value      E1BPACHE09,
                                                             E1BPACGL09, (GLvalue 111810)
                                                             E1BPACGL09, (GLvalue 111821)
                                                             E1BPACCR09,
                                                             E1BPACCR09,
                                                             E1PACEXTC  .
                                                             Field value=CFCV00000627
    Similary if Vendor_Account Value exist then only Vendor Segment (E1BPACAP09) must occur at target side
    Row having Vendor_Aaccount  Value     
                                                             E1BPACHE09,
                                                             c (Vendor value 123)
                                                             E1BPACAP09, (Vendor Value 124)
                                                             E1BPACCR09,
                                                             E1BPACCR09,
                                                             E1PACEXTC  .
                                                             Field value=CFCV00000628
    I have mapped GL_ACCOUNT -
    >E1BPACGL09 .
                             Vendor_Account---->E1BPACGL09.
    if any one have gone through simiar mapping logic kindly share and do the needfull ...
    Regards,
    Aziz khan .
    I

    Hi ,
    Here the requirement which i am looking for :
    Sender Side has below value
    <row>
         <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
        <PERIOD>3</PERIOD>
        <DOCUMENT_TYPE>ZF</DOCUMENT_TYPE>
        <REFERENCE>45720-T</REFERENCE>
        <CF_MATERIAL_TYPE>MATTE</CF_MATERIAL_TYPE>
        <VENDOR_ACCOUNT>600046</VENDOR_ACCOUNT>
        <CF_ENTRY_POINT>610 Tank</CF_ENTRY_POINT>
        <CF_SOURCE>XNN</CF_SOURCE>
        <PAYMENT_TERMS></PAYMENT_TERMS>
        <BASELINE_DATE>20110305</BASELINE_DATE>
         <ASSIGNMENT>5251/0115/000</ASSIGNMENT>
         <GL_ACCOUNT>111810</GL_ACCOUNT>
         <USER_STATUS>TOHD</USER_STATUS>
         <PREV_POSTING_DATE></PREV_POSTING_DATE>
    </row>
    as you can see in the above Payload has  values where Row  is the Root element and under that the rest of fields occur (its a jdbc to idoc Scenario ) and here based on the Interface Trasaction ID the Idoc is generated . where each Idoc should have either GL Segment if GL Account Value has values and respectively Vendor idoc Segment has to be generated if Vendor Account details are present . the Sender Data will have either GL Account or Vendor Account value in a row not both. 
    below is the IDOC Strcuture how it looks for GL Account at Target side
    IDOC
      --->E1BPACHE09
            E1BPACGL09 (This is the GL Segment will have GL Account Line item)
            E1BPACAR09
            E1BPACAR09.
            E1BPACEXTC
              Filed1
    below out put should come when Vendor Account have Value
       IDOC     
            E1BPACHE09
            E1BPACAP09 (This is the Vendor Segment will have Vendor Account Line item)
            E1BPACAR09
            E1BPACAR09.
            E1BPACEXT09         
              Filed1
    Now when i duplicate the above Row
    Like
    <row>
          <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
           <VENDOR_ACCOUNT></VENDOR_ACCOUNT>
           <GL_ACCOUNT>111810</GL_ACCOUNT>
    </row>
    <row>
          <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
           <VENDOR_ACCOUNT></VENDOR_ACCOUNT>
           <GL_ACCOUNT>111811</GL_ACCOUNT>
    </row>
    <row>
          <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
           <VENDOR_ACCOUNT></VENDOR_ACCOUNT>
           <GL_ACCOUNT>111812</GL_ACCOUNT>
    </row>
    I have Mapped the below fileds
    Interface_Transaction_ID-->SplitByValue(EachValue)>CollapseContext>IDOC 
    Interface_Transaction_ID -->Filed1 (IDOC/E1BPACEXTC/Filed1) 
    all the above 3 Row have been duplicated the 3 Rows will have 3 interface Transaction id Value=CFCV00000627 (which is same  as per the above Sender Payload ) and 3 GLAccount fields with values 111810,111811,111812 each
    If i test the data i should get the below output 1
    if GL account exists
      IDOC 1
            E1BPACHE09
            E1BPACGL09 (This is the GL Segment with value 111810)
            E1BPACGL09 (This is the GL Segment with value 111811)
            E1BPACGL09 (This is the GL Segment with value  111812)
            E1BPACAR09
            E1BPACAR0/
            E1BPACEXTC
              Filed1  (CFCV00000627)
    If Vendor account Exists then output 2  as follows
    IDOC     
              E1BPACHE09
             E1BPACAP09 (This is the Vendor Segment will have Vendor Account Line item)
             E1BPACAP09
             E1BPACAP09
             E1BPACAR09
             E1BPACAR09.
             E1BPACEXT09         
               Filed1  (CFCV00000627)
    How can i achive the above logic  .
    Regards,
    Aziz

  • Child to Parent Node Creation, Mapping Help required

    Hi Guys,
    I need some suggestions on the following mapping problem, kindly suggest some solution if possible:
    I have a sender structure as:
    ParentNode
    ..........RecordSet  (0 to 1)
    ................ SValue1  (0 to 1)
    ................ SValue2  (0 to 1)
    .................SValue3  (0 to 1)
    For the receiver Structure I have following:
    ParentNode
    ..........RSet  (0 to unbounded)
    ............. RValue  (0 to 1)
    ..............RField    (0 to 1)
    Now my mapping conditions requires for every SValue1, SValue2, SValue3 source fields, I should generate at receiver side a new RSet and the value of SValue1/SValue2/SValue3 field(s) should be Provided into RValue, and RField should have the respective field name.
    I am trying this with PI Graphical mapping, is there any better solution for it?

    Hi,
    As source structure occurence is 0..1 in this case duplicate the target structure and use create if function with source as SValue1 ...so that for each of Svalues...a corresponding target node will get generated...
    With graphical mapping you should be able to do this...else need to go for UDF...
    HTH
    Rajesh

  • Mapping Logic in XI for Idoc to File

    Hi All,
    I have the scenario like this Idoc to File
    I have Quantity field inside E1EDL24(Line Item)--E1EDL43Quantity, i have to Sum up the Quantity field.
    I have used the ligic like this and works perfectly.
    Quantity--Sum-Total and the context od Quantity is set to IDOC level.
    Now the problem is, Inside the Line item(E1EDL24) Segment, we have E1EDL43 Segment and this E1EDL43 can repeats twice
    then, i have to consider only first Segment quantity value coming from E1EDL43 . I should not take the second E1EDL43 segment .
    But here in my case what is  happening is while doing the SUM function it is considering the second segment quantity also. and giving the total.
    For Example...
    -E1EDl24
    --E1EDL43
    ---Quantity -
    20
    --E1EDL43
    ---Quantity -
    30
    And second line item
    -E1EDl24
    --E1EDL43
    ---Quantity -
    10
    --E1EDL43
    ---Quantity -
    50
    In this case i shld get 20 + 10 = 30
    But iam getting 203010+50 = 110 which is not correct.
    Please help me on this
    Regards

    set the context to Idoc level
    use the UDF
    int sum=0;
    for(int i=0;i<a.length;i++)
    sum =sum + Integer.parseInt(a<i>);
    i++;
    String res = sum;
    return res;
    Do the mapping as
    Quantity----->UDF---->Total
    this  logic works if  E1EDL43 should  repeats twice

  • Biztalk Map Logic

    Hi,
    I have the Biztalk Map logic as shown in figure
    Discount Step and Loyalty both are repeatitive node structures
    Sample Input Xml is as shown below
    <DiscountStepList>
     <DiscountStep>
      <NumberOfTrips>35</NumberOfTrips>
      <Percentage>1113</Percentage>
      </DiscountStep>
     <DiscountStep>
      <NumberOfTrips>5</NumberOfTrips>
      <Percentage>7732</Percentage>
      </DiscountStep>
     <DiscountStep>
      <NumberOfTrips>30</NumberOfTrips>
      <Percentage>8280</Percentage>
      </DiscountStep>
       </DiscountStepList>
    the logic to get the o/p will be
    For Childe Element MIntrip:
    in the first iteration Mintrip=1 and in Secoond iteration Mintrip=Last elememnt Maxtrips+1
    For CHild Element Maxtrips:
    In the first Iteration Maxtrips="NumberOfTrips" and in Second iteration current element MintripNum  + NumberOfTrips.
    The o/p for the above input example will be like
    <ns0:Loyalites xmlns:ns0="http://BizTalk_Server_Project7.Schemdfa1">
      <Loaylty>
        <MinTrip>1</MinTrip>
        <MaxTrips>35</MaxTrips>
      </Loaylty>
    <Loaylty>
        <MinTrip>36</MinTrip>
        <MaxTrips>41(36+5)</MaxTrips>
      </Loaylty>
    <Loaylty>
        <MinTrip>36</MinTrip>
        <MaxTrips>41(36+5)</MaxTrips>
      </Loaylty>
    <Loaylty>
        <MinTrip>42</MinTrip>
        <MaxTrips>72(42+30)</MaxTrips>
      </Loaylty>
    </ns0:Loyalites>
    Is it possible in Biztalk Map using functoids?

    Sujith,
    You got to buy me a drink :)
    You can achive this using XSLT in your map, following XSLT will get the desired result:
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://BizTalk_Server_Project7.Schemdfa1" >
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/DiscountStepList" />
    </xsl:template>
    <xsl:template match="/DiscountStepList">
    <ns0:Loyalites>
    <xsl:for-each select="DiscountStep">
    <xsl:if test="position() =1">
    <Loaylty>
    <MinTrip>
    <xsl:value-of select="position()" />
    </MinTrip>
    <MaxTrips>
    <xsl:value-of select="NumberOfTrips/text()" />
    </MaxTrips>
    </Loaylty>
    <xsl:call-template name="ConstructNextLoayltyNode">
    <xsl:with-param name="i" select="2"/>
    <xsl:with-param name="limit" select="count(/DiscountStepList/DiscountStep)"/>
    <xsl:with-param name="vMaxTrips" select="NumberOfTrips/text()"/>
    </xsl:call-template>
    </xsl:if>
    </xsl:for-each>
    </ns0:Loyalites>
    </xsl:template>
    <xsl:template name="ConstructNextLoayltyNode">
    <xsl:param name="i"/>
    <xsl:param name="limit"/>
    <xsl:param name="vMaxTrips"/>
    <xsl:if test="$i &lt;= $limit">
    <Loaylty>
    <MinTrip>
    <xsl:value-of select="$vMaxTrips + 1" />
    </MinTrip>
    <MaxTrips>
    <xsl:value-of select="$vMaxTrips + 1 +/DiscountStepList/DiscountStep[$i]/NumberOfTrips/text() " />
    </MaxTrips>
    </Loaylty>
    <xsl:call-template name="ConstructNextLoayltyNode">
    <xsl:with-param name="i" select="$i+1"/>
    <xsl:with-param name="limit" select="$limit"/>
    <xsl:with-param name="vMaxTrips" select="$vMaxTrips + 1 +/DiscountStepList/DiscountStep[$i]/NumberOfTrips/text()"/>
    </xsl:call-template>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>
    Note: You may have to change the namespace as yours. And also the output sample you have show has repeated node as following which is correct.
    <Loaylty>
        <MinTrip>36</MinTrip>
        <MaxTrips>41(36+5)</MaxTrips>
      </Loaylty>
    <Loaylty>
        <MinTrip>36</MinTrip>
        <MaxTrips>41(36+5)</MaxTrips>
      </Loaylty>
    For your requirement you will get the out as following which your requirement:
    <ns0:Loyalites xmlns:ns0="http://BizTalk_Server_Project7.Schemdfa1">
    <Loaylty>
    <MinTrip>1</MinTrip>
    <MaxTrips>35</MaxTrips>
    </Loaylty>
    <Loaylty>
    <MinTrip>36</MinTrip>
    <MaxTrips>41</MaxTrips>
    </Loaylty>
    <Loaylty>
    <MinTrip>42</MinTrip>
    <MaxTrips>72</MaxTrips>
    </Loaylty>
    </ns0:Loyalites>
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Need Mapping logic for the following scenario

    Hi everyone,
    I need a mapping logic for the following scenario.
    For the same order no with same material no, the quantity should be summed and only one idoc should be created.
    For the same order no with different material no, no need to sum the quantity and only one idoc should be created.
    For example:
    Source Structure:
    Ord No      Mat No      QTY
    12               1               2
    13               1               3
    13               2               1
    12               2               4
    15               1               5
    14                3              7
    12               1              6
    Target Structure:
    Ord No      Mat No      QTY
    12               1               8
    12               2               4
    13               1               3
    13               2               1
    14               3              7
    15               1              5
    Thanks in Advance

    Try the graphical mapping as shown below using concat with a space as delimite and UDF to split the value again by space.
    1. Idoc node
    (RootContext)
    OrdNo
         |concat[ ] -> sort[asending] -> SplitByValue -> collapseContexts -> Idoc
    MatNo                case sensitive    [ValueChange]                              
    (RootContext)
    2. OrdNo
    OrdNo(RC)
         |concat[ ] -> sort[asending] ->SplitByValue->collapseContexts->SplitByVale-> UDF to fetch ordno  -> OrdNo
    MatNo(RC)           case sensitive    [ValueChange]                [eachValue]   (return var1.split(" ")[0];)
    3. MatNo
    OrdNo(RC)
         |concat[ ] -> sort[asending] -> SplitByValue ->collapseContexts->SplitByVale-> UDF to fetch ordno  -> MatNo
    MatNo(RC)              case sensitive    [ValueChange]                  [eachValue]   (return var1.split(" ")[1];)
    4. Qty
                   [asending,case sensitive]               
                   --  sortByKey -----> formatByExample -> sum ->Qty
    OrdNo(RC)           |          |          ^          
         |concat[ ] -> |            Qty(RC)          |
    MatNo(RC)           |                |     
                   --sort[asending]-> SplitByValue
                       case sensitive    [ValueChange]
    Regards,
    Sunil Chandra

  • XSLT mapping Help Required.

    XSLT mapping Help Required.
    Hi Experts,
    I am New to XSLT Mapping. I am practising the below Example:
    InputXML File:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    XSL StyleSheet File:
    <?xml version='1.0' encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
    Xmlns:ns1=”http://XYZ.com/Test”>
    <xsl:template match="/">
    <ns1:MT_XSLT_Target>
    <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
    <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
    </Name>
    <Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
    ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
    <City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
    </ns1:MT_XSLT_Target>
    </xsl:template>
    </xsl:stylesheet>
    The Desired Output shuold be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
    <Title>Male</Title>
    <Name>Anshul Chowdhary</Name>
    <Street>83/b 2nd Main</Street>
    <City>Mysore</City>
    </ns1:MT_XSLT_Target>
    I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
    Anshul Chowdhary Male 2nd Main 83/b Mysore
    I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
    Regards,
    GIRIDHAR

    Hi,
    I have used below for testing.
    Input xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
    <ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
    <Person>
    <FirstName>Anshul</FirstName>
    <LastName>Chowdhary</LastName>
    <Gender>Male</Gender>
    <Address>
    <Street>2nd Main</Street>
    <Houseno>83/b</Houseno>
    <City>Mysore</City>
    </Address> </Person>
    </ns0:MT_XSLT_Source>
    xsl code:
    <?xml version='1.0' encoding="UTF-8"?> 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen" 
        xmlns:ns1="http://XYZ.com/Test"> 
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> 
        <xsl:template match="/"> 
            <ns1:MT_XSLT_Target> 
                <Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title> 
                <Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/> 
                </Name> 
                <Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '), 
                    /ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street> 
                <City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City> 
            </ns1:MT_XSLT_Target> 
        </xsl:template> 
    </xsl:stylesheet>
    For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
    Regards
    Venkat

  • Mapped logical system

    Hi Experts,
    I have a confusion to use the type of RFC connection like when
    to use ABAP connection and TCP/IP connections etc...
    I have defined one logical system and define one RFC destination and when  i am trying connect this two it is asking me to give Standard RFC destination for BAPI and dialog calls to connect to the logical system. i would like to know what is this ? why we need to give this?.
    and we assign this logical system to the Mapped logical system. i d like to know what is this mapped logical system and when we need to assign the logical system to this mapped system.
    Can anybody please clarify all my doubts.
    Thanks, Izaz.

    Hi Izaz,
    ABAP connections are given between 2 SAP systems and TCP/IP is used between ABAP and JAVA.
    Regards,
    Suman

  • Mapping Help required for ORDER Idoc to EDI file

    Hi
    My source strcture is as follows
    E1EDP01
    E1EDP01
       E1EDPT1 (TDID=0001)
         E1EDPT2
             TDLINE = abcd
       E1EDPT1 (TDID=0001)
         E1EDPT2
             TDLINE = XYZ
    and my target line item is mapped with TDLINE(Context E1EDP01)-exist then createif LineItem(This is working fine but item filed is failing)
    The logic to populate itemFIELD1 is if E1EDT1(TDID==0001) then pass TDLINE to ItemFIELD1, how to map this
    (Sometimes E1EDPT2 populate multiple times for one E1EDPT1)

    >and my target line item is mapped with TDLINE(Context E1EDP01)-exist then createif LineItem(This is working fine but item filed is failing)
    Why don't you create the LineItems only when TDID = 0001 because this will ensure to populate item fields with correct value.
    The mapping logic to produce the LineItems should be like this..
    IF (TDID = 0001) THEN (TDLINE set context to E1EDPT1)---RemoveContext---LineItem.
    >The logic to populate itemFIELD1 is if E1EDT1(TDID==0001) then pass TDLINE to ItemFIELD1, how to map this
    In this mapping make sure the context of TDLINE is set to E1EDPT1 and then use RemoveContext ---SplitByValue to the output of "IF" function. e.g.
    IF (TDID = 0001) THEN (TDLINE set context to E1EDPT1)---RemoveContext---SplitByValue---FIELD1.

  • Logic required  for Sort in ALV

    Hi All,
    I am dowloding the ALV report layout in excel sheet thorough mailing functionality.
    I want to implenemnt the dynamic sort. Here I am writing this.but i want the logic for below code.
          CALL FUNCTION 'LT_DBDATA_READ_FROM_LTDX'
            EXPORTING
      I_TOOL             = 'LT'
              IS_VARKEY          = W_VARKEY_EU
            TABLES
              T_DBFIELDCAT       = IT_DBFIELDCAT_EU
            T_DBSORTINFO       =  IT_DBSORTINFO
             T_DBFILTER         = IT_FILTER_LAYOUT
             T_DBLAYOUT         = IT_DB_LAYOUT.
    LIT_DBSORTINFO[] = IT_DBSORTINFO[].
        SORT LIT_DBSORTINFO[] BY KEY1.
        DELETE ADJACENT DUPLICATES FROM LIT_DBSORTINFO[] COMPARING KEY1.
        LOOP AT LIT_DBSORTINFO[].
          CLEAR: LW_SPOS,
                 LW_UP,
                 LW_DOWN,
                 LW_SUBTOT,
                 LW_COMP,
                 LW_EXPA,
                 LW_GROUP.
          CLEAR IT_DBSORTINFO[].
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'SPOS'.
          IF SY-SUBRC = 0.
            LW_SPOS = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'UP'.
          IF SY-SUBRC = 0.
            LW_UP = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'DOWN'.
          IF SY-SUBRC = 0.
            LW_DOWN = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'SUBTOT'.
          IF SY-SUBRC = 0.
            LW_SUBTOT = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'COMP'.
          IF SY-SUBRC = 0.
            LW_COMP = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'EXPA'.
          IF SY-SUBRC = 0.
            LW_EXPA = IT_DBSORTINFO-VALUE.
          ENDIF.
          CLEAR IT_DBSORTINFO.
          READ TABLE IT_DBSORTINFO WITH KEY
                                    KEY1  = LIT_DBSORTINFO-KEY1
                                    PARAM = 'GROUP'.
          IF SY-SUBRC = 0.
            LW_GROUP = IT_DBSORTINFO-VALUE.
          ENDIF.
          LOOP AT IT_ALV_DATA FROM W_LOOP_FROM_EU TO W_LOOP_TO_EU.
            LW_TABIX = SY-TABIX.
            READ TABLE IT_FIELDCAT INTO LW_FIELDCAT WITH KEY
                               FIELDNAME = LIT_DBSORTINFO-KEY1.
            IF SY-SUBRC = 0.
              ASSIGN COMPONENT SY-TABIX OF
                         STRUCTURE IT_ALV_DATA TO <LFS>.
              IF SY-SUBRC = 0.
                CLEAR LW_CHAR.
                LW_CHAR = <LFS>.
                  IF LW_SPOS= 'SPOS'.
                  LOGIC Required
                    ENDIF.
                  ELSEIF LW_OPTION = 'DOWN'.
                 LOgic required
                    ENDIF.
                        ENDIF.
          ENDLOOP.
        ENDLOOP.
    regards,
    Ajay reddy

    Hai,
    Let
    1)general data
    2)all customers
    3)company code data
    4)sales organization data
    are the check box names,Then
    Just use the piece  of code below:
    <b>IF general data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF all_customers = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF company_code_data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.
    IF sales_organization_data = 'X'.
       COUNT = COUNT + 1.
    ENDIF.</b>
    Now check whether more than one Check Boxes are selected or not
    <b>IF COUNT GT 1.
    "* Do the oprations  what ever you want here  
    ENDIF.</b>
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

  • No mapping logic : soap to proxy scenario

    Hi,
    I have a soap to proxy scneario with no mapping logic.wanted to confirm certain things.
    Wanted to confirm certain things.
    1) So i can exclude mapping and interface mapping step since i just need to pass value to proxy ?
    2) in interface determination ,what i need to provide for interface mapping ?
    3) sync proxy will be generated from one outbound message interface "( there will be only one outbound message interface which will be synchronous  : which will be synchronous ?
    4) in receiver business system , i need not put any message interface since we only have one outbound sync message interface
    Thnx

    how many message interfaces wil be needed for synchronous scneario without mapping ?
    Two....one for Sender (Outbound) and one for receiver (Inbound)
    in case ur answer is 2 for above ? proxy needs to be generated from outbound or inbound interface?
    For your SOAP --> XI/ PI --> PROXY, scenario the proxy should be generated for the inbound interface
    1) So i can exclude mapping and interface mapping step since i just need to pass value to proxy ?
    If both the source and target structures are the same , then you do not need to perform mapping....do not create message and Interface mapping .....you should however create Interface Determination with appropriate Source and Target interfaces.
    2) in interface determination ,what i need to provide for interface mapping ?
    Nothing.....including a mapping is not mandatory.
    4) in receiver business system , i need not put any message interface since we only have one outbound sync message
    interface
    The message interface needs to be associated with the Business System.....it will be the inbound interface for SOAP --> XI --> PROXY scenario.
    Regards,
    Abhishek.

  • ALV ...Logic required

    Hi every body,
       I have one requirement like an alv report will display
    output which contains a material number.
    <b>If i click On the material number it shud go to MM03...Accounting view
    Logic required for this.</b>I am a beginner ...Plz help me...
    Thanks in advance.
    Message was edited by: raja gurrala

    Hi,
    See the code sample,
    INCLUDE <icon>.
    * Predefine a local class for event handling to allow the
    * declaration of a reference variable before the class is defined.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA : o_alvgrid          TYPE REF TO cl_gui_alv_grid ,
           o_dockingcontainer TYPE REF TO cl_gui_docking_container ,
           o_eventreceiver    TYPE REF TO lcl_event_receiver,
           wa_layout TYPE lvc_s_layo ,
           wa_variant TYPE disvariant.
    CONSTANTS : c_a(1) TYPE c VALUE 'A' ,                     " All Layouts
                c_x(1) TYPE c VALUE 'X'.
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
    * Hot Spot Click
           handle_hotspot
             FOR EVENT hotspot_click OF cl_gui_alv_grid
                IMPORTING e_row_id
                          e_column_id
                          es_row_no,
    * Double Click
    handle_double_click
          FOR EVENT double_click OF cl_gui_alv_grid
              IMPORTING e_row
                        e_column
                        es_row_no,
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    * Implementation
    CLASS lcl_event_receiver IMPLEMENTATION.
    *&      Method handle_hotspot
    * This method is called when the user clicks on a hotspot to drill down.
    * The following types are exported from the ALV
    * LVC_S_ROW
    * LVC_S_COL
    * LVC_S_ROID
      METHOD handle_hotspot.
    * The hotspot processing coded in the form below.
        PERFORM f9900_handle_hotspot USING e_row_id
                                           e_column_id
                                           es_row_no.
      ENDMETHOD.                    "handle_hotspot
    *&      Method handle_double_click
      METHOD handle_double_click.
    * The double click processing should be coded in the form below.
        PERFORM f9901_handle_double_click USING e_row
                                                e_column
                                                es_row_no.
      ENDMETHOD.                    "HANDLE_DOUBLE_CLICK
    FORM f9900_handle_hotspot  USING    p_row_id
                                        p_column_id
                                        p_row_no.
    *Read internal table for proper value.
      READ TABLE  i_output
                  INDEX p_row_id
                  INTO wa_output.
    * Call the transaction MMBE
      SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
      CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
    ENDFORM.                    " f9900_handle_hotspot
    *&      Form  f9901_handle_double_click
    *       Double Click
    FORM f9901_handle_double_click  USING    p_row
                                             p_column
                                             p_row_no.
      READ TABLE i_output INDEX p_row INTO wa_output.
      CASE p_column.
        WHEN 'MATNR'.
          IF NOT wa_output-matnr IS INITIAL.
            SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
          ENDIF.
      ENDCASE.
    ENDFORM.                    " f9901_handle_double_click
    U can use either hot spot or double click event.
    If u r using hotspot set the hotspot = 'X' in fieldcatalog.
    Hope this helps.
    OR another method without oops concept
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    data:lv_matnr    LIKE v_mmim_lc-matnr,   "Material
    read table i_output into w_output index rs_selfield-tabindex.
    lv_matnr = w_output-matnr.
    SET PARAMETER ID 'MAT' FIELD lv_matnr.
    CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
    Clear:     lv_matnr.
    ENDFORM.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                =
    *   I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_repid
         i_callback_pf_status_set          = 'SET_PF_STATUS'
    <b>     i_callback_user_command           = 'USER_COMMAND'</b>
         i_background_id        = 'ALV_BACKGROUND'
        IS_LAYOUT               = I_LAYOUT
        it_fieldcat             = i_fieldcat "field catalog
       I_SAVE                   = 'A'
       IS_VARIANT               = G_VARIANT
        TABLES
            t_outtab                       = i_output "output table
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Kindly reward points if this helps u, revert back with queries.
    Message was edited by: Judith Jessie Selvi

Maybe you are looking for

  • Task Scheduled Start Date with RAPI

    Task Scheduled Start Date with RAPI Is it possible to have a scheduled start date for a task in a service that is generated by RAPI, and, which does not have any authorizations/reviews? RAPI seems to throw the request into the service delivery moment

  • T430s + BIOS 2.02: Red Hat Enterprise Desktop 6.3 display problem

    Hi, Today I updated the BIOS on my T430s to 2.02 using the g7uj04uc.iso boot CD image from Lenovo's support site. After that the Red Hat Enterprise Linux Workstation 6.3 display is screwed up. It's shifted to the right and shows psychodelic false col

  • Adobe captivate installing problem

    Title: Adobe captivate installing problem Question: I have purchased a Adobe Captivate 4 license and I have downloaded  the setup file from adobe site and installed in a x86 windows XP machine  which is joined in a windows 2003 server ADS.At first I

  • Exception when using a renamed com.sap.portal.navigation.toolarea.par file

    Hi, I would like to modify the toolarea of our SAP Enterprise Portal. Basically, I just want to move the tools to the right hand side. <b>Problem Description</b> According to several threads I found on sdn - How to modify the header - copy and rename

  • DHCP-The number of current clients in Overview do not match the Clients

    Hi, I have a big issue that I'm unable to resolve. In our old server running 10.3.9 DHCP is running. In the overview is shows that 99 clients are currently on but when I click on the Clients tab it only shows about 26, which is accurate. The problem