Mapping with useOneAsMany

Hi All,
I am trying a scenario from Sravya' blog(/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii) wherein the source structure is
Header 1..1
--MatDescr 1..1
Item 0..N
--ItemNo 1..1
--MatGroup 1..1
Target Strcutre
Header 1..N
--MatDescr 1..1
--MatGroup 1..1
--Item 1..1
ItemNo 1..1
The target strcutre will have N records for each ItemNo in source structure.
If I use the useOneAsMany fucntion then the context for MatDesc and ItemNo would be same. The context for MatDesc is HEADER but wihin the context of ItemNo, there is no such context as HEADER. How can I put the Context of ItemNo to that of MatDesc.
The structre for function mapping is:
MatDescr
ItemNo                       useOneAsMany                     MatDescr
ItemNo
Kindly let me know, how can I fill up the data in the HEADER(Target message) for each value of ItemNo.
Thanks,
Amit

Hi Amit,
<i>The context for ItemNo does not contain Header. The context contains 2 values: Item and Datatype name.</i>
I just went through the blog. Context for Item No ..Header wont be present.
Everything is explained in the blog in a wonderful way. Read the same 2-3 times u will understand.
Incase you have doubt with <b>7.useOneAsMany</b>- in the blog..then heres what you need to do..
We have 3 fields in source..
1) MatDesc - Let the context be whatever is the default one.
2) ItemNo - Change the context to Item.
3) ItemNo - Let the context be whatever is the default one.
Regards,
Sumit

