Skip record in message mapping

I have scenario where I am doing a RFC call in message mapping.Based on the result I need to create
IDOC.If result does not meet the condition then I dont have to create IDOC for that record.
Is any thing can be worked out that I can skip those
records which does not meet condition in message mapping.
Any help is appericiated.
Rekha.

Rekha,
You need to use the BPM to check your RFC return data.
Then you can have the logic to create / Not create the IDoc.
Are you using XI 3.0?
Regards,
Simon

Similar Messages

  • Filtering of records in Message Mapping

    I am facing problem during filtering record in message mapping. My message comes from R3 and should be sent to one business service in entirety and should also be sent to another business service in part. To resolve this I created a message map for selecting record based on some conditions but this creates empty XML nodes wherever condition is not satisfied. Everything works fine but the scenario fails at the end while trying to convert XML to text using file adapter. The error is ‘Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)’

    Hi Rajesh,
    This scenario you are trying can be done using CONDITIONAL RECEIVER DETERMINATION and RB SPLIT, where you can basically have one sender and two receivers.
    To do this without using a BPM.
    1. Create your mapping program that will map the information from the source file
    into the destination idoc. This has to be a 1:N split. Just make sure that the destination message type and message interface are are of occurrence N.
    2. Also, you will have 2 destination interfaces and 2 interface mapping, one for the IDOC and one for the mail.
    Now, there are a few essential steps in your configuration,
    1. In the receiver determination, specify the 2 receiver systems, one for your IDOC and the other for your MAIL.
    2. Now, you will have a condition window. Just type the condition on the basis of which the receiver has to be determined for the mail and the idoc business system. Just remember that the condition can be specified only for the source message.
    3. In the Interface Determination, you have an option called RB CLASSIC and RB SPLIT. To do a 1:N split, you will have to do a RB_SPLIT.
    And since you wanted to covert the XML format to text format you require content conversion at the receiver adapter end, for that please go through these links below. It clearly explains your requirement.
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    I hope I have answered your query.
    Regards,
    Abhy
    note: do reward points for the helpful answers.

  • Filtering records in message mapping by field value

    hi,
    i have a source message:
    record: 1..1
    --row: 0..unbounded
    type: 1..1
    data: 1..1
    i want to map to target message with the same structure only rows with type = x.
    how do i do that in message mapping?
    thanks
    Tomer

    if u mean that the target message shud be generated only when type = x use the below mapping.
    type------------->
                        equalsS----->createif--->row(tgt root)
    Constant[x]--->
    Map
    type--->type
    data--->data

  • Using List of records in Message Mapping

    I am using SOAP - XI - RFC Structure.
    (SAP CRM - .Net Application).
    I need to get the list of Opportunity records.
    What can I do incase I don't find a proper BAPI for getting the list of Opportunity records.
    Means how can I send a request to get ListOfRecords of some entity to SAP System.
    Thanks,
    Narendra.

    Narendra,
    All the rows of the table will be returned in a tables parameter of this FM.  The data will be unformatted i.e the each of the table record will be put in a single row. So you need to parse the data to get the data for individual field in a tanle row.
    You can see this yourself if you have access to any SAP system or XI ABAP stack itself, it need not be CRM.
    Just go to SE37 and enter the name of the FM and press F8.
    Then enter the name of any existing database table with some rows in it, in the field TABLE_NAME and press F8 again.
    You will be able to see the results in table parameter ENTRIES.
    Anand

  • Message Mapping from flat XML to a Record structure

    Hi All,
    We have a scenario in which the input message is a PDF document. we are following below the blog to convert PDF to XML format which uses <b>PDF box utitlity</b>.
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    We are able to convert the PDF doc to a flat XML file.
    Now we have the following queries...
    what are the different ways to map the flat XML to our record structure?
    Do we have any utitlity in PDF box to do that?
    Regards,
    Rakesh.

    Hi Rakesh,
    You have Graphical mapping, Java mapping, ABAP mapping and XSLT mapping. The choice depends on the scenario and what target result you require.
    <b>Message mapping using graphical mapping editor:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    <b>XSLT mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/frameset.htm
    <b>Java Mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    <b>ABAP mapping:</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    As said earlier, graphical mapping is the simplest and quite a few built in options are available with it, explore it and see which is suitable for your scenario.
    Regards,
    Chandra

  • I downloaded the latest version of iTunes and now ALL of my songs sounf d like skipping records.  How do I get rid of this or completely remove the new version that I downloaded???

    I booted up my computer and opened up my usual shortcuts.  I got a message from iTunes that a new version was available and would I like to download it.  I clicked on "yes".  It took over 1/2 hour to download and now ALL of my songs sound like a skipping record or like they are tripping over themselves.  I uninstalled the ITunes and tried reinstalling my old version.  I've tried EVERYTHING I could think of to get my old version back but everytime I go through the download process I get a message saying that - the file "iTunes Library.itl "cannot be read because it was created by a newer version of iTunes.  I was finally able to download a version that will open but it has the same "skipping" problem.  How do I stop/fix this or COMPLETELY get rid of this version of iTunes and re-download what I had???  I'm REALLY distressed.      Jim

    Usually, the exclamation mark tells you that the song was not where the program expected to find it. It may also mean that there was an error with the file itself.
       If you click on the exclamation mark, it may give you a reason. You can also double click the file to make it play. If the file is not found, it will tell you. Just follow the prompts to look for the song again. It will ask you if you want to look for the other missing songs in the same folder. You can do it, but unfortunately, the last few updates have made the program blind to the songs that are there and you sometimes have to do the same process for each song.
       If neither of these help, I would suggest starting from scratch and reinstalling iTunes. I have had to do that before. Do your best to back up the library and such first.
       Sometimes a computer will rename a hard disk (Windows) and all the songs on that disk will be gone to iTunes because it will think it's looking in the right place. It can't recognize that the hard disk or partition has been renamed.
    I know that this is a podcast, but the principle is the same. A dialogue box should pop up to tell you just what the problem is.
       I hope this helps!

  • File to file with out message mapping and using variable substitution

    Hi,
    Can any one send me a scenario where we can have file to file scenario with out message mapping and where i can use variable substitution.
    As of now i am using integrate configurations where i cant use variable substitution as the message does not reflect in integration engine. I need to populate time stamp between <filename><timestamp>.txt.pgp
    I am as of now using configuration scenario.
    The time stamp always writes before the last file extension.
    Let me know your thoughts?
    Thanks,
    Chandra.

    Hi Chandra,
    u can use the Variable substitution even without IR contents also(Mapping....).
    in the receiver communication channel just specify the path u want to access for a value...
    eg: filename                             payload:mt_name,1,records,1,name,1
    and in th file name give it as %filename%.txt... or vt ever ur requirement
    Babu

  • Error in message mapping

    I used MT_PerformRate for both sender side and receiver side in message mapping
    When I goto interface mapping and click on the mapping program it gives following error.
    The source or target structure has been changed or could not be found in the Integration Repository. The mapping definition contains elements or attributes that do not exist in the changed structure. The relevant entries will be deleted
    Target structure has no such path: /ns0:MT_PerformRate/@EmpName. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@EmpNo. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@PerformRating. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@RatingDesc. Skipping mapping
    Target structure has no such path: /ns0:MT_PerformRate/@EffectiveDate. Skipping mapping
    In mapping editor target fileds are shown in red.
    I can see two message mappings in Change list one with target fileds in red and one with green.
    I do not know what is happening
    PLs suggest

    Thanks Amith and Ameer for your answers.
    The exact reason was because I did not used recordset in my datatype creation.
    But I did not set ignoreRecordsetName to true
    For who get similar problem please see below details and link
    A <Recordset> element is inserted in the XML structure for each recordset structure. This level is not always required, particularly if the recordset only contains one structure definition.
    If you set the parameter to true, the <Recordset> element is not inserted.
    http://help.sap.com/saphelp_nw70/helpdata/EN/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    Thanks,
    Raj

  • Soap lookup in PI7.31 message mapping

    Hi All,
    I have a soap lookup created in UDF in PI message mapping
    I am taking material id from the source structure and use it as input parameter for the lookup webservice
    Here is the UDF code which takes material number and returns the internal id
    AbstractTrace trace = container.getTrace();
    String matintid = "";
    try {
    //instance the channel to invoke the service.
    Channel channel = LookupService.getChannel("BS_Bus","CC_SearchLookup");
    SystemAccessor accessor = LookupService.getSystemAccessor(channel);
    // The Request message in XML. THIS IS THE LOOKUP SERVICE
      String SOAPxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><searchTM_MATERIAL>xmlns:ns0=\"MDM_MAT_Search_MDM"><query><criteria><fTX_MATERIAL><constraint><value>"
    +a
    + "</value><expressionOperator>equals</expressionOperator></constraint></fTX_MATERIAL></criteria></query><reposInfo><repositoryName>REP_MATERIALS</repositoryName><serverName>mdm6765</serverName></reposInfo></searchTM_MATERIAL>";
    InputStream inputStream =new ByteArrayInputStream(SOAPxml.getBytes());
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    Payload SOAPOutPayload = null;
    //The response will be a Payload. Parse this to get the response field out.
    SOAPOutPayload = accessor.call(payload);
    /* Parse the SOAPPayload to get the SOAP Response back.  */
    InputStream inp = SOAPOutPayload.getContent(); 
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 
    /* Create DOM structure from input XML */ 
    DocumentBuilder builder = factory.newDocumentBuilder(); 
    Document document = builder.parse(inp);
    NodeList matlist = document.getElementsByTagName("tM_MATERIAL");
    Element material = (Element) matlist.item(0);
    NodeList recidlist = material.getElementsByTagName("recordIdentification");
    Element recidnode = (Element)recidlist.item(0);
    matintid = recidnode.getNodeValue();
    trace.addInfo("matnid is" + matintid);
    } catch (Exception e) {
    trace.addWarning("Error" + e);  }
    trace.addInfo("Service XXX success executed");
    return matintid;
    This is giving a java null point error
    Errorjava.lang.NullPointerException: while trying to invoke the method org.w3c.dom.Element.getElementsByTagName(java.lang.String) of a null object loaded from a local variable at slot 16
    Any idea whats going on? I am able to get response for the webservice using SOAP UI 
    And here is the soap input and output in SOAP UI execution
    Input
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:MDM_MAT_Search_MDM" xmlns:urn1="urn:com.sap.mdm.ws.beans.mdt_mat_search_mdm_in" xmlns:urn2="urn:com.sap.mdm.ws.beans" xmlns:urn3="urn:com.sap.mdm.core.beans">
       <soapenv:Header/>
       <soapenv:Body>
          <urn:searchTM_MATERIAL>
             <urn:query>
                <!--Optional:-->
                <urn1:criteria>
                     <!--Optional:-->
                   <urn1:fTX_MATERIAL>
                      <urn2:constraint>
                         <!--Optional:-->
                         <urn2:value>12345</urn2:value>
                         <!--Optional:-->
                         <urn2:expressionOperator>equals</urn2:expressionOperator>
                      </urn2:constraint>
                   </urn1:fTX_MATERIAL>
                </urn1:criteria>
             </urn:query>
             <urn:reposInfo>
                <urn3:repositoryName>REP_MATERIALS</urn3:repositoryName>
                <urn3:serverName>mdm1234</urn3:serverName>
             </urn:reposInfo>
          </urn:searchTM_MATERIAL>
       </soapenv:Body>
    </soapenv:Envelope>
    Output:
    <SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <SOAP-ENV:Body xmlns:rpl="urn:MDM_MAT_Search_MDM">
          <rpl:searchTM_MATERIALResponse xmlns:rn0="java:sap/standard" xmlns:rn1="urn:com.sap.mdm.ws.beans" xmlns:rn2="http://schemas.xmlsoap.org/soap/encoding/" xmlns:rn3="urn:com.sap.mdm.core.base" xmlns:rn4="urn:com.sap.mdm.ws.beans.mdt_mat_search_mdm_in" xmlns:rn5="urn:com.sap.mdm.core.beans">
             <rpl:Response>
                <rn1:executionStatus>
                   <rn1:status>OK</rn1:status>
                   <rn1:description>Search/Retrieve done successfully</rn1:description>
                   <rn1:dataObject>Records 1..1 of 1 found</rn1:dataObject>
                </rn1:executionStatus>
                <rn4:tM_MATERIAL>
                  <rn4:fTX_MATERIAL>12345</rn4:fTX_MATERIAL>    
                 <rn4:recordIdentification>
                       <rn4:internalID>1267</rn4:internalID>
                    </rn4:recordIdentification>
           </rn4:tM_MATERIAL>
             </rpl:Response>
          </rpl:searchTM_MATERIALResponse>
    Thx
    mike

    Hi Mike,
    What I suspect is, you get a null pointer exception because the XML tag name which you are trying to retrieve, has a namespace. Could you please instead try to use:
    getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
              Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
    Let us know if it works.
    Regards,
    Shweta

  • Problem in Message Mapping

    Hi,
    My requirement is filter message based on the condition.
    My source structure is like below
    Root_Node
        |
      RecordSet (1..Unbounded)
          |_
          |   Header (1..1)
          |      |_ RecordType
          |_
              Detail (1.. Unbounded)
                 |_ RecordTypeDetail
    Example XSD is given below
    Now my requirement is I need to map the iterations to the same type of target structure (but only difference is all elements are non mandatory).
    if
    1) RecordType does not exists under Header, then map Detail.
    2) recordTypeDetails does not exists under Details then map Header.
    Now while doing RecordSet Mapping I have written user defined function which adds context if any of the above condition valid.
    But while doing the mapping for the Header Record we should map the iteration for which detail is not available, I am not able to associate the above context with the new resultset context.
    Any suggestions please.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:group8" targetNamespace="urn:group8">
         <xsd:complexType name="DT_EA_COMPLETE">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   e616ab20c08c11d9bb8e001143eb68b9
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="DT_EA_HD" type="DT_EA" maxOccurs="unbounded">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             cdea8830bb8e11d98600dd930a770421
                             </xsd:appinfo>
                        </xsd:annotation>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="DT_EA">
              <xsd:annotation>
                   <xsd:appinfo source="http://sap.com/xi/TextID">
                   eab53980c08c11d9ab7d001143eb68b9
                   </xsd:appinfo>
              </xsd:annotation>
              <xsd:sequence>
                   <xsd:element name="Header">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             9d192f70bb0e11d9afc8fdcd0a770421
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="rec_type_h" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f71bb0e11d9c902fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Project_estimate_number" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f72bb0e11d998cafdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Revision_number" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f73bb0e11d9851bfdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Project_estimate_title" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f74bb0e11d99a04fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Project_estimate_description" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f75bb0e11d99d6ffdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="purchase_order" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f76bb0e11d9bf5efdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
                   <xsd:element name="DetailData" maxOccurs="unbounded">
                        <xsd:annotation>
                             <xsd:appinfo source="http://sap.com/xi/TextID">
                             9d192f77bb0e11d9c8b6fdcd0a770421
                             </xsd:appinfo>
                        </xsd:annotation>
                        <xsd:complexType>
                             <xsd:sequence>
                                  <xsd:element name="rec_type" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f78bb0e11d9cfa4fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Price" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f79bb0e11d9c487fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="gl_account" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f7abb0e11d99609fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Internal_order" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f7bbb0e11d99b5afdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="line_item_description" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f7cbb0e11d9bdf8fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="print_job_indicator" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f7dbb0e11d9cec2fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="impress_project_number" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f7ebb0e11d9af41fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="partner_vendor" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f7fbb0e11d9be5dfdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="time_of_delivery" type="xsd:date">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f80bb0e11d9c353fdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                                  <xsd:element name="Vendor_text" type="xsd:string">
                                       <xsd:annotation>
                                            <xsd:appinfo source="http://sap.com/xi/TextID">
                                            9d192f81bb0e11d9b0cdfdcd0a770421
                                            </xsd:appinfo>
                                       </xsd:annotation>
                                  </xsd:element>
                             </xsd:sequence>
                        </xsd:complexType>
                   </xsd:element>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>

    HI,
    I think there is problem with occurence here. Try to findout run time value in the mapping.. i.e Diplay queue option in the mapping editor. SO that you can check where exactly it is getting error.
    Regards,
    Moorthy

  • Request Message mapping in SXMB_MONI for File - RFC - File without BPM

    Hi ,
    In my File-RFC-File scenario, the messages are processed successfully.
    but when i look into the SXMB_MONI for File to RFC step, the records are present only till the  Message split According to Receiver List and not able to see the records from Request Message mapping step onwards.it contains
    <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:Z_PI_LOTUSNOTES_UNIFORM xmlns:ns1="urn:sap-com:document:sap:rfc:functions" />
    in my mapping for the receiver RFC i have not done the mapping for all the fields. few fields i have disabled. whether this could create a problem in message mapping. pls let me know what needs to be done.

    Is it only for this scenario that the above display issue is occuring or is it for all scenarios?
    If onlt a particular Pipeline steps are displayed then you can check what is the TRACE level set in SXMB_ADM --> Integration Engine Configuration --> and check if the TRACE parameter is set to at least 2 (max is 3 which will ensure that your DB will get full quickly)
    For more information refer: /people/michal.krawczyk2/blog/2005/05/10/xi-i-cannot-see-some-of-my-messages-in-the-sxmbmoni
    Regards,
    Abhishek.

  • Message Mapping Error in Text File to XML file Scenario

    Hi Gurus,
    This is Sudheer...I am New to SAP-PI......
    Below link is File to File Scenario(Text File to XML File)...
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/basicFileAdapterContentConversion
    I am facing Message Mapping Error....I am not able to map the fileds...
    Please help me.
    -Sudheer

    Thanks Shabarish & Manisha for your reply....
    Ya I am getting error while I am testing in IR....
    I dont know how to map the fields that shown given below...
           Message Type         ---         Message Type
                 Record                              Employee
                     Header                                 EmployeeID
                         Key                              Name
                         EmpID                          Company
                         Name                            Phone
                         Company                       Prior_Employer
                         Phone                               Company         
                      Detail                                   Location
                          Key
                          Company
                          Location

  • Message Mapping - SUM a field per unique combination of 2 other fields?

    I'm receiving a proxy with detail records, and I need to create a subtotals file.  Here an example:
    BEFORE MAPPING
       <ROW>
          <KOSTL>0000010300</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.51</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>123</POSID>
          <FTE>0.49</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.72</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>123</POSID>
          <FTE>0.82</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010300</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.18</FTE>
       </ROW>
    AFTER MAPPING:
       <ROW>
          <KOSTL>0000010300</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.59</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>123</POSID>
          <FTE>1.31</FTE>
       </ROW>
       <ROW>
          <KOSTL>0000010400</KOSTL>
          <POSID>DUMMY</POSID>
          <FTE>0.72</FTE>
       </ROW>
    How do I create a new record for all unquie combinations of KOSTL and POSID?  And total the FTE field for each line?  Can this be done in a message mapping?

    Hello,
    How do I create a new record for all unquie combinations of KOSTL and POSID? And total the FTE field for each line? Can this be done in a message mapping?
    Yes, very much possible with or without UDF. See sample mapping below without using UDF:
    For ROW:
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> collapseContext -> ROW
    POSID(set context to row) ->  /
    For KOSTL:
    KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> collapseContext -> splitByValue:eachValue -> KOSTL
    POSID(set context to row) -> /      KOSTL(set context to row) ->/                                          /
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
    POSID(set context to row) ->  /
    For POSID:
    KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> collapseContext -> splitByValue:eachValue -> POSID
    POSID(set context to row) -> /      POSID(set context to row) ->/                                          /
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
    POSID(set context to row) ->  /
    For FTE:
    KOSTL(set context to row) -> concat: ----------------> sortByKey: case insensitive ascending -> formatByExample -> sum -> splitByValue:eachValue -> FTE
    POSID(set context to row) -> /      FTE(set context to row) ->/                                            /
    KOSTL(set context to row) -> concat: -> sort: case insensitive ascending -> splitByValue:valueChanged -> /
    POSID(set context to row) ->  /
    Hope this helps,
    Mark

  • Message mapping changes

    Hi All.
    I created a message mapping from a custom message type towards MATMAS_BAPI01.
    I disabled the EDI_DC40 field and in the idoc communication channel I disabled "Apply control record values from payload".
    When I check the final idoc message created, I noticed that some EDI_DC40 parameters were wrong.
    <SAP:TABNAM>EDI_DC40</SAP:TABNAM>
      <SAP:MANDT>200</SAP:MANDT>
      <SAP:DOCREL>640</SAP:DOCREL>
      <SAP:DOCNUM>0000000000037246</SAP:DOCNUM>
      <SAP:DIRECT>2</SAP:DIRECT>
      <SAP:IDOCTYP>MATMAS_BAPI01</SAP:IDOCTYP>
      <SAP:CIMTYP />
      <SAP:MESTYP>MATMAS_BAPI</SAP:MESTYP>
      <SAP:MESCOD />
      <SAP:MESFCT />
      <SAP:SNDPOR>SAPCX1</SAP:SNDPOR>
      <SAP:SNDPRN>host01</SAP:SNDPRN>
      <SAP:SNDPRT>LS</SAP:SNDPRT>
      <SAP:SNDPFC />
      <SAP:RCVPOR>CFDCLNT200</SAP:RCVPOR>
      <SAP:RCVPRN>CFDCLNT200</SAP:RCVPRN>
      <SAP:RCVPRT>LS</SAP:RCVPRT>
      <SAP:RCVPFC />
      <SAP:TEST />
      <SAP:SERIAL />
      <SAP:EXPRSS />
      <SAP:STD />
      <SAP:STDVRS />
      <SAP:STATUS>03</SAP:STATUS>
      <SAP:OUTMOD />
      <SAP:SNDSAD />
      <SAP:SNDLAD />
      <SAP:RCVSAD />
      <SAP:RCVLAD />
      <SAP:STDMES />
      <SAP:REFINT />
      <SAP:REFGRP />
      <SAP:REFMES />
      <SAP:CREDAT>2005-09-12</SAP:CREDAT>
      <SAP:CRETIM>23:21:31</SAP:CRETIM>
       <SAP:ARCKEY>2FE85D8023D311DA9BDB000D56B9D8A6</SAP:ARCKEY>   </SAP:IDocOutbound>
    In concrete
    <SAP:SNDPRN>host01</SAP:SNDPRN> had to be changed into <SAP:SNDPRN>hostXX</SAP:SNDPRN>. I thought the value host01 came from the sld (logical system name of the technical system attached to the business system), so I changed that towards hostXX.
    <SAP:RCVPOR>CFDCLNT200</SAP:RCVPOR> had to be changed into <SAP:RCVPOR>SAPCDD</SAP:RCVPOR>. I thought this value came from the rfc destination in the xi sytem, so I created a new one called SAPCDD and configured it into the idoc adapter.
    However, this change in the sld/XI system  did not affect the generated idoc (no, I did not forget to activate ).
    I decided to do some more drastic changes:
      - enable EDI_DC40 field in the message mapping
      - enable "Apply control record values from payload" in the idoc communication channel
    I now hardcode the wanted values.
    After activating the changes, still the same idoc is send towards the R/3 system.
    Can anyone tell me what I am doing wrong.
    Is it a caching problem or am I doing something wrong.
    Kind regards

    hi Geert,
    take a look at my weblog:
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    it may answer some of your questions:)
    Regards,
    michal

  • 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

Maybe you are looking for