Pick first value from source structure out of multiple satisfying condition

Hi PI Experts,
I have mapping situation as follows. Looking for best way to achieve this.
I have source structure
Src Header
   Src Line ITems ( 1.. N)
         Line Field 1
        Src Details records ( 1....N)
              Field 1
              Field 2
My Target stucture is
Target (1.. N)  ( Cardinality same as the Src Details records)
Line Field1
Field 1  
Field 2  ( This is should field2 of the first Src detail records which matches the condition based on field 1)
From the source message  I want to repeat the field 2 in the target from that source record which matches the condition.
e.g if Field1 =  PR00 then Copy of the values of records field 2 in the all the output target records.
I was thinking of useOneOfMany but the issue is my source i can have multiple records which may satisfy the condition but i want only the first one which is satisfying condition from the source records to be output in targe.
Thanks,
Mahesh

Hello,
Use Collapse Context & SplitByValues like this
Field2collapseContext-SplitByValue---Target Field
Set the context of field to one level Up
Regards

Similar Messages

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • In J1IS system is not picking net value from PO automatically

    Dear Experts,
    I want to send rejected material to vendor back, so I have done return delivery against MIGO material document, in MIGO, in Excise Invoice Tab i have selected no exicse Entry document. At the time of J1IS sytem is not picking net value from PO. This field is editable. Our requirement is, system should pick net value from PO.
    In this case I am not makeing any RETURN PO
    Could any body guide me? Is there any configuration required?
    Thanks & Regards,
    Trupti.

    There is no link between p.o & excise inv. creation using J1IS.
    In J1IS,Enter return material document no,Ref doc. type - MATD,Doc Year,series group,excise group,series group & finally vendor in selection.
    In excise invoice automatically details like material code,qty will appear.
    You need to enter assesable value & excise duties manually.
    Note :
    Be cautious while entereing excise duties bcoz you may be returning partial quantity to vendor,
    so calculate excise duties in a seperate excel sheet before entering it in J1IS.

  • Dealer Invocie -MIRO is not picking excise value from MIGO it takes from PO

    Hi all,
          I have a issue in dealer invoice.
         I have raised a PO., made goods receipt against that PO. Entered the excise duties, education cess and Higher education cess manually in MIGO. Automatic posting is done for that excise invoice. When MIRO is raised it picks the value from PO.
       It is a new plant. The issue is in this plant only. The dealer invoice works fine for all the other plants.
      Kindly help to resolve this issue.
    Regards.

    Hi ,
    please refee below
         Creating a Purchase order with Zero Tax code
         Capturing of Excise invoice in J1IEX/MIGO.
         Activation of MRP indicator during capturing
         Posting the Excise Invoice captured.
         Invoice processing for the Purchase order
    In the MIGO screen, you can find that the excise base value is defaulted as the PO price and the excise duties are zero.
    Now manually enter the respective excise rates for Basic excise duty (BED), Educational cess (ECS) and Higher Educational cess (SECESS).
    The excise base is changed such that the sum of the excise base value and the excise duties remain the same as the PO price. The excise base is reduced by the excise duty value and the differential amount is split amongst the relevant excise duty components.
    In the miro screen change the base value as same that you have maintained in MIGO.
    also refer the note which i am insisting so that you can able to meet your req.
    Regards,
    velu

  • Fetching value from deep structure

    Hi All,
    I need to take value from deep structure into a variable.
    IS_DESDLVRY_NOTIF-DELIVERY-ITEM[1]-PURCHASE_ORDER_REFERENCE-ID is that structure.
    Value is available in debugger.
    But in editor gives syntax error- item[1] doesnt exist,Item exist.
    If i delete [1] from item i wont get value.
    can you guide how to resolve error?
    Thanks.
    Edited by: sanj_dell on Jun 17, 2011 8:20 AM

    Hi,
    you have to read table IS_DESDLVRY_NOTIF-DELIVERY-ITEM index 1 into a matching structure!
    Regards,
    Klaus

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • Loading Null values from source to target

    Hello all,
    Please help me in this issue....
    I am trying to load data from source ( state column, varchar50) into target (state column,varchar10).....
    in my source i have 10records for state...... 9states with lenght<10 and 1 NULL value......
    when i am trying to load the records from source to target...i am getting this error.....
    12899 : 72000 : java.sql.SQLException: ORA-12899: value too large for column "TARGET"."STATE" (actual: 11, maximum: 10)
    why is taking the lenght of NULL as 11...........
    Thanks

    there might be some special characters or international characters instead of Varchar2(10 byte ) try varchar2(10 char) and try again. As some of the unicode symbols or characters can take two byes even though they are single characters

  • XI is not picking the file from source dir after exported from DEV to QA

    Hi Experts,
    We have moved one XI object from Dev to QA. It was working fine Dev but in QA XI system not picking the file from the source directory.
    I have checked Communication Channel monitoring and receiver determiniation everything is fine. But still it is not picking the file.
    Could you please help us.
    Regards
    Sowmya

    Hi
    We have used the CMS to transport XI objects. Everything has been configured automatically. I checked all the configuration and everthing seems to be fine.
    Could you please give any more suggestions.
    Regards
    Sowmya

  • How to handle 1 Source Structure and N ( multiple Target Structure

    Hi           I have One source structure , Which is Source1 and mulitple target structure which Target1 , Target2 and Target3
    I need Map this Source1 to Target1 and Target2 and Target3 based on the condition of one field of source1
    ianyone please tell me how to do it
    Thanking you
    Sridhar

    Hi Sridhar,
    Yes Multimapping is possible without BPM from SP14 and above. But there are certain limitation on that as well. You can do only 1:N multi mapping and N:1 is not possible without BPM. In the case of 1:N mapping you would need to go for Enhanced Interface Determination and you will have a full advantage of that mapping if you use a adapter other than IDOC, HTTP and XI. In otherwords this holds good for adapters that runs on Adapter framework and not on Integration Engine.
    BPM involved:
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Without BPM:
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f3b31d48fb1bc8e10000000a11466f/content.htm
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    Thanks
    Ravi

  • Can I steam video from Apple TV out to multiple iPads

    Can I play video from my Apple TV out to multiple iPads?

    Winston Churchill wrote:
    Speculation is not permitted in these communities.
    <Silly Spinning Around Emoticon>

  • Dropping first product from vendor punch-out catalog

    Hi,
    We are having classic scenario implemented with GOA on SRM server 5.5 and support pack 9 with CCM2.0.
    Currently we are facing an issue for one vendor punch-out catalog. When we are choosing multiple products from vendor catalog,it is dropping first product and bringing remaining products in the shopping cart. We have checked OCI mapping , it looks fine . I have also checked all configuration for catalog call structure. Can anyone answer what could probable reason for this issue?
    Thanks in advance.
    Regards,
    Umesh

    Hi,
    This issue resolved after vendor inbound OCI format.
    Regards,
    Umesh

  • RRI - Jump query, unable to pass the variable value from source to target

    Hi,
        I've a source query which has a variable on 0vendor, from this query i jump to another query for which i want to pass the this variable value, in the target query i've vendor in free characteristics (no filter or variable in there), and in RSBBS i tried the assignment details options keeping vendor as generic, tried variable and the variable name but nothing seem to work.
    But when query is run i can jump into target query but the vendor variable value doesnt get passed thru the values i get in target query is for all rather than for the variable entered vendor value in the source.
    btw we're in NW2004s.
    any help appreciated with points.
    thanks
    Mayil

    Anyways, I read somewhere that a variable with replacement path in target query would work, tried it seem to work.
    let me know if there other way to do it without creating a variable in target query.
    thanks
    mayil

  • Ccalling the webservice in WSDL based on the incoming value from source

    Hi Experts,
    i am doing the inteface like SAP -(Client proxy)SAPPI(SOAP)----thirdparty
    i got WSDL from the third party it provides the structure like this when i was impoted through external defination
    BLE
    Fault
    Exception code
    Exception message
    ADDPARTS
    Add parts
    Parts
    Each record
    Field1
    Field2
    Field3
    Price
    Usd
    Field4
    ADD PARTSRESPONSE
    Add parts response
    Status
    Success
    Message
    DELETEPARTS
    Deleteparts
    Parts
    Criteria
    DELETEPARTSRESPONSE
    Deletepartsresponse
    Status
    Success
    Message
    GETPARTS
    Getparts
    Parts
    Criteria
    GETPARTSRESPONSE
    - -Getpartsresponse
    Status
    Parts
    Eachrecord
    Field1
    Field2
    Field3
    Field4
    UPDATEPARTS
    Updateparts
    Parts
    Eachrecord
    Field1
    Field2
    Field3
    UPDATEPARTSRESPONSE
    Updatepartsresponse
    Status
    my question is how can i call the perticular webservice suppose if the partsmaster values are new values we need to update so in that time we need to call the update parts webservice
    in the same manner deleteparts and getparts
    please any body suggest to me how can iachinve this one
    Thanks in advance
    Edited by: katakoti on Mar 23, 2011 9:35 AM

    To process adapter attributes in the message header of the XI message, select Use Adapter-Specific Message Attributes and Variable Transport Binding.
    http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm

  • Pick Default Value from Page 0

    Hello all.
    I have a page with a select list. I need to set the default value for this item from a value in a item from page 0.
    As Default Value for the item, i've put :P0_SSC_CLIENTE, but it does not work.
    Any help?
    Thanks in advance

    Thanks for the replies.
    I don't know what am I missing here, but it does not work.
    It doesn't accept v('P0_SSC_CLIENTE'). It is not valid for default values. If I use &P0_SSC_CLIENTE, it gives me a runtime error too (ORA-06550: line 1, column 27: PLS-00103: Encountered the symbol "&" when expecting one of the following: ( - + case mod new...) if it's a PLSQL Expression. If it is a static value, it just displays &P0_SSC_CLIENTE instead of showing it's value.

  • Problem in picking base value from PO while doing goods receipt for multiple POs

    Hi,
    Our user is trying to post goods receipt for two purchase orders which have same vendor. After the materials of two POs are allocated in the item detail screen and checked the item ok, system throwing error as "Please check the base value of the item is zero" ( also excise tab does not appear for last three line items). This error does not occur when we are trying to do the goods receipt separately for each POs. Only when we do goods receipt for both the POs together, we are facing this error.
    Please let us know what could be the reason. Is there an issue with standard CIN? Any notes to be applied? Please help!

    Refer these notes for the issue.
    1528009 - MAA: incorrect distribution of goods receipt
    quantities
    and
    1677707 - Determining the valuation type for stock transport orders
    at the time of GI
    For Excise tab not appearing, you have to check J1ID for "Material-ChapterId combination" and "Cenvat Determination".
    Regards
    Binoy

Maybe you are looking for