Similar Messages

  • Mapping with useOneAsMany function

    Dear mapping ad Java experts,
    I have my source structure like this:
    <Detail>
        <QTY />
    </Detail>
    <Detail1>
       <Amount />
    </Detail1>
    Node Detail occurs once. Node Detail1 can occur more than once.
    My target is
    <target>
      <result/>
    </target>
    where node target occurs as many times as source node Detail1.
    The element result is a product of Qty and Amount.
    Please note that node Detail and Detail1 are at the same level. In other words, Detail1 is not a child node of Detail.
    I tried using useOneAsMany, but it does not even compile right. I am pretty sure someone has an answer! Please help. Points for helpful answers.
    Appreciate your help.
    Thanks a lot.

    Param,
    Please refer the logic in below URL, if it doesn't suits your reqmt, then let us know.
    Mapping
    http://www.flickr.com/photo_zoom.gne?id=1935890891&size=o
    http://www.flickr.com/photo_zoom.gne?id=1935890911&size=o
    Results
    http://www.flickr.com/photo_zoom.gne?id=1935890917&size=o
    raj.

  • Mapping Issue with useOneAsMany Function

    Hi Experts,
    1) The target node DATA must be repeat as many times as YT3M in source side, if YT3M not exist it must fill with empty node.
    2) the target field "P" must reapeat as many times as YT3M in source side and P value from source side repeat same value for all YT3M occurance under M1M node, if M1M node not exist fill with empty.
    Can anyone help me about this.
    Sorce structure is look like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt1 xmlns:ns0="urn:sap.shoprite.co.za:ecc:md">
       <a1m>
          <m1m>
             <po>100</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>2</m>
             </yt3m>
          </m1m>
       </a1m>
       <a1m>
          <m1m>
             <po>101</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>2</m>
             </yt3m>
          </m1m>
       </a1m>
       <a1m/>
       <a1m>
          <m1m>
             <po>100</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>1</m>
             </yt3m>
          </m1m>
          <m1m>
             <po>103</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>1</m>
             </yt3m>
          </m1m>
       </a1m>
       <a1m>
          <m1m>
             <po>101</po>
             <yt3m>
                <m>1</m>
             </yt3m>
             <yt3m>
                <m>2</m>
             </yt3m>
          </m1m>
       </a1m>
    </ns0:mt1>
    Target Structure is look like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt2 xmlns:ns0="urn:sap.shoprite.co.za:ecc:md">
       <data>
          <po>100</po>
          <m>1</m>
       </data>
       <data>
          <po>100</po>
          <m>2</m>
       </data>
       <data>
          <po>101</po>
          <m>1</m>
       </data>
       <data>
          <po>101</po>
          <m>1</m>
       </data>
       <data>
          <po>101</po>
          <m>2</m>
       </data>
       <data>
          <po/>
          <m>1</m>
       </data>
       <data>
          <po>100</po>
          <m>1</m>
       </data>
       <data>
          <po>100</po>
          <m>1</m>
       </data>
        <data>
          <po>103</po>
          <m>1</m>
       </data>
       <data>
          <po>103</po>
          <m>1</m>
       </data>
       <data>
          <po>101</po>
          <m>2</m>
       </data>
       <data>
          <po>101</po>
       </data>
    </ns0:mt2>

    Hi,
    I tested your mapping with below structure.
    Source Structure
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:test xmlns:ns0="http://PurchaseRequest_Info">
       <M1M>
          <PO>100</PO>
          <YT3M>
             <M>1</M>
          </YT3M>
          <YT3M>
             <M>2</M>
          </YT3M>
       </M1M>
       <M1M>
          <PO>101</PO>
          <YT3M>
             <M>1</M>
          </YT3M>
          <YT3M>
             <M>1</M>
          </YT3M>
          <YT3M>
             <M>2</M>
          </YT3M>
       </M1M>
    </ns0:test>
    Output:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:target xmlns:ns0="http://PurchaseRequest_Info">
    <Data>
    <PO>100</PO>
    <M>1</M>
    </Data>
    <Data>
    <PO>100</PO>
    <M>2</M>
    </Data>
    <Data>
    <PO>101</PO>
    <M>1</M>
    </Data>
    <Data>
    <PO>101</PO>
    <M>1</M>
    </Data>
    <Data>
    <PO>101</PO>
    <M>2</M>
    </Data>
    </ns0:target>
    Mapping Used:
    Data Node: Y3TM- Context on Test Node.
    PO Node: Pass output of One as many to PO. first input to one as many will be Source PO field and other two inputs will be Node Y3TM.
    Map source M field as it is to Target M field.
    -Gouri

  • Problem with useOneAsMany

    Hi,
    The target structure is replicated 3 times and I am using Multi message mapping.
    there is conditional checking for each target structures based on the inputs, which is true for the 3rd condition.
    targetstructure1 (false - hence no node got generated )
    targetstructure2 (false - hence no node got generated )
    targetstructure3 ( TRUE - hence one target node generated)
    In Targetstructure 3, there was error with UseOneAsMany, which says too many values in first queue, which I fixed and now the error message still persists, when I debugged it furthur with the test data, it was referring to second target structure ( which is never generated because of condition fail )
    Then I remove useOneAsMany and I mapped the field directly. Still I see useOneAsMany error message, which implies it is referring to target structure2.
    There was one useoneasmany used in Targetstructure1 as well. it is not generating any error message but why does the only targetstructure2 is genearating useoneasmany error message?
    By the way, the error message after mapping changes is,
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Messages/ns0:Message1/ns2:targetstructure[3]/ns2:req/ns3:RefNo(suppressed field). Too many values in first queue in function useOneAsMany
    my question is Why is UseOneAsMany of a target structure which is not generated is throwing me an error message?
    regards,
    Nikhil..

    Hi,
      Its Because of in your queue have multiple value inputs.
      The problem is Use One As Many function used to send the single value to Multiple.
      Means If you have One Header field Like Employee Id.
          You have 10 Line Item.
          You need to pass the Single Employee Id to 10 Line item.
           In Use One As Many Function 1 and 2 Input Queues are same.That time It will accept One value only.
           If you have Multiple value values then Before the use of field "RefNo" put some logic and send only one
           value.
         Like
        RefNo-->If >XXX(then)->UseoneasMany-->with other two fields.
    Regards,
    Prakasu

  • Issue in Color Theme on the map with ADF geographic components

    I am facing an issue in bringing up a map using color theme .I can able to bring up a map with color themes using geographic components feature in ADF.
    The problem here is 'Edit Color Map Theme' dialog which lists Map Theme in five categories like continents,counties,countries,states_abbrev,states_names.
    we had implemented map using Color Theme based on the states_abbrev and found it was working properly.
    But after some days we found that the settings we made to work for the map no longer works and resulted in no color theme on the map being displayed on the page.
    It was found that the states_names works properly instead of states_abbrev by that time.
    But again after some days it didnt work with state_names and we revert back our code to follow state_abbrev so as to get the desired result.
    Does somebody know where is the problem and how to approach this issue?

    Quick Install is gone.
    Database repair doesn't work.
    Color coded categories is gone, and as you've discovered Theme colors are gone.
    Print to Excel is gone.
    Many desktop clients that worked with 4.2 do not work.
    It won't work with legacy devces.
    and others.... There are lots of complaints about 6.2 scattered around the forums.  Personally, the HotSync manager keeps forgetting the connections I've set, and goes to default views.
    You aren't missing much of anything, IMHO.
    WyreNut
    Post relates to: Centro (AT&T)
    Message Edited by WyreNut on 02-20-2009 12:18 PM
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • How to add a bing map with pins to a Siena Project

    Hi
    I just want to add a bing map with the current location and a few nice pins of some nice locations around me. Comming out of a Excel file. Potentially also draw some routing lines into the bing maps.
    Any ideas how I can accomplish that goal?
    Thank you in advance
    wbr.
    Joerg 

    yes you can (there is actaully one on the map, blue square)
    The syntax is listed on
    http://msdn.microsoft.com/en-us/library/ff701724.aspx
    You will however have to build the correct string to included in the image source (which you can do in the source excel or in runtime in siena)
    Concatenate is suitable to do that.
    http://dev.virtualearth.net/REST/v1/Imagery/Map/Road?pp=47.638197,-122.131378;;1&ms=350,500&key=KEYHERE
    the PP indicates the pin actually and the bing map autocenters on that. You have several options listed on the webpage listed above. It's a question of the one fitting you best.
    Please note that your bing key is yours so you need to hide it well enough.
    Regards
    StonyArc

  • Can i use WebApps to build a Google map with polygon territories instead of points (pins)?

    I built a map with Google Maps Engine Pro - http://www.jmbcompanies.com/Services/Mitigation/map.
    It showcases territories using a Google map polygon shape.  I wrote custom KML to create it.  However, with Google Maps Engine pro you cannot create custom hyperlinks.  It will link a URL that you put in the data, but you cannot name it or target the parent window, so therefore it opens a new tab for each click to more details.  I really want it to open the WebApp detail page for that item within the same window.
    So, is there a way to use the BC integrated Google maps technology and show polygons instead of points on the map? I've used {module_webappsmap,20754,a} to place individual locations on a map, but what about territories or polygon areas?
    I'm sure that I can create a WebApp to generate the KML for each placeholder.  But how do I turn that into a map?
    THANKS!!

    You can not create a kml file in BC through webapps. Modules do not work in other file types and you do not have server code access to generate a file type of results.
    You need to use the google API and do this yourself or you can just use this:
    And embed it into a custom field. My Maps

  • How to lock a specific map with a password in FINDER?

    I don't use a password on my mac because you have to fill it out the whole time for ridiculous reasons. But I have one map, with all my financial numbers and invoices, that I want to secure with a password.
    How to do that?
    I already tried some things but can't figure it out.
    Thanks in advance!

    not sure what you mean by a map here. if you use a blank admin password (a mistake IMO), pretty much your only option is to create an encrypted disk image using disk utility and put whatever you want protected inside. when the image is unmounted, the only way to mount it is by entering the password you set at the image creation time.

  • Error in scheduling a mapping with sqlloader ctl file

    Hi everyone,
    I have been trying to schedule a single mapping which generates sqlloader ctl file. but i get the error
    ORA-20001: Begin. initialize complete. workspace set. l_job_audit_execution_id= 20545. ORA-20001: Please check execution object is deployed correctly. ORA-01403: no data found ORA-06512: at "USER7.PMAP_TLOG_JOB", line 180 ORA-20001: Please check execution object is deployed correctly. ORA-01403: no data found
    but when i attach this mapping with a process flow it works fine. There is no error.
    so my question is in OWB is it a must that we should attach the mapping which generates sqlloader ctl file to a process flow and then schedule it or can we schedule a single mapping which generates sqlloader ctl file and what should be the process to schedule a single mapping which generates sqlloader ctl file?
    can anyone please help?
    Thanks & Regards
    Subhasree

    Hi Nawneet,
    Any suggestions?
    can anybody else also help me in this error???
    Regards
    Subhasree

  • Runtime-Error after deploying a mapping with the generated script

    For example a very easy scenario:
    1. Create a table and a view in a DB-schema, witch ist registered as WB-target-schema with the following scripts:
    create view v1(c1) as select 'a' c1 from dual;
    create table t1(c1 varchar2(1));
    2. Import the table and the view into a OWB-module
    3. Create a mapping ‘m1’
    4. Drag and drop view and table into the mapping
    5. Draw an arrow from the view-column to the table-column
    6. Save and close the mapping
    7. Mark the mapping in the ‘Design Center’ and klick the ‘Generate’-Button
    8. Save the generated script ‘M1.pls’ to file
    9. Run the script in SQL*Plus, connected with the target-schema (without using the Control Center Manager)
    => very easy right now ;-)
    10. Start the mapping with the following script will produce the following error
    SQL> declare
    2 v_status varchar2(100);
    3 begin
    4 m1.main(v_status);
    5 end;
    6 /
    declare
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OWB_OWN.WB_RT_MAPAUDIT_UTIL", line 1027
    ORA-06512: at "SCOTT.M1", line 2048
    ORA-06512: at line 4
    If i delete or comment the four WB_RT_MAPAUDIT_UTIL-calls - it work´s fine!
    But is this a good advise?
    What exactly does the wrapped package ‘WB_RT_MAPAUDIT_UTIL do?
    Thanks
    jwehner

    I just ran into the same problem myself. I used the same technique of saving the generated OWB script to file and then compiling it through sqlplus. When I used the "Deploy" option for the mapping, then the problem went away. So when OWB is deploying the code it seems to be setting something internally that doesn't get set when you simple compile the PL/SQL. I don't know of any workaround to this. I will need it eventually, since I don't want to use the UI to deploy to various test environments and production. Maybe the built-in scripting language is the way to go.

  • Multi mapping with out BPM

    HI ALL ,
           I am trying to do multi mapping with out using BPM .I will get message from the sender and i need to send that to two different target system. I have defined the mapping in the IR . In ID i  have created the configuration scenario and i have created the receiver determination .In receiver determination i have selected "EXTENDED" and when i select input help for mapping name it says "NO Object found". What else should i do get the mapping program here .
    Regards,
    Tarun.

    Bhavesh,
    I'm sorry but if he needs 2 different receivers, then it's not the case of using Enhanced Interface Determination.
    sapuser,
    if you scenario is asynchronous, then it's easily implemented.
    But it won't be achieved with multimapping.
    You'll have 2 receivers in receiver determination (normal RD, not enhanced). For each of those, you'll have to create a separate simple mapping (that will generate the message expected at each receiver system) and refer that mapping in the interface determination of each receiver.
    For example, you have input_message containing data1 and data 2. You'll have 2 simple mappings (not a multimapping), 1 generating output_message_1 containing data1 and the other generating output_message_2 containing data2. Then refer those mappings in the proper interface determinations.
    Regards,
    Henrique.

  • XSLT Mapping with Java Enhancement

    Hi All
    I am working on XSLT Mapping with Java Enhancement.
    To do this scenario i have followed the following link.
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
    As per the above link I have created Source and Target Data Types , Message Types , Mesage Interfaces, XSLT Mapping (using the transaction XSLT_TOOL) and Interface Mapping part and configred a simple file to file scenario in the ID part.
    Apart from this I have wirte the java code, compile the java code, create the jar file using .java and .class file and after creating the jar file import the .jar file in the imported archive of the IR..
    when I am trying to execute the scenario I am getting the successful message in SXMB_MONI but the target file is having the payload as given below.
    <?xml version ="1.0" encoding="UTF-8"?>
    <name xmlns:javamap="java:com.company.group.MappingClass"/>
    And as per the XSLT mapping the payload should be as below
    <?xml version ="1.0" encoding="UTF-8"?>
    <person>
    <name>Rinku Gangwani</name>
    </person>
    I have also followed the following blog link but still i am getting the same issue
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    could you please tell me what can be the reason that i am getting the blank targt field values in the payload.
    Thanks
    Rinku Gangwani

    Hi,
      The Transaction code XSLT_TOOL for ABAP xslt mapping.But the Java Enhancement is used for normal xslt mapping which we created using Stylus Studio.You can not access the Java Enhancement in ABAP xslt mapping.
    If you want to use Java Enhancement in xslt mapping then create a xslt mapping using Stylus Studio and save the file as .xsl and zip the .xsl and import to import archive.
    Regards,
    Prakasu.M
    Edited by: prakasu on May 28, 2009 1:46 PM

  • XSLT Maps with Java enhancements - JCO_SYSTEM_FAILURE

    Hi,
    I have reviewed several postings regarding XSLT Maps with Java enhancements. I followed instructions and build a jar file and the XSLT document. I built one imported archive with the .jar and .xsl. For the class, The path get loaded properly.
    However, I still have a problem when and execute the interface.
    My xslt has the following information
    <xsl:transform version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:ns="http://xyz.abc.sap.def.com"
        xmlns:javamap="java:xyz.Date_Time">
    <xsl:param name="inputparam" />
        <xsl:template match="/">
            <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
        </xsl:template>
    </xsl:transform>
    In SXMB_Moni I get the following error...
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>Exception in method processFunction.</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>"SYSTEM FAILURE" during JCo call. Exception in method processFunction.</SAP:Stack>
      <SAP:Retry>A</SAP:Retry>
      </SAP:Error>
    If i remove the line        
    <test><xsl:value-of select="javamap:getDateValue($inputparam)"/></test>
    The map ends successfuly.
    Comments would be appreciated.
    Regards,
    Sergio

    Stefan,
    Find the class and method definition below. The method is static and it returns the string.
    ==========
    package xyz;
    import java.util.Map;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.*;
    import java.text.*;
    public class Date_Time {
        private static AbstractTrace trace = null;
        public static String getDateValue(Map inputparam)
                trace = (AbstractTrace)inputparam.get(
                         StreamTransformationConstants.MAPPING_TRACE );
                Date now1 = new Date();
                SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMd");
                String dateString = formatter.format(now1);
                return dateString;

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • How to use tile map with AS3?

    I have a file that contains a bunch of isometric tiles that I need to make a map with, much like a sprite sheet but not for making animations. So using AS3, how can I divide that file into the different tiles, knowing the coordinates of each of them. Or can it be done automatically in Flash itself, so I can access each tile from AS3?
    Furthermore I've been a programmer for a couple of decades but I am new to Flash. I know there are a ton of DisplayObjects like Bitmap, Sprite, Shape, MovieClip, Symbol etc. But which one would be better to use for that file? I need to access it from AS3 as described above, but I don't need it to react to mouse events, stretch or have children, just extract each tile and move it onto the stage with AS3.
    It seems to be down to a choice between Bitmap and Shape, since they're both lightweight, but I couldn't find out what the advantages and disadvantages of them are, as there was no comparison between those two on Google, though between a lot of the other objects. And Symbol seems like an idea too, since when I googled this, I found a lot of pages saying that you should convert a Bitmap to a Symbol, but I never found out why.
    Oh, and since I'm building an isometric map, all the tiles and all other graphics I'll be using, will be Bitmap and not Vector since I'm drawing the graphics in pixelart.

    create one tile symbol (movieclip or sprite so you can use actionscript to reference tile properties - like its x and y) and arrange them (using code or by hand) into your map.
    enable the cacheAsBitmap property of your map (that has some number of tile children).
    assign the mouseEnabled property of the map to false and its mouseChildren property to false.

Maybe you are looking for