How to drop the reversed GRs while selecting from EKBE ?

Hi,
I have a requirement to select only GR which are not reversed. Suppose we have a PO with 2 items with 3000 quantity each. First time user did GR (using MIGO) with quantity 1000 for each item by mistake. So the user comes back to MIGO, reverse it and do a GR again for 1100 each item. If you look at EKBE for this PO, you will see three lines for each item. First line will be GR(moment type 101) with quantity 1000, 2nd line will be reverse of it ( with moment type 102), with quantity 1000 and the 3rd line will the new GR(moment type 101) with quantity 1100. Now in my requirement is to select this new GRs from EKBE for each item. I am using a select..for all entries of ts_ekpo (assume that this table is filled already with right PO items) internal table into another internal table ts_ekbe. So I am selecting total 6 lines, 3 lines for each item. I don't want to select the reversed lines. Will there be any flag in EKBE table to identify that the line is reversed or that the line is new GR line ? If you need more clarity please let me know. Your help will be appriciated.
Thank you,
Surya.

Hi,
You will have to 1st retrieve all the Mat Docs corresponding to the POs from the MSEG table for Movement type 101.
If you want to whether the Mat Doc is reversed, as hendy has suggested you will have to do the following.
If you consider that T_MSEG is the Internal table that was populated with the Mat Docs for Move Type 101.
SELECT ...... FOR ALL ENTRIES IN T_MSEG
                    WHERE SJAHR  EQ T_MSEG-SJAHR
                          AND SMBLN EQ T_MSEG-MBLNR
                          AND SMBLP EQ T_MSEG-ZEILE
                          AND BWART EQ '102'.
This suggests that for Move Type 102 if you find the actual Mat Doc existing in the field SMBLN and SMBLP, then the GR is reversed.
regards,
Mahesh

