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

Similar Messages

  • 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

  • Message Mapping Logical Problem

    Hi there I have an issue with my message mapping. My source structure looks like this.
    IDOC
    -Seg1
    ---Element1
    ---Element2
    ---Seg2
    ElementA
    ElementB
    Ok so I have to map the IDOC to a flat file. Seg 1 is the Header and Seg2 is the Details. For each flat file there will only be 1 Seg1 but there can be X amount of Seg2s' in the flat file. My problem is mapping Element 1 to Element A. Element A has the value of Element 1 and 2 combined. It appears I cannot map a lower hierarchy to an higher hierarchy? I tried changing the context but with no luck.
    Any idea?
    Thanx,
    Jan

    My problem is mapping Element 1 to Element A.
    What do you mean by this? I guess you want the Element1 to appear with each Segment occurrence. If yes, you may use standard function useOneAsMany as shown.
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Regards,
    Prateek

  • Message mapping logic help

    Hi All
    I have a source structure like this below. It's a big structure actually. I'm just pasting the relevant structure where I need your help.
    </root>
         <storage> 
             <id>AB</id>
             <Type>TY</storType>
             <Temp>100</Temp>
        </storage>
    ----</root>
    My requirement is to check the value coming in <Type> and if it is TY, then the target structure will be the exactly the same
    If it is XY, then the target structure will have one more field <celsius> and will look like this below.
    </root>
         <storage> 
             <id>AB</id>
             <Type>TY</storType>
             <Temp>100</Temp>
             <celsius>922</celsius>
        </storage>
    ----</root>
    The <storage> complex element with elements can repeat as many times in the source XML. But the values of <Type> will be either TY or XY and I have to create the target structure accordingly. Pls help. I am using graphical message mapping
    thx
    mike

    Hi Michael,
    Please try below mapping
    Regards,
    Krupa

  • Regarding Message Mapping

    Hi All,
    The problem is I have created 2 Message Mappings and Two Message Interfaces
    Two Messages Mappings and Message Interfaces are activated successfully, my question is which Message Mapping will execute among them(Message Mapping). If it Executes latest one Message Mapping ok, if I want to Execute Old one how can I execute that. I dont know whether we can create more than one Message Mapping, if it is possible here then can I Execute any one among all these Message Mapping help me in this problem.
    Thanks & Regards,
    Ashok.

    hi,
    in your scenarios your mappings
    are executed on the basis of the <b>interface mappings</b>
    one interface mapping can have a few message mappings
    that will all be executed :
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    you always use interface mappings (in directory)
    so you need to check how which message mappings
    are included in your interface mapping
    to find out which will be used in your scenarios
    Regards,
    michal

  • Regarding Message Mapping in JDBC Scenario

    Hello Experts,
            I got struct up in message mapping. In message mapping we can able to see different types of Functions. So I need some clarifications on it. Functions are available like...
    Conversions
    Boolean
    Node Functions
    Constants
    Date
    Text
    Static
    Arithmetic
    So please explain in simple for each functions.
    Points will be rewarded.
    Thank you

    Hi
    *Boolean*:-
    And -- checks for 2condition, return a true value if both condition are satisfied
    Or --checks for 2condition, return a true value if one condition is true.
    Not - checks if the condition is not equal to.
    Equals - Check whether 2 Boolean values are equal
    NotEquals
    If u2013 Returns second value if the first argument is true. otherwise returns third argument
    If WithoutElse u2013 Returns value of second argument, if first argument is true.
    Node Functions:-
    createIf - Produces empty value if argument is true; Resultlist.SUPPRESS otherwise
    removeContexts u2013 Produces plain stream of values with No context changes
    replaceValue u2013 replaces value of source field to value specified in Function Properties.
    Exists u2013 Returns true, if Node exists otherwise false
    SplitByValue u2013 inserts context changes after event specified
    collapseContexts u2013 Produces one empty string value out of each arguments context. All arguments are in one context
    useOneAsMany u2013 Use First Argument as IS on same level as third argument. second argument defines when next value of first argument is used
    sort u2013 sorts values in each context
    sortByKey u2013 Sorts values in second queue by keys from first queue
    mapwithDefault u2013 Inserts default values specified in the function properties into empty contexts
    formatByExample u2013 Takes values from the first queue and inserts them in the structure of second queue.
    Constants:-
    Constant u2013 Generates constant value
    CopyValue u2013 Takes specified value in argument stream and copies it an infinite number of times
    Sender u2013 Sender System
    Receiver u2013 Receiver System
    Date:-
    CurrentDate u2013 Return current date in specified format
    DateTrans u2013 Transforms date from input format to output format
    Dateafter u2013 Returns True if first date is after second otherwise false
    DAteBefore - Returns True if first date is before second otherwise false
    CompareDates u2013 Compares two dates
    Text:-
    Substring u2013 Returns substring depending upon the given parameters
    Concat u2013 concatenates 2 strings inserting delimiter string parameter between them
    Equals u2013 Check whether Strings are equal
    indexOf2 u2013 returns the index where the second string is found for the first time in the first string
    indexOf3 u2013 As with indexOf with 2 parameters, But starting search at the specified position
    lastindexOf2 u2013 Returns the index where the second string is found for the last time in the first string
    lastIndexOf3 u2013 As with lastIndexOf with 2 parameters starting search at the specified position
    compare u2013 compares 2 strings lexicographically
    replaceString u2013 Replaces each occurrence of pattern(2nd argument ) of source string(1st arg). By third string
    length u2013 returns length of string
    endsWith u2013 Tests whether string ends with specified suffix
    startsWith2 u2013 Tests whether string starts with specified prefix
    startsWith3 u2013 Tests whether string starts with specified prefix beginning at specified location
    toUpperCase u2013 Converts all characters in string to upper case
    trim u2013 Removes white space from both ends of string
    toLowerCase u2013 Converts all characters in String to Lower case
    Statistic:-
    sum u2013 calculates sum of all numbers in each context
    average u2013 calculates the average of all numbers in each context
    count u2013 Counts number of values in each context
    Index u2013 For each incoming value, this Function returns the index number of the incoming value in the context, String from the initial index and increasing by the increment defined in the parameters.
    Arithmetic:-
    Add u2013 add two values
    Subtract u2013 subtracts second value from the first value
    equalsA u2013 Returns true; If float numbers represented by argument strings are equal otherwise returns false
    abs u2013 returns Absolute value of argument
    sqrt u2013 Returns square root of the number
    sqr u2013 Returns square of the number
    sign u2013 Returns -1 if number is negative, +1 if positive, 0 if 0
    neg u2013 Multiplies number to -1
    1/x u2013 calculates 1/x
    Power u2013 Returns value of the first argument to the power of the second argument
    Less u2013 Returns true if the first number is less than the second number otherwise false
    Greater - Returns true if the first number is greater than the second number otherwise false
    Multiply u2013 Multiplies 2 values
    Divide u2013 Divides first value by the second value
    Max u2013 Returns maximum of 2 numbers
    Min u2013 Returns Minimum of the 2 numbers
    Ceil u2013 Returns the smallest (closest to the negative infinity) initial value that is not less than the argument and it is equal to the mathematical integer.
    Floor - Returns the largest (closest to the negative infinity) initial value that is not Greater than the argument and it is equal to the mathematical integer.
    Round u2013 Returns closest initial value to the argument
    Counter u2013 Counts number of invocations. Initial value and increment defined by Parameters.
    FormatNum u2013 Formats Number with given pattern.
    Conversions:-
    FixValues u2013 Creates a Local Table to perform a value Mapping
    ValueMapping u2013 Define jump to Value Mapping table of Integration Directory.
    Message Mapping(Node Function) Part-1
    Message Mapping Simplified - Part I
    Sravaya Talanki- Message Mapping(Node Function) Part-2
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Standard Functions
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    Advanced mapping function(mapwithdefault,formatbyexample,sort,sortbykey)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    Hope this is useful
    Saiyog
    Edited by: Saiyog Gonsalves on Jul 11, 2008 1:14 PM

  • Error : message mapping logic in PI

    Dear Team,
    Please find the source and target structures..
    Source ::
    ->MT
    -->records
    --->matnr
    --->batch
    --->submatnr(s)
    Target::
    ->ZRFC
    -->Import
    --->Item
    >matnr
    >batch
    >submatnr
    1) It is SOAP to RFC scenario. In Source strcuture for one matnr , we have one or more submatnrs.
    2)RFC in R/3 contains Import parameters as..matnr,batch,submatnr(onlyone).
    3)I want to build mapping - for each submatnr in source I want to create one complete record in target .i.e
    if matnr contains 2 submatnrs in source , i want to create 2 records at target side like
    first record - matnr,batch,submatnr 
    second record - matnr,batch,submatnr.
    here in both records the matnr and batch values are same , which we have taken from source but submatnrs changed.
    Can any body help me how to build mapping.
    -Drumi

    Hi,
    I assumed that submatnr occurance 1 to unbounded...
    here is the logic
    map
    Submatnr----->SplibyValue(ValueChange)-->RemoveContect-->Item
    matnr1---->useoneAsmany(1st argument Matnr1,second and third arugument submatnr)--->splitbyValue(EachValue)-->Matnr1.
    batch1---->useoneAsmany(1st argument batch11,second and third arugument submatnr)--->splitbyValue(EachValue)-->batch1
    submatnr-->removecontext-->splitbyevalue(eachvalue)--->submatnr
    Regards,
    Raj

  • Require some complex logic scenario in message mapping

    Hi all,
                 I need some complex logic scenarios for practice in message mapping . Kindly forward some links for message mapping logic scenarios.
    Thank you so much in advance.

    always search sdn first....
    http://wiki.sdn.sap.com/wiki/display/XI/MappingConceptsinSAPXI

  • Message Mapping- 3 problems

    Hi,
    1)I need some information regarding Message Mapping. I need to map the field TDLINE of segment E1EDKT2 of IDOC ORDERS05 to the target fields. But based upon the index number of the record of this segment, I must map it to different fields (eg.E1EDKT2[10], E1EDKT2[3]). How can I incorporate this in Message Mapping?
    2)And one more scenario is as follows.Use PARTN if exists or use LIFNR to map to target and it must satisfythe conidtion PARVW = AG. Should we need Java code or can we achieve this using two 'If' conditions.
    3)We are looping at a source segment and it has multiple  occurances.How to create multiple segments in target based on condition.
    Can anyone help me.
    Thanks,
    Srinivas

    > 1) I need to map the field TDLINE of segment E1EDKT2
    > of IDOC ORDERS05 to the target fields. But based upon
    > the index number of the record of this segment, I
    > must map it to different fields (eg.E1EDKT2[10],
    > E1EDKT2[3]). How can I incorporate this in Message
    > Mapping?
    You can use the index function (with SP13):
    E1EDKT2* - index
                      equalS
        constant(10) /     
                             ifWithoutElse - target
    TDLINE - removeContexts /
    check the correct context
    > 2)And one more scenario is as follows. Use PARTN if
    > exists or use LIFNR to map to target and it must
    > satisfy the conidtion PARVW = AG. Should we need Java
    > code or can we achieve this using two 'If'
    > conditions.
    Sure you can chain if statements:
            PARVW
                  equalS 
    constant(AG) /     
                         ifWithoutElse
                  PARTN /            
                       PARTN - exist - if - target
                                  LIFNR
    This mapping assumes, that PARVW = AG is available, when PARTN is available.
    > 3)We are looping at a source segment and it has
    > multiple  occurances. How to create multiple
    > segments in target based on condition.
    Here is a pattern:
    condition - createIf - target
    condition has to be a queue of true and false with the same occurrency as source.
    All sub nodes of source are now arranged correctly under the target node.
    Regards
    Stefan
    Message was edited by: Stefan Grube

  • Message Mapping for multiple item levels

    Hi,
    My query is regarding message mapping
    Example of source data structure & Target data structure
    Source data Structure
    <item>
          --<no>1</no>
          --<address/>
          --<ITEMS>
            ----<item>
              ------<Name>a</Name>
            ----<item>
              ------<Name>b</Name>
    <item>
          --<no>2</no>
          --<address/>
          --<ITEMS>
            ----<item>
              ------<Name>c</Name>
            ----<item>
              ------<Name>d</Name>
    Expected  Target data structure
    <Item>
      -- <no>1</no>
      -- <name>a</name>
    <Item>
      -- <no>1</no>
      -- <name>b</name>
    <Item>
      -- <no>2</no>
      -- <name>c</name>
    <Item>
      -- <no>2</no>
      -- <name>d</name>
    How I can map the '<no>' field to target '<no>' field to repeat value until to second sub item level occurance complete ?
    Thank you
    Sateesh

    Hi Sateesh,
    Please see the solution below.
    The are 2 contect changes you need to do on field level. Right click and go to context and select your context you need.
    Context on ITEMS - Should be on Root Structure(In my mapping it is MT_Multiple_Item_Level_Source)
    Context on Name - Should be on Item (The first Item Tag)
    Good Luck.
    Regards,
    Jannus Botha

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • Query Regarding Multi-Message Mapping in Interface Mapping.

    Hi All,
    I've a query that can we use Multi-Message Mapping in Interface Mapping if:
    One mapping structure is simple one-2-one mapping and
    Second mapping is calling a stored procedure.
    Please give me some links if the answer is YES.
    Thanks in Advance.
    Regards,
    Sreedhar.
    Edited by: Sreedhar Av on Oct 12, 2009 1:26 PM

    Hi,
    Your question not clear buddy..what i understood is..
    If you want execute multiple message mappings in Interface mapping we can ,just add two mapping programs in interface mapping.first mapping program output is input to the second mapping program.
    If first mapping program is very simple,if you want to execute stored procedure in second level mapping write used defned fun ction to conect to data base or create JDMC receiver communication channel ,cal the communictaion channel in udf.write stored procedure in UDF.
    SEARCH for more info in sdn how to perform DBLOOKUPS.
    regards,
    Raj

  • Regarding nodes shown in red colour in message mapping under test (tab)

    hi all.
    i just want to confrom one thing.
    i just created a file to rfc scenario and when i was tested and look in sxmb_moni its showing like the message was sucess but when i ltested in message mapping in design there were some nodes in sender Message type which were displayed in red colour.
    and when i look in runtime workbench the message is showing like system error.
    so can you guys tell me what could be the reason for this.
    waiting for your response.
    bye.
    regards.
    seeta ram.

    hi rinku .
    i think you havent understand my problem.
    here the message in moni was showing as succes but when i tested the same message which was in moni in message mapping (design) there were some nodes which were in red colour and these nodes are not populated to reciever message type  .but it was in sxmb_moni with all the nodes .
    what could be the reason for this.
    can u tell me fast and i case if u still havent understand the Q u can ask me.
    waiting for your response.
    bye.
    regards.
    seeta ram.

  • Message Mapping ...  ABAP ,XSLT and JAVA

    HI Friends
    I have a general question ... but it will confuse me a lot ....
    my question is we have four types of message mappings
    1) GUI ( and UDFs)
    2) ABAP
    3)XSLT
    4) JAVA
    when we have plenty of options in GUI (and User defined functions also)  to define sender 2 receiver message mapping
    then what is need of JAVA,ABAP and XSLT Message Mapping and when we use these message mappings( exactly in which situation) and difference b/w them
    Thanks in Advance
    Mahesh

    Green = recommended
    Yellow = Acceptable
    Red = not recommended
    In my experience.
    XSLT mapping: is confotable to convert to another format different to xml(when we do not have a complex logic)
    Java Mapping: is to implement complex logics(but the maintainbilityis not good...you need a external tool)
    ABAP mapping: I think is the best option when the you have the skills on that technology but take account that is not portable neither good for usability.
    Regards
    Ivan

  • Access current system or target system ID in message mapping

    Hi.
    I have a requirement to map three different constant values to Sales Org field, depending on whether the system is D, Q or Prod.
    This needs to be done in the message mapping section of the Interface along with all the other mapping logic.
    Is there any way how we can access the current system ID or the Target system ID (XI is communicating with target, in this case, ECC, using RFC receiver Communication channel)?
    Please help.
    Thanks.
    Anuradha.

    Hi,
    The key element would be :-
    System.getProperty("SAPSYSTEMNAME");
    Use this in UDF to get System Name ... and then on basis of systemname do whatever you want to perform.
    Regards
    Prabhat Sharma

Maybe you are looking for