Splitting a message with multiple rows from the JDBC Adapter

Hi,
I'd like to split the resultset message with multiple row elements and process each row separately..
Does someone have this experience?
Thanx, Peter

Hi Chandrasekhar,
I tried to follow your advise, but I'm not able to complete the process correctly.
Let me explain my process:
First - output from the JDBC adapter goes into the first receive step. Of course, there are multiple ROW elements. (Should be marked the ingoing message marked in the container as Multiline??)
The next should be the transformation:
format of the source message is like
<message>
  <row>
    <column>w</column>
  </row>
  <row>
    <column>w</column>
  </row>
</message>
In the message I have the ROW element as 0..unbounded
and <column> element exactly 1
This message should be mapped to multiple messages of the format:
<message>
  <value>w</value>
</message>
How should be the mapping be done?
Is it N:1 or 1:N (because in another thread there was an 1:N mapping advised)
Then (as you say) should follow the Block step:
Which message (container element) should be marked as Multiline? And what does it mean: Current Message?
Can you give me some advise, when and how to use the multiline mark?
Thanx a lot, Peter

Similar Messages

  • Send a message to multiple receivers from the same service

    Hi all,
    I registered on SAP community several months ago, I found many good hints and solutions to some of the problems encountered in XI and for which I thank you, but this is the first time I address a question to a common issue, written already about.
    I have a scenario with 1 File FTP sender adapter and 2 Receiver adapters:1 FTP adapter and 1 MAIL adapter. The input message is sent to one of these receiver adapters based on the value taken by a specific field from the input message.The receiver adapters are using the same party and service.
    The requirement is to solve this without using BPM.
    I have read "multiple receiver" issue related blogs and tried to use the standard receiver determination. Thus, I have 1 Sender Agreement, 2 Receiver agreements (one for FTP and one for MAIL), 1 Interface Determinations (with the 2 inbound interfaces and interface mappings corresponding to FTP and MAIL output) and 1 standard Receiver Determination where I added the party and service twice and specified for both the condition. The condition is based on XPath, is correct.
    In sxmb_moni, I get the error: "No receiver could be determined". If I remove one of the conditions, then the output is sent on both receiver adapters, instead of only the one that fulfills the condition.
    Can you please give me some feedback on how to solve this problem? It is rather urgent.
    I have also tried to create 2 Interface Determinations and have 2 Receiver Determinations, each one with the right condition. But I get the same error message.
    Is the problem due to the fact that I don't use 2 different services ?
    If you know how this can be solved without using BPM, please reply.
    Thanks a lot,
    Alina hudea

    > In sxmb_moni, I get the error: "No receiver could be determined". If I remove one of the conditions, then the output is sent on both receiver adapters, instead of only the one that fulfills the condition.
    Hi,
    I think the problem in Receive Determination. As you mentioned when you remove one of the condition then it works..
    What I concluded is, I think while creating your Receiver Determination for multiple receivers you added the receivers by pressing the plus sign and that means you are using mulitiple receivers with "AND" condition, so in this condition when both the condition will be true then only you will get success.
    What you can do is, Just remove one of the receivers and then add it by pressing the "OR" symbol i.e. by pressing this ( [ ] ) symbol and put your conditions as you like.
    I hope what I have concluded is correct.. 
    Regards,
    Sarvesh

  • BAPI_PO_CREATE1 not able to create PO's for multiple rows from the flat fil

    Hi
    i am uploading PO's from a flat file into SAP using the BAPI_PO_CREATE1. Everything works fine if the flat file hast only one record.
    if the flat file has more than one record then while loading the second record the BAPI returns a error message. I am calling the BAPI in a loop.
    The strange thing is that if i load the second record individually the program is able to create the PO. So only when i have multiple records in the flat file i am unable to load the PO into SAP. I debugged and checked all the internal tables passed to the BAPI. All seems to have the data correctly but still the BAPI fails.
    any idea where i am going wrong?
    the code looks something like this.
    LOOP AT HEADER_ITAB.
       PERFORM FILL_HEADER_RECORDS.
    LOOP AT ITEM_ITAB WHERE EBELN eq HEADER_ITAB-EBELN.
         PERFORM FILL_ITEM_RECORDS.
    ENDLOOP.
      PERFORM CERATE_PO_VIA_BAPI.
    ENDLOOP.

    What is the error message. Are you trying something like this:
        LOOP AT T_DATA1.
          AT NEW LIFNR.
            READ TABLE T_DATA1 INDEX SY-TABIX.
            PERFORM INIT_TABLES.
            PERFORM FILL_DATA.
    --Call the BAPI to create PO
            PERFORM CREATE_PO.
          ENDAT.
        ENDLOOP.
    FORM CREATE_PO .
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          POHEADER                     =   POHEADER
          POHEADERX                    =   POHEADERX
        POADDRVENDOR                 =
        TESTRUN                      =
        MEMORY_UNCOMPLETE            =
        MEMORY_COMPLETE              =
        POEXPIMPHEADER               =
        POEXPIMPHEADERX              =
        VERSIONS                     =
        NO_MESSAGING                 =
        NO_MESSAGE_REQ               =
        NO_AUTHORITY                 =
        NO_PRICE_FROM_PO             =
       IMPORTING
         EXPPURCHASEORDER             =  EXPPURCHASEORDER
         EXPHEADER                    =  EXPHEADER
         EXPPOEXPIMPHEADER            =  EXPPOEXPIMPHEADER
       TABLES
         RETURN                       =  RETURN
         POITEM                       =  POITEM
         POITEMX                      =  POITEMX
        POADDRDELIVERY               =
         POSCHEDULE                   =  POSCHEDULE
         POSCHEDULEX                  =  POSCHEDULEX
         POACCOUNT                    =  POACCOUNT
        POACCOUNTPROFITSEGMENT       =
         POACCOUNTX                   =  POACCOUNTX
        POCONDHEADER                 =
        POCONDHEADERX                =
         POCOND                       =  POCOND
         POCONDX                      =  POCONDX
        POLIMITS                     =
        POCONTRACTLIMITS             =
        POSERVICES                   =
        POSRVACCESSVALUES            =
        POSERVICESTEXT               =
        EXTENSIONIN                  =
        EXTENSIONOUT                 =
        POEXPIMPITEM                 =
        POEXPIMPITEMX                =
        POTEXTHEADER                 =
          POTEXTITEM                   = POTEXTITEM
        ALLVERSIONS                  =
         POPARTNER                    =  POPARTNER
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT   = 'X'
        IMPORTING
          RETURN = RETURN1.
      DATA: L_NAME TYPE LFA1-NAME1.
      CLEAR L_NAME.
      SELECT SINGLE NAME1
               FROM  LFA1
               INTO L_NAME
               WHERE LIFNR = POHEADER-VENDOR.
      LOOP AT RETURN.
        WRITE : / RETURN-TYPE,
                  RETURN-ID,
                  RETURN-MESSAGE.
        WRITE : '--> For vendor:',
                 POHEADER-VENDOR,
                 L_NAME.
      ENDLOOP.
    ENDFORM.                    " CREATE_PO

  • Messaging With Multiple Devices on the Same iTunes Account

    My husband and I each have an iPhone 4s.  We share the same iTunes account.  We have never had any problems texting.  My daughter got an iPod Touch for Christmas.  So we set it up using the same iTunes account (since I was told you can have up to 5 devices on 1 acct).  Now when any of the 3 of us send a text, it shows up on all 3 devices.  It didn't happen before with just the 2 iPhones, but after adding the touch it does with all 3.  Even if a txt is sent between the 2 iPhones, it shows up on the touch.  And everything is set to 'off' except "find my iPhone" under on the iCloud settings on both phones Any suggestions???

    Go into Settings -> Messages -> Send & Receive on the devices that your would not like to get your text messages to.
    Then remove the email addresses that you would not like to be reached on, especially the one that is the same as your Apple ID.
    Just leave the phone number there, and then the text messages should only appear on your iPhone 4s.

  • Report Template Help - Vertical report with multiple rows on the same line.

    I am tearing my hair out trying to figure a way to do this. I want a vertical report, but with the rows across the page rather than down it.
    e.g.
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5
    ROW1    ROW2    ROW3    ROW4   ROW5Has anyone managed to do this?

    Use a custom named column report template. The template could generate either:
    <li> a table with one physical <tt>tr</tt> row, with your "columns" being the logical "rows" of the report rendered as the <tt>td</tt>s within the row
    <li> a list of lists using CSS to render them side-by-side via <tt>float</tt> or <tt>inline-block</tt> (Some examples of similar techniques)

  • Retriving multiple rows from the same table

    Hi all,
    I have a table consisting of an id column as well as a start and end date.
    What I want to do is select the difference between start and end time for different id's.
    For example select (endtime where id = 1 - starttime where id = 2).
    Is this possible to do using a single select statement?
    Thanks ppl

    OK, so you want every combination of dropped_id 500 with dropped_id 1000? For example:
    WITH test_data as (SELECT 500 dropped_id, TO_DATE('13/05/2009', 'DD/MM/YYYY') insert_date, TO_DATE('12/05/2009 12:00:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('12/05/2009 12:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 500, TO_DATE('12/05/2009', 'DD/MM/YYYY'),  TO_DATE('11/05/2009 12:04:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('11/05/2009 12:41:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 500,TO_DATE('11/05/2009', 'DD/MM/YYYY'), TO_DATE('10/05/2009 12:18:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('10/05/2009 12:59:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 1000,TO_DATE('13/05/2009', 'DD/MM/YYYY'), TO_DATE('12/05/2009 12:30:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('12/05/2009 13:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 1000,TO_DATE('12/05/2009', 'DD/MM/YYYY'), TO_DATE('11/05/2009 12:41:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('11/05/2009 14:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 1000,TO_DATE('11/05/2009', 'DD/MM/YYYY'), TO_DATE('10/05/2009 12:19:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('10/05/2009 13:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL)
    -- end test data
    SELECT tab1.insert_date insert_date1, tab2.insert_date insert_date2, tab1.dropped_id dropped_id1,   tab2.dropped_id dropped_id2, ROUND(tab2.endtime -  tab1.starttime,2) time_diff
       FROM test_data tab1
    CROSS JOIN test_data tab2
    WHERE tab1.dropped_id = 500
        AND tab2.dropped_id = 1000;
    INSERT_DA INSERT_DA DROPPED_ID1 DROPPED_ID2  TIME_DIFF
    13-MAY-09 13-MAY-09         500        1000        .06
    12-MAY-09 13-MAY-09         500        1000       1.06
    11-MAY-09 13-MAY-09         500        1000       2.05
    13-MAY-09 12-MAY-09         500        1000        -.9
    12-MAY-09 12-MAY-09         500        1000         .1
    11-MAY-09 12-MAY-09         500        1000       1.09
    13-MAY-09 11-MAY-09         500        1000      -1.94
    12-MAY-09 11-MAY-09         500        1000       -.94
    11-MAY-09 11-MAY-09         500        1000        .05
    9 rows selected.

  • Importing multiple rows from the same date from one table to another.

    I need to pull information from one sheet(Sheet 1) to another (Sheet 3). I am able to pull the first line of info with VLookup but need all rows for a specific date, which could range from zero to 10 rows depending on the day according to the date in cell G1 on Sheet 3. I am importing the needed information from Sheet 2 with vlookup, but since it is information from one cell to another its not an issue. Is there a way to transfer the needed data?

    Hello
    Here's another method to build a summary table, which calculates index of every row in source data matching given key and use the indices to retrieve rows of data.
    E.g.,
    Data (excerpt)
    A1  date
    A2  2015-03-12
    A3  2015-03-12
    A4  2015-03-12
    A5  2015-03-12
    B1  a
    B2  A
    B3  B
    B4  C
    B5  D
    C1  b
    C2  1
    C3  2
    C4  3
    C5  4
    Summary (excerpt)
    A1  a
    A2  =IF($D2<>"",INDEX(Data::B,$D2,1),"")
    A3  =IF($D3<>"",INDEX(Data::B,$D3,1),"")
    A4  =IF($D4<>"",INDEX(Data::B,$D4,1),"")
    A5  =IF($D5<>"",INDEX(Data::B,$D5,1),"")
    B1  b
    B2  =IF($D2<>"",INDEX(Data::C,$D2,1),"")
    B3  =IF($D3<>"",INDEX(Data::C,$D3,1),"")
    B4  =IF($D4<>"",INDEX(Data::C,$D4,1),"")
    B5  =IF($D5<>"",INDEX(Data::C,$D5,1),"")
    C1  2015-03-11
    C2 
    C3 
    C4 
    C5 
    D1  index
    D2  =IFERROR(MATCH(C$1,Data::A,0),"")
    D3  =IFERROR(MATCH(C$1,OFFSET(Data::A,D2,0,ROWS(Data::A)-D2,1),0)+D2,"")
    D4  =IFERROR(MATCH(C$1,OFFSET(Data::A,D3,0,ROWS(Data::A)-D3,1),0)+D3,"")
    D5  =IFERROR(MATCH(C$1,OFFSET(Data::A,D4,0,ROWS(Data::A)-D4,1),0)+D4,"")
    Notes.
    Formula in A2 and B2 can be filled down.
    Formula in D3 can be filled down. Note that D2 has different formula than D3.
    Tables are built in Numbers v2.
    Hope this may help you to get the basic idea.
    H

  • Pass multiple rows from sp to the calling prog

    I have a stored procedure using cursor to get multiple rows from the db, how can I pass these rows to the calling prog? Is the out variable returns the last row only?
    This is what I did:
    Create or replace procedure mysp (
    var1 in number,
    var2 OUT number,
    ) as
    Cursor mycor is
    select * from emp;
    begin
    for cors in mycor loop
    var2 :=cors.ename;
    end;
    Thanks
    null

    George:
    You can use CURSOR VARIABLE to pass this
    data type among PL/SQL or Java:
    create or replace package pkg_a
    as
    TYPE c_emp REF CURSOR;
    PROCEDURE mysp (var1 IN NUMBER,
    c_var2 OUT c_emp);
    END package pkg_a;
    CREATE OR REPLACE PACKAGE BODY pka_a
    AS
    PROCEDURE mysp (var1 IN NUMBER,
    c_var2 OUT c_emp)
    IS
    BEGIN
    OPEN c_var2
    FOR
    SELECT * FROM emp;
    END mysp;
    END pkg_a;

  • Custom database functoid to return multiple rows from database

    Hi,
    I have created a custom database fucntoid to execute a stored procedure which returns just single row from the database.But I could not manage to return multiple rows from the database.
    Does anyone know how to return multiple rows from DB and create a node with that many occurrences in the target schema?
    Thanks
    JB

    If you want to do this in messaging-only way without orchestration, then only option let to you is using .NET in BizTalk:
    We had similar requirement with one of our clients, where they didn’t want to use orchestration (though we emphasised on less impact orch would have compared to manageability),
    they still wanted to have pure-messaging only.
    We extended the custom XslTransform component that ships with BizTalk SDK (<BizTalk installation directory>\SDK\Samples\Pipelines\XslTransformComponent)).
    Created a custom disassembler pipeline component, used the XslTransform component from SDK to execute the map’s XSLT. Here we created a map with every links except the database ones. After executing the map, access the database, execute the store procedure
    which returns more than one row/dataset, enrich the XSLT transformed message with the dataset from your database in disassembler.
    Since .NET gives you the flexibility of access the dataset with more than one row, you can enrich the message in custom pipeline code.
    Other option is code the message transformation completely in .NET code in custom disassembler by passing the received message to method/code which would code the map/enrichment.
    While enriching you can execute the store procedure which returns more than one row/dataset, enrich the message further with the dataset from db.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Selecting Multiple Rows from ALV GRID Display

    Hi,
    I am having a ALV GRID Display. I want to select multiple rows from the Output and move them to an internal table.
    Please let me know how do I acheive this.
    Thanks in advance,
    Ishaq.

    Hi,
    Have a look on the following code. It displays the selected rows which hv been selected in basic list.
    TABLES:
      spfli.
    TYPE-POOLS:
      slis.
    DATA:
      BEGIN OF t_spfli OCCURS 0,
        checkbox.
            INCLUDE STRUCTURE spfli.
    DATA:  END OF t_spfli.
    DATA:
      t_sspfli LIKE STANDARD TABLE OF t_spfli .
    DATA:
      fs_spfli LIKE LINE OF t_sspfli.
    DATA:
      fs_layout TYPE  slis_layout_alv,
      w_program TYPE sy-repid.
    SELECT *
      FROM spfli
      INTO CORRESPONDING FIELDS OF TABLE t_spfli.
    *fs_layout-info_fieldname = 'COLOR'.
    fs_layout-box_fieldname = 'CHECKBOX'.
    w_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program       = w_program
        i_callback_pf_status_set = 'FLIGHT'
        i_callback_user_command  = 'SPFLI_INFO'
        i_structure_name         = 'SPFLI'
        is_layout                = fs_layout
      TABLES
        t_outtab                 = t_spfli
      EXCEPTIONS
        program_error            = 1
        OTHERS                   = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  FLIGHT
          text
         -->RT_EXTAB   text
    FORM flight    USING rt_extab TYPE slis_t_extab..
      SET PF-STATUS 'FLIGHT' EXCLUDING rt_extab.
    ENDFORM.                    "FLIGHT
    *&      Form  SPFLI_INFO
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM spfli_info USING ucomm LIKE sy-ucomm
                           selfield TYPE slis_selfield.
      selfield-refresh = 'X'.
      CASE ucomm.
        WHEN 'FLIGHT'.
          LOOP AT t_spfli.
            IF t_spfli-checkbox = 'X'.
              t_spfli-checkbox = ' '.
             t_spfli-color = 'C51'.
              MODIFY t_spfli TRANSPORTING checkbox.
              fs_spfli = t_spfli.
              APPEND fs_spfli TO t_sspfli.
            ENDIF.
          ENDLOOP.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR fs_spfli.
      fs_layout-info_fieldname = 'COLOR'.
    fs_layout-confirmation_prompt = 'X'.
      fs_layout-key_hotspot = 'X'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = w_program
          i_structure_name   = 'SFLIGHT'
          is_layout          = fs_layout
        TABLES
          t_outtab           = t_sspfli
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      REFRESH t_sspfli.
    ENDFORM.                    "SPFLI_INFO
    Regards,
    Chandu

  • Subquery with multiple rows

    i'm using the following select-query:
    select distinct a.ID,
    a.date,
    c.seg,
    a.critical,
    b.status,
    a.Lnr,
    (select pnr from vs_parts where vs = a.ID) as partnr,
    a.prob
    from VS a, VS_STATUS b, VS_Seg c, WE_B e
    where a.status_id = b.id
    and a.seg_id = d.VS_Seg_ID
    the problem is, that the subquery (select pnr from vs_parts where vs = a.ID) returns multiple rows, which i need and want to show in one cell in the report.
    but apex returns error: "ORA-01427: Subquery for one row returns more the one row" (Berichtsfehler: ORA-01427: Unterabfrage für eine Zeile liefert mehr als eine Zeile).
    How can i get these multiple rows from the subquery in one cell in the report?
    simison

    Simplest way is to write a function, then you can format the output however you want it as well.
    Pseudo:
    myFunc(theID)
    define strOutput varchar(2)
    select pnr from vs_parts where vs = theID
    for each row
    strOutput = strOutput + pnr
    loop
    return strOutput
    Message was edited by:
    BigPhil

  • Extract Multiple Rows from a Single Table into a Single Row in a New Table

    I have a table in a database that contains contact data like name, address, phone number, etc.
    The folks who designed the database and wrote the application wrote it so that all contact records are placed in that table, regardless of contact type. In fact, the contacts table does not even have a column for "type" even though there are many
    different types of contacts present in that table.
    I am trying to write a mail merge style report in SRSS, that gets sent to a specific type of contact, based on criteria provided that must be obtained from another table, and that data is then used to get back to a specific set of contacts from the contacts
    table.
    The attached file directly below describes my problem and all related information in an extremely detailed way.
    SRSSMailMergeIssue.pdf
    Unless there is a way to make a SRSS Tablix point to two different data sets in SRSS, it looks like I have to combine multiple rows from the same table into a new table.
    If anyone can review the details in the attached pdf file and possibly point me in the direction I need to run to solve this probelm, I would greatly appreciate it.
    I also included a document (below) that shows the tables I reference in the probelm description.
    dbtables.pdf

    I found a solution.... and posted it below
    select
    dk.ucm_docketnumber [UCM DocketNumber],
    dk.ucm_docketid [UCM DocketID],
    vc.FirstName [Victim FirstName],
    vc.MiddleName [Victim MiddleName],
    vc.LastName [Victim LastName],
    vc.Suffix [Victim Suffix],
    vc.Address1_Line1 [Victim AddressLine1],
    vc.Address1_Line2 [Victim AddressLine2],
    vc.Address1_Line3 [Victim AddressLine3],
    vc.Address1_City [Victim City],
    vc.Address1_StateOrProvince [Victim StateProvince],
    vc.Address1_PostalCode [Victim Postalcode],
    oc.FirstName [Offender FirstName],
    oc.MiddleName [Offender MiddleName],
    oc.LastName [Offender LastName],
    oc.Suffix [Offender Suffix],
    oc.Address1_Line1 [Offender AddressLine1],
    oc.Address1_Line2 [Offender AddressLine2],
    oc.Address1_Line3 [Offender AddressLine3],
    oc.Address1_City [Offender City],
    oc.Address1_StateOrProvince [Offender StateProvince],
    oc.Address1_PostalCode [Offender Postalcode],
    pc.FirstName [Arresting Officer FirstName],
    pc.MiddleName [Arresting Officer MiddleName],
    pc.LastName [Arresting Officer LastName],
    pc.Address1_Line1 [Arresting Officer AddressLine1],
    pc.Address1_Line2 [Arresting Officer AddressLine2],
    pc.Address1_Line3 [Arresting Officer AddressLine3],
    pc.Address1_City [Arresting Officer City],
    pc.Address1_StateOrProvince [Arresting Officer StateProvince],
    pc.Address1_PostalCode [Arresting Officer Postalcode]
    FROM ucm_docket dk
    left outer join ucm_victim v on dk.ucm_docketid = v.ucm_docketnumber
    left outer join contact vc on vc.contactid = v.ucm_victimlookup
    left outer join ucm_offender o on o.ucm_offenderid = dk.ucm_offenderlookup
    left outer join contact oc on oc.contactid = o.ucm_individualid
    left outer join contact pc on pc.contactid = dk.ucm_ArrestingOfficerLookup
    WHERE (dk.ucm_docketnumber = @DocketNUM)

  • Pass multiple rows from sp to calling prog

    I have a stored procedure using cursor to get multiple rows from the db, how can I pass these rows to the calling prog? Is the out variable returns the last row only?
    This is what I did:
    Create or replace procedure mysp (
    var1 in number,
    var2 OUT number,
    ) as
    Cursor mycor is
    select * from emp;
    begin
    for cors in mycor loop
    var2 :=cors.ename;
    end;
    Thanks
    null

    I think you need to do in similar way as follows:
    CREATE OR REPLACE PACKAGE sp_dev_sel_all_devicesPKG AS
    TYPE RT1 IS RECORD (
    sp_dev_id tbl_device.dev_id%TYPE,
    sp_dev_name tbl_device.dev_name%TYPE,
    sp_err_code tbl_error_messages.erm_id%TYPE,
    sp_err_msg tbl_error_messages.erm_msg%TYPE
    TYPE RCT1 IS REF CURSOR RETURN RT1;
    END;
    sho err
    CREATE OR REPLACE PROCEDURE sp_dev_sel_all_devices (
    in_usr_id IN tbl_user.usr_id%TYPE,
    in_session_id IN tbl_user.usr_curr_session_id%TYPE,
    RC1 IN OUT sp_dev_sel_all_devicesPKG.RCT1
    ) AS
    ls_err_hint tbl_error_log.erl_err_hint%TYPE := 'BEGINING';
    ls_err_code tbl_error_messages.erm_id%TYPE;
    ls_err_msg tbl_error_messages.erm_msg%TYPE;
    BEGIN
    ls_err_hint := 'Check the timeout status of the user';
    sp_utr_chk_timeout(UPPER(in_usr_id), in_session_id, 'sp_dev_sel_all_devices', ls_err_code, ls_err_msg);
    ls_err_hint := 'Getting all Devices from tbl_device';
    OPEN RC1 FOR
    SELECT dev_id,
    dev_name,
    ls_err_code err_code,
    ls_err_msg err_msg
    FROM tbl_device
    ORDER BY dev_name;
    RETURN;
    END;
    sho err
    Hope this works
    r@m@

  • (261936172) Q DBC Multiple rows from Database Control method?

    Q<DBC> Can you give an example of returning multiple rows from a database?
    A<DBC> A Database Control method can return multiple rows.
    Assuming the SQL for the method can return multiple rows from
    the database, what does the method return? It may return an
    Array of Objects*, an Iterator (on a Collection of Objects*)
    or a java.sql.ResultSet.
    Attached is code that gives an example of returning multiple
    rows (not the entire files, but text from them).
    * the Objects are either user defined or a HashMap
    [rows.txt]

    hi Keshav,
    Earlier i was using same variable SEL in internal table and as a selection column as well. In that case, it was marking SEL as 'X' even when document was selected.
    Today, i tried making selection column name as 'MARK' and internal table field name as 'SEL', it is working fine. I am able to read table control lines where MARK equals 'X'.
    [http://www.sapdev.co.uk/dialog/tabcontrol/tc_mark.htm]
    I followed this link provided by you. Its really useful. Thanks for your help.
    Thanks to others as well.
    Thanks,
    Archana

  • Calling stored procedure multiple times in the JDBC receiver

    Hi,
    I am calling the stored procedure(SP) to update a DB table in the JDBC receiver.
    SP has 10 input parameters, and SP can receive one value for each parameter at a time.
    In my case, i will have multiple rows to insert using SP.i.e multiple values for each parameter.
    Its working correctly for a single value for each parameter, but when i have multiple values i want to call the SP multiples times.
    Is this possible and how?
    Thanks,
    Varghese.

    Varghese,
    I think you can have multiple statements in the JDBC Adapter's XML, as in http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm.
    Here the StatementName1 node can be inserted into your JDBC XML as often as you want.
    Kind regards,
    Koen

Maybe you are looking for