Urgent: Problem in Fetching the records from ITAB3

hi,
here's d code,and the bold is dere where i am facing the problem i.e. whne i append lines of ITAB2 to ITAB3 it takes 32,234 records but in reality in ITAB2 there are 39 records,ITFINAL contains 45 records which is displaying the coreect data.
But why ITAB3 conatins 32,234 records in it.
it might hit th eperformance of the report.
TABLES: RSEG.
***********DECLARATION OF TABLES*************
************TABLE BKPF - ACCOUNTING HEADER ***********
DATA: BEGIN OF ITBKPF OCCURS 0,
BUKRS LIKE BKPF-BUKRS,
BELNR LIKE BKPF-BELNR,
GJAHR LIKE BKPF-GJAHR,
AWKEY LIKE BKPF-AWKEY,
BUDAT LIKE BKPF-BUDAT,
XBLNR LIKE BKPF-XBLNR,
AWTYP LIKE BKPF-AWTYP,
END OF ITBKPF.
*********TABLE BSIK - ACCOUNTING OPEN ITEMS********
DATA: BEGIN OF ITAB2 OCCURS 0,
LFBNR LIKE RSEG-LFBNR,
BUKRS LIKE BSIK-BUKRS,
GJAHR LIKE BSIK-GJAHR,
BELNR LIKE BSIK-BELNR,
AWKEY LIKE BKPF-AWKEY,
WRBTR LIKE BSIK-WRBTR,
LIFNR LIKE BSIK-LIFNR,
AUGBL LIKE BSAK-AUGBL,
AUGDT LIKE BSAK-AUGDT,
END OF ITAB2.
**********TABLE BSAK - ACCOUNTING CLEAR ITEMS*******
DATA: BEGIN OF ITAB3 OCCURS 0,
LFBNR LIKE RSEG-LFBNR,
BUKRS LIKE BSAK-BUKRS,
GJAHR LIKE BSAK-GJAHR,
BELNR LIKE BSAK-BELNR,
AWKEY LIKE BKPF-AWKEY,
WRBTR LIKE BSIK-WRBTR,
LIFNR LIKE BSIK-LIFNR,
AUGBL LIKE BSAK-AUGBL,
AUGDT LIKE BSAK-AUGDT,
END OF ITAB3.
DATA: BEGIN OF ITDEMO OCCURS 0,
BELNR LIKE RSEG-BELNR,
GJAHR LIKE RSEG-GJAHR,
LFBNR LIKE RSEG-LFBNR,
XBLNR LIKE RSEG-XBLNR,
END OF ITDEMO.
*****FINAL TABLE TO GATHER N DISPLAY OUTPUT*****
DATA: BEGIN OF ITFINAL OCCURS 0,
LFBNR LIKE RSEG-LFBNR,
BUKRS LIKE BKPF-BUKRS,
GJAHR LIKE BKPF-GJAHR,
BELNR LIKE BKPF-BELNR,
AWKEY LIKE BKPF-AWKEY,
WRBTR LIKE BSIK-WRBTR,
LIFNR LIKE BSIK-LIFNR,
AUGBL LIKE BSAK-AUGBL,
AUGDT LIKE BSAK-AUGDT,
END OF ITFINAL.
**********END OF DECLARATIONS*************
SELECT-OPTIONS: P_LFBNR FOR RSEG-LFBNR.
*************FETCHING OF THE DATA*************
START-OF-SELECTION.
BKPF
SELECT BUKRS BELNR GJAHR AWKEY BUDAT XBLNR AWTYP
FROM BKPF
INTO (ITBKPF-BUKRS,ITBKPF-BELNR,ITBKPF-GJAHR,
ITBKPF-AWKEY,ITBKPF-BUDAT,ITBKPF-XBLNR,ITBKPF-AWTYP)
WHERE AWTYP EQ 'MKPF' OR AWTYP EQ 'RMRP'.
          o
                + MKPF*
************BEGIN OF TRY CODE FOR A MATERIAL DOCUMENT************
ITDEMO-BELNR = ITBKPF-AWKEY(10).
ITDEMO-GJAHR = ITBKPF-AWKEY+10(4).
ITDEMO-XBLNR = ITBKPF-XBLNR.
SELECT LFBNR FROM RSEG INTO
(ITDEMO-LFBNR) WHERE
BELNR EQ ITBKPF-AWKEY(10) AND
GJAHR EQ ITBKPF-AWKEY+10(4) AND
XBLNR EQ ITBKPF-XBLNR AND LFBNR > 0.
CHECK SY-SUBRC EQ 0 AND ITDEMO-LFBNR IN P_LFBNR.
************END OF TRY CODE FOR A MATERIAL DOCUMENT***************
ITAB2-BUKRS = ITBKPF-BUKRS.
ITAB2-GJAHR = ITBKPF-GJAHR.
ITAB2-BELNR = ITBKPF-BELNR.
ITAB3-BUKRS = ITBKPF-BUKRS.
ITAB3-GJAHR = ITBKPF-GJAHR.
ITAB3-BELNR = ITBKPF-BELNR.
          o
                + BSIK*
SELECT WRBTR LIFNR FROM BSIK
INTO (ITAB2-WRBTR, ITAB2-LIFNR)
WHERE BUKRS EQ ITBKPF-BUKRS
AND GJAHR EQ ITBKPF-GJAHR
AND BELNR EQ ITBKPF-BELNR.
APPEND ITAB2.
EXIT.
ENDSELECT.
          o
                +
