Help on message mapping.

Hi,
I am working on EDI to IDOC scenario.
In my input side i have PO1 record with occurence 1..1 and
                                   REF record with occurence 0 to unbound
In my output side E1EDPT2 record with occurence 1 to unbound.
   E1EDPT2  RECORD HAVE FIELD TDLNR.
My input file as
PO10016
REFSU12345
REFSU2345
REFSU3456
REFCR789
PO10026
REFSU54321
REFSU235
REFSU3465
REFCR7896
Here my Question is
if PO1 1st field = 001 and REF 1st field  = SU then i need to map REF 2nd  field to TDLNR.
   if REF 1st field = CR then ignore that record in output.
same thing for PO1 1st field =  002.
How can i map for above conditions.
Thanks,
SIngh.

Hi Sarvesh,
Can u plzz tell me how would i used in Graphical mapping that REF 1st element  is SU then map REF 2nd element to target fields
Here i need to check PO1 value also.
Plzz give me briefly  how would i use if/else. give me some hints.
Thanks,
SIngh.
Edited by: vcpsingh on Mar 10, 2010 5:09 PM
Edited by: vcpsingh on Mar 10, 2010 5:36 PM

Similar Messages

  • Need Help with Message Mapping in PI 7.1 - JDBC to IDOC

    I have an outgoing SQL function that sends multiple rows of data for use in creating an IDOC in ECC. I am trying to key the creation of new IDOCs (already did the maxOccurs trick to the IDOC definition) based on a field in the JDBC return data...
    JDBC Message Format...
    SEGNAM - TRANS_ID - MATERIAL - VKORG...ETC
    MARA -  00001 - 1234 - <space> - ...
    MARC -  00001 - 1234 - VK01 - ...
    MARA - 00002 - 9876 - <space> - ...
    MAKT - 00002 - 9876 - <space> - material description - ...
    Each time there is a new TRANS_ID, I need to indicate a new IDOC in the message mapping. I have tried all kinds of combinations of TRANS_ID --> dropContext --> splitValue and TRANS_ID --> collapseContext --> splitValue, but nothing has worked.
    Has anyone done this kind of message map (without any BPM please)?
    Thanks,
    Nathan

    Hello Nathan,
    For this one, you have to play with contexts.
    row 1 SEGNAM = MARA, TRANS_ID = 1, MATNR = 123...
    row 2 SEGNAM = MARC, TRANS_ID = 1, MATNR = 123, WERKS = PL01...
    row 3 SEGNAM = MARA, TRANS_ID = 2, MATNR = 987
    This also depends on the occurrence of the parent node. example, if I want MATNR to be populated, the logic would be like
    ex:
    IDOC1..unbounded) (The logic is the already provided in an earlier response)
    -->MATNR (1..1)
    MATNR --------> removeContext ----------------> FormatByExample --> MATNR
    TRANS_ID --> removeContext --> splitByValue:ValueChange --> /
    If the rows are not in order of trans_id, then you need to incorporate sorting into the logic above.
    Hope this helps,
    Mark

  • Need help on message mapping screen

    Hi folks,
    I am working on file to idoc scenario.   I Imported the IDOC to my scenario. In Messaga Mapping IDOC structure displaying fields as a documention. but i need techincal names of those fields.
    for Example:   In my IDOC 1 field is showing companycode but I want to see that field as a BUKRS.
    How to see the technical names of IDOC fields in Message Mapping.
    Your help is highly apprecia

    Hi,
    I dont think we would be able to see the data element names of the IDOC in XI. Even the imported XSD of Idoc doesnot contain data element name.
    We would be only dealing with the field names/ structure of the IDOC for field message mappings. The field names are internally mapped to the data element names in SAP R3 system.
    To view the internal mapping between field names and data element names of the Idoc fields, you can go to the transaction 'WE30'. Give the basic type of the Idoc and go to the segment editor. You can find the data element names for each field name  there.
    Thank you.
    Regards,
    Subbu

  • Help with Message Mapping - Context Change

    I need help with the following message mapping.  I am filtering by EMP_STAT in the Message Mapping.  I have this working for the ROW structures, but I can get the HEADER/REC_COUNT field to calculate.  I can do just a record count of ROW and get it to work, but I can't get it to work with the filter EMP_STAT = 'REG' added.  I get a context error.  Could someone send me the mapping code.
    Sender XML----
    <RECORD>
    <ROW>
    <EMPLOYEE>111</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>222</EMPLOYEE>
    <EMP_STAT>PT</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>333</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    </RECORD>
    Receiver XML----
    <RECORD>
    <HEADER>
    <REC_COUNT>2</REC_COUNT>
    </HEADER>
    <ROW>
    <EMPLOYEE>111</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>333</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    </RECORD>

    Hello,
    You can use this mapping
    For REC_COUNT:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> count -> REC_COUNT
                                     EMPLOYEE -> /
    For ROW:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> ROW
                                     EMPLOYEE -> /
    For EMPLOYEE:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> SplitByValue -> EMPLOYEE
                                     EMPLOYEE -> /
    For EMP_STAT:
    Constant: REG -> EMP_STAT
    Hope this helps,
    Mark

  • Need help in Message Mapping

    Hi Folks,
    I have below Query. Can you please suggest how do i solve below case.
    My source system has 4 fileds A , B, C, D and the target system has 1 Filed TOTAL.
    I have to concatenate all the 4 source fields by using slash(/) and placed in TOTAL target field.
    i need output has A/B/C/D.
    but here is my Query?  if any one of the field is not present in source field i.e. if source B filed is empty then I have to print Output has  A/C/D.
    NOTE:  there is no empty slashes for B.
    Please help me on this issue.
    Thanks,
    Enivass

    Hi Supriya,
    Actually I didnot get ur mapping shot
    Can u tell me some more briefly plzzz
    I tried blow
    A
             concat  -
    >    trim -
    > then what i have to use.       
    Thanks,
    Enivass
    Edited by: enivas on Oct 20, 2010 9:47 AM

  • Need help on message mapping

    Hi,
    Need ur help on below situation.
    I have input file structure as
    - <G_SPO1>
    - <S_PO1>
      <D_350>0001</D_350>
      <D_330>6</D_330>
      <D_355>EA</D_355>
      <D_212>151</D_212>
      <D_235>VC</D_235>
      <D_234>40421-821/1920-02</D_234>
      <D_235_2>SK</D_235_2>
      <D_234_2>427Y73226</D_234_2>
    - <S_REF>
      <D_128>SU</D_128>
      <D_127>0060325940</D_127>
      </S_REF>
    - <S_REF>
      <D_128>SU</D_128>
      <D_127>0060325957</D_127>
      </S_REF>
    - <S_REF>
      <D_128>SU</D_128>
      <D_127>0060325964</D_127>
      </S_REF>
    - <S_REF>
      <D_128>SU</D_128>
      <D_127>0060325971</D_127>
      </S_REF>
    - <S_REF>
      <D_128>SU</D_128>
      <D_127>0060325988</D_127>
      </S_REF>
    - <S_REF>
      <D_128>SU</D_128>
      <D_127>0060325995</D_127>
      </S_REF>
    - <S_REF>
      <D_128>CR</D_128>
      <D_127>WHITEHOUSE,RYAN</D_127>
      </S_REF>
    </S_PO1>
    </G_SPO1>
    I need to map D_127 elements to target field.
    here i need to check conditions.
    IF D_128 = SU then only i need to map D_127 to target field. otherwise ignore that record.
    Plzz let me know how would i map thid field to target field.
    Thanks,
    Singh.

    Lakshmi,
    for PO1 first element is 0001 i need output as
    0060325940
    0060325957
    0060325964
    0060325971
    0060325988
    0060325995
    for next PO1 first element is 0002 then i need output as
    0070325940
    0070325957
    0070325964
    These below fields are present in input file. the above file i mentioned only for PO1 first element D_350 = 0001.
    Presnetly i am geting output as
    0060325940
    0060325957
    0060325964
    0060325971
    0060325988
    0060325995
    0070325940
    0070325957
    0070325964
    but i need to differentiate this output as separate based on D_350 = 0001.
    finally required output is
    if PO1 1st element D-350 = 0001
    then output is
    0060325940
    0060325957
    0060325964
    0060325971
    0060325988
    0060325995
    if PO1 1st element D_350 = 0002
    then
    0070325940
    0070325957
    0070325964
    Plzzzz let me know.
    Thanks,
    Singh.

  • Help on message mapping requirement

    I have a source file with a structure like below:
    emp no , company code , dependent name , dependent age , dependent qualification
    an exp file would look something like below :
    PERNRA , 1000, ABC , 23, CA
    PERNRA,  1000, DEF , 25 , BE
    PERNRB,  1200, XYZ , 35 , GE
    PERNRA,  1000, TGH, 30, BE
    My target structure expects one node per employee number and the dependent information node recurring inside the <emp> ..... </emp> node.
    Please advise.
    Mathews

    Please look at following:
    I am asumming your source message will be do FCC to following format:
    <Recordset>
       <emp_no>PERNRA</emp_no>
       <comp_code>1000</comp_code>
       <dep_name>ABC</dep_name>
       <dep_age>23</dep_age>
       <dep_qua>CA</dep_qua>
    </Recordset>
    <Recordset>
       <emp_no>PERNRA</emp_no>
       <comp_code>1000</comp_code>
       <dep_name>DEF</dep_name>
       <dep_age>25</dep_age>
       <dep_qua>BE</dep_qua>
    </Recordset>
    I am assuming that your target message is something look like below:
    <emp>
      <emp_num>PERNRA</emp_no>
      <emp_info>
       <comp_code>1000</comp_code>
       <dep_name>ABC</dep_name>
       <dep_age>23</dep_age>
       <dep_qua>CA</dep_qua>
      </emp_info>
      <emp_info>
       <comp_code>1000</comp_code>
       <dep_name>DEF</dep_name>
       <dep_age>25</dep_age>
       <dep_qua>BE</dep_qua>
      </emp_info>
    </emp>
    <emp>
    </emp>
    Then your mapping design will look like below:
    remember that the formatbyExampe take two parameters, I put it just in same line of first parameter. Silimarly for sortbyKey
    emp_no -> removeConetext -> Sort -> SplitByValue[Value Change] -> CollapsContext -> removeContext --> emp
    emp_no -> removeConetext -> Sort -> SplitByValue[Value Change] -> CollapsContext ->emp
    _num
    emp_no --------------------------------------------------------->FormatbyExample -->emp_info
    emp_no -> removeContext -> sort -> SplitByValue[Value Change]--->
    Other nodes, for example dep_age:
    emp_no->removeContext-->sortbyKey -> SplitByValue[Each Value] -> dep_age
    dep_age->removeContext->
    Liang

  • Help for message mapping

    Hi, I have an IDOC -> PI -> File simple scenario but I donu2019t know how to solve the following problem. I have to built my file header line with data from IDOC segments. That data comes from the same segment but different u201Cinstancesu201D and there is a field to identify the instances, something like that:
    Source IDOC
         Segment1 with parameter = 001
         Segment1 with parameter = 002
    Target FILE header line:
    [segment1.001-field1];[segment1.002-field1]
    The mapping checks the parameter value but generates an error because the 2nd field of the file is obligatory and when the mapping founds the 1st segment then it canu2019t continue searching the segment with parameter = 002 and complete the file line.
    Sorry for my bad explanation, I hope you understand the problem.
    Edited by: Marshal on May 20, 2009 12:04 PM

    to make the if condition work for all the instances of <E1ADRM1>....the only thing that you need to do is in the mapping logic suggested by ravi just increase the context of the <PARTNER_Q> node on the source side and make it to point to <E1EDL20>...this will apply the logic for all the instances of E1ADRM1 in E1EDL20.....no need of any UDF
    Hi abhishek,
    I've done this but know the IF without els doesn't work. All the fields from the first E1ADRM1 instance are mapped to the file 2 times, and the 2nd E1ADRM1 data is not mapped right.
    Here I post an example of target XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:OL_MT_Entrega xmlns:ns0="urn:general-optica-es:ol:entrega">
       <Entrega>
          <header>
             <tipreg>01</tipreg>
             <nument>vbeln</nument>
             <codol>OSP_Partner</codol>
             <nomol>OSP_NAME1</nomol>
             <domol>OSP_STREET1</domol>
             <pobol>OSP_CITY1</pobol>
             <cpol>OSP_COD1</cpol>
             <coddes>WE_Partner</coddes>
             <nomdes>WE_NAME1</nomdes>
             <domdes>WE_STREET1</domdes>
             <pobdes>WE_CITY1</pobdes>
             <cpdes>WE_COD1</cpdes>
          </header>
       </Entrega>
    </ns0:OL_MT_Entrega>
    PD: There is another positions part on target XML but 1st I have to solve the header mapping

  • A little help needed in message mapping

    a little help needed in message mapping
    I have to map one of the idoc header segments as many times as it occurs to each Idoc when using the split message funcionality
    let us say we have the segment seg1 and there is a QUALF in it
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    then we use the vbeln to split the idoc into 2.
    so if we have
    <vbeln> 1 </vbeln>
    and
    <vbeln>2 </vbeln>
    then 2 Idocs should be created like this
    <Idoc>
    <vbeln> 1 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    <Idoc>
    <vbeln> 2 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    it is easy to create the segment by using createif with the QUALF field but my problem how to map the qualf twice for each idoc
    Thanks.

    UseOneAsMany is the function you need to use.
    It takes three parameters:
    1 --- The node you want to duplicated
    2 --- How many times you want to duplicated
    3 --- The context you want to place for it.
    Regards
    Liang

  • MESSAGE MAPPING PROBLEM PLS HELP

    hi forum i have a problem in message mapping...
    i have a file to file scenario...with a BPM..
    the components are:
    1. one outbound async MI:->   MI_OA_fileSender
    2. one abstract async MI:->   MI_AA_fileSender
    the above two has messsage structure as:
    <ns0:MT_sourceFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1...1
          <record>  1..unbound
             <batch_num/> 1..1
             <quantity/>  1..1
          </record>
       </recordset>
    </ns0:MT_sourceFile>
    3. one abstract async MI: -> MI_AA_fileDestination
    4. one inbound async MI:-> MI_IA_fileDestination..
    the above two has messsage structure as:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1..unbound
             <rec_number/> 1...1
             <qty/> 1...1
          </record>
       </recordset>
    </ns0:MT_rana3_destinationFile>
    inside the BPM i m doing a simple one to one interface mapping between MI_AA_fileSender and MI_AA_fileDestination AND then use a send step to send it to receiver service. But inside the graphical editor, for the message maaping in the interface mapping, i change the target structure a bit by duplicating <rec_number> making it:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1.. unbound
             <rec_number/> 0..1
             <rec_number/> 0..1 //did right click   and "duplicate sub-tree, so it becomes 0...0"
             <qty/>
          </record>
       </recordset>
    </ns0:MT_destinationFile>
    But i dont change the original structure of MT_destinationFile.
    Now in the resultant file in the receiver side i recive two <rec_number> tags....
    but since i didnt change the original structure of MT_destinationFile.....but i only made a change in the mapping by duplicating the node <rec
    _number>(right click and done "duplicate sub tree").............SHOULD IT NOT THROW AN ERROR
    Message was edited by:
            sudeep dhar
    Message was edited by:
            sudeep dhar

    >.............SHOULD IT NOT THROW AN ERROR
    Not necessarily.
    See, XI won't realize, by default, a schema validation in your messages. If you want a validation, you'll have to implement one, as described in
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
    However, for some particular steps in BPM, I have observed that an invalid XML will some times result in a error in BPM execution. In particular, if you have switch steps, container operation steps and/or correlations where you use a particular field of that message, it may throw some exception when you have an invalid xml. Also, I have observed some errors with conditional receiver determination for invalid messages.
    As a best practice, if you have any kind of dependency on a particular message inside your system (like switches, container operations, correlations, condition in receiver or interface determination etc), it is a good idea to implement a schema validation.
    Also, if you do want to create a thrustable scenario, you might want to perform schema validation for all your output messages.
    Regards,
    Henrique.

  • How to Alert RFC connection failure via message mapping? Kindly Help!

    Hi Experts,
        I have a JMS - XI - RFC scenario.
    JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system.
       I have a requirement where I have to monitor RFC connection failure because of the remote R/3 system being down. I have to send a email alert where the subject contains the PIP number to understand for which PIP the connection failed.
      The PIP number exists in the PIP content at the interface.
      If I use the Alert configuration in the runtime workbench for monitoring then I cannot dynamically pass the PIP number.
      Only way I think of triggering alert is in the message mapping via a Java UDF.
      But I am not sure how can I do this? How do I check in the UDF if RFC connection has failed? Is this the correct approach?
      How to acheive my requirement? Note that my email subject content is dynamic bacause if PIP number.
    Please help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi Gopal,
    what version/sps of XI are u running?
    The easiest way to do what u want inside a UDF is to
    1. use JCo to try estabilish a connection to the remote SAP System
    2. if that fails, use JavaMail to send an email message
    Let your UDF work on the PIP number, accepting it as input, and (maybe) returning it as output if everything goes ok. Otherwise break the mapping execution as described by Michal in one of his last weblog (using Dynamic Configuration).
    Note that the above method doesn't guarantee that the message will be actually delivered, as some seconds could last between your check and the real RFC delivery operated by the Adapter Engine...
    I am evaluating a way to do the same with Alert Framework. I will let you know the result!
    Cheers,
    Alex

  • 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

  • Message Mapping Help XMLDocument with in XML

    I am trying to pass on some XMLDocument with in XML
    Example
    <Header>
    <Detail><Text1>Text</Text1><Text2>Text</Text2></Detail>
    </Header>
    Message mapping giving error at present. My Message Type has only the following
    <Header>
    <Detail>
    I am trying to include <Text1>Text</Text1><Text2>Text</Text2> with in Detail section. Not sure how to handle this with Message Map. Please explain if there is any possibility to achieve something like this

    Hi,
    You can directly use CDATA in message mapping and can solve this.
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Else you can use xsl mapping as mentioned in this thread:
    Re: CDATA in xml file
    You can also try java mapping as mentioned here:
    XML inside a field in XI
    If you can give complete source payload, source message type and target message type then somebody here can help you out.
    Regards,
    ---Satish

  • Message mapping/UDF help..

    Hi experts,
    Can someone let me know whether there is a chance to fulfill the below requirement:
    Input file:
    In the Input CSV file, there is a fixed length field with length 9 char and has leading zeroes (ex: 000000650)
    Output file:
    In the O/p XML file, the corresponding value should be displayed as "6.50" (Have to remove the leading zeroes, right justified and the last two digits should be allocated for decimals)
    Can anyone let me know if we can handle in Message mapping or should we write a UDF? If so can you please provide the code..
    Any help would be highly appreciated !!
    Thnx
    - Ravi

    Hi Ravi,
    UDF:
    Create a function zerosuppress and take the cache as value and take one argument input. Then put the code below:
    //Put this code
    String output = input.replaceFirst("^0+","");
    return output;
    With this function your leading zeros will remove.
    Then map like this:
    source field --> zerosuppress (udf) --> divide by 100 --> target field.
    This should solve your issue.
    Regards,
    ---Satish

  • Message mapping help

    Hi,
    I am doing graphical message mapping.
    Source structure looks like
    <BAC>
    <IXYZ>
    <DEF>
    <PQR>
    All are 0.. 1.
    Target field is item which is also 0.. unbounded.
    If ABC is not blank, assign to target  field item[0] as 1st occurance.
    If DEF is not blank, assign the same to item[1] field as 2nd occurance and so on.
    Can this be done using message mapping without udf or java? If not, pls let me know other ways.
    Thanks
    anand

    Hi,
    <ABC> -> lenth Function (TEXT)-> Greate Then -> 0 (using the IF Condition)
      <ABC> -> CopyValue(docuble click and give the index 0) -> to Target
    <DEF> -> lenth Function (TEXT)-> Greate Then -> 0 (using the IF Condition)
      <DEF> -> CopyValue(docuble click and give the index 1) -> to Target
    Regards,
    Venu.

Maybe you are looking for

  • SSL VPN Webauth/anyconnect failue

    So with our setup we're using the SSL webauth page as it uses RSA Adaptive Authentication as the second factor for auth. In the DAP we then push the connection over to anyconnect. The result is this. 1. Webauth to AD 2. RSA auth with questions 3. DAP

  • Doubt in the Oracle BPM Tutorial

    Hi All, Iam new to this Oracle BPM.. Moreover i have installed the studio and other files... But at the point of working with the TUTORIAL iam getting an error as... All arguments must be fulfilled when defining the incoming argument mapping of a scr

  • 10.1.4 library file missing for help and update not working

    Just updated to AR 10.1.4 and everything seems to be working except the help and update functions are not working. I get the message that the library help file is missing. I uninstalled and reinstalled in both FF15 anf IE9 with the same result and I

  • Retrieving specific information from a website

    Ok, here's my problem. I want to display the current weather conditions on my site. Just the text for now, dont need pictures or anything. But i have absolutely no idea how i would retrieve the webpage and then take only the part i need (the weather)

  • How to email sequence for edit

    I am editing a project and trying to email sequence for my editor to use revised sequence and keep getting an error message... please help