Similar Messages

  • How to control the number of rows selected from a sybase database table?

    Hi, JDBC guru,
    I'm working on project using Sybase 11.9.x database.We need to process a record in a table,first select it from the table,then do some computing,finally write it to a dbf file, if the above steps succeed,remove the original row in the table.Quite evidently, all these operation should be put into one transaction. But how can I select just a number of rows from the sybase database table?
    Any hints?
    Thank you in advance.
    Regards,
    Jusitne

    Statement stmt...
    stmt.setMaxRows(20);

  • How to resolve the encoding problem while migration from informix9.4

    When I migrate the informix9.4 database, there occur a error while migrate the data from informix to oracle.
    Because the source tables has a column which type is "vchar", the some row's data length more the 4000, so migration workbench convert this column type from "vchar" to "clob" automaticly. But when the worbench has created the oracle model, and then migrate the data, there occured this error:
    java.io.UnsupportedEncodingException: ISO2022CN_GB
    java.sql.SQLException: index miss IN or OUT param:: 9
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)+
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1536)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2900)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2996)+
    +     at oracle.mtg.migrationServer.LoadTableData._migrateTableData(LoadTableData.java:1473)+
    +     at oracle.mtg.migrationServer.LoadTableData.run(LoadTableData.java:326)+
    +     at oracle.mtg.migration.WorkerThread.run(Worker.java:268)+
    The encode in the source informix database is "zh_CN.gbk", and the encode in the destination database is "zh_CN.gbk", why this prompt the convert error?
    Another information is that excluding this table, other tables can migrated success.
    So, I guess this problem must has association with the type conversation which from "vchar" to "clob", can anyone help me with this, Thanks.

    Hello,
    well, the limit of 4000 is clear. From the Oracle® Migration Workbench Reference Guide for Informix Dynamic Server Migrations:
    VARCHAR(m,r)
    The Informix Dynamic Server VARCHAR data type stores varying length single-byte and multibyte character strings of letters, numbers. and symbols. The maximum size of this column is m, that can range from 1 to 255. The minimum reserved space is r. This is optional and defaults to 0 if not specified. The minimum reserved space can range from 0 to 255.
    The comparable Oracle data type is VARCHAR2(n) that also stores variable-length character strings. An Oracle VARCHAR2(n), however, can have a maximum string length of between 1 and 4000 specified for n.
    Specifying a minimum reserved space is useful if the data in a row is initially small but is expected to grow at a later date. If this is the case then, when migrating Informix Dynamic Server tables that contain VARCHAR columns consider increasing the PCTFREE value in the storage clause for these tables in the Oracle database. If this column is used in an index, then the PCTFREE values for the corresponding index storage should also be considered. For indexes based on VARCHAR columns, Informix Dynamic Server allocates the maximum storage.
    So it is not surprising that the workbench is converting a VARCHAR with a length of more than 4000 to a CLOB.
    But that does not explain the encoding exception. This might be a problem of the Informix JDBC driver.
    Is the Informix JDBC Driver Programmer's Guide helpful for you: http://publibfi.boulder.ibm.com/epubs/pdf/6435.pdf
    Can you reproduce the problem with a Java program against your Informix database using your Informix JDBC driver?
    Which version of Informix JDBC driver are you using?
    Best regards
    Wolfgang

  • How to do the reverse po in this report

    Hi,   
          i have a one problem in this report . i don,t know how to display the
    reverse po in this report. reverse po should have a po history cat. 'N' (field is bewtp)
    i connect type 'Q' and the type 'E' but not been able to connect the 'N'. when i connect it will give me the wrong amount and some field should not been displayed. i will provide u the following code.
           please help me.
    Thanks
      dinesh
    *& Report  Z_MM_PURCHASE_REGISTER
    REPORT  Z_MM_PURCHASE_REGISTER.
      Short Description: Purchase Register
    TABLES                                                              *
    TABLES : ekko, taxcom, ekpo, ekbe,ekkn,konv,komv,t007s, j_1imovend, bseg .
    TYPE-POOLS: slis.
    TYPES: Begin with TY_                                               *
    TYPES : BEGIN OF  ty_ekko,
              BSART LIKE EKKO-BSART,
              KNTTP LIKE EKPO-KNTTP,
              ebeln LIKE ekko-ebeln,
              knumv LIKE ekko-knumv,
              lifnr LIKE ekko-lifnr,
              waers LIKE ekko-waers,
              kalsm LIKE ekko-kalsm,
              lands LIKE ekko-lands,
              ekorg LIKE ekko-ekorg,
              wkurs LIKE ekko-wkurs,
              bedat LIKE ekko-bedat,
              ebelp LIKE ekpo-ebelp,   "po line item
              mwskz LIKE ekpo-mwskz,   "tax code
              bukrs LIKE ekpo-bukrs,
              matkl LIKE ekpo-matkl,
              mtart LIKE ekpo-mtart,
             netpr LIKE ekpo-netpr,   "Net price in purchasing document
             meins LIKE ekpo-meins,   "unit
              menge LIKE ekpo-menge,   "quantity
              txz01 LIKE ekpo-txz01,   "material description
              txjcd LIKE ekpo-txjcd,   "tax jurisdiction code
              matnr LIKE ekpo-matnr,
              llief LIKE ekko-llief,
              meins LIKE ekpo-meins,
              bprme LIKE ekpo-bprme,
              netpr LIKE ekpo-netpr,
              peinh LIKE ekpo-peinh,
             lifnr like lfa1-lifnr,
              name1 like lfa1-lifnr,
              pstlz like lfa1-pstlz,
              stras like lfa1-stras,
              text1 like t007s-text1,
    END OF ty_ekko.
    TYPES : BEGIN OF ty_ekbe,
              ebeln LIKE ekbe-ebeln,    "po number
              ebelp LIKE ekbe-ebelp,    "po line item
              buzei LIKE ekbe-buzei,
              belnr LIKE ekbe-belnr,    "Number of material document
              budat LIKE ekbe-budat,    "Posting date in the document
              xblnr LIKE ekbe-xblnr,    "Reference document number
              werks LIKE ekbe-werks,    "plant
              matnr LIKE ekbe-matnr,    "material
              menge LIKE ekbe-menge,    "quantity
              peinh LIKE ekpo-peinh,
              dmbtr LIKE ekbe-dmbtr,    "Amount in local currency
              kalsm LIKE ekko-kalsm,    "Procedure (pricing)
              waers LIKE ekbe-waers,    "currency
              wrbtr LIKE ekbe-wrbtr,    "Amount in document currency
              bwtar LIKE ekbe-bwtar,    "Valuation type
              shkzg LIKE ekbe-shkzg,
              maktx LIKE makt-maktx,
              mwskz LIKE ekbe-mwskz,
              bldat LIKE ekbe-bldat,
              srvpos LIKE ekbe-srvpos,
              packno LIKE ekbe-packno,
              introw LIKE ekbe-introw,
              lfbnr  LIKE ekbe-lfbnr,
              bwart TYPE ekbe-bwart,
              budat1 TYPE ekbe-budat,
              belnr1 TYPE ekbe-belnr,
           END OF ty_ekbe.
    TYPES : BEGIN OF ty_display,
              BSART LIKE EKKO-BSART,
              KNTTP LIKE EKPO-KNTTP,
              lifnr(10) TYPE C,              " LIKE ekko-lifnr,
              ebeln LIKE ekko-ebeln,
              bedat LIKE ekko-bedat,
              budat LIKE ekbe-budat,
              matnr LIKE ekbe-matnr,
              maktx LIKE makt-maktx,
              belnr LIKE ekbe-belnr,
              bldat LIKE ekbe-bldat,
              menge LIKE ekpo-menge,
              peinh LIKE ekpo-peinh,
              dmbtr LIKE ekbe-dmbtr,
              shkzg LIKE ekbe-shkzg,
              custduty LIKE konv-kwert,
              bed LIKE konv-kwert,
              cvd LIKE konv-kwert,
              sertax LIKE konv-kwert,
              sereducess LIKE konv-kwert,
              surcharge LIKE konv-kwert,
              educess LIKE konv-kwert,
              insure LIKE konv-kwert,
              freight LIKE konv-kwert,
              octroi LIKE konv-kwert,
              kursf LIKE rbkp-kursf,
              grossamt LIKE konv-kwert,
              vat4 LIKE konv-kwert,
              vat8 LIKE konv-kwert,
              vat125 LIKE konv-kwert,
              INC LIKE KONV-KWERT,     "
              PF LIKE KONV-KWERT,
              CF LIKE KONV-KWERT,
              INS LIKE KONV-KWERT,
              cst LIKE konv-kwert,
              subdeb LIKE ekbe-dmbtr,
              netamt LIKE ekbe-dmbtr,
              cenvatcreditbed LIKE konv-kwert,
              cenvatcreditecc LIKE konv-kwert,
              vatcredit LIKE konv-kwert,
              bgcharges LIKE konv-kwert,
              srvpos LIKE ekbe-srvpos,
              ktext1 LIKE esll-ktext1,
              sertaxcredit LIKE konv-kwert,
              sereducesscredit LIKE konv-kwert,
              totaltaxbenefit LIKE konv-kwert,
              inventoryvalue LIKE konv-kwert,
              bwart TYPE ekbe-bwart,
              belnr1 TYPE ekbe-belnr,
              budat1 TYPE ekbe-budat,
              lfbnr TYPE ekbe-lfbnr,
              bprme LIKE ekpo-bprme,
              meins LIKE ekpo-meins,
              name1 like lfa1-name1,
              pstlz like lfa1-pstlz,
              stras like lfa1-stras,
              mwskz like ekpo-mwskz,
              text1 like t007s-text1,
              kalsm like t007s-kalsm,
              j_1icstno like j_1imovend-j_1icstno,
              hkont(10) TYPE C,       " like bseg-hkont,
              saknr like ska1-saknr,
              sakan like ska1-sakan,
              ktoks like ska1-ktoks,
              mcod1 like ska1-mcod1,
              WAERS LIKE EKKO-WAERS,
              bukrs like ekpo-bukrs,
              total LIKE ekbe-dmbtr,
            END OF ty_display.
    TYPES : BEGIN OF ty_services,
               ebeln LIKE ekpo-ebeln,
               ebelp LIKE ekpo-ebelp,
               lfbnr LIKE ekbe-lfbnr,
               packno LIKE esll-packno,
               sub_packno LIKE esll-sub_packno,
               srvpos LIKE esll-srvpos,
               ktext1 LIKE esll-ktext1,
               netwr LIKE esll-netwr,
               act_wert  LIKE esll-act_wert,
               menge LIKE esll-menge,
               bldat LIKE ekbe-bldat,
            END OF ty_services.
    TYPES :  BEGIN OF ty_konv,
               ebeln LIKE ekpo-ebeln,
               ebelp LIKE ekpo-ebelp,
               knumv LIKE konv-knumv,
               kposn LIKE konv-kposn,
               kschl LIKE konv-kschl,
               kwert LIKE konv-kwert,
               kbetr LIKE konv-kbetr,
             END OF ty_konv.
    TYPES : BEGIN OF ty_lfbnr,
              belnr TYPE ekbe-belnr,
              lfbnr TYPE ekbe-lfbnr,
            END OF ty_lfbnr.
    TYPES : BEGIN OF ty_miro,
             belnr1 TYPE ekbe-belnr,
             belnr TYPE ekbe-belnr,
             budat TYPE ekbe-budat,
    END OF ty_miro.
    types: begin of ty_lfa1,
           lifnr like lfa1-lifnr,
           name1 like lfa1-lifnr,
           pstlz like lfa1-pstlz,
           stras like lfa1-stras,
           end of ty_lfa1.
    types: begin of ty_t007s,
           mwskz like t007s-mwskz,
           text1 like t007s-text1,
           spras like t007s-spras,
           kalsm like t007s-kalsm,
           end of ty_t007s.
    types: begin of ty_j_1imovend,
           lifnr like j_1imovend-lifnr,
           j_1icstno like j_1imovend-j_1icstno,
           end of ty_j_1imovend.
    types: begin of ty_bseg,
           lifnr like bseg-lifnr,
           dmbtr like bseg-dmbtr,
           shkzg like bseg-shkzg,
           hkont like bseg-hkont,
           BELNR LIKE BSEG-BELNR,
           end of ty_bseg.
    types: begin of ty_ska1,
           saknr like ska1-saknr,
           sakan like ska1-sakan,
           ktoks like ska1-ktoks,
           mcod1 like ska1-mcod1,
           end of ty_ska1.
    DATA : it_lfbnr TYPE STANDARD TABLE OF ty_lfbnr,
           wa_lfbnr TYPE ty_lfbnr,
           it_lfa1 type standard table of ty_lfa1,
           wa_lfa1 TYPE ty_lfa1,
           it_t007s type standard table of ty_t007s,
           wa_t007s TYPE ty_t007s,
           it_j_1imovend type standard table of ty_j_1imovend,
           wa_j_1imovend TYPE ty_j_1imovend,
           it_bseg type standard table of ty_bseg,
           wa_bseg TYPE ty_bseg,
          it_ska1 type standard table of ty_ska1,
           wa_ska1 TYPE ty_ska1,
           it_miro TYPE STANDARD TABLE OF ty_miro,
           wa_miro TYPE ty_miro,
           w_belnr TYPE ekbe-belnr,
           w_lfbnr TYPE ekbe-lfbnr,
           w_belnr1 TYPE ekbe-belnr,
           w_budat TYPE ekbe-budat.
    CONSTANTS: Begin with C_                                            *
    DATA: Begin with W_                                                 *
    DATA :  w_flag TYPE c.
    INTERNAL TABLES: Begin with IT_                                     *
    DATA : it_ekko TYPE STANDARD TABLE OF ty_ekko WITH NON-UNIQUE KEY ebeln
                                                                ebelp,
          it_ekpo type standard table of ty_ekpo,
           it_ekbe TYPE STANDARD TABLE OF ty_ekbe,
           it_ekbe1 TYPE STANDARD TABLE OF ty_ekbe WITH NON-UNIQUE KEY ebeln
                                                                ebelp,
           it_display TYPE STANDARD TABLE OF ty_display,
           it_subdebit TYPE STANDARD TABLE OF ty_ekbe,
           it_services TYPE STANDARD TABLE OF ty_services,
           it_packno TYPE STANDARD TABLE OF ty_services,
           it_konv TYPE STANDARD TABLE OF ty_konv.
    DATA :  it_fieldcat TYPE slis_t_fieldcat_alv,
            it_layout TYPE slis_layout_alv,
            it_komv TYPE STANDARD TABLE OF komv WITH NON-UNIQUE KEY knumv
            kschl.
    WORKAREAS: Begin with WA_                                           *
    DATA : wa_ekbe TYPE ty_ekbe,
           wa_ekbe1 TYPE ty_ekbe,
           wa_ekko TYPE ty_ekko,
           wa_komv TYPE komv,
           wa_display TYPE ty_display,
          WA_LFA1 TYPE TY_LFA1,
          W_GROSS_AMT type KOMV-KWERT,
           wa_subdebit TYPE ty_ekbe,
           wa_packno TYPE ty_services,
           wa_services TYPE ty_services,
           wa_konv TYPE ty_konv,
           wa_taxcom TYPE taxcom,
           wa_ls_fieldcat TYPE slis_fieldcat_alv.
    FIELD-SYMBOLS: Begin with FS_                                       *
    FIELD-GROUPS: Begin with FG_                                        *
    CONTROLS:                                                           *
    SELECT-OPTIONS: Begin with SO_                                      *
    SELECT-OPTIONS : so_lifnr FOR ekko-lifnr ,
                    so_mtart FOR ekpo-mtart,
                     so_ebeln FOR ekbe-ebeln,
                     so_matnr FOR ekbe-matnr,
                    so_date FOR sy-datum no-display,
                     do_date for ekko-bedat,
                     tax_code for ekpo-mwskz,
                     mr_date for ekbe-budat,
                     mat_gr for ekpo-matkl,
                     mat_tp for ekpo-mtart,
                     pr_plant for ekbe-werks,
                     pr_ekorg for ekko-ekorg.
    PARAMETERS: Begin with PR_                                          *
    *PARAMETER : pr_plant LIKE ekpo-werks . "OBLIGATORY.
               pr_ekorg LIKE ekko-ekorg . "OBLIGATORY.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
    PARAMETER : pr_preg TYPE c  radiobutton group g1  default 'X',
                pr_ror TYPE c  RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN : END OF BLOCK b1.
    START-OF-SELECTION                                                  *
    START-OF-SELECTION .
    *--- Get the data reguired--
      PERFORM f001-get_data.
    *-------Calculate the tax required -
      PERFORM f002-cal_taxes.
      PERFORM miro_get_data.
    END-OF-SELECTION                                                    *
    END-OF-SELECTION.
    *---Display the report--
      PERFORM f003-display_register.
    *&      Form  F001-GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM f001-get_data .
    Clear and Refresh all internal table and work area.
      REFRESH : it_ekko,
                it_ekbe,
                it_services,
                it_packno,
                it_konv,
                it_lfa1,
                it_komv.
      CLEAR   : wa_ekko,
                wa_ekbe,
                wa_services,
                wa_packno,
                wa_konv,
                wa_lfa1,
                wa_komv.
    Get the history records for all the selected PO. from table EKBE of
    type GR.
        IF pr_preg = 'X'.
    *Get Purchasing Document Number, Number of the document condition,
    *Vendor's accountNumber, Currency Key, Procedure , Country for Tax
    *ReturnPurchasing OrganizationExchange rate In an internal table it_ekko
    *break-point.
      SELECT pBSART qknttp pebeln pknumv plifnr pwaers pkalsm plands pekorg pwkurs
         wkurs pbedat  qebelp qbukrs qmatkl qmtart pllief qmeins qbprme
         qtxjcd qmwskz pwkurs qnetpr qmenge QPEINH
        INTO CORRESPONDING FIELDS OF TABLE it_ekko
        FROM   ekko AS p INNER JOIN ekpo AS q
               ON pebeln = qebeln
        WHERE   p~ekorg in pr_ekorg
                AND p~lifnr IN so_lifnr
            AND q~mtart IN so_mtart
                AND p~ebeln IN so_ebeln
                and p~bedat in do_date
                and q~mwskz in tax_code
                and q~matkl in mat_gr
                and q~mtart in mat_tp
                and kalsm = 'SIL000'
                AND EKORG = 'SDOP'.
           GET ALL THE PO FOR WHICH MIRO HAS BEEN DONE
      SELECT ebeln ebelp budat bldat werks
        INTO CORRESPONDING FIELDS OF TABLE it_ekbe1
        FROM ekbe
        FOR ALL ENTRIES IN it_ekko
        WHERE ebeln = it_ekko-ebeln
           AND ebelp = it_ekko-ebelp
           AND bewtp = 'Q'
           AND  werks in pr_plant
          AND budat IN so_date
          AND ( bwart = '101' OR bwart = '102'  ) "OR bwart = '105' OR bwart = '106' OR bwart ='')
           AND ebeln IN so_ebeln
           and budat in mr_date
           AND matnr IN so_matnr.
          AND ( BUDAT >= SO_DATE-low and BUDAT <= SO_DATE-high ).
    Check whether any records is present
      IF sy-subrc = 0.
          IF NOT it_ekbe1 IS INITIAL.
            SELECT ebeln ebelp buzei belnr budat xblnr werks matnr menge
                   dmbtr waers wrbtr bwtar shkzg dmbtr bldat srvpos
                   packno introw lfbnr bwart
                INTO CORRESPONDING FIELDS OF TABLE it_ekbe
                FROM  ekbe
                FOR ALL ENTRIES IN it_ekbe1
                WHERE      ebeln = it_ekbe1-ebeln
                        AND  ebelp = it_ekbe1-ebelp
                        and budat in mr_date
                       AND budat IN so_date
                 and  ( BUDAT >= SO_DATE-low and BUDAT <= SO_DATE-high )
                      AND  bewtp = 'Q'.
                    AND ( bwart = '101' OR bwart = '102' OR bwart = '103' OR bwart = '105' ). "OR bwart = '105' OR bwart = '106' OR bwart ='').
                     AND  bwart = '103'.
                 and  WERKS = PR_PLANT.
            IF sy-subrc = 0.
            ENDIF.
          ELSE.
            SELECT ebeln ebelp buzei belnr budat xblnr werks matnr menge
                  dmbtr waers wrbtr bwtar shkzg dmbtr bldat srvpos
                  packno introw lfbnr bwart
               INTO CORRESPONDING FIELDS OF TABLE it_ekbe
               FROM  ekbe
               FOR ALL ENTRIES IN it_ekbe1
               WHERE      ebeln = it_ekbe1-ebeln
                       AND  ebelp = it_ekbe1-ebelp
                       and budat in mr_date
                     AND budat IN so_date
                 and ( BUDAT >= SO_DATE-low and BUDAT <= SO_DATE-high )
                     AND  bewtp = 'Q'.
                    AND ( bwart = '101' OR bwart = '102' OR bwart = '103' OR bwart = '105' ) . "OR bwart = '105' OR bwart = '106' OR bwart ='').
                    AND  bwart = '102'.
                 and  WERKS = PR_PLANT.
            IF sy-subrc = 0.
            ENDIF.
            ENDIF.
        ENDIF.
    new code added
    *get the venor address
         select alifnr bname1 bpstlz bstras b~lifnr
         into corresponding fields of table it_LFA1
         from ekko as a inner join lfa1 as b
         on alifnr = blifnr
         for all entries in it_EKKO
         where  B~lifnr = it_EKKO-lifnr.
    ***tax code description added*******************
    select mwskz text1 spras kalsm
    from t007s
    into corresponding fields of table it_t007s for all entries in it_ekko
    where mwskz = it_ekko-mwskz and spras = 'E' and kalsm = 'TAXSIL'.
    *******vendor vat no. added*************
    select lifnr j_1icstno
    from j_1imovend
    into corresponding fields of table it_j_1imovend for all entries in it_ekko
    where lifnr = it_ekko-lifnr.
    **********gl code added******************************************
    *select lifnr shkzg dmbtr hkont
    *from bseg
    *into corresponding fields of table it_bseg for all entries in it_lfa1  " it_ekko
    *where  LIFNR = it_lfa1-LIFNR and shkzg = 'S'.
    *************gl code description added*******************************************
    *select saknr ktoks mcod1 sakan
    *from ska1
    *into corresponding fields of table it_ska1 for all entries in it_bseg
    *where sakan = it_bseg-hkont and ktoks = 'MAT'.
    Get the package number , service number , service text , net price ,
    accual amount , qty. etc
        IF NOT it_packno[] IS INITIAL.
          SELECT ppackno psrvpos pktext1 pnetwr pact_wert pmenge
              INTO CORRESPONDING FIELDS OF TABLE it_services
              FROM esll  AS p "inner join ESLL as Q
               on      PPLN_PACKNO = QPACKNO
                  and  PINTROW = QINTROW
              FOR ALL ENTRIES IN it_packno
              WHERE p~packno = it_packno-sub_packno.
          IF sy-subrc = 0.
          ENDIF.
        ENDIF.
    Get Number of the document condition ,line item number, Condition
    value for all selected PO.
        IF NOT it_ekko[] IS INITIAL.
          SELECT  knumv kposn kschl kwert
              INTO CORRESPONDING FIELDS OF TABLE it_konv
              FROM konv
              FOR ALL ENTRIES IN it_ekko
              WHERE  knumv = it_ekko-knumv.
          IF sy-subrc = 0.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " F001-GET_DATA
    *&      Form  F002-CAL_TAXES
          text
    -->  p1        text
    <--  p2        text
    FORM f002-cal_taxes .
    Calculate taxes for all the PO.
      LOOP AT it_ekbe INTO wa_ekbe.
        CLEAR :  wa_display,
                 wa_ekko.
        READ TABLE it_ekko WITH TABLE KEY ebeln = wa_ekbe-ebeln
                                          ebelp = wa_ekbe-ebelp
                                          INTO wa_ekko.
        IF sy-subrc = 0.
        ENDIF.
        CLEAR wa_taxcom.
    Get the text for the Material.
        SELECT SINGLE maktx
          INTO wa_display-maktx
          FROM  makt
          WHERE     matnr = wa_ekbe-matnr
                AND spras = sy-langu.
        wa_taxcom-bukrs = wa_ekko-bukrs.
        wa_taxcom-budat = wa_ekbe-bldat.
        wa_taxcom-budat = wa_ekko-bedat." change by dinesh
        wa_taxcom-waers = wa_ekbe-waers.
        wa_taxcom-kposn = wa_ekbe-ebelp.
        wa_taxcom-mwskz = wa_ekko-mwskz.
        wa_taxcom-txjcd = wa_ekko-txjcd.
       taxcom-shkzg = 'H'.
        wa_taxcom-xmwst = 'X'.
       IF ekko-bstyp EQ bstyp-best.
        wa_taxcom-wrbtr = wa_ekko-netpr * wa_ekbe-menge * wa_ekko-wkurs.
         WA_TAXCOM-WRBTR = wa_ekbe-dmbtr.
       ELSE.
         taxcom-wrbtr = ekpo-zwert.
       ENDIF.
        wa_taxcom-lifnr = wa_ekko-lifnr.
        wa_taxcom-land1 = wa_ekko-lands.                              "WIA
        wa_taxcom-ekorg = wa_ekko-ekorg.
        wa_taxcom-hwaer = 'INR'.    "t001-waers.
        wa_taxcom-llief = wa_ekko-llief.
        wa_taxcom-bldat = wa_ekbe-bldat.
        wa_taxcom-matnr = wa_ekbe-matnr.         "HTN-Abwicklung
        wa_taxcom-werks = wa_ekbe-werks.          "pr_plant.
          taxcom-bwtar = ekpo-bwtar.
        wa_taxcom-matkl = wa_ekko-matkl.
        wa_taxcom-meins = wa_ekko-meins.
        wa_taxcom-ebeln = wa_ekbe-ebeln.
        wa_taxcom-ebelp = wa_ekbe-ebelp.
        wa_taxcom-mglme = wa_ekbe-menge.
        wa_taxcom-mtart = wa_ekko-mtart.
    *Call function module CALCULATE_TAX_ITEM--
        CALL FUNCTION 'CALCULATE_TAX_ITEM'
          EXPORTING
            i_taxcom     = wa_taxcom
            display_only = 'X'
           dialog       = diakz
          IMPORTING
            e_taxcom     = wa_taxcom
           nav_anteil   = hwert
          TABLES
            t_xkomv = it_komv
          EXCEPTIONS
            OTHERS       = 01.
        IF sy-subrc = 0.
        ENDIF.
        wa_display-bsart = wa_ekko-bsart.
        wa_display-knttp = wa_ekko-knttp.
        wa_display-bprme = wa_ekko-bprme.
        wa_display-meins = wa_ekko-meins.
        wa_display-lifnr = wa_ekko-lifnr.
        wa_display-ebeln = wa_ekbe-ebeln.
        wa_display-bedat = wa_ekko-bedat.
        wa_display-bwart = wa_ekbe-bwart.
        wa_display-budat = wa_ekbe-budat.
        wa_display-matnr = wa_ekbe-matnr.
        wa_display-belnr = wa_ekbe-belnr.
        wa_display-menge = wa_ekbe-menge.
        wa_display-PEINH = wa_ekko-PEINH.
        wa_display-dmbtr = ( wa_ekko-netpr * wa_ekbe-menge * wa_ekko-wkurs ) / wa_ekko-PEINH.
      WA_DISPLAY-DMBTR = WA_EKBE-DMBTR.
        wa_display-srvpos = wa_ekbe-srvpos.
        wa_display-mwskz = wa_EKKO-mwskz.
        wa_display-WAERS = wa_EKKO-WAERS.
    read table it_lfa1 into wa_lfa1 with key lifnr = wa_ekko-lifnr.
    wa_display-name1 = wa_lfa1-name1.
    wa_display-pstlz = wa_lfa1-pstlz.
    wa_display-stras = wa_lfa1-stras.
    read table it_t007s into wa_t007s with key mwskz = wa_ekko-mwskz.
    wa_display-text1 = wa_t007s-text1.
    read table it_j_1imovend into wa_j_1imovend with key lifnr = wa_ekko-lifnr.
    wa_display-j_1icstno = wa_j_1imovend-j_1icstno.
    read table it_bseg into wa_bseg with key LIFNR = wa_lfa1-lifnr.  " wa_ekKO-LIFNR .
    wa_display-HKONT = wa_bseg-HKONT.
    *read table it_ska1 into wa_ska1 with key sakan = wa_bseg-hkont.
    *wa_display-mcod1 = wa_ska1-mcod1.
        READ TABLE it_komv WITH KEY kschl = 'JCDB'
                                    kposn = wa_ekko-ebelp
                                    INTO wa_komv.
        IF sy-subrc = 0.
          wa_display-custduty = wa_komv-kwert .
        ELSE.
          READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
                                                   kposn = wa_ekko-ebelp
                                                   kschl = 'JCDB'.
          IF  wa_ekko-menge <> 0.
            wa_display-custduty = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
          ENDIF.
        ENDIF.
    Get the BED OR EXCISE DUTY
         CLEAR :  wa_komv , wa_konv.
        READ TABLE it_komv WITH KEY kschl = 'JMOP'
                                    kposn = wa_ekko-ebelp
                                    INTO wa_komv.
        IF sy-subrc = 0 .
          wa_display-BED = wa_komv-kwert .
        ELSE.
          READ TABLE it_komv WITH KEY kschl = 'JMOQ'
                                      kposn = wa_ekko-ebelp
                                      INTO wa_komv.
          IF sy-subrc = 0.
            wa_display-BED = wa_komv-kwert .
          ELSE.
            READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
                                                  kposn = wa_ekko-ebelp
                                                  kschl = 'JMOP'.
            IF sy-subrc = 0.
              IF  wa_ekko-menge <> 0.
                wa_display-BED  = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
              ENDIF.
            ELSE.
              READ TABLE it_konv INTO wa_konv WITH KEY
                                                 knumv =  wa_ekko-knumv
                                                 kposn = wa_ekko-ebelp
                                                 kschl = 'JMOQ'.
              IF  wa_ekko-menge <> 0.
                wa_display-BED  = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    ******END OF EXCISE DUTY AND THE BED******************************************************
    Get the  EDUCATION CESS
        CLEAR :  wa_komv , wa_konv.
        READ TABLE it_komv WITH KEY kschl = 'JEC1'
                                    kposn = wa_ekko-ebelp
                                    INTO wa_komv.
        IF sy-subrc = 0 .
          wa_display-educess = wa_komv-kwert .
        ELSE.
          READ TABLE it_komv WITH KEY kschl = 'JESQ'
                                      kposn = wa_ekko-ebelp
                                      INTO wa_komv.
          IF sy-subrc = 0.
            wa_display-educess = wa_komv-kwert .
          ELSE.
            READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
                                                  kposn = wa_ekko-ebelp
                                                  kschl = 'JEC1'.
            IF sy-subrc = 0.
              IF  wa_ekko-menge <> 0.
                wa_display-educess  = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
              ENDIF.
            ELSE.
              READ TABLE it_konv INTO wa_konv WITH KEY
                                                 knumv =  wa_ekko-knumv
                                                 kposn = wa_ekko-ebelp
                                                 kschl = 'JESQ'.
              IF  wa_ekko-menge <> 0.
                wa_display-educess  = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    *END OF EDUCATION CESS
    Get the SERVICE TAX
        clear : WA_KOMV , WA_KONV.
        read table IT_KOMV with key KSCHL = 'JSRT'
                                    KPOSN = WA_EKKO-EBELP
                                    into WA_KOMV.
        if SY-SUBRC = 0.
          WA_DISPLAY-SERTAX  = WA_KOMV-KWERT .
        else.
          read table IT_KONV into WA_KONV with key KNUMV = WA_EKKO-KNUMV
                                                   KPOSN = WA_EKKO-EBELP
                                                   KSCHL = 'JSRT'.
          WA_DISPLAY-SERTAX  = WA_KONV-KWERT * wa_ekko-WKURS.
        endif.
    END OF SERVICE TAX****************************************
    Get the  EDUCATION CESS ON SERVICE TAX************************
        clear : WA_KOMV , WA_KONV.
        read table IT_KOMV with key KSCHL = 'JEC5'
                                    KPOSN = WA_EKKO-EBELP
                                    into WA_KOMV.
        if SY-SUBRC = 0.
          WA_DISPLAY-SEREDUCESS  = WA_KOMV-KWERT .
        else.
          read table IT_KONV into WA_KONV with key KNUMV = WA_EKKO-KNUMV
                                                   KPOSN = WA_EKKO-EBELP
                                                   KSCHL = 'JEC5'.
          WA_DISPLAY-SEREDUCESS  = WA_KONV-KWERT * wa_ekko-WKURS.
        endif.
    ******END OF SERVICE TAX ON EDUCATION CESS************************************************
    Get the CVD
        CLEAR : wa_komv , wa_konv.
        READ TABLE it_komv WITH KEY kschl = 'JCV1'
                                    kposn = wa_ekko-ebelp
                                    INTO wa_komv.
        IF sy-subrc = 0.
          wa_display-cvd  = wa_komv-kwert .
        ELSE.
          READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
                                                   kposn = wa_ekko-ebelp
                                                   kschl = 'JCV1'.
          IF  wa_ekko-menge <> 0.
            wa_display-cvd  = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
          ENDIF.
        ENDIF.
    Get the total INSURANCE
        CLEAR : wa_komv , wa_konv.
        READ TABLE it_komv WITH KEY kschl = 'ZIN1'
                                    kposn = wa_ekko-ebelp
                                    INTO wa_komv.
        IF sy-subrc = 0 .
          wa_display-insure = wa_komv-kwert .
        ELSE.
          READ TABLE it_komv WITH KEY kschl = 'ZIN2'
                                      kposn = wa_ekko-ebelp
                                      INTO wa_komv.
          IF sy-subrc = 0.
            wa_display-insure = wa_komv-kwert .
          ELSE.
            READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
                                                  kposn = wa_ekko-ebelp
                                                  kschl = 'ZIN1'.
            IF sy-subrc = 0.
              IF  wa_ekko-menge <> 0.
                wa_display-insure  = ( wa_ekbe-menge / wa_ekko-menge
                                            ) * wa_konv-kwert * wa_ekko-wkurs.
              ENDIF.
            ELSE.
              READ TABLE it_konv INTO wa_konv WITH KEY
                                     

    Hi Ingo,
    Thanks for the reply. But let me rephrase my question.  In the Bex we get a extra row called overall result in the result set which gives the correct  count/total/average based on exception aggregation.  The question is how we show the overall result row in the crystal or rather how can we map it into crystal.  So i thought as of now we should create a formula to compute the overall result and display it.
    Hope I am clear this time in asking the right question.
    Many many thanks in advance for your reply.
    Kind regards,
    Shiva.

  • Getting the error LOG file opened at 01/29/07 18:13:12 while selecting from

    I am getting following error in log file while selecting from a external table
    LOG file opened at 01/29/07 18:13:12
    KUP-04040: file test.csv in UTL not found. I am follwoing the following steps:
    connect as sys user :
    CREATE OR REPLACE DIRECTORY UTL as 'D:\oracle\product\10.1.0';
    GRANT READ,write ON DIRECTORY UTL TO user1;
    connect as user1
    drop table test;
    create table test (EQP_N_EQUIPMETID_PK number(10) ,
    EQPNAME varchar2(100),
    EQPDESCR varchar2(1000),
    COSSEC varchar2(10),
    ETSCES varchar2(10),
    CATPARTNO varchar(1000),
    EQUIPMETID_FK number(10),
    EQPTYPEMASTERID_FK number(10),
    SECTIONID_FK number(10),
    MEAUNITID_FK number(10),
    CREATEDBY number(10),
    MODIFIEDBY number(10),
    LASTUPDATED varchar2(20),
    SHUFFLING varchar2(50))
    ORGANIZATION EXTERNAL
    (TYPE oracle_loader
    DEFAULT DIRECTORY utl
    ACCESS PARAMETERS (FIELDS TERMINATED BY ',')
    LOCATION ('test.csv'))
    REJECT LIMIT UNLIMITED
    On issuing select count(*) from test gives following error:
    SQL> select count(*) from test;
    select count(*) from test
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file test.csv in UTL not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    All these steps I have tried on the oracle server as well as on the client m/c.
    Is there any step that I am missing out???

    hi,
    SQL> edit c:\oracle\product\10.1.0\test.csv
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> create or replace directory UTL  as 'c:\oracle\product\10.1.0';
    Directory created.
    SQL> grant read,write on directory UTL to scott;
    Grant succeeded.
    SQL> create table scott.test ( no number(10),
      2                           name varchar2(20))
      3  organization external
      4                   ( type oracle_loader
      5                     default directory UTL
      6                     access parameters
                           ( fields terminated by ',')
      7  location
                           ('test.csv'))
      8  reject limit unlimited;
    Table created.
    SQL> select count(*) from scott.test;
      COUNT(*)
             1
    SQL> select * from scott.test;
            NO NAME
             1 test
    SQL>it is working for me. again check your file location.
    regards
    Taj
    Message was edited by:
    M. Taj

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • I cannot determine how to utilize the voice function while in the fitness workout area. On rare occasions it works with a voice summary of my workout and a new summary screen. would appreciate help

    I cannot determine how to utilize the voice function while in the fitness mode. On one or two occassions it worked but I do not know how it was activated. It gives a voice summary and new summary screen for the workout.

    Hi shiva
    Thanks for your help,
    Can you check this coding and revert me back ASAP Please.
    REPORT BDS_GOS_CONNECTION.
    DATA : logical_system LIKE BAPIBDS01-log_system.
           CLASSNAME LIKE BAPIBDS01-CLASSNAME
           OBJKEY LIKE SWOTOBJID-objkey.
    PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
                pa_class like BPIBDS01-CLASSNAME,
                pa_objkey like swotobjidobjkey.
    AT SELECTION-SCREEN.
    CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
             EXPORTING
                  bor_id             = bor_id
             IMPORTING
                  logical_sytem      = pa_lo_sys.
                  classname          = pa_class.
                  objkey            = pa_objkey.
             EXCEPTIONS
                  no_objects_found     = 1
                  internal_error       = 2
                  internal_gos_error   = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    clear v_attno1.
    i_object1-typeid = 'BUS2012'.
    i_object1-catid  = 'BO'.
    i_object1-instid = i_yItem-docno.
    call method cl_gos_attachment_query=>count_for_object
       exporting
        is_object = i_object1
        ip_arl    = space
       receiving
        rt_stat   = i_stat1.
    read table i_stat1 into wa_stat1 index 1.
    if sy-subrc eq c_0.
        move wa_stat1-counter to v_attno1.
    endif.             
    CALL METHOD cl_gos_attachment_query=>count_for_object
    EXPORTING
    is_object = object
    ip_arl =    space
    RECEIVING
    rt_stat = lt_stat.
    READ TABLE lt_stat INDEX 1 into ls_stat.
    count = ls_stat-counter.
    *The object has to be a concatenation of your document, like this:
    CONCATENATE object-instid tab-gjahr INTO object-instid.
    ELSE.
    CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
    object-instid.
    ENDIF.

  • How to find the number of fetched lines from select statement

    Hi Experts,
    Can you tell me how to find the number of fetched lines from select statements..
    and one more thing is can you tell me how to check the written select statement or written statement is correct or not????
    Thanks in advance
    santosh

    Hi,
    Look for the system field SY_TABIX. That will contain the number of records which have been put into an internal table through a select statement.
    For ex:
    data: itab type mara occurs 0 with header line.
    Select * from mara into table itab.
    Write: Sy-tabix.
    This will give you the number of entries that has been selected.
    I am not sure what you mean by the second question. If you can let me know what you need then we might have a solution.
    Hope this helps,
    Sudhi
    Message was edited by:
            Sudhindra Chandrashekar

  • How to Improve the performance in Variable Selection Screen.

    Hi,
    In Query Level we have Variable " User entry Defalt Valu". User want select particular value when he press "F4" it's take hours time how to improve the performance in Varaible Selection Screen.
    Thanks in Advance.
    Regards,
    Venkat.

    Dear Venkat.
    You please try the following steps:
    1. Say the InfoObject is 0EMPLOYEE against which you have created the variable, which user is trying to select value against, when they execute the report.
    2. Goto RSA1-> InfoObject tab-> Select InfoObject 0EMPLOYEE.
    3. Selcet the following options:
       Query Execution Filter Val. Selectn  -  'Only Posted Value for Navigation'
       Filter Value Repr. At Query Exec. -      'Selector Box Without Values'
    Please let me know if there is any more issue. Feel free to raise further concern
    Thnx,
    Sukdev K

  • How to get the reverse color of a color

    how to get the reverse color of a color
    thanks

    int red = Math.abs(255 - oldColor.getRed());
    int green = Math.abs(255 - oldColor.getGreen());
    int blue = Math.abs(255 - oldColor.getBlue());
    java.awt.Color inverseColor = new java.awt.Color(red, green, blue);
    Where oldColor is a java.awt.Color object.
    Hope this is want u need !!!

  • Does Delete Overlapping Requests drop the BIA index like Selective deletion

    Hi,
    Does Delete Overlapping Requests process in a chain drop the Accelerator index like Selective Deletion does?

    Hi,
    No is does not.
    -Vikram

  • How to specify the target name while deploying a code in OSB-- Plz Help

    Hi all,
    Am working in creating a cluster environment. For my testing i created a new managed server(OSB_Server) in 9001 port in the admin console itself and that server started running. The default managed server(Admin_Server) is in 7001 port. So when i deploy a code in 7001 sb console the WSDL gets exposed in 7001 because the default admin server port is 7001. While deploying a code in service bus admin console we are not specifying the target name. So how to specify the target name while deploying the code in service bus admin console. Plz help me.
    Regards
    Prabhu

    Hi Prabhu,
    There are three kind of server architecture possible for OSB -
    1. Single server - Everything gets deployed on Admin server itself
    2. Admin Server + Single Managed Server for OSB -- OSB configuration gets deployed on OSB managed server. OSB resources (proxy service, WSDL, Schema) will remain available on OSB managed server port only and NOT on admin server port
    3. Admin Server + OSB cluster -- OSB configuration gets deployed on OSB cluster. OSB resources (proxy service, WSDL, Schema) will remain available on OSB Cluster port(s) only and NOT on admin server port
    Converting one type of server architecture to any other type, requires a manual tedious process, so it is suggested that you create domain accordingly i.e. if you need clusters then while creating domain itself, create OSB cluster, so that all OSB applications gets deployed to OSB cluster. I will suggest you to create a clustered domain from scratch and import the configuration from your existing domian to this new clustered domain.
    You may refer-
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15022/toc.htm
    Regards,
    Anuj

  • How to drop the datafile in a tablespace

    hi,
    I need to drop the datafile in a tablespace.How to drop the datafile in the tablespace.If iam able to drop the datafile and is it possible to create the datafiles with the same name.could u pls help me out..
    Thanks in advance,
    R.Ratheesh

    sql > alter database <datafile> offline drop ;
    sql > alter database open ;What if the datafile have the segments in it, I believe users will not be able to access them. And system will put the datafile to Recovry mode not drop it.
    Dropping a datafle is possible only in 10G. In 9i you can reduce the size of file below the size of your min extents so that the space wont be allocated from that datafile or you may need to recreate a new tablespace copy all the segments from old tablespace and drop old one.
    Cheers

  • How to handle the table control While working with LSMW?

    How to handle the table control While working with LSMW?

    its possible in lsmw,
    Hi,
    LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
    check that single charecter field, it that is X that means the header record is processed, and do the items.
    and, this is another way, try this out also
    YOu can do this in "Define Source Structures" step,
    the HEADER is defined first,
    then the DETAIL below the HEADER.
    add the fields to the structures.
    Both should have some common key field
    Please take care that the name of the common field is the same.
    Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
    Thanks

  • How to fix the delay problem while recording? Can't set the Latency to 0. Win7, CS6,Realtek,C03u Mic

    I am using Win7, with CS6, Realtek soundcard and Samson C03U microphone.
    There is a problem that's really been bothering me. When I record songs the recorded audio always comes 0.1 seconds after where it's supposed to be and I need to fix the problem every time. How to fix the delay problem while recording? I can't set the Latency to zero. The minimum is 30ms and I still get an obvious delay.
    I saw some previous discussions saying that installing ASIO would help. Is it gonna work on my PC?
    Thank you in advance guys.

    You probably should look at a more 'serious' audio interface rather than the Realtek
    Yes ASIO drivers are the way to go
    If you want zero latency you need to monitor via your audio hardware (hence the 'serious' audio interface suggestion)
    There are a heap of reasonable audio interfaces which will do the job for you that are pretty inexpensive and I'm sure that someone will jump in with a suggestion

Maybe you are looking for

  • Pismo CPU upgrades/heat sink

    Does anyone know if the 400 mhz heatsink and 500 mhz heatsink are interchangeable? PowerMac G4 MDD 1.25 Ghz, PowerBook G3 Pismo 400, Newton 2100, iPod Photo 30 gb   Mac OS X (10.3.9)  

  • Population in MS Word

    I have two forms. From form1 i am passing the parameters on form2 i want to display those parameters in word file based on some conditions. How can i do that?

  • Print Screen in Vista

    MacBook Pro keyboard. Doing the key combination in the Bootcamp manual just maximizes the windows. I had to connect an external PC keyboard to do a print screen. How can I do this from the MacBook Pro keyboard?

  • AppBuilder:create oData service

    Hi I have an error when I am trying to create a new odata service in appbuilder. As you can see below I enter the name of my database in the field of name and in the field of URL I put the URL that appears when I click on "open service document" in G

  • [SOLVED] Problem with installing wireless driver (Boradcom)

    Hi! I am trying to install the driver for my wireless card: Broadcom Corporation NetLink BCM5787M Gigabit Ethernet PCI Express (rev 02). And I found this driver: www.broadcom.com/support/ethernet_nic/netlink.php, and I'm trying to follow the instruct