How to Pass multiple parameter into single store procedure

How to Pass multiple parameter into single store procedure
like a one to many relationship.
it is possible then reply me immediatly

you mean like this .....
CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
BEGIN
DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
END display_me;
CREATE OR REPLACE procedure display_me_2 as
cnt integer :=0;
BEGIN
For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
     display_me(in_param => c1_rec.empno);
     cnt := cnt+1;
     end loop;
     DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
END display_me_2;
SQL > exec display_me_2
Values is .....9999....Default
Values is .....4567....Default
Values is .....2345....Default
Values is .....7369....Default
Values is .....7499....Default
Values is .....7521....Default
Values is .....7566....Default
Values is .....7654....Default
Values is .....7698....Default
Values is .....7782....Default
Values is .....7788....Default
Values is .....7839....Default
Values is .....7844....Default
Values is .....7876....Default
Values is .....7900....Default
Values is .....7902....Default
Values is .....7934....Default
Values is .....1234....Default
Total record count is ....18

Similar Messages

  • How to pass the parameter of a stored procedure to iReport

    Hi... i don't know how to pass the parameter of the stored procedure to the iReport.
    In the Report Query, i tried
    1. sp_storedprocedure ' value'
    2. sp_storedprocedure +''''+$P{parameter}+''''+
    3. sp_storedprocedure +$V+$P{parameter}++$F($F is a variable having a value of ' (a single quote))may you enlighten us please? thank you

    For M$ SQL server I find that it only works when U use the fully qualified name...
    e.g. catalod.dbo.my_procedure_name 'variable'
    My full query in the Report Query window is something like this:
    EXEC arc.dbo.jasper_Invoice 1000
    Note that you may find that selecting from VIEWS / TABLES fails for no apparent reason and iReport will prompt you with the usual very unhelpful (we have what we "pay" for) prompt, stating that "The document is empty".
    To work around this issue, where a statement like "SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id=1000" does not work, simply create a PROC, something like:
    CREATE PROC jasper_MyProc (@my_rec_id integer) AS
    SELECT * FROM arc.dbo.acc_invoices WHERE Invoice_id= @my_rec_id integer
    ...to wrap your SELECT statement, then call the PROC
    Edited by: Sylinsr on Apr 22, 2008 4:23 PM

  • How to pass a parameter into RMAN script

    Hello,
    I have the following rman script :
    run {
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE CONTROLFILE AUTOBACKUP OFF;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\ora_df%t_s%s_s%p';
    This script called configure.rman is launch by a .bat script with the following command:
    rman target 'sys/sys12@ORCL102 as sysdba' @c:\oracle\RmanORCL102\configure.rman
    How can I pass a parameter into rman script, I want to pass an additional directory like this:
    rman target 'sys/sys12@ORCL102 as sysdba' @c:\oracle\RmanORCL102\configure.rman v_dir_name
    And use it in rman script:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\$v_dir_name\ora_df%t_s%s_s%p';
    Is it a way to do this?
    Regards,
    Elodie

    One option would be to create a file called backup.bat with the following:
    echo run {
    echo CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    echo CONFIGURE CONTROLFILE AUTOBACKUP OFF;
    echo CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
    echo CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'c:\oracle\RmanORCL102\%1\ora_df%t_s%s_s%p';
    echo } ) | rman target sys/sys12@orcl102and then call the script as:
    c:\> backup.bat backup_directory_name

  • How to pass a parameter into execute sql task and later use it into dataflow task?

    i am in a situation, where i have a logging table in which i have a primary key called ETL_log_ID which is an identity column and acts as a foreign key for various fact table and dimension tables which are populated using SSIS packages. Now i wanna use the
    ETL_log_ID as a parameter in the execute sql task which populates the log table and pass the same value in the data flow task which populates the facts and dimension. Can you let me know how to pass the parameter in a step by step procedure.
    Thanks,
    Nikhil
      

    Nikhil,
    You can check the following :
    http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx
    http://stackoverflow.com/questions/7610491/how-to-pass-variable-as-a-parameter-in-execute-sql-task-ssis
    Regarding the usage in Dataflow task, Can you elaborate on that a little?
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to Pass Multiple Parameter to Discoverer Custom Folder Created in Admin

    Hi,
    I have done as describe in doc id (metalink) note 304192.1 and it's ok.
    Now, my scope is to use the parameter declared in SETPARAMS not with the "=" condition but with "IN CLAUSE" (multipe values).
    for example (SQL Inspector):
    SELECT i106116 as E106116,i106117 as E106117,SUM(i106118) as E106118_SUM
    FROM ( SELECT DS_COMMESSA AS i106116, DS_SCENARIO AS i106117, DS_VALUE AS i106118 FROM (select ds_commessa, ds_scenario, DS_VALUE
    from dw_ods.ods_mbo_commessa
    where DS_TIPO_COSTO='COSTI MEDI'
    and ds_label='DIR'
    and cd_scenario in (1,2)
    and ds_commessa IN DW_ODS.SETPARAM.GET_PARAM1
    union all
    select 'Totale' as ds_commessa, ds_scenario, sum(DS_VALUE)
    from dw_ods.ods_mbo_commessa
    where DS_TIPO_COSTO='COSTI MEDI'
    and ds_label='DIR'
    and cd_scenario in (1)
    and ds_commessa IN DW_ODS.SETPARAM.GET_PARAM1
    group by ds_scenario
    ) CUO106102 ) o106102
    WHERE (1 IN (DW_ODS.SETPARAM.SET_PARAM1(:"Commessa")))
    GROUP BY i106116, i106117;
    where the parameter "commessa" is used with "IN" operator.
    Also tried to modifiy the SET_PARAM1 and GET_PARAM1 in order to use a "table of varchar2" ... but with no succes.
    Help please

    Rod,
    for the first "problem" I find the solution on metalink (note 304192.1) and works fine (also combining SET and GET together)... otherwise I don't know how use this "workaround"...
    for the multiple values on a single parameter (for example: Month='Jan,'Feb') I have tried to understand how DISCO pass these values to the SET function (I suppose like an array of varchar2) but don't work. After the first values (Jan) the reports stop... The problem in not how stored the values but understan how DISCO "pass/manage" these values (Jan,Feb)... Can u help me?
    my actual SETPARAMS package body is (like metalink):
    CREATE OR REPLACE PACKAGE BODY SETPARAM AS
    FUNCTION SET_PARAM1(P1 IN VARCHAR2) RETURN NUMBER IS
    BEGIN
    param1 := P1;
    return 1;
    END;
    FUNCTION GET_PARAM1 RETURN VARCHAR2 AS
    BEGIN
    return param1;
    END;
    FUNCTION SET_PARAM_MBO(p_anno IN VARCHAR2) RETURN NUMBER IS
    BEGIN
    anno := p_anno;
    return 1;
    END;
    FUNCTION GET_PARAM_MBO RETURN VARCHAR2 AS
    BEGIN
    return anno;
    END;
    END SETPARAM;
    ----------------------------------------------------------------------

  • How to pass a parameter into a select statement using a bulk collect

    Using a cursors I can use execute immediate to pass a parameter to specify a table name.
    I have modified the procedure not to use the cursor. I am using a collection using a bulk insert into a nested table. How can I specify the table the table name as a parameter without using the execute immediate statement.
    Thank you

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • How to pass a parameter into a sql expression?

    How to pass a report parameter into a sql expression?

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • HOW to pass page parameter into table function in  HTMLDB

    I created this object and table function in database.
    create or replace TYPE date_flow_type
    AS OBJECT (
    time           date,
    max_time      number,
    avg_total           NUMBER,
    sum_total      NUMBER,
    max_total      NUMBER,
    change_rate      number
    create or replace TYPE date_flow_table_type AS TABLE OF date_flow_type;
    create or replace function ret_date(p_date date default sysdate) return date_flow_table_type is
    v_tbl1 date_flow_table_type :=date_flow_table_type();
    begin
    v_tbl1.extend;
    v_tbl1(v_tbl1.last):=date_flow_type (p_date,1,1,1,1,1);
    return v_tbl1;
    end;
    and it is correct in htmldb when using in these ways
    SELECT TIME da,
         max_time max_time,
         sum_total total,
         max_total max_total,
    change_rate
    FROM TABLE ( ret_icp_date_flow ) a;
    SELECT TIME da,
         max_time max_time,
         sum_total total,
         max_total max_total,
    change_rate
    FROM TABLE ( ret_icp_date_flow( sysdate-1 )) a;
    but return error
    ORA-00904: "RET_ICP_DATE_FLOW": &#26080;&#25928;&#30340;&#26631;&#35782;&#31526;
    when pasing page parameter into the table function
    SELECT TIME da,
    max_time max_time,
    sum_total total,
    max_total max_total,
    change_rate
    FROM TABLE ( ret_icp_date_flow( to_date(:p1_date,'yyyy-mm-dd') )) a
    and this sql is correct while running in sqlplus .

    Hi!
    Thanks for your reply!
    I have tried this solution but it doesn't work!
    When I do getInitParameter in the init function, the servlet take the default values...
    Maybe I have wrote something wrong?
    Excuse me for my english,
    Thanks

  • HOW TO COMBINE MULTIPLE ROWS INTO SINGLE ROWS

    Hi,
    I have a table with the following data:
    CASE-1
    TABLE -X
    RNO      FROM_SQN     TO_SQN     DATE
    ==========================================
    991      9           11     2010-01-01
    991      11           22     2010-01-01
    991      22           33     2010-01-01
    992      33           44     2010-01-01
    I want to see the result data as follows:
    RNO      FROM_SQN     TO_SQN     DATE
    ==========================================
    991      9           44     2010-01-01
    CASE-2
    TABLE -X
    RNO      FROM_SQN     TO_SQN     DATE
    ==========================================
    991      9           11     2010-01-01
    991      15           22     2010-01-01
    991      22           34     2010-01-01
    992      33           44     2010-01-01
    I want to see the result data as follows:
    RNO      FROM_SQN     TO_SQN     DATE
    ==========================================
    991      9           11     2010-01-01
    991      15           44     2010-01-01
    Please help me how to achieve this using SQL.
    Edited by: 986725 on Feb 7, 2013 2:36 AM

    with x as
    select 991 rno, 9 from_sqn ,11 to_sqn ,to_date('2010-01-01','yyyy-mm-dd') dt
    from dual union all
    select 991, 15 ,22 ,to_date('2010-01-01','yyyy-mm-dd') from dual union all
    select 991, 22 ,33 ,to_date('2010-01-01','yyyy-mm-dd') from dual union all
    select 991, 33 ,44 ,to_date('2010-01-01','yyyy-mm-dd') from dual
    x_with_group as
    select rno,from_sqn,to_sqn,dt,
           sum(sm) over(partition by rno,dt order by from_sqn) sm
    from
      select rno,from_sqn,to_sqn,dt,
             from_sqn-
              nvl(lag(to_sqn) over(partition by rno,dt order by from_sqn),0) sm
      from x
    select rno,min(from_sqn) from_sqn,max(to_sqn) to_sqn,dt
    from x_with_group
    group by rno,dt,sm
    order by rno,dt,from_sqn;
    RNO FROM_SQN TO_SQN DT       
    991        9     11 01-jan-2010
    991       15     44 01-jan-2010 Edited by: jeneesh on Feb 7, 2013 4:59 PM
    Assumed the date values are actually DATE types.
    Partition on DT and RNO can be amended as per your requirement..
    And assumed your sample data has a typo..
    If your data is correct..
    with x as
    select 991 rno, 9 from_sqn ,11 to_sqn ,to_date('2010-01-01','yyyy-mm-dd') dt
    from dual union all
    select 991, 15 ,22 ,to_date('2010-01-01','yyyy-mm-dd') from dual union all
    select 991, 22 ,33 ,to_date('2010-01-01','yyyy-mm-dd') from dual union all
    select 992, 33 ,44 ,to_date('2010-01-01','yyyy-mm-dd') from dual
    x_with_group as
    select rno,from_sqn,to_sqn,dt,
           sum(sm) over(order by from_sqn) sm
    from
      select rno,from_sqn,to_sqn,dt,
             from_sqn-
              nvl(lag(to_sqn) over(order by from_sqn),0) sm
      from x
    select min(rno) rno,min(from_sqn) from_sqn,max(to_sqn) to_sqn,min(dt) dt
    from x_with_group
    group by sm
    order by rno,dt,from_sqn;
    RNO FROM_SQN TO_SQN DT       
    991        9     11 01-jan-2010
    991       15     44 01-jan-2010 Edited by: jeneesh on Feb 7, 2013 5:14 PM

  • Merge multiple rows into single row (but multiple columns)

    How to merge multiple rows into single row (but multiple columns) efficiently.
    For example
    IDVal IDDesc IdNum Id_Information_Type Attribute_1 Attribute_2 Attribute_3 Attribute_4 Attribute_5
    23 asdc 1 Location USA NM ABQ Four Seasons 87106
    23 asdc 1 Stats 2300 91.7 8.2 85432
    23 asdc 1 Audit 1996 June 17 1200
    65 affc 2 Location USA TX AUS Hilton 92305
    65 affc 2 Stats 5510 42.7 46 9999
    65 affc 2 Audit 1996 July 172 1100
    where different attributes mean different thing for each Information_type.
    For example for Information_Type=Location
    Attribute_1 means Country
    Attribute_2 means State and so on.
    For example for Information_Type=Stats
    Attribute_1 means Population
    Attribute_2 means American Ethnicity percentage and so on.
    I want to create a view that shows like below:
    IDVal IDDesc IDNum Country State City Hotel ZipCode Population American% Other% Area Audit Year AuditMonth Audit Type AuditTime
    23 asdc 1 USA NM ABQ FourSeasons 87106 2300 91.7 46 85432 1996 June 17 1200
    65 affc 2 USA TX AUS Hilton 92305 5510 42.7 46 9999 1996 July 172 1100
    Thanks

    Hi,
    That's called Pivoting . The forum FAQ has a section on this subject: {message:id=9360005}
    I hope this answers your question.
    If not, post your best attempt, along with a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data. (You did post the results you wanted, but they're very hard to read because they're not formatted. Use \ tags, as described in the forum FAQ, below.)
    Explain, using specific examples, how you get the results you want from the data given.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).  This is always important, but especially so with pivots.
    See the forum FAQ {message:id=9360002}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Pass multiple values as single input parameter into pipelined function

    Hi all,
    My need is to pass multiple values as single input parameter into pipelined function.
    For example - "2" and "3" are values of input parameter "t":
    with data as (
    select 1 as t from dual union all
    select 2 as t from dual union all
    select 3 as t from dual union all
    select 4 as t from dual union all
    select 5 as t from dual
    select * from data where t in (2,3)Is it possible at all?

    Not exactly sure, but usually 'multiple values'+'pipelined function' = some IN-LIST related approach?
    See:
    SQL> create table data as
      2  select 1 as t from dual union all
      3  select 2 as t from dual union all
      4  select 3 as t from dual union all
      5  select 4 as t from dual union all
      6  select 5 as t from dual;
    Table created.
    SQL> --
    SQL> CREATE OR REPLACE FUNCTION in_list (p_in_list  IN  VARCHAR2)
      2  RETURN sys.odcivarchar2list PIPELINED
      3  AS
      4    l_text  VARCHAR2(32767) := p_in_list || ',';
      5    l_idx   NUMBER;
      6  BEGIN
      7    LOOP
      8      l_idx := INSTR(l_text, ',');
      9      EXIT WHEN NVL(l_idx, 0) = 0;
    10      PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    11      l_text := SUBSTR(l_text, l_idx + 1);
    12    END LOOP;
    13 
    14    RETURN;
    15  END;
    16  /
    Function created.
    SQL> --
    SQL> select *
      2  from   data
      3  where  t in ( select *
      4                from   table(in_list('1,2'))
      5              );
             T
             1
             2
    2 rows selected.http://www.oracle-base.com/articles/misc/dynamic-in-lists.php
    or
    http://tkyte.blogspot.nl/2006/06/varying-in-lists.html

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • How to pass multiple records to target side using xquery

    Hi Everybody,
    I am using xquery transformation.
    Input: Source payload contains 5 variables.
    Target payload contains 5 variables.
    I have input with payload with multiple instance like:
    <Input>
    <payload1>
    <a>1<a>
    <b>2<b>
    <c>3<c>
    <d>4<d>
    <e>5<e>
    </payload1>
    <payload1>
    <a>6<a>
    <b>7<b>
    <c>8<c>
    <d>9<d>
    <e>10<e>
    </payload1>
    </Input>
    So my requirement is to pass above records into target side,
    So I am using xquery Transformation.
    I have written code as follows.
    (:: pragma bea:global-element-parameter parameter="$tHRecAdv1" element="ns0:THRecAdv" location="../XMLSchemas/THRecAdv.xsd" ::)
    (:: pragma bea:global-element-return element="ns1:ShipmentReceiptEBO" location="../../AIAReferenceModelProject/EnterpriseObjectLibrary/Core/EBO/ShipmentReceipt/V1/ShipmentReceiptEBO.xsd" ::)
    declare namespace ns2 = "http://xmlns.oracle.com/EnterpriseObjects/Core/Custom/EBO/ShipmentReceipt/V1";
    declare namespace ns1 = "http://xmlns.oracle.com/EnterpriseObjects/Core/EBO/ShipmentReceipt/V1";
    declare namespace ns4 = "http://xmlns.oracle.com/EnterpriseObjects/Core/Common/V2";
    declare namespace ns3 = "http://xmlns.oracle.com/EnterpriseObjects/Core/Custom/Common/V2";
    declare namespace ns0 = "http://diversey.com/THRecAdv";
    declare namespace xf = "http://tempuri.org/ShipmentReceiptServicesProject/XMLTransformations/THRecAdvFile_ShipmentReceiptEBO_JDE_XQuery/";
    declare function xf:THRecAdvFile_ShipmentReceiptEBO_JDE_XQuery($tHRecAdv1 as element(ns0:THRecAdv))
    as element(ns1:ShipmentReceiptEBO) {
    for $THRecAdvFields  in $tHRecAdv1/ns0:THRecAdvFields
    return
    <ns1:ShipmentReceiptEBO>
    <ns4:Identification>
    <ns4:BusinessComponentID>{ data($THRecAdvFields/ns0:JD_WHSE_Code) }</ns4:BusinessComponentID>
    <ns4:ID schemeID = "{ (data($THRecAdvFields/ns0:JD_PO_Number)) }"
    schemeVersionID = "{ data($THRecAdvFields/ns0:JD_PO_Type) }">{ data($THRecAdvFields/ns0:WMS_InternalPONumber) }</ns4:ID>
    <ns4:ApplicationObjectKey>
    <ns4:ID>{ data($THRecAdvFields/ns0:JD_BranchPlant) }</ns4:ID>
    </ns4:ApplicationObjectKey>
    <ns4:Revision>
    <ns4:Reason>{ data($THRecAdvFields/ns0:ReturnReceiptReasonCode) }</ns4:Reason>
    </ns4:Revision>
    </ns4:Identification>
    <ns1:ExpectedReceiptDate>{ data($THRecAdvFields/ns0:WMS_ReceiptDate) }</ns1:ExpectedReceiptDate>
    <ns4:InvoiceReference>
    <ns4:InvoiceIdentification>
    <ns4:ID>{ data($THRecAdvFields/ns0:JDE_SupplierInvoiceNumber) }</ns4:ID>
    </ns4:InvoiceIdentification>
    </ns4:InvoiceReference>
    <ns1:ShipmentReceiptLine actionCode = "{ data($THRecAdvFields/ns0:ActionFlag) }">
    <ns4:Identification>
    <ns4:ID schemeID = "{ data($THRecAdvFields/ns0:JD_PO_LineNumber) }"
    schemeVersionID = "{ data($THRecAdvFields/ns0:ExternPONumber) }">{ data($THRecAdvFields/ns0:WMS_ReceiptNumber) }</ns4:ID>
    <ns4:ContextID>{ data($THRecAdvFields/ns0:WMSReceivingClerk) }</ns4:ContextID>
    <ns4:ApplicationObjectKey>
    <ns4:ID schemeID = "{ data($THRecAdvFields/ns0:BatchNumber) }"
    schemeVersionID = "{ data($THRecAdvFields/ns0:BatchLineNumber) }">{ data($THRecAdvFields/ns0:JD_LocationCode) }</ns4:ID>
    </ns4:ApplicationObjectKey>
    <ns4:AlternateObjectKey>
    <ns4:ID>{ data($THRecAdvFields/ns0:SupplierCode) }</ns4:ID>
    <ns4:ContextID>{ data($THRecAdvFields/ns0:LineNumber_Or_SequenceNumber) }</ns4:ContextID>
    </ns4:AlternateObjectKey>
    <ns4:Revision>
    <ns4:Label>{ data($THRecAdvFields/ns0:Records) }</ns4:Label>
    </ns4:Revision>
    </ns4:Identification>
    <ns1:ReceivedQuantity unitCode = "{ data($THRecAdvFields/ns0:ReceiptUOM) }">{ data($THRecAdvFields/ns0:UnitReceipt) }</ns1:ReceivedQuantity>
    <ns1:SourceDocumentTypeCode>{ data($THRecAdvFields/ns0:SKU_Code) }</ns1:SourceDocumentTypeCode>
    <ns1:DestinationTypeCode>{ data($THRecAdvFields/ns0:DestinationProcessFlag) }</ns1:DestinationTypeCode>
    <ns1:Comment>{ data($THRecAdvFields/ns0:Remarks) }</ns1:Comment>
    <ns4:Status>
    <ns4:Code>{ data($THRecAdvFields/ns0:ProcessSourceFlag) }</ns4:Code>
    <ns4:EffectiveDateTime>{ data($THRecAdvFields/ns0:ADDDATE) }</ns4:EffectiveDateTime>
    </ns4:Status>
    <ns1:ShipmentReceiptTransaction>
    <ns1:ShipmentReceiptTransactionLot>
    <ns1:ShipmentReceiptItemLotReference>
    <ns1:ExpirationDate>{ data($THRecAdvFields/ns0:ExpiryDate) }</ns1:ExpirationDate>
    <ns1:CreationDateTime>{ data($THRecAdvFields/ns0:ProductionDate) }</ns1:CreationDateTime>
    </ns1:ShipmentReceiptItemLotReference>
    </ns1:ShipmentReceiptTransactionLot>
    </ns1:ShipmentReceiptTransaction>
    </ns1:ShipmentReceiptLine>
    </ns1:ShipmentReceiptEBO>
    declare variable $tHRecAdv1 as element(ns0:THRecAdv) external;
    xf:THRecAdvFile_ShipmentReceiptEBO_JDE_XQuery($tHRecAdv1)
    But while importing this code to OSB,and tested it ,
    With 1 payload it successfully shows the data in Target side,
    But while testing with multiple line items,i am getting an error as follows.
    *Error executing the XQuery transformation: line 14, column 17: {err}FORG0005: expected exactly one item, got 2+ items*
    So please provide me the steps how to pass multiple records to target side using xquery.
    Regards,
    Jyoti Nayak

    Hi Jyoti Nayak,
    You have to do something like the example bellow, you can not just repeat the inner element, you will need an outer "container" tag. So you will have to change the target element of your xq transformation.
    declare function xf:setToList($set1 as element(ns0:set))
    as element(ns0:list) {
    <ns0:list>
    for $pair in $set1/ns0:pair
    return
    <ns0:entry>
    <ns0:key>{ data($pair/ns0:key) }</ns0:key>
    <ns0:value>{ data($pair/ns0:value) }</ns0:value>
    </ns0:entry>
    </ns0:list>
    Cheers,
    Vlad
    Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question. If you think this is helpful, please consider giving points

  • How to send multiple attachements in single mail

    Hi All,
    Currently i am using this function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail with only one attachment.
    But now i need to send multiple attachments to a single mail.
    Can any one please tell me as how to send multiple attachments in single mail.
    Thanks in advance.

    Hi
    See this and do accordingly
    Mailing with Attachment by ABAP Coding  
    Refer this link:
    Mail with attachment.
    FORM send_list_to_basis .
      DATA: w_path      LIKE rlgrap OCCURS 0 WITH HEADER LINE,
            lt_index    TYPE sy-tabix,
            doc_type(3) TYPE c,
            descr       LIKE it_objpack_basis-obj_descr,
            temp_data   LIKE w_path,
            temp1       TYPE string,
            tab_lines   TYPE i,
            langu(15)   TYPE c,
            expirydate  TYPE so_obj_edt,
            L_FILE1(100).
      CONCATENATE 'C:\' sy-repid '_' sy-datum '.XLS' INTO L_FILE1.
      W_PATH-FILENAME = L_FILE1.
      APPEND w_path.
      CLEAR w_path.
      wa_doc_chng-obj_descr  = 'User List not logged on for 180 days'.
      wa_doc_chng-obj_langu  = 'E'.
      wa_doc_chng-obj_expdat = sy-datum.
      CLEAR w_subject.
      CONCATENATE 'Please find attached document with list of users'
                  'not logged on for 180 days for client' sy-mandt
                  INTO w_subject SEPARATED BY space.
      it_objtxt_basis-line = w_subject.
      APPEND it_objtxt_basis.
      CLEAR it_objtxt_basis.
      it_objtxt_basis-line = text-004.
      APPEND it_objtxt_basis.
      CLEAR it_objtxt_basis.
      CLEAR w_tab_line.
      DESCRIBE TABLE it_objtxt_basis LINES w_tab_line.
      READ TABLE it_objtxt_basis INDEX w_tab_line  INTO l_cline.
      wa_doc_chng-doc_size =
       ( w_tab_line - 1 ) * 255 + STRLEN( l_cline ).
      CLEAR it_objpack_basis-transf_bin.
      it_objpack_basis-head_start = 1.
      it_objpack_basis-head_num   = 0.
      it_objpack_basis-body_start = 1.
      it_objpack_basis-body_num   = w_tab_line.
      it_objpack_basis-doc_type   = 'RAW'.
      APPEND it_objpack_basis.
      CLEAR it_objpack_basis.
      LOOP AT w_path.
        temp1 = w_path.
        descr = w_path.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = descr
            lang    = 'E'
          IMPORTING
            rstring = descr.
        CALL FUNCTION 'STRING_SPLIT'
          EXPORTING
            delimiter = '\'
            string    = descr
          IMPORTING
            head      = descr
            tail      = temp_data.
        CALL FUNCTION 'STRING_REVERSE'
          EXPORTING
            string  = descr
            lang    = 'E'
          IMPORTING
            rstring = descr.
        CALL FUNCTION 'STRING_SPLIT'
          EXPORTING
            delimiter = '.'
            string    = descr
          IMPORTING
            head      = temp_data
            tail      = doc_type.
        CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename      = temp1
            filetype      = 'BIN'
            header_length = 0
            read_by_line  = 'X'
            replacement   = '#'
          TABLES
            data_tab      = it_upload.
        DESCRIBE TABLE it_upload LINES tab_lines.
        DESCRIBE TABLE it_objbin_basis LINES lt_index.
        lt_index = lt_index + 1.
        LOOP AT it_upload.
          wa_objbin_basis-line = it_upload-line.
          APPEND wa_objbin_basis TO it_objbin_basis.
          CLEAR wa_objbin_basis.
        ENDLOOP.
        it_objpack_basis-transf_bin = 'X'.
        it_objpack_basis-head_start = 0.
        it_objpack_basis-head_num   = 0.
        it_objpack_basis-body_start = lt_index.
        it_objpack_basis-body_num   = tab_lines.
        it_objpack_basis-doc_type   = doc_type.
        it_objpack_basis-obj_descr  = descr.
        it_objpack_basis-doc_size   = tab_lines * 255.
        APPEND it_objpack_basis.
        CLEAR it_objpack_basis.
      ENDLOOP.
      it_reclist_basis-receiver = '[email protected]'.
      it_reclist_basis-rec_type = 'U'.
      APPEND it_reclist_basis.
      CLEAR it_reclist_basis.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_objpack_basis
          contents_txt               = it_objtxt_basis
          contents_bin               = it_objbin_basis
          receivers                  = it_reclist_basis
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
      IF sy-subrc EQ 0.
        SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
      ENDIF.
    ENDFORM.                    " send_list_to_basis
    <b>Reward points for useful Answers</b>
    Regards
    Anji

Maybe you are looking for

  • Where to look for all value mappings being used in ID

    Hi All,           Where to look for all value mappings being used in ID? XIer

  • How BBPUPDVD determines vendor master change in ECC?

    Hi Experts, How is the vendor master change in ECC captured and what is the strategy/check that the BBPUPDVD transaction OR vendor update report uses/does in ECC to pick up the updated vendor with qualified fields for transmission? Qualified fields -

  • F110 - Payment proposal simulator

    Dear all, does anybody knows if SAP provide a standard report ables to perform a simulation of payment proposal? That is, I need to extract the total amount of an hypothetic payment but without locking all open items as F110 does. Thanks in advance!

  • Missing contact number in callback set

    Hi, I have UCCE 8.5 with CAD. When I want to schedule callback with the agent, after the client is talking, the Customer Number field has a value of -1. If I try to schedule the callback when the phone is still ringing , the Customer Number is popula

  • Remove windows boot camp applications

    Hi there! It might be a common question but this is the situation: I've been using Windows for a few weeks for school. I had it installed on a partition and I used Parallels. A few weeks ago, I have restored my disk to only one, so i removed Windows.