Counting Record from OPEN FOR statement

Hi,
Is there a way to count the number of record produce by OPEN ... FOR statement...?
I tried using %ROWCOUNT. It doesn't seems to be working. It returned me 0 though when i printed the cursor, i had 7 records.
OPEN p_cursor FOR sqlstatement;
pnum_record := p_cursor%ROWCOUNT;Thank you everyone!

Dave,
My procedure is supposed to return back the records to the caller (application)
Below is the spec
PROCEDURE query_licensetype (
      p_cursor     IN OUT   cursortype,
      p_num_page   IN OUT   PLS_INTEGER,
      p_string              VARCHAR2 DEFAULT NULL,
      p_pageno              PLS_INTEGER DEFAULT 1,
      p_pagerow             PLS_INTEGER DEFAULT 20,
      p_asc                 PLS_INTEGER DEFAULT 1
   )And a piece of the code that open it
OPEN p_cursor FOR vsql USING p_string, p_string, vstart_rec, vend_rec;I am not sure how to do what you have suggested.
Can you show me how to FETCH all the record from p_cursor and still returning back the record to the caller?
Thanks Dave!

Similar Messages

  • ORA-01460: unimplemented or unreasonable error & OPEN-FOR statement ...

    Hi,
    I have a procedure that opens a cursor which returns a result set based on a dynamic SELECT statement. The IN clause
    in most cases needs to handle more than 1000 expressions. So to avoid the ORA-01785 error, I use a function to
    convert the comma separated list of ids (which are unknown) into a collection which can then be used in the sub query
    to process each expression or id. I assumed that the maximum string length I could use for these list of ids was
    32767, i.e. VARCHAR2. But f I attempt to open the cursor with a list of ids where the string length is greater than 4000 bytes , the cursor is invalid
    and it seems to throw the following Oracle error:
    ORA-01460: unimplemented or unreasonable conversion ...
    Note that anything less than 4000 bytes is fine. I have attached some of the code below and would appreciate if anyone
    could tell me what im doing wrong! For example, can a varchar2 variable greater than 4000 bytes not be used when
    executing dynamic SQL in the context of the OPEN-FOR statement?
    -- Create type to hold collection of identifiers.
    CREATE OR REPLACE TYPE IDList IS TABLE OF NUMBER;
    -- Function which converts a string of comma separated list of identifiers
    -- into a collection.
    CREATE OR REPLACE FUNCTION fnConvertIDListToCollection(
         varList IN VARCHAR2,
         varDelimiter IN VARCHAR2 DEFAULT ',')
    RETURN IDList
    IS
         varString long := varList || varDelimiter;
         varPos pls_integer;
         varData IDList := IDList();
    BEGIN
         LOOP
              varPos := instr(varString, varDelimiter);
              EXIT WHEN (nvl(varPos, 0) = 0);
              varData.extend;
              varData(varData.count) := trim(substr(varString, 1, varPos - 1));
              varString := substr(varString, varPos + 1);
         END LOOP;
         RETURN (varData);
    END;
    CREATE OR REPLACE PROCEDURE MyTestProc
    myCursor OUT SYS_REFCURSOR
    AS
    varListOfIds VARCHAR2(32767);
    BEGIN
         -- Hard coding this for now but this will be an incoming parameter containing a list
         -- of unknown ids, separated with commas.
         varListOfIds := '1,2 .. , 5000';
         OPEN myCursor FOR
         'SELECT     DISTINCT val1, val2, val3
         FROM TABLEA
         WHERE     val1 IN (select * from table(cast(fnConvertIDListToCollection(:ListOfIds) as IDList)))' USING varListOfIds;
    END;
    /

    APC,
    Many thanks for the suggestion and yes I could possibly implement an alternative solution, certainly for some cases but I need to investigate further for others. I'm migrating some SQL Server logic over to Oracle and that was simply the approach taken on that platform.
    Could I trouble you with one further question as a newbie to all of this. I hinted in my last response that I was somewhat confused over the limits with the use of varchar2 variables in PL/SQL. If I were building up a piece of dynamic SQL (e.g. SELECT statement including a WHERE clause) using an incoming VARCHAR2 parameter for the WHERE clause, can this parameter contain more than 4000 bytes if necessary. I assumed it could be as big as 32767 bytes but an earlier response suggested a maximum of 4000 bytes. Really sorry for probably a fairly basic Oracle question but it would be very appreciated if you could explain this to me.
    Again, many thanks.

  • How to count records from 2 tables and show in RDLC Report

    hi all,
    its being a one day searching for the solution but No Luck.
     I have two SQL tables tblstudetail and tblfeereceiptdetail.
    i just want to count records from both tables and show in RDLC report.
    I tried SQl Query Like This:
    select a.session, a.course,
    Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
    Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
    from
    tblstudetail a
    FULL join
    tblfeereceiptdetail s on s.studentID = a.studentID
    where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
    GROUP BY a.session,a.course
    ORDER by a.course
    The result Show the Same Value in Both columns
    Session    Course      Admission       FeeDetail
    2015          B.A. I               275              275
    2015          B.A. II              307             307
    2015         B.A. III             255            255
    2015          B.Sc. I             110             110
    2015           B.Sc. II           105            105
    2015          B.Sc. III            64               64
    Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
    please guide me for this as soon as possible.
    thanks in advance...

    I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
    please suggest me

  • Insert space between records from open .. close dataset

    I am generating a file that contains different information for a business partner with the aid of datasets. I want my records to look like this ...
    partner1 BPname1 address1 contact info1   - from table1
    partner2 BPname2 address2 contact info2
    partner1 agency1 address1 insurance obj1  - from table2
    partner2 agency2 address2 insurance obj2
    But the one I am seeing in the generated file in AL11 is like this ...
    partner1 BPname1 address1 contact info1
    partner2 BPname2 address2 contact info2
    partner1 agency1 address1
    partner2 agency2 address2
    I want to see a space between records from tables 1 and 2.
    Code:
    OPEN DATASET FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
    IF SUBRC = 0
       LOOP AT TABLE1
         TRANSFER TABLE1 TO FILE
       ENDLOOP
       CLOSE DATASET
       OPEN DATASET FILE APPENDING
       IF SUBRC = 0
         TRANSFER TABLE2 TO FILE
       ELSE
         MESSAGE ERROR
       ENDIF
    ELSE
       MESSAGE ERROR
    ENDIF
    CLOSE DATASET
    Thanks.

    Hi Cor,
    Here is my code to create datagridview (see below)
    By the way, I would like to ask if i will always declare this code every time i will do the insert , update and delete records. Let say i have separate buttons for every process. its possible to create one time and i will call this function.
    Another question. can i put a auto number in the first column of Datagridview upon adding of records.
    Dim conn As New System.Data.OleDb.OleDbConnection() conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\jov\Desktop\FeedBackSystem\FBSystems\FBSystems\Data\KPI.accdb"
    form load event (DataGridView)
        Dim dt As New DataTable        Private cma As CurrencyManager = DirectCast(BindingContext(dt), CurrencyManager)        'Set Data GridView
            With dgvReport            dt.Columns.Add("ItemNumber", GetType(String))            dt.Columns.Add("ReportName", GetType(String))            dt.Columns.Add("Ratings", GetType(String))            dt.Columns.Add("Comment", GetType(String))            AddHandler cma.CurrentChanged, AddressOf CurrentChanged            .ReadOnly = True
                .MultiSelect = False
                .AllowUserToAddRows = False
                .AllowUserToDeleteRows = False
                dgvReport.DataSource = dt            For Each c As DataGridViewColumn In dgvReport.Columns                c.Width = 200            Next
            End With
    This is the code to insert records from textbox to datagridview
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    Dim i As Integer
    dt.Rows.Add(txtItemNo.Text, CmbReportName.Text, CmbRate.Text, txtComment.Text)
    End Sub

  • Oracle DB 10g - Count records from a subquery is to slow. (after tuning)

    Hi everybody:
    I have the following problem.
    1.- I have a transactional table with 11 millions of records.
    2.- The user asked for a few reports, to know some sumarized data for business decisions.
    3.- Initialy the query was developed in a development environment, with a subset smaller than the actual data mentioned in label 1.
    4.- When the report was delivered to the end user, the report never return data.
    5.- at this point, we performed tuning, adding indexes, re-writing the query, using hints, etc. and the following scenario is ocurring:
    a) the query without the count, before the tuning was taking about 3 to 5 minutes, and returned aproximatelly 332,000 records-.
    b) the numer of records was counted and this query takes aproximatelly 15 to 23 minutes.
    c) after the tuning, the raw data, returns in 1 second, we used some b-tree indexes, some FBI (because the report needs to filter by to_char functions).
    that time is ok for us, 1 second is a great time in comparison with the 3 to five minutes.
    d) the funny thing, is that when we add a simple count(1), count(x) or wathever flavor of count, the count takes about 3 minutes to return, with the 332,00
    records. is better than de 15 minutes of course, but we dont need count(1), we need to use group by, order by, etc, and will increase the time of query.
    6.- Another thing is happening, if I use count(1) with a transactional table with 600,000 records, without filtering, the count returns in les than 2 seconds. Even if the data is more than the result of my query defined in label 5.c, and that query returns in 1 second.
    Please help me with this, I know that maybe is something that i'm not considering on tuning. Or if there is a way to run this count query faster, please let me know.
    This is the query:
    WITH historial_depurado_v AS (
    select serie, identificador,
           cc_form_cc_tifo_tipo_forma
          ,cc_form_serie
          ,cc_form_folio
          ,estatus_nuevo
          ,to_char(fecha,'MM') Mes
          ,to_char(fecha,'YYYY') Anio  -- the table has a FBI for this.
          ,get_recaudacion_x_forma (hifo.CC_FORM_CC_TIFO_TIPO_FORMA
                                   ,hifo.CC_FORM_SERIE
                                   ,hifo.CC_FORM_FOLIO) Recaudacion  -- function for description.
    from  cc_historial_formas hifo
    where not exists (select 1
                         from ve_tipos_placas tipl
                        where tipl.cc_tifo_tipo_forma = hifo.cc_form_cc_tifo_tipo_forma)
    SELECT serie
      FROM historial_depurado_v hide
    WHERE Anio = '2009'  -- using the function based index.
       AND Mes = '01'
       AND Estatus_nuevo = 'UT'
    -- returns in 1 second, but if I use count(serie) takes 3 to 5 minutes, and still is not complete, I need to use group by some fields returned by the firs subset.
    -- if I count a table with more records, returns in 2 seconds.

    alopez wrote:
    WHERE Anio = '2009'  -- using the function based index.
    AND Mes = '01'
    AND Estatus_nuevo = 'UT'
    Also, i'm not sure if your internal comment is correct, but if you have a function based index on any of those columns, it will ONLY work when you apply the exact function as defined in the FBI (you aren't using any functions on ANY of your columns).
    An example.
    create table use_the_fbi
       column1  date
    insert into use_the_fbi
    select
       trunc(sysdate, 'dd') - level
    from dual connect by level <= 10000;
    create index use_the_fbi_FBI on use_the_fbi (to_char(column1, 'YYYYMM') );
    exec dbms_stats.gather_table_stats( user, 'USE_THE_FBI', cascade=> true, method_opt=> 'for all hidden columns');Let's try without querying in the manner in which we defined the index.
    explain plan for
    select *
    from use_the_fbi
      4  where column1 = '201006';
    Explained.
    Elapsed: 00:00:00.01
    TUBBY_TUBBZ?@xplain
    PLAN_TABLE_OUTPUT
    Plan hash value: 1722805582
    | Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |             |   100 |   900 |     7   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| USE_THE_FBI |   100 |   900 |     7   (0)| 00:00:01 |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$1 / USE_THE_FBI@SEL$1
    Predicate Information (identified by operation id):
       1 - filter("COLUMN1"='201006')
    Column Projection Information (identified by operation id):
       1 - "COLUMN1"[DATE,7]
    23 rows selected.
    Elapsed: 00:00:00.02Sad Christmas .. no index love.
    Now, query as we defined the index
    explain plan for
    select *
    from use_the_fbi
    where to_char(column1, 'YYYYMM') = '201006';
    Explained.
    Elapsed: 00:00:00.01
    TUBBY_TUBBZ?TUBBY_TUBBZ?@xplain
    PLAN_TABLE_OUTPUT
    Plan hash value: 268331390
    | Id  | Operation                   | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |                 |    30 |   450 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| USE_THE_FBI     |    30 |   450 |     2   (0)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN          | USE_THE_FBI_FBI |    30 |       |     1   (0)| 00:00:01 |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$1 / USE_THE_FBI@SEL$1
       2 - SEL$1 / USE_THE_FBI@SEL$1
    Predicate Information (identified by operation id):
       2 - access(TO_CHAR(INTERNAL_FUNCTION("COLUMN1"),'YYYYMM')='201006')
    Column Projection Information (identified by operation id):
       1 - "USE_THE_FBI"."COLUMN1"[DATE,7]
       2 - "USE_THE_FBI".ROWID[ROWID,10], TO_CHAR(INTERNAL_FUNCTION("COLUMN1"),'YYYYMM')[VA
           RCHAR2,6]
    27 rows selected.
    Elapsed: 00:00:00.03
    TUBBY_TUBBZ?Happy times.

  • [ORACLE 9] OPEN FOR statement USING bind variable

    Hi,
    I have a loop that only fetches 1 record instead of 7:
    DECLARE
    lv_into varchar2(40);
    lv_qry  varchar2(400);
    type curtest_ref is ref cursor;
    curtest          curtest_ref;
    lv_compteur number(4) := 1;
    lv_client_loc   varchar2(100);
    BEGIN
    dbms_output.put_line( 'Début' );
    lv_qry := 'select client_loc from tmp_jbm where client_id = :A ';
    open curtest for lv_qry using lv_compteur;                
    loop
                    fetch curtest into lv_client_loc ;
                    exit when curtest%notfound;
                    dbms_output.put_line( 'ligne: '       || to_char( lv_compteur )
                                       || ' Client Loc: ' || lv_client_loc );
                    lv_compteur := lv_compteur + 1;
                    exit when lv_compteur > 6;
         end loop;
    EXCEPTION
        when others then
                 dbms_output.put_line( 'Erreur exception: ' || sqlerrm );
    END;
    [/END CODE]
    It looks like the cursor only fetches 1 record and then stops.
    Many thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    The code is doing what you have asked it to do.
    Incrementing lv_compteur := lv_compteur + 1; inside the FOR LOOP will not refresh your CURSOR as the CURSOR OPEN statement is outside the loop.
    You could change your lv_qry variable to something like this:
    lv_compteur_min number(4) := 1;
    lv_compteur_max number(4) := 6;
    lv_qry := 'select client_loc from tmp_jbm where client_id BETWEEN :A AND :B';and OPEN the cursor by passing two variables
    open curtest for lv_qry using lv_compteur_min, lv_compteur_max ;

  • Count Records from JDBC Sender

    Hi Experts,
    I have a requirement to process 80,000 records once a month from MS SQL Server to BW.
    After tuning of server and assigning the XBTM queue for the scenario didnt help much and brings down the J2EE engine everytime.
    Now i am thinking of processing 5000 records at a time in a BPM (in a while loop). But i somehow need to trap the overall number of records which is not always 80k.
    set rowcount 5000 SELECT * table_name where XIProcessed is NULL (SELECT COUNT(*) from table_name) 
    and then sending an UPDATE of XIProcessed flag to get the next 5000 rows in the JDBC sender.
    I somehow need to get the total number of records and the COUNT function will not help as i am getting 5000 rows at a time and not all.
    Thanks

    Hi Siva,
    why do you attempt counting in the BPM and adding all this overhead? Can't you just do that on the Database directly? In Oracle this is fairly easy as you can use the pseudo column rownum to limit your results. A search for rownum and SQL Server shows, that it is not as easy on SQL Server but there are still fairly simple ways to do this.
    Some sources:
    http://blogs.x2line.com/al/articles/173.aspx
    http://www.databasejournal.com/features/mssql/article.php/10894_2244821_2
    http://www.mcse.ms/archive94-2005-3-1502710.html
    From a performance standpoint i'm sure, it will work a lot better than any BPM into which you put 80000 records.
    Regards
    Christine

  • IPhoto 4.0.3- can't stop it from opening for iPhone

    (I know, I should upgrade iPhoto, but for now...)
    When I connect iPhone, I don't want iPhoto to open. When I go under Preferences in iPhoto, there is no tab to change "Connecting Camera Opens:"
    Also, my computer does not have "Image Capture" so I cannot change settings there.
    Does anyone know where else to look for settings so I can make it so iPhoto does not open when I connect iPhone?

    Okay So I understand that iPhone do not support MMS as of yet ,which really does'nt sit well with us since for $599 not being able to send a simple picture message is really unacceptable. Secondly, what about sms forwarding? any basic cell phone has that feature except iPhone.I cannot forward any of my texts or send mass texts which really annoys me and my friends.also ,we have a 2 megapixel camera that does not allow us to make a video!!! so basically no pic msg capability, no text msg forwarding capability and no video capture! Now the best part, I cant even download ringer's ???? Games etc??? I mean come on we paid$600 EXPECTING ATLEAST THE BASIC FEATURE'S OF A CELL PHONE ,ANY CELL PHONE YOU KNOW ! atleast tell me that we will be able to upgrade or Apple is going to launch softwares that will allow us to atleast download ringers.

  • Unloading a movie clip from a for statement

    Hi,
    I have this code:
    //create empty movie clips to place bin top, flame and bin
    bottom in that order
    this.createEmptyMovieClip("holder_mc2",this.getNextHighestDepth());
    this.createEmptyMovieClip("holder_mc",this.getNextHighestDepth());
    this.createEmptyMovieClip("holder_mc1",this.getNextHighestDepth());
    //attach movie clip/variables
    var dsfInstance:DropShadowFilter = new DropShadowFilter(5,
    45, 0x000000, 1, 10, 10);
    var b:MovieClip =
    holder_mc2.attachMovie("binTop_mc","binTop_mc",holder_mc2.getNextHighestDepth());
    var a:MovieClip =
    holder_mc1.attachMovie("binBottom_mc","binBottom_mc",holder_mc1.getNextHighestDepth());
    //property values
    a._x = 419;
    a._y = 244;
    a._width = 112.0
    a._height = 140.0
    b._x = 419;
    b._y = 175;
    b._width = 112.8;
    b._height = 10.1;
    a.filters = [dsfInstance];
    //create for loop to place the flame particle on the stage
    many times
    for(i=0;i<200;i++){
    //places in temporary movieclip t
    var t:MovieClip =
    holder_mc.attachMovie("flame","flame"+i,holder_mc.getNextHighestDepth());
    // position the movieclip on the stage for y co-ordinates
    t._y = 190;
    t._x = Math.random()*80+(Stage.width/2+115);
    //give the flame random sizes no larger than 80 pixels and no
    smaller than 20
    t._xscale = t._yscale = Math.random()*80 + 20;
    //randomize the frame the movieclip is going to start in the
    flame movie clip is 16 frame long so it will pick number between
    that
    //because math.random produces decimal values we round the
    number using math.ceil to the high whole number
    t.gotoAndPlay(Math.ceil(Math.random()*16));
    what i want to do is remove the movieclip in the for loop off
    the stage when i click on a button. i can manage to remove the
    movie clips with the variables a and b but i cant do it with the
    one in the for loop.
    i put this code in the button:
    on(release){
    play();
    stopAllSounds();
    a.removeMovieClip();
    b.removeMovieClip();
    t.removeMovieClip();
    Is there a way to do this?

    im so dumb! i figured it out.
    i used the "holder_mc" the name of the empty movie clip.
    holder_mc.removeMovieClip();

  • How do you return back one record from a For Loop issue

    I have the following piece of code and i want to be able to just return one item...
    that is           return e.next(); but this line doesnt work for below what is wrong
    if (attrs == null) {
         System.out.println("No attributes");
    } else {
         /* Print each attribute */
         for (NamingEnumeration ae = attrs.getAll();
         ae.hasMore();) {
              Attribute attr = (Attribute)ae.next();
              System.out.println("attribute: " + attr);
              /* print each value */
              for (NamingEnumeration e = attr.getAll();
              e.hasMore();){
                   System.out.println("value:- " + e.next()));
              return e.next();
         }

    At the end of the loop, the NamingEnumeration has no more elements. You need to call getAll() again.
    By the way, please use code tags (above the posting box). You've been here long enough to know that (judging by your registration date).

  • Some Times Table is inserting Partial record from a view Why?

    The query consists of a simple insert statement where the data is inserted from a view. The issue is that some times only the first retreived record from the select statement are inserted into the table from a view and the rest are ignored when we scheduled in the batch job of EM console. Some times it inserted correctly.
    For Ex.
    INSERT INTO Table_COLL(COL_A, COL_B, COL_C)
    SELECT COL_A, COL_B, COL_C
    FROM COLL_VIEW
    WHERE DATE=TRUNC(SYSDATE);
    COMMIT;
    The select statement retreives 200 records and the insert statement works perfectly as expected when executed in SQL* plus.
    However the issue happens where only one record is inserted when the same query is scheduled in the batch job of the EM console or a procedure is created for the query and the same is scheduled in the EM console as a batch job and Some times it inserted correctly in EM Console.
    Can anyone explain as why this is hapenning? (DB is Oracle 10g& size is 100gb )

    I doubt that there is a bug. I suspect the query runs when you schedule it at a point of time where TRUNC(SYSDATE) gives less rows...
    You could store the COUNT(*) and execution time before you run the INSERT in a LOG table. Any transaction based on two times (runtime and systime) can lead to unexpected results.
    What about something like this:
    INSERT INTO Table_COLL(COL_A, COL_B, COL_C)
    SELECT COL_A, COL_B, COL_C
    FROM COLL_VIEW a
    LEFT JOIN Table_COLL B
    ON (      a.COL_A = b.COL_A
          AND a.COL_B = b.COL_B
          AND a.COL_C = b.COL_C)
    WHERE a.DATE>=TRUNC(SYSDATE)-1
    AND b.COL_A IS NULL;
    COMMIT;

  • Recording from DAT using SB Conn

    Long time ago I have recorded DAT tapes using my Denon DTR 2000. I used digital recording from CD for that.Now I am considering using SB Connect for burning CD's (DAT?is such an old stuff?don't want to loose my recordings). Anyone has tried anything like that? Any problem with SCMS?

    BES,
    Which input on the back of the card did you use? The Line-in is the stereo input. Ensure that you have the cable fully inserted on both ends. Also check with another source such as a CD player or personal radio. This will tell you if the tape player may be sending only the left, or if the input jack is failing.
    Daniel

  • Overwrite Value from Payload for RCVPOR, Receiver Port

    Dear All,
    Can we overwrite value of receiver port (RCVPOR) from Payload?
    The actual port value (For example SAP<SID>) will be specified in IDOC Receiver adapter.
    If I want to replace this value with say ABC can I do it through mapping?
    I tried using "apply control record from Payload"  for IDOC Receiver communication channel but still the actual port value (SAP<SID>) is going to SAPR3 and not ABC.
    I checked the help.sap.com link as well.
    http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/frameset.htm
    As per my understandings, RCVPOR value will be picked up only from IDOC Receiver communication channel.
    Can you please suggest?
    Warm Regards,
    Gouri

    Thanks Prateek for replying.
    Even my understanding is same that this value will not be overwritten. But I am not able to find any help.sap.com link or valid SAP Document which will clearly specify this.
    I need to pass this ABC value into IDOC header Record. This value will be required by User as selection criteria while executing WE05 and WE09 reports on SAPR3.
    This ABC value is nothing but the Application name and while executing above standard reports user will be able to differentiate application specific IDOCs if i provide this information in IDOC header .
    Now I spoke to ABAP Team and he suggested to use RCVPOR filed for thsi purpose as it is present in selection screen of both WE05 and WE09 report.
    So I wanted a confirmation through official document that we wont be able to use this field.

  • Can i count row from ResultSet ?

    I would like to count row from ResultSet for
    take it into my array object because i must know number of row before create array object.
    Example:
    ResultSet rset = stmt.executeQuery("select * from user ");
    /*i = amount of ResultSet*/
    User[] user = new User;
    int l=0;
    while (rset.next()){
    user[l] = new User();
    user.name = rset.getString(1);
    l++;

    Hi,
    As per my knowledge there is no method by which you can get the count of items in a resultset directly. You will have to loop through the reseltset and set a variable for count. In your specific case I would advise you to use a Vetor instead of an array so that you need not bother about the size.
    ResultSet rset = stmt.executeQuery("select * from user ");
    Vector user = new Vector();
    while (rset.next()){
    user.addElement(rset.getString(1));
    Now you will have a Vector that holds the user info. To retrieve the user info loop through the Vector.
    for (int i; i<user.size(); i++){
    userName = user.elementAt(i);
    Hope I was of some help.
    cheers!!!
    Nish

  • How do you return back one record from a NamingEnumeration

    how do you return back one record from a For Loop issue
    Posted: Jan 4, 2007 9:13 AM Reply
    I have the following piece of code and i want to be able to just return one item...
    that is return e.next(); but this line doesnt work for below what is wrong
    if (attrs == null) {
    System.out.println("No attributes");
    } else {
    /* Print each attribute */
    for (NamingEnumeration ae = attrs.getAll();
    ae.hasMore();) {
    Attribute attr = (Attribute)ae.next();
    System.out.println("attribute: " + attr);
    /* print each value */
    for (NamingEnumeration e = attr.getAll();
    e.hasMore();){
    System.out.println("value:- " + e.next()));
    return e.next();
    }

    At the end of the loop, the NamingEnumeration has no more elements. You need to call getAll() again.
    By the way, please use code tags (above the posting box). You've been here long enough to know that (judging by your registration date).

Maybe you are looking for

  • Having to rebuild *all* of my MS 1 concerts... and... rather than cry...

    about having to do this... (I suspected the concerts had become internally inconsistent - see previous posts about copy/paste that maxed out memory)... I want to look at how to approach MS2... please comment as you see fit - I've got to tackle this d

  • How to view the source code of JavaFx component ?

    Hi everybody, I just want to know if it's possible to view the source code of the component Button (from JavaFx) and how to do it ? In fact, I don't really understand if JavaFx is entirely open source ? Thanks.

  • File to Mail with body content and attachment

    Hi Experts, Here my scenario; I receive an xml file, this xml file content need to be mapped to body of the eMail as well formatted email. and also the original xml file which I receive need to be sent as attachment. I searched in sdn, help and check

  • Opening .doc Word documents in Word for Mac 2011

    When I try to open Word documents produced in Word 1997 - 2004 (.doc documents) I seem to get no text visible but often have the frame of a table layout. The small preview pane seems to show the full document but this is not available when I open it.

  • LaserJet 4M PostScript print quality/functionality

    I have a LaserJet4M, connected to my Mac (and all my other machines) using its ethernet JetDirect card. My problem is that the PostScript driver for the 4M appears to have disappeared. Printing with the generic PostScript driver works only for simple