BSAK*
SELECT WRBTR LIFNR AUGBL AUGDT
FROM BSAK
INTO (ITAB3-WRBTR,ITAB3-LIFNR,ITAB3-AUGBL,ITAB3-AUGDT)
WHERE BUKRS EQ ITBKPF-BUKRS
AND GJAHR EQ ITBKPF-GJAHR
AND BELNR EQ ITBKPF-BELNR.
APPEND ITAB3.
EXIT.
ENDSELECT.
APPEND ITDEMO.
EXIT.
ENDSELECT.
APPEND ITBKPF.
ENDSELECT.
Fields Found?
READ TABLE ITBKPF TRANSPORTING NO FIELDS INDEX 1.
IF sy-subrc NE 0.
MESSAGE i000(zmm1) WITH 'No documents found!'.
ENDIF.
Prepare Output
LOOP AT ITBKPF.
CLEAR ITAB2.
READ TABLE ITAB2
WITH KEY BUKRS = ITBKPF-BUKRS
BELNR = ITBKPF-BELNR
GJAHR = ITBKPF-GJAHR.
CHECK sy-subrc EQ 0?
CLEAR ITAB3.
READ TABLE ITAB3
WITH KEY BUKRS = ITBKPF-BUKRS
BELNR = ITBKPF-BELNR
GJAHR = ITBKPF-GJAHR. .
CHECK sy-subrc EQ 0?
READ TABLE ITDEMO
WITH KEY BELNR = ITBKPF-AWKEY(10).
CHECK sy-subrc EQ 0?
APPEND LINES OF ITAB2 TO ITAB3.
CHECK sy-subrc EQ 0?
ITFINAL-LFBNR = ITDEMO-LFBNR.
ITFINAL-BUKRS = ITBKPF-BUKRS.
ITFINAL-BELNR = ITBKPF-BELNR.
ITFINAL-GJAHR = ITBKPF-GJAHR.
ITFINAL-AWKEY = ITBKPF-AWKEY.
ITFINAL-WRBTR = ITAB3-WRBTR.
ITFINAL-LIFNR = ITAB3-LIFNR.
ITFINAL-AUGBL = ITAB3-AUGBL.
ITFINAL-AUGDT = ITAB3-AUGDT.
DELETE ITFINAL WHERE WRBTR = 0.
APPEND ITFINAL.
CLEAR ITFINAL.
ENDLOOP.
SORT ITFINAL BY AUGBL AUGDT .
END-OF-SELECTION
END-OF-SELECTION.
Output
LOOP AT ITFINAL.
WRITE: / ITFINAL-LFBNR,ITFINAL-BELNR, ITFINAL-GJAHR,ITFINAL-AWKEY, ITFINAL-WRBTR, ITFINAL-LIFNR,ITFINAL-AUGBL,ITFINAL-AUGDT.
ENDLOOP.

hi,
actually i have to display the open n clear items with respect to the MATERIAL DOCUMENT.
try to execute the code which i am displaying below:-
TABLES: RSEG.
**********DECLARATION OF TABLES************
***********TABLE BKPF  - ACCOUNTING HEADER **********
DATA: BEGIN OF ITBKPF OCCURS 0,
      BUKRS LIKE BKPF-BUKRS,
      BELNR LIKE BKPF-BELNR,
      GJAHR LIKE BKPF-GJAHR,
      AWKEY LIKE BKPF-AWKEY,
      BUDAT LIKE BKPF-BUDAT,
      XBLNR LIKE BKPF-XBLNR,
      AWTYP LIKE BKPF-AWTYP,
      END OF ITBKPF.
********TABLE BSIK - ACCOUNTING OPEN ITEMS*******
DATA: BEGIN OF ITAB2 OCCURS 0,
      LFBNR LIKE RSEG-LFBNR,
      BUKRS LIKE BSIK-BUKRS,
      GJAHR LIKE BSIK-GJAHR,
      BELNR LIKE BSIK-BELNR,
      AWKEY LIKE BKPF-AWKEY,
      WRBTR LIKE BSIK-WRBTR,
      LIFNR LIKE BSIK-LIFNR,
      AUGBL LIKE BSAK-AUGBL,
      AUGDT LIKE BSAK-AUGDT,
      END OF ITAB2.
*********TABLE  BSAK - ACCOUNTING CLEAR ITEMS******
DATA: BEGIN OF ITAB3 OCCURS 0,
      LFBNR LIKE RSEG-LFBNR,
      BUKRS LIKE BSAK-BUKRS,
      GJAHR LIKE BSAK-GJAHR,
      BELNR LIKE BSAK-BELNR,
      AWKEY LIKE BKPF-AWKEY,
      WRBTR LIKE BSIK-WRBTR,
      LIFNR LIKE BSIK-LIFNR,
      AUGBL LIKE BSAK-AUGBL,
      AUGDT LIKE BSAK-AUGDT,
      END OF ITAB3.
*********TABLE BSIS - MIRO NOT PERFORMED*******
DATA: BEGIN OF ITAB4 OCCURS 0,
      LFBNR LIKE RSEG-LFBNR,
      BUKRS LIKE BSIS-BUKRS,
      GJAHR LIKE BSIS-GJAHR,
      BELNR LIKE BSIS-BELNR,
      AWKEY LIKE BKPF-AWKEY,
      WRBTR LIKE BSIK-WRBTR,
      LIFNR LIKE BSIK-LIFNR,
      AUGBL LIKE BSAK-AUGBL,
      AUGDT LIKE BSAK-AUGDT,
      END OF ITAB4.
**********TABLE RSEG - FOR MATERIAL DOCUMENT********
DATA: BEGIN OF ITDEMO OCCURS 0,
      BELNR LIKE RSEG-BELNR,
      GJAHR LIKE RSEG-GJAHR,
      LFBNR LIKE RSEG-LFBNR,
      XBLNR LIKE RSEG-XBLNR,
      END OF ITDEMO.
****FINAL TABLE TO GATHER N DISPLAY OUTPUT****
DATA: BEGIN OF ITFINAL OCCURS 0,
      LFBNR LIKE RSEG-LFBNR,
      BUKRS LIKE BKPF-BUKRS,
      GJAHR LIKE BKPF-GJAHR,
      BELNR LIKE BKPF-BELNR,
      AWKEY LIKE BKPF-AWKEY,
      WRBTR LIKE BSIK-WRBTR,
      LIFNR LIKE BSIK-LIFNR,
      AUGBL LIKE BSAK-AUGBL,
      AUGDT LIKE BSAK-AUGDT,
      END OF ITFINAL.
*********END OF DECLARATIONS************
SELECT-OPTIONS: P_LFBNR FOR RSEG-LFBNR.
************FETCHING OF THE DATA************
START-OF-SELECTION.
BKPF
    SELECT BUKRS BELNR GJAHR AWKEY BUDAT XBLNR AWTYP
    FROM BKPF
    INTO (ITBKPF-BUKRS,ITBKPF-BELNR,ITBKPF-GJAHR,
         ITBKPF-AWKEY,ITBKPF-BUDAT,ITBKPF-XBLNR,ITBKPF-AWTYP)
    WHERE AWTYP EQ 'MKPF' OR AWTYP EQ 'RMRP'.
MKPF
***********BEGIN OF TRY CODE FOR A MATERIAL DOCUMENT***********
    ITDEMO-BELNR = ITBKPF-AWKEY(10).
    ITDEMO-GJAHR = ITBKPF-AWKEY+10(4).
    ITDEMO-XBLNR = ITBKPF-XBLNR.
    SELECT LFBNR FROM RSEG INTO
    (ITDEMO-LFBNR) WHERE
    BELNR EQ ITBKPF-AWKEY(10) AND
    GJAHR EQ ITBKPF-AWKEY+10(4) AND
    XBLNR EQ ITBKPF-XBLNR AND LFBNR  > 0.
CHECK SY-SUBRC EQ 0 AND ITDEMO-LFBNR IN P_LFBNR.
***********END OF TRY CODE FOR A MATERIAL DOCUMENT**************
    ITAB2-BUKRS = ITBKPF-BUKRS.
    ITAB2-GJAHR = ITBKPF-GJAHR.
    ITAB2-BELNR = ITBKPF-BELNR.
    ITAB3-BUKRS = ITBKPF-BUKRS.
    ITAB3-GJAHR = ITBKPF-GJAHR.
    ITAB3-BELNR = ITBKPF-BELNR.
BSIK
    SELECT WRBTR LIFNR FROM BSIK
    INTO (ITAB2-WRBTR, ITAB2-LIFNR)
    WHERE BUKRS EQ ITBKPF-BUKRS
      AND GJAHR EQ ITBKPF-GJAHR
      AND BELNR EQ ITBKPF-BELNR.
    APPEND ITAB2.
    EXIT.
    ENDSELECT.
BSAK
    SELECT WRBTR LIFNR AUGBL AUGDT
    FROM BSAK
    INTO (ITAB3-WRBTR,ITAB3-LIFNR,ITAB3-AUGBL,ITAB3-AUGDT)
    WHERE BUKRS EQ ITBKPF-BUKRS
      AND GJAHR EQ ITBKPF-GJAHR
      AND BELNR EQ ITBKPF-BELNR.
    APPEND ITAB3.
    EXIT.
    ENDSELECT.
BSIS
   SELECT WRBTR XREF3 FROM BSIS
   INTO (ITAB1-WRBTR, ITAB1-XREF3)
   WHERE BUKRS EQ ITBKPF-BUKRS
     AND GJAHR EQ ITBKPF-GJAHR
     AND BELNR EQ ITBKPF-BELNR.
   APPEND ITAB1.
   EXIT.
   ENDSELECT.
  CHECK sy-subrc EQ 0?
    APPEND ITDEMO.
    EXIT.
    ENDSELECT.
    APPEND ITBKPF.
    ENDSELECT.
Fields Found?
  READ TABLE ITBKPF TRANSPORTING NO FIELDS INDEX 1.
  IF sy-subrc NE 0.
    MESSAGE i000(zmm1) WITH 'No documents found!'.
  ENDIF.
Prepare Output
  LOOP AT ITBKPF.
    CLEAR ITAB2.
    READ TABLE ITAB2
    WITH KEY   BUKRS = ITBKPF-BUKRS
               BELNR = ITBKPF-BELNR
               GJAHR = ITBKPF-GJAHR." BINARY SEARCH..
  CHECK sy-subrc EQ 0?
    CLEAR ITAB3.
    READ TABLE ITAB3
    WITH KEY   BUKRS = ITBKPF-BUKRS
               BELNR = ITBKPF-BELNR
               GJAHR = ITBKPF-GJAHR." BINARY SEARCH.              .
  CHECK sy-subrc EQ 0?
    READ TABLE ITDEMO
    WITH KEY BELNR = ITBKPF-AWKEY(10).
  CHECK sy-subrc EQ 0?
    APPEND LINES OF ITAB2 TO ITAB3.
  CHECK sy-subrc EQ 0?
    ITFINAL-LFBNR = ITDEMO-LFBNR.
    ITFINAL-BUKRS = ITBKPF-BUKRS.
    ITFINAL-BELNR = ITBKPF-BELNR.
    ITFINAL-GJAHR = ITBKPF-GJAHR.
    ITFINAL-AWKEY = ITBKPF-AWKEY.
    ITFINAL-WRBTR = ITAB3-WRBTR.
    ITFINAL-LIFNR = ITAB3-LIFNR.
    ITFINAL-AUGBL = ITAB3-AUGBL.
    ITFINAL-AUGDT = ITAB3-AUGDT.
    DELETE ITFINAL WHERE WRBTR = 0.
    APPEND ITFINAL.
    CLEAR  ITFINAL.
    ENDLOOP.
    SORT ITFINAL BY  AUGBL AUGDT .
END-OF-SELECTION
END-OF-SELECTION.
Output
WRITE: /'                     OPEN ITEMS ->  PAYMENTS ARE NOT DONE'.
  ULINE.
  WRITE: / 'MAT.DOC.   A/C DOC.   YEAR    REF.KEY                  AMOUNT    VENDOR     CLR.DOC.    CLR.DATE' .
  ULINE.
  LOOP AT ITFINAL.
    WRITE: / ITFINAL-LFBNR,ITFINAL-BELNR, ITFINAL-GJAHR,ITFINAL-AWKEY, ITFINAL-WRBTR, ITFINAL-LIFNR,ITFINAL-AUGBL,ITFINAL-AUGDT.
  ENDLOOP.

Similar Messages

  • Fetch the records from cache

    say i have emp table
    eno ename sales
    1 david 1100
    2 lara 200
    3 james 1000
    1 david 1200
    2 lara 5400
    4 white 890
    3 james 7500
    1 david 1313
    eno can be duplicate
    when i give empno is 1
    i want to display his sales i.e 1100,1200,1313
    first time i will go to database and fetch the records
    but next time onwards i dont go to database; i will fetch the records from cache;
    i thought doing it using hashmap or hasptable ;both those two don't allow duplicate values(empno has duplicate values);
    How to solve this problem.

    Hi,
    Ever considered splitting that table up. You are thinking about caching thats a
    very good idea. But doesnt it make it vary evident that the table staructure that you have
    keeps a lot of redundant data. Specially it hardly makes a sense to have sales
    figures in a emp table. Instead you can have Emp table containing eno and
    ename with eno as the primary key and have another table called sales with eno
    and sales columns and in this case the eno references the Emp table.
    If you still want to continue with this structure then I think you can go ahead with
    the solution already suggested to you
    Aviroop

  • How to do Query optimization?It takes more time to fetch the record from db. Very urgent, I need your assistance

    Hi all
                                     I want to fetch just twenty thousands records from table. My query take more time to fetch  twenty thousands records.  I post my working query, Could you correct the query for me. thanks in advance.
    Query                    
    select
    b.Concatenated_account Account,
    b.Account_description description,
    SUM(case when(Bl.ACTUAL_FLAG='B') then
    ((NVL(Bl.PERIOD_NET_DR, 0)- NVL(Bl.PERIOD_NET_CR, 0)) + (NVL(Bl.PROJECT_TO_DATE_DR, 0)- NVL(Bl.PROJECT_TO_DATE_CR, 0)))end) "Budget_2011"
    from
    gl_balances Bl,
    gl_code_combinations GCC,
    psb_ws_line_balances_i b ,
    gl_budget_versions bv,
    gl_budgets_v gv
    where
    b.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID and bl.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID and
    bl.budget_version_id =bv.BUDGET_VERSION_ID and gv.budget_version_id= bv.budget_version_id
    and gv.latest_opened_year in (select latest_opened_year-3 from gl_budgets_v where latest_opened_year=:BUDGET_YEAR )
    group by b.Concatenated_account ,b.Account_description

    Hi,
    If this question is related to SQL then please post in SQL forum.
    Otherwise provide more information how this sql is being used and do you want to tune the SQL or the way it fetches the information from DB and display in OAF.
    Regards,
    Sandeep M.

  • Problem with Fetching Million Records from Table COEP into an Internal Tabl

    Hi Everyone ! Hope things are going well.
           Table : COEP has 6 million records.
    I am trying to get records based on certain criteria, that is, there are atleast 5 conditions in the WHERE clause.
    I've noticed it takes about 15 minutes to populate the internal table. How can i improve the performance to less than a minute for a fetch of 500 records from a database set of 6 million?
    Regards,
    Owais...

    The first obvious sugession would be to use the proper indexes. I had a similar Issue with COVP which is a join of COEP and COBK. I got substanstial performance improvement by adding "where LEDNR EQ '00'" in the where clause.
    Here is my select:
              SELECT kokrs
                     belnr
                     buzei
                     ebeln
                     ebelp
                     wkgbtr
                     refbn
                     bukrs
                     gjahr
                FROM covp CLIENT SPECIFIED
                INTO TABLE i_coep
                 FOR ALL ENTRIES IN i_objnr
               WHERE mandt EQ sy-mandt
                 AND lednr EQ '00'
                 AND objnr = i_objnr-objnr
                 AND kokrs = c_conarea.

  • How to quickly fetch the records from an SQL recordset

    I'm using LW/CVI V7.1.1 and SQL Toolkit V2.06.
    When displaying the recordset from a SELECT statement I use the following construct:
      SQLhandle1 = DBActivateSQL(DBhandle, SELECTtext);
      DBBindCol() statements.......
      numRecs = DBNumberOfRecords(SQLhandle1);
      for (n=1; n<=numRecs; n++) {
        DBFetchNext(SQLhandle1);
        display record to the user...
      DBDeactivateSQL (SQLhandle1);
    This has always worked fine for me when using local databases. Now I am developing an app for a remote database, and the fetching of each selected record is proving to be an issue. It takes at best, 60msecs for my round-trip network access to fetch each record. If selecting very many records, the fetching can add up to a considerable time delay.
    My question is, how can I bind the entire recordset to my application variables, (or to a local table?) in a single request to the database? Does LW/CVI support such a method? Or perhaps someone knows an SQL method to help me?
    Thanks

    Hi Michael,
    Thanks for the help. This is what I was looking for. Not sure why I missed it!
    However, after trying it out, it doesn't seem to help. The statement:  DBGetVariantArray(SQLhandle, &array, &recs, &fields); seems to take the same amount of time to get the records as the individual DBFetchNext() statements. So if my SQL statement matches 100 records, the DBGetVariantArray() call will take 100*60msec to complete.
    Is there a DB attribute setting that needs changed?

  • PROBLEM WITH FETCHING THE TEXT FROM  HEADER DATA

    Hi,
    plz give me the solution.
    TYPES:BEGIN OF WA_TLINE,
            TDFORMAT TYPE TLINE-TDFORMAT,
            TDLINE(132) TYPE C, "TLINE-TDLINE,
           END OF WA_TLINE,
         BEGIN OF WA_STXH,
            TDOBJECT TYPE RSTXT-TDOBJECT,
            TDNAME TYPE STXH-TDNAME,
            TDID TYPE STXH-TDID,
            TDSPRAS TYPE STXH-TDSPRAS,
          END OF WA_STXH.
    DATA : OBJECT(10) TYPE C,
           it_inline  TYPE TABLE OF WA_TLINE with header line,
           IT_LINE TYPE TABLE OF WA_TLINE WITH HEADER LINE,
           IT_STXH TYPE STANDARD TABLE OF WA_STXH WITH HEADER LINE,
           IT_HEAD TYPE THEAD.
    *data:it_tdline like  table of tline with header line.
    PARAMETERS:PA_VBELN TYPE VBELN_VF.
    START-OF-SELECTION.
    SELECT TDOBJECT TDNAME TDID TDSPRAS FROM STXH INTO CORRESPONDING FIELDS OF TABLE IT_STXH
      WHERE  TDNAME = PA_VBELN.
    MOVE IT_STXH-TDOBJECT TO OBJECT.
    IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT_INLINE'
      EXPORTING
        ID                    =  IT_STXH-TDID
        INLINE_COUNT          =  '1'
        LANGUAGE              =  IT_STXH-TDSPRAS
        NAME                  =  IT_STXH-TDNAME
        OBJECT                =  'VBBK'
      LOCAL_CAT             = ' '
    IMPORTING
      HEADER                =  it_head
      TABLES
        INLINES               = it_inline
        LINES                 = it_line
    EXCEPTIONS
      ID                    = 1
      LANGUAGE              = 2
      NAME                  = 3
      NOT_FOUND             = 4
      OBJECT                = 5
      REFERENCE_CHECK       = 6
      OTHERS                = 7
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDIF.
    write:/ it_inline.
    iam using this program but it will shows the error  object is not found but it will comes in itab when u pass the data from itab to function module it will shows the error.
    I will give the nuts.
    Regards,
    Venkat

    Hi Venkat,
    This is working fine for me.
        CALL FUNCTION 'READ_TEXT_INLINE'
          EXPORTING
            id                   = '0001'
            inline_count    = '1'
            language        = 'D'
            name             = '0000005462'
            object            = 'VBBK'
            local_cat        = ' '
          IMPORTING
            header           = it_head
          TABLES
            inlines            = it_inline
            lines               = it_line
          EXCEPTIONS
            id                    = 1
            language         = 2
            name              = 3
            not_found        = 4
            object             = 5
            reference_check = 6
            OTHERS          = 7.
        IF sy-subrc NE 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-      msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
      WRITE:/ it_inline.
    Regards
    avi.....

  • Can anyone pls. help me : facing problem while fetching the data from BAPI

    Hi all,
        we have installed xMII in a new server. In this new server I am trying to fetch data from a BAPI & write it into a file thru a transaction, but i cant see the data in the tracer, & neither is the file created. But with the same configuration & connection am able to get the data in the old server. Can anyone pls. tell me wat could be the problem?? or is there anything else that we might have forgotten while installing xMII in the new server.
    ur help would be greatly appreciated.
    Thanks,
    Sushma.

    Hi Ravi,
           no am not able to see the table structure also. This is what it is showing in the tracer :
       [INFO ]: Execution Started At: 17:24:17
    [DEBUG]: 00000.03100 Begin Transaction 'TMP99A51958-5BAE-CDE0-0DB5-A3A8C72BC297'
    [DEBUG]: 00000.03100 Begin Sequence Sequence : ()
    [DEBUG]: 00000.03100 Begin Action SAPJCOInterface_0 : (SAP JCO Interface)
    [DEBUG]: 00006.43700 Connection Took 6406 mS
    [DEBUG]: 00009.82800 Function Creation Took 3391 mS
    [DEBUG]: 00010.25000 Execution Took 422 mS
    [DEBUG]: 00010.25000 End Action SAPJCOInterface_0 : (SAP JCO Interface)
    [DEBUG]: 00010.25000 Begin Sequence Sequence_0 : ()
    [DEBUG]: 00010.25000 Begin Action Repeater_0 : (Repeater)
    [DEBUG]: 00010.26600 End Action Repeater_0 : (Repeater)
    [DEBUG]: 00010.26600 End Sequence Sequence_0 : ()
    [DEBUG]: 00010.26600 End Sequence Sequence : ()
    [DEBUG]: 00010.26600 End Transaction 'TMP99A51958-5BAE-CDE0-0DB5-A3A8C72BC297'
    [INFO ]: Execution Completed At: 17:24:28 Elapsed Time was 10235 mS
    I doubt the repeater is not working, becoz i checked the JCO connection & thats fine..
    Thanks,
    Sushma.

  • Best way to Fetch the record

    Hi,
    Please suggest me the best way to fetch the record from the table designed below. It is Oracle 10gR2 on Linux
    Whenever a client visit the office a record will be created for him. The company policy is to maintain 10 years of data on the transaction table but the table holds record count of 3 Million records per year.
    The table has the following key Columns for the Select (sample Table)
    Client_Visit
    ID Number(12,0) --sequence generated number
    EFF_DTE DATE --effective date of the customer (sometimes the client becomes invalid and he will be valid again)
    Create_TS Timestamp(6)
    Client_ID Number(9,0)
    Cascade Flg vahrchar2(1)
    On most of the reports the records are fetched by Max(eff_dte) and Max(create_ts) and cascade flag ='Y'.
    I have following queries but the both of them are not cost effective and takes 8 minutes to display the records.
    Code 1:
    SELECT   au_subtyp1.au_id_k,
                                       au_subtyp1.pgm_struct_id_k
                                  FROM au_subtyp au_subtyp1
                                 WHERE au_subtyp1.create_ts =
                                          (SELECT MAX (au_subtyp2.create_ts)
                                             FROM au_subtyp au_subtyp2
                                            WHERE au_subtyp2.au_id_k =
                                                                au_subtyp1.au_id_k
                                              AND au_subtyp2.create_ts <
                                                     TO_DATE ('2013-01-01',
                                                              'YYYY-MM-DD'
                                              AND au_subtyp2.eff_dte =
                                                     (SELECT MAX
                                                                (au_subtyp3.eff_dte
                                                        FROM au_subtyp au_subtyp3
                                                       WHERE au_subtyp3.au_id_k =
                                                                au_subtyp2.au_id_k
                                                         AND au_subtyp3.create_ts <
                                                                TO_DATE
                                                                    ('2013-01-01',
                                                                     'YYYY-MM-DD'
                                                         AND au_subtyp3.eff_dte < =
                                                                TO_DATE
                                                                    ('2012-12-31',
                                                                     'YYYY-MM-DD'
                                   AND au_subtyp1.exists_flg = 'Y'
    Explain Plan
    Plan hash value: 2534321861
    | Id  | Operation                | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |           |     1 |    91 |       | 33265   (2)| 00:06:40 |
    |*  1 |  FILTER                  |           |       |       |       |            |          |
    |   2 |   HASH GROUP BY          |           |     1 |    91 |       | 33265   (2)| 00:06:40 |
    |*  3 |    HASH JOIN             |           |  1404K|   121M|    19M| 33178   (1)| 00:06:39 |
    |*  4 |     HASH JOIN            |           |   307K|    16M|  8712K| 23708   (1)| 00:04:45 |
    |   5 |      VIEW                | VW_SQ_1   |   307K|  5104K|       | 13493   (1)| 00:02:42 |
    |   6 |       HASH GROUP BY      |           |   307K|    13M|   191M| 13493   (1)| 00:02:42 |
    |*  7 |        INDEX FULL SCAN   | AUSU_PK   |  2809K|   125M|       | 13493   (1)| 00:02:42 |
    |*  8 |      INDEX FAST FULL SCAN| AUSU_PK   |  2809K|   104M|       |  2977   (2)| 00:00:36 |
    |*  9 |     TABLE ACCESS FULL    | AU_SUBTYP |  1404K|    46M|       |  5336   (2)| 00:01:05 |
    Predicate Information (identified by operation id):
       1 - filter("AU_SUBTYP1"."CREATE_TS"=MAX("AU_SUBTYP2"."CREATE_TS"))
       3 - access("AU_SUBTYP2"."AU_ID_K"="AU_SUBTYP1"."AU_ID_K")
       4 - access("AU_SUBTYP2"."EFF_DTE"="VW_COL_1" AND "AU_ID_K"="AU_SUBTYP2"."AU_ID_K")
       7 - access("AU_SUBTYP3"."EFF_DTE"<=TO_DATE(' 2012-12-31 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "AU_SUBTYP3"."CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00')
           filter("AU_SUBTYP3"."CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00' AND
                  "AU_SUBTYP3"."EFF_DTE"<=TO_DATE(' 2012-12-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
       8 - filter("AU_SUBTYP2"."CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00')
       9 - filter("AU_SUBTYP1"."EXISTS_FLG"='Y')Code 2:
    I already raised a thread a week back and Dom suggested the following query, it is cost effective but the performance is same and used the same amount of Temp tablespace
    select au_id_k,pgm_struct_id_k from (
    SELECT au_id_k
          ,      pgm_struct_id_k
          ,      ROW_NUMBER() OVER (PARTITION BY au_id_k ORDER BY eff_dte DESC, create_ts DESC) rn,
          create_ts, eff_dte,exists_flg
          FROM   au_subtyp
          WHERE  create_ts < TO_DATE('2013-01-01','YYYY-MM-DD')
          AND    eff_dte  <= TO_DATE('2012-12-31','YYYY-MM-DD') 
          ) d  where rn =1   and exists_flg = 'Y'
    --Explain Plan
    Plan hash value: 4039566059
    | Id  | Operation                | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |           |  2809K|   168M|       | 40034   (1)| 00:08:01 |
    |*  1 |  VIEW                    |           |  2809K|   168M|       | 40034   (1)| 00:08:01 |
    |*  2 |   WINDOW SORT PUSHED RANK|           |  2809K|   133M|   365M| 40034   (1)| 00:08:01 |
    |*  3 |    TABLE ACCESS FULL     | AU_SUBTYP |  2809K|   133M|       |  5345   (2)| 00:01:05 |
    Predicate Information (identified by operation id):
       1 - filter("RN"=1 AND "EXISTS_FLG"='Y')
       2 - filter(ROW_NUMBER() OVER ( PARTITION BY "AU_ID_K" ORDER BY
                  INTERNAL_FUNCTION("EFF_DTE") DESC ,INTERNAL_FUNCTION("CREATE_TS") DESC )<=1)
       3 - filter("CREATE_TS"<TIMESTAMP' 2013-01-01 00:00:00' AND "EFF_DTE"<=TO_DATE('
                  2012-12-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))Thanks,
    Vijay

    Hi Justin,
    Thanks for your reply. I am running this on our Test environment as I don't want to run this on Production environment now. The test environment holds 2809605 records (2 Million).
    The query output count is 281699 (2 Hundred Thousand) records and the selectivity is 0.099. The Distinct values of create_ts, eff_dte, and exists_flg is 2808905 records. I am sure the index scan is not going to help out much as you said.
    The core problem is both queries are using lot of Temp tablespace. When we use this query to join the tables, the other table has the same design as below so the temp tablespace grows bigger.
    Both the production and test environment are 3 Node RAC.
    First Query...
    CPU used by this session     4740
    CPU used when call started     4740
    Cached Commit SCN referenced     21393
    DB time     4745
    OS Involuntary context switches     467
    OS Page reclaims     64253
    OS System time used     26
    OS User time used     4562
    OS Voluntary context switches     16
    SQL*Net roundtrips to/from client     9
    bytes received via SQL*Net from client     2487
    bytes sent via SQL*Net to client     15830
    calls to get snapshot scn: kcmgss     37
    consistent gets     52162
    consistent gets - examination     2
    consistent gets from cache     52162
    enqueue releases     19
    enqueue requests     19
    enqueue waits     1
    execute count     2
    ges messages sent     1
    global enqueue gets sync     19
    global enqueue releases     19
    index fast full scans (full)     1
    index scans kdiixs1     1
    no work - consistent read gets     52125
    opened cursors cumulative     2
    parse count (hard)     1
    parse count (total)     2
    parse time cpu     1
    parse time elapsed     1
    physical write IO requests     69
    physical write bytes     17522688
    physical write total IO requests     69
    physical write total bytes     17522688
    physical write total multi block requests     69
    physical writes     2139
    physical writes direct     2139
    physical writes direct temporary tablespace     2139
    physical writes non checkpoint     2139
    recursive calls     19
    recursive cpu usage     1
    session cursor cache hits     1
    session logical reads     52162
    sorts (memory)     2
    sorts (rows)     760
    table scan blocks gotten     23856
    table scan rows gotten     2809607
    table scans (short tables)     1
    user I/O wait time     1
    user calls     11
    workarea executions - onepass     1
    workarea executions - optimal     9
    Second Query
    CPU used by this session     1197
    CPU used when call started     1197
    Cached Commit SCN referenced     21393
    DB time     1201
    OS Involuntary context switches     8684
    OS Page reclaims     21769
    OS System time used     14
    OS User time used     1183
    OS Voluntary context switches     50
    SQL*Net roundtrips to/from client     9
    bytes received via SQL*Net from client     767
    bytes sent via SQL*Net to client     15745
    calls to get snapshot scn: kcmgss     17
    consistent gets     23871
    consistent gets from cache     23871
    db block gets     16
    db block gets from cache     16
    enqueue releases     25
    enqueue requests     25
    enqueue waits     1
    execute count     2
    free buffer requested     1
    ges messages sent     1
    global enqueue get time     1
    global enqueue gets sync     25
    global enqueue releases     25
    no work - consistent read gets     23856
    opened cursors cumulative     2
    parse count (hard)     1
    parse count (total)     2
    parse time elapsed     1
    physical read IO requests     27
    physical read bytes     6635520
    physical read total IO requests     27
    physical read total bytes     6635520
    physical read total multi block requests     27
    physical reads     810
    physical reads direct     810
    physical reads direct temporary tablespace     810
    physical write IO requests     117
    physical write bytes     24584192
    physical write total IO requests     117
    physical write total bytes     24584192
    physical write total multi block requests     117
    physical writes     3001
    physical writes direct     3001
    physical writes direct temporary tablespace     3001
    physical writes non checkpoint     3001
    recursive calls     25
    session cursor cache hits     1
    session logical reads     23887
    sorts (disk)     1
    sorts (memory)     2
    sorts (rows)     2810365
    table scan blocks gotten     23856
    table scan rows gotten     2809607
    table scans (short tables)     1
    user I/O wait time     2
    user calls     11
    workarea executions - onepass     1
    workarea executions - optimal     5Thanks,
    Vijay
    Edited by: Vijayaraghavan Krishnan on Nov 28, 2012 11:17 AM
    Edited by: Vijayaraghavan Krishnan on Nov 28, 2012 11:19 AM

  • How to fetch the data from databse table and get the required output

    Hi,
    I have made a project that connects CEP to database table but i m getting some problem in fetching the data from database.
    From the following code :
    If the where condition is removed then the application runs fine but i am still not able to fetch the data from the table because it is not showing any output.
    Can anyone please suggest me that how to write WHERE statement correctly and how i will be able to see the output.
    Following is the config.xml for processor:
    ======================================
    <?xml version="1.0" encoding="UTF-8"?>
    <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application"
         xmlns:jdbc="http://www.oracle.com/ns/ocep/config/jdbc">
         <processor>
              <name>JDBC_Processor</name>
              <rules>
                   <query id="q1"><![CDATA[
                             SELECT STOCK.SYMBOL as symbol, STOCK.EXCHANGE as exchange
                             FROM ExchangeStream [Now] as datastream, STOCK
                             WHERE datastream.SYMBOL = datastream.SYMBOL ]]></query>
              </rules>
         </processor>
         <jms-adapter>
              <name>JMS_IN_Adapter</name>
              <jndi-provider-url>t3://CHDSEZ135400D:7001</jndi-provider-url>
              <destination-jndi-name>jms.TestKanikaQueue</destination-jndi-name>
              <user>weblogic</user>
              <password>welcome1</password>
         </jms-adapter>
    </wlevs:config>
    Following is the assembly file:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
         xmlns:wlevs="http://www.bea.com/ns/wlevs/spring" xmlns:jdbc="http://www.oracle.com/ns/ocep/jdbc"
         xmlns:spatial="http://www.oracle.com/ns/ocep/spatial"
         xsi:schemaLocation="
              http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans.xsd
              http://www.springframework.org/schema/osgi
              http://www.springframework.org/schema/osgi/spring-osgi.xsd
              http://www.bea.com/ns/wlevs/spring
              http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_3.xsd
              http://www.oracle.com/ns/ocep/jdbc
              http://www.oracle.com/ns/ocep/jdbc/ocep-jdbc.xsd
              http://www.oracle.com/ns/ocep/spatial
              http://www.oracle.com/ns/ocep/spatial/ocep-spatial.xsd">
         <wlevs:event-type-repository>
              <wlevs:event-type type-name="StockEvent">
                   <wlevs:properties>
                        <wlevs:property name="SYMBOL" type="byte[]" length="16" />
                        <wlevs:property name="EXCHANGE" type="byte[]" length="16" />
                   </wlevs:properties>
              </wlevs:event-type>
              <wlevs:event-type type-name="ExchangeEvent">
                   <wlevs:class>com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent</wlevs:class>
              </wlevs:event-type>
              <wlevs:event-type type-name="StockExchangeEvent">
                   <wlevs:properties>
                        <wlevs:property name="symbol" type="byte[]" length="16" />
                        <wlevs:property name="price" type="byte[]" length="16" />
                        <wlevs:property name="exchange" type="byte[]" length="16" />
                   </wlevs:properties>
              </wlevs:event-type>
         </wlevs:event-type-repository>
         <bean id="readConverter" class="com.bea.wlevs.adapter.example.JDBC_CEP.Adapter_JDBC" />
         <bean id="outputJDBCBean" class="com.bea.wlevs.bean.example.JDBC_CEP.OutputBean_JDBC">
         </bean>
         <wlevs:adapter id="JMS_IN_Adapter" provider="jms-inbound">
              <wlevs:listener ref="ExchangeStream" />
              <wlevs:instance-property name="converterBean"
                   ref="readConverter" />
         </wlevs:adapter>
         <wlevs:processor id="JDBC_Processor" advertise="true">
              <wlevs:listener ref="OutputChannel" />
              <wlevs:table-source ref="STOCK" />
         </wlevs:processor>
         <wlevs:channel id="ExchangeStream" event-type="ExchangeEvent" advertise="true">
              <wlevs:listener ref="JDBC_Processor" />
         </wlevs:channel>
         <wlevs:channel id="OutputChannel" event-type="StockExchangeEvent"
              advertise="true">
              <wlevs:listener ref="outputJDBCBean" />
         </wlevs:channel>
         <wlevs:table id="STOCK" event-type="StockEvent"
              data-source="StockDs" table-name="STOCK" />
         <wlevs:table id="STOCK_EXCHANGE" event-type="StockExchangeEvent"
              data-source="StockDs" table-name="STOCK_EXCHANGE" />
    </beans>
    ExchangeEvent.java:
    package com.bea.wlevs.event.example.JDBC_CEP;
    public class ExchangeEvent {
         public String SYMBOL;
         public String symbol;
         public String exchange;
         public ExchangeEvent() {
         public String getSYMBOL() {
              return SYMBOL;
         public void setSYMBOL(String sYMBOL) {
              SYMBOL = sYMBOL;
         public String getSymbol() {
              return symbol;
         public void setSymbol(String symbol) {
              this.symbol = symbol;
         public String getExchange() {
              return exchange;
         public void setExchange(String price) {
              this.exchange = price;
    Adapter Class:
    package com.bea.wlevs.adapter.example.JDBC_CEP;
    import com.bea.wlevs.adapter.example.JDBC_CEP.MyLogger;
    import com.bea.wlevs.adapters.jms.api.InboundMessageConverter;
    import java.text.DateFormat;
    import java.util.Date;
    import com.bea.wlevs.adapters.jms.api.MessageConverterException;
    import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.TextMessage;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
         public class Adapter_JDBC implements InboundMessageConverter{
         @SuppressWarnings("unchecked")
         public List convert(Message message) throws MessageConverterException, JMSException {
              Random rand = new Random();
              int unique_id = rand.nextInt();
              DateFormat dateFormat;
              dateFormat = DateFormat.getTimeInstance();
              dateFormat.format(new Date());
              MyLogger.info(unique_id + " CEP Start Time is: " + dateFormat.format(new Date()));
              System.out.println("Message from the Queue is :"+ message);
              TextMessage textMessage = (TextMessage) message;
              String stringMessage = textMessage.getText().toString();
              System.out.println("Message after getting converted into String is :"+ stringMessage);
                   String[] results = stringMessage.split(",\\s*"); // split on commas
                   ExchangeEvent event1 = new ExchangeEvent();
                   event1.setSYMBOL(results[0]);
         List events = new ArrayList(2);
         events.add(event1);
         return events;
    Output Bean Class :
    package com.bea.wlevs.bean.example.JDBC_CEP;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
    import com.bea.core.datasource.DataSourceService;
    public class OutputBean_JDBC implements StreamSink{
         public void onInsertEvent(Object event) {
         if (event instanceof ExchangeEvent) {
              ExchangeEvent cacheEvent = (ExchangeEvent) event;
         System.out.println("Symbol is: " + cacheEvent.getSymbol());
         System.out.println("Exchange is: " + cacheEvent.getExchange());
         System.out.println(DataSourceService.class.getClass());
    Kindly let me know if you need further info.

    Do you have StockDs configured in your server config.xml?
    I think the query should look more like this:
    SELECT stocks.SYMBOL, stocks.EXCHANGE
    FROM STOCK as stocks, ExchangeStream [Now] as datastream WHERE stocks.SYMBOL = datastream.SYMBOL
    Thanks
    andy

  • Can we split and fetch the records in Database Adapter

    Hi,
    I designed a Database Adapter to fetch the records from oracle Database. Some time, the Database Adapter need to fetch around 5000, or 10,000 records in single shot. In that case my BPEL process is choking and getting error as
    java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
    Could someone help me to resolve this?
    In Database Adapter can we split and fetch the records, if number of records more then 1000.
    ex. First 100 rec as one set and next 100 as 2nd set like this.
    Thank you.

    You can send the records as batches useing the debatching feature of db adapter. Refer documentation for implementation details.

  • Picking the records from IT2011.....

    Hi All,
    I am writing the report as per the clients requirement. for this i am using the IT 0007, 2010, 2011. Here i am using the LDB PNP for this report. i have declared  as below.
    INFOTYPES: 0007, 2010,2011.
    The infotypes are filling with the records which are existing in the infotype. Here even old data is also filling in the infotypes that means data other than the selected date from the selection screen.
    To avoide this i have written provide statement as follows.
    provide * from P2011  between pn-begda and pn-endda.
    but i did not get any data from the above statement. My requirement is i need to fetch the records from the IT2011 for the entered date. can anybody tell how to fetch the records from the time infotypes for entered date.
    Thanks & Regards,
    Giri.

    Hi..
    I suggest to use PNPCE LDB and use input as other perion option for selection screen
    and you will get all the recordes valid during the period which you give and the recordes will coming in to the tables 0007, 2010,2011.and just you can read or loop the table.
    TABLES : pernr.
    INFOTYPES: 0001,
               0007,
               2011,
               2010 .
    NODES:  peras.
    TYPES : BEGIN OF ty_final,
           pernr TYPE persno,
           ename  TYPE emnam,
            PBTXT TYPE PBTXT,
            BTRTX TYPE BTRTX,
            END OF ty_final.
    DATA : it_final TYPE TABLE OF ty_final,
           wa_final TYPE ty_final.
    DATA go_table         TYPE REF TO cl_salv_table.
    START-OF-SELECTION.
    GET peras.
      SORT p0001 BY endda DESCENDING.
      READ TABLE p0001 INDEX 1.
      wa_final-pernr = p0001-pernr.
      wa_final-ename  = p0001-ename .
      CALL FUNCTION 'HRWPC_RFC_WERKS_TEXT_GET'
        EXPORTING
          werks      = p0001-werks
        IMPORTING
          werks_text = wa_final-PBTXT.
      CALL FUNCTION 'HRWPC_RFC_BTRTL_TEXT_GET'
        EXPORTING
          werks      = p0001-werks
          btrtl      = p0001-btrtl
        IMPORTING
          btrtl_text = wa_final-BTRTX.
    loop at p2010.
    endloop.
      APPEND wa_final TO it_final.
      CLEAR wa_final.
    END-OF-SELECTION.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = go_table
        CHANGING
          t_table      = it_final.
      go_table->display( ).

  • Problem in fetching the latest updated record.

    Hello ,
    I have  a program in which i am creating a BDC session and submit the same in program rsbdcsub, now the problem is that i need to capture the Field Qstate from the table APQI, its not updated instantaneously, so i am not able to get the latest value of QSTATE from updated APQI table,
    I have used commit work, commit work and wait , SET UPDATE TASK LOCAL, nothing is working, only if i put wait up to '1.5' seconds before fetching the value from table APQI i get the updated Qstate, but this will create a performance issue so please suggest.
    Can any one please help me resolve this problem.
    Regards,
    Abhinav

    it's quite normal that status is updated after the job is modified
    and you cannot know beforehand how much time it will take to do it (even the start time is not sure because it could be delayed !)
    you could select the value until it is one of a list that you expect (for example, finished or cancelled)

  • How to fetch all the records from ztable

    Hi 
    My program is outbound program.
    According to the requirement i have to fetch all the records from ztable which are not tranmitted before to the third party and once the records are extracted and written to output file they will be marked as 'X' in the "status" field of that ztable for the next days run.
    How to fetch the records.Please suggest me.
    Thanks,
    Neelima

    HI,
    Fetch all the records whose status is equal to 'X' as whatever data is sent to third party system is marked as 'X' in status field of table after sending.
    You need to first fetch the data into internal table using the select statement where status EQ space. You get the data which is not yet transmitted to third part. And later in the program after trasmitting the data to third party modify the Records in the DB table which are transmitted with Staus eq 'X'.

  • Fetch the values from internal table inside an internal table (urgent!!)

    data : BEGIN OF PITB2_ZLINFO occurs 0,
             BEGDA LIKE SY-DATUM,
             ENDDA LIKE SY-DATUM,
             PABRJ(4) TYPE N,                       "Payroll Year
             PABRP(2) TYPE N,                       "Pay. Period
             ZL LIKE PC2BF OCCURS 0,
           END OF PITB2_ZLINFO.
    I have a internal table like this,
    How to Fetch the values from internal table inside an internal table.
    Kindly Help me on this..
    Regards,
    Ram.

    Hi,
    Try this....
    Loop at PITB2_ZLINF0.
    Loop at PITB2_ZLINF0-ZL.
    endloop.
    Endloop.
    Thanks...
    Preetham S

  • Report is not fetching the data from Aggregate..

    Hi All,
    I am  facing the problem  in aggregates..
    For example when i  am running the report using Tcode RSRT2, the BW report is not fetching the data from Aggregates.. instead going into the aggregate it is scanning whole cube Data....
    FYI.. Checked the characteristcis is exactely matching with aggregates..
    and also it is giving the  message as:
    <b>Characteristic 0G_CWWPTY is compressed but is not in the aggregate/query</b>
    Can some body explain me about this error message.. pls let me know solution asap..
    Thankyou in advance.
    With regards,
    Hari

    Hi
    Deactivate the aggregates and then rebuild the indexes and then activate the aggregates again.
    GTR

Maybe you are looking for

  • Amber updata

    i have  updata to amber lumia 820 but i cannot find call+sms filter 

  • 2 iPods, 1 PC, same music wanted on both iPods

    I've an old brick 60GB iPod for myself and I've just bought a new nano for my wife. We both like the same music and am frightened of connecting the new nano to the PC in case it wipes the music from iTunes. Any advice on how I can get the same music

  • Related to sap bw

    i want to know why ods is loaded in info cube...means in which situation we do like this

  • Configure protocol with airport extreme base station

    Need powerbook g3 wireless internet compatible password. roamabout 802.11b cabletron card does not have wpa password option. There does not appear to be a compatible encryption type to use airport extreme base station with this card.

  • Screen Mode

    Hi everyone I have a problem to which I have not found a solution yet. 1. Why do Illustrator, Fireworks and InDesign (these are the ones I have checked) open with floating panels, tabs and windows, even in full screen mode... but Photoshop opens nice