How to use cl_gui_alv_grid to print an alv?

Hi,
How to use the class 'cl_gui_alv_grid' to ?
thnx in advance

Hi,
Check out standard examples in SAP by passing BCALV* & pressing F4 in SE38.
Regards,
Amit
Reward all helpful answers.

Similar Messages

  • How to use pf-status u2018menuu2019  in ALV report ?

    Hi Friends,
    How to use pf-status u2018menuu2019  in ALV report ?
    I want to use back button ( F3). whenever press it should show
    another report.
    I used  subroutine
    form SUB_ERROR_OUTPUT USING RT_EXTAB TYPE SLIS_T_EXTAB .
    SET PF-STATUS 'ZMENU' EXCLUDING RT_EXTAB.  u201C( the button name is u201C back u201C)
    CASE SY-UCOMM.
    *WHEN '&F03'.
    WHEN 'BACK'
    ( my coding is there ).
    endcase.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PF_STATUS_SET          = 'SUB_ERROR_OUTPUT'
    but it is  executing, working the back button but not showing another report .
    any other procedure to use back button in alv report ?
    plz any idea .
    For correct answer  reword most.
    Thanking you.

    Purchase day Book .
    Data to be down loaded / printed for EDP dept. CGL.
    CGL - Requirement .
    WRITTEN  BY : ADI.****
    *CONSULTANT : SANJAY JAJOO..
    AS PER DP REQUIREMENT.
    -CHANGED BY    :    KRISHNA MOHAN  (15/01/2002)--
    -CHANGE REQ BY :    JAJU S--
    -DESCRIPTION   :    SUMMRY BY TAX CODE WISE & GL CODE WISE--
    ---MODIFIED LINES: -
    ---CHANGED BY    :    -
    ---CHANGE REQ BY :    -
    ---DESCRIPTION   :    -
    ---MODIFIED LINES: -
    *---changed by    :    sanjay jajoo on 23/08
    *---changed req by:    Ranka
    *---Description   :    Inserting Range of period as sel field
      changed by    :    krishna mohan
      func. consultant:  sanjay jajoo
    REPORT ZMMPURDB MESSAGE-ID 00
                    LINE-SIZE 255
                    LINE-COUNT 60
                    NO STANDARD PAGE HEADING .
    TABLES :   MKPF   ,  MSEG  ,SKAT,
               EKKO   ,  EKPO  , EKBE ,
               BSEG   ,  BKPF  , BSET ,
               T009B  ,  T001  , T007S ,
               T001W  ,  T001K ,LFA1.
    ******Table deactivated on 30/8/2000------jaju
    *tables : zcgltaxatn .
    DATA  : ZFILE1(65) VALUE '/DOWNLOAD/'.
    DATA  : ZFILE2(65) .
    DATA  : ZFILE(30) TYPE C VALUE '/DOWNLOAD/'.
    DATA   : ZMON(2).
    DATA : ZTOTAL(11) TYPE N.
    DATA: ZTOT1 TYPE P DECIMALS 2.
    DATA: ZTXT LIKE SKAT-TXT50.
    TYPES: BEGIN OF COMPANY ,
    HKONT LIKE BSEG-HKONT,
    TOTAL LIKE BSEG-DMBTR,
    END OF COMPANY.
    DATA: COMP TYPE COMPANY,
          COMPTAB TYPE HASHED TABLE OF COMPANY WITH UNIQUE KEY HKONT
          WITH HEADER LINE.
    DATA : NEXT LIKE BSEG-BUZEI.           "A.A. (28/03/2000)
    DATA : DOC LIKE BSEG-BELNR.            "A.A. (28/03/2000)
    DATA  S_GSBER.
    DATA: CTR TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-B01.
    PARAMETERS : T_BUKRS LIKE T001-BUKRS OBLIGATORY MEMORY ID BUK .
    ***********CH--ID- ADI- 29 / 09 / 1999
    SELECT-OPTIONS : ZGL FOR BSEG-HKONT OBLIGATORY.
    ***********CH--ID- ADI- 29 / 09 / 1999
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(9) TEXT-C01 .
    PARAMETERS : POPER RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN COMMENT 13(7) TEXT-C02 .
    PARAMETERS : MONTH RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN COMMENT 23(8) TEXT-C03 .
    SELECTION-SCREEN POSITION 33 .
    commented on 22/08 sanjay jajoo
    *PARAMETERS :  T_MONAT LIKE BKPF-MONAT .
    SELECTION-SCREEN END OF LINE.
    PARAMETERS : T_GJAHR LIKE BKPF-GJAHR OBLIGATORY .
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS : S_DOCTYP FOR BKPF-BLART,
                     S_VENDOR FOR LFA1-LIFNR  MATCHCODE  OBJECT KRED,
                     S_MATNR FOR BSEG-MATNR NO-DISPLAY,
                    T_BUDAT FOR MKPF-BUDAT NO-EXTENSION MODIF ID DAT,
                    p_gsber FOR bseg-gsber  OBLIGATORY,
                     P_GSBER FOR BSEG-GSBER,
    mod starts for inserting range of period - sanjay jajoo
                     T_MONAT FOR BKPF-MONAT OBLIGATORY.
    mod ends
    *SELECT-OPTIONS: br_blart FOR mkpf-blart.
    *Select-options:  br_blart for bkpf-blart.
    SELECTION-SCREEN END OF BLOCK B1 .
    Start of Delete by B.Elan on 23/12/2005
    *PARAMETERS : errors AS CHECKBOX .
    *PARAMETERS : summary AS CHECKBOX .
    *PARAMETERS : nodetail AS CHECKBOX .
    **selection-screen skip 2.
    *SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-b03.   "<<<
    *Add
    *PARAMETER : stax_reg RADIOBUTTON GROUP rad2 .                   "<<<
    *Add
    *PARAMETER : pur_db RADIOBUTTON GROUP rad2 .                     "<<<
    *Add
    *SELECTION-SCREEN END OF BLOCK b3 .     "<<< Add
    *SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
    *PARAMETERS : display RADIOBUTTON GROUP grp1 ,
                dload RADIOBUTTON GROUP grp1.
    *PARAMETERS : fname1 LIKE rlgrap-filename .
    *DATA : zdoc LIKE bseg-belnr.
    *DATA : fname LIKE rlgrap-filename.
    *SELECTION-SCREEN END OF BLOCK b2 .
    End of Delete by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETER : PUR_DB RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C06.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETERS : MAT_SM RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C04.
    SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
    PARAMETERS : VEN_SM RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 44(20) TEXT-C05.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) TEXT-C01.
    PARAMETERS : MAT_DT RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 10(25) TEXT-C07.
    SELECTION-SCREEN COMMENT 35(5) TEXT-C01.
    PARAMETERS : VEN_DT RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 44(20) TEXT-C08.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    End of Insert by B.Elan on 23/12/2005
    Hard coded values used in the program
    added by krishna mohan on 09/02/02
    DATA : BEGIN OF IT_MSEG OCCURS 0,
            BELNR LIKE BSEG-BELNR,
            MBLNR LIKE MSEG-MBLNR,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
          END OF IT_MSEG.
    mod ends
    Start of Insert by B.Elan on 23/12/2005
    *--vikky
    DATA : BEGIN OF IT_FINAL OCCURS 0,
             MATNR LIKE MARA-MATNR,
             BLART LIKE BKPF-BLART,         "  doctype
             BELNR LIKE BSEG-BELNR,         "sr - nO  10
             XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
             NAME1_VENDOR(25),
             "lfa1-name1,   " Vendor Name 35
             HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
             MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
             BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
             DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
             PON    LIKE EKKO-EBELN ,                           " PON 10
             MAKTX LIKE MAKT-MAKTX,         "Material text 40
             MBLNR LIKE MSEG-MBLNR,
             QTY(8) TYPE P DECIMALS 2  ,                        "Qty 11
             RATE(9) TYPE P DECIMALS 2  ,                       "Rate11
             DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
             PROD-AMT(9) TYPE P DECIMALS 2,
                                                                "AMOUNT 13
             EXCISE(8) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
             SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
             FREIGHT(9) TYPE P DECIMALS 2,   "FREIGHT     11
             OTHERS(11) TYPE P DECIMALS 2,    " OTHERS     11
             TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           END OF IT_FINAL.
    *DATA : BEGIN OF IT_FINAL OCCURS 0,
            MATNR LIKE MARA-MATNR,
            BLART LIKE BKPF-BLART,         "  doctype
            BELNR LIKE BSEG-BELNR,         "sr - nO  10
            XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
            NAME1_VENDOR(25),
            "lfa1-name1,   " Vendor Name 35
            HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
            MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
            BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
            DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
            PON    LIKE EKKO-EBELN ,                           " PON  10
            MAKTX LIKE MAKT-MAKTX,         "Material text 40
            MBLNR LIKE MSEG-MBLNR,
            QTY(13) TYPE P DECIMALS 2  ,                       "Qty 11
            RATE(13) TYPE P DECIMALS 2  ,                      "Rate 11
            DISCOUNT(13) TYPE P DECIMALS 2,  "DISCOUNT 11
            PROD-AMT(13) TYPE P DECIMALS 2,
                                                               "AMOUNT 13
            EXCISE(13) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
            SALES(13) TYPE P DECIMALS 2 ,    "SALES TAX   11
            FREIGHT(13) TYPE P DECIMALS 2,   "FREIGHT     11
            OTHERS(13) TYPE P DECIMALS 2,    " OTHERS     11
            TOTAL(13) TYPE P DECIMALS 2,     "TOTAL       17
          END OF IT_FINAL.
    *--vikky
    DATA : BEGIN OF IT_FINAL_VN OCCURS 0,
               NAME1_VENDOR(25),
               "lfa1-name1,   " Vendor Name 35
               MATNR LIKE MARA-MATNR,
               BLART LIKE BKPF-BLART,         "  doctype
               BELNR LIKE BSEG-BELNR,         "sr - nO  10
               XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
               HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
               MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
               BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
               DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
               PON    LIKE EKKO-EBELN ,                         " PON  10
               MAKTX LIKE MAKT-MAKTX,         "Material text 40
               MBLNR LIKE MSEG-MBLNR,
               QTY(8) TYPE P DECIMALS 2  ,                      "Qty 11
               RATE(9) TYPE P DECIMALS 2  ,                     "Rate 11
               DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
               PROD-AMT(9) TYPE P DECIMALS 2,
                                                                "AMOUNT 13
               EXCISE(5) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
               SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
               FREIGHT(5) TYPE P DECIMALS 2,   "FREIGHT     11
               OTHERS(9) TYPE P DECIMALS 2,    " OTHERS     11
               TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           END OF IT_FINAL_VN.
    End of Insert by B.Elan on 23/12/2005
    DATA: BEGIN OF ITAB_DISPLAY OCCURS 0,
            BLART LIKE BKPF-BLART,         "  doctype
            BELNR LIKE BSEG-BELNR,         "sr - nO  10
            XBLNR LIKE BKPF-XBLNR ,        " Bill-no  16
            NAME1_VENDOR(25),              "lfa1-name1,   " Vendor Name 35
            HKONT LIKE BSEG-HKONT ,        " Alloc-cd  10
            MWSKZ LIKE EKPO-MWSKZ ,        " St-cd     2
            BUDAT LIKE BKPF-BUDAT ,        " Bill-dt  10
            DUE_DATE LIKE BSEG-ZFBDT ,     " Due date 10
            PON    LIKE EKKO-EBELN ,                            " PON  10
            MAKTX LIKE MAKT-MAKTX,         "Material text 40
           QTY(8) TYPE P DECIMALS 2  ,                          "Qty 11
                                                                "qty 5
         RATE(5) TYPE P DECIMALS 2  ,                         "Rate 11
         mod starts on 21/08 for inc size to 7
           RATE(9) TYPE P DECIMALS 2  ,                         "Rate 11
                                                                "Rate 7
         mod ends -  sanjay jajoo 21/08
           DISCOUNT(7) TYPE P DECIMALS 2,  "DISCOUNT 11
           PROD-AMT(9) TYPE P DECIMALS 2,                       "AMOUNT 13
           EXCISE(5) TYPE P DECIMALS 2 ,   "eXCISE TAX 11
           SALES(5) TYPE P DECIMALS 2 ,    "SALES TAX   11
           FREIGHT(5) TYPE P DECIMALS 2,   "FREIGHT     11
           OTHERS(9) TYPE P DECIMALS 2,    " OTHERS     11 " added by vik on
    *21.08.2008
           TOTAL(9) TYPE P DECIMALS 2,     "TOTAL       17
           TOTAL1(9) TYPE P DECIMALS 2,
           MATNR LIKE MARA-MATNR,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
        END OF ITAB_DISPLAY.
    DATA: BEGIN  OF ITAB_TOTAL1 OCCURS 0,
          HKONT LIKE BSEG-HKONT,
          TOTAL TYPE P DECIMALS 2,
          TXT50 LIKE SKAT-TXT50,
          END OF ITAB_TOTAL1.
    DATA: BEGIN  OF ITAB_KONV OCCURS 0,
            KNUMV LIKE KONV-KNUMV,
            KPOSN LIKE KONV-KPOSN,
            STUNR LIKE KONV-STUNR,
            ZAEHK LIKE KONV-ZAEHK,
            KSCHL LIKE KONV-KSCHL,
            KWERT LIKE KONV-KWERT,
          END OF ITAB_KONV.
    DATA:BEGIN OF ITAB_RATE_MODVAT OCCURS 0,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MENGE LIKE EKPO-MENGE,
           BRTWR LIKE EKPO-BRTWR,
           KZWI5 LIKE EKPO-KZWI5,
           KNUMV LIKE EKKO-KNUMV,
           MATNR LIKE EKPO-MATNR,
           TXZ01 LIKE EKPO-TXZ01,
         END OF ITAB_RATE_MODVAT.
    DATA: BEGIN OF ITAB_PO OCCURS 0,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
          END OF ITAB_PO.
    DATA: BEGIN OF ITAB_PO_ITEM OCCURS 0,
            BELNR LIKE BSEG-BELNR,
            EBELN LIKE BSEG-EBELN,
            BUZID LIKE BSEG-BUZID,
            XBLNR LIKE BKPF-XBLNR,
            MATNR LIKE BSEG-MATNR,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
            EXCISE LIKE BSEG-DMBTR, " ADDED ON 21/01/02 FOR 27500 EXCISE
          SGTXT LIKE BSEG-SGTXT, " ADDED ON 24/01/02
            FLAG,
          END OF ITAB_PO_ITEM.
    DATA:BEGIN OF I_LFA1 OCCURS 0,
           LIFNR LIKE BSEG-LIFNR,
         END OF I_LFA1.
    DATA: BEGIN  OF I_VENDOR OCCURS 0,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
          END OF I_VENDOR.
    DATA: BEGIN OF ITAB_PO_OTHERS OCCURS  0,
            BELNR LIKE BSEG-BELNR,
            MATNR LIKE BSEG-MATNR,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
          END OF ITAB_PO_OTHERS.
    DATA: BEGIN OF ITAB_FINAL OCCURS 0,
            BUKRS LIKE BSEG-BUKRS,
            BELNR LIKE BSEG-BELNR,
            GJAHR LIKE BSEG-GJAHR,
            BUZEI LIKE BSEG-BUZEI,
            BUZID LIKE BSEG-BUZID,
            SHKZG LIKE BSEG-SHKZG,
            EBELN LIKE BSEG-EBELN,
            EBELP LIKE BSEG-EBELP,
            MENGE LIKE BSEG-MENGE,
            WRBTR LIKE BSEG-WRBTR,
            MATNR LIKE BSEG-MATNR,
            HKONT LIKE BSEG-HKONT, " ADDED ON 21/01/02 FOR 27500 EXCISE
            SGTXT LIKE BSEG-SGTXT,         " ADDED ON 24/01/02 FOR SALES TAX
          END OF ITAB_FINAL.
    DATA : BEGIN OF ITAB OCCURS 100 ,
               MWSKZ LIKE EKPO-MWSKZ ,     " St-cd
               HKONT LIKE BSEG-HKONT ,     " Alloc-cd
               MBLNR LIKE MKPF-MBLNR ,     " Sr-No
               LIFNR LIKE LFA1-LIFNR ,     " Supp-cd
               XBLNR LIKE BKPF-XBLNR ,     " Bill-no
               BUDAT LIKE BKPF-BUDAT ,     " Bill-dt
               DUE_DATE LIKE BSEG-ZFBDT ,  " Due date
               PON    LIKE EKKO-EBELN ,    " PON
               BELNR LIKE BKPF-BELNR ,     " CCI no
               DMBTR LIKE BSEG-DMBTR ,     " Prod-amount
               EXCISE LIKE BSEG-DMBTR ,    " Excise / ModVAT
               ST_INV LIKE BSEG-DMBTR ,    " Sales Tax Loaded on Inv.
               ST_SET LIKE BSEG-DMBTR ,    " Sales Tax setoff .
               OCT_TOT LIKE BSEG-DMBTR ,   " A,A, (29/03/2000) Octroi chargs
               PT_PABLE LIKE BSEG-DMBTR ,  " Purchase tax payable
               ST_TOT LIKE BSEG-DMBTR ,    " Sales Tax total
               OTHR_CHRG LIKE BSEG-DMBTR , " Other chagres
               NEBTR LIKE BSEG-NEBTR,      " Total-amount
               NAME1_VENDOR LIKE LFA1-NAME1,   " Vendor Name
         END OF ITAB.
    DATA: BEGIN OF ITAB_DOC OCCURS 0,
            BELNR LIKE BKPF-BELNR,
            BLART LIKE BKPF-BLART,
          END OF ITAB_DOC.
    DATA : BEGIN OF DOCTAB OCCURS 100 ,
             MWSKZ LIKE BSEG-MWSKZ ,
             HKONT LIKE BSEG-HKONT ,
             BELNR LIKE BKPF-BELNR ,
    Changed By Pankaj              19.03.99
    Included field fiscal year
             GJAHR LIKE BKPF-GJAHR ,
             BUDAT LIKE BKPF-BUDAT ,
             XBLNR LIKE BKPF-XBLNR ,
             LIFNR LIKE LFA1-LIFNR ,
             ZTERM LIKE BSEG-ZTERM ,
             AMOUNT LIKE BSEG-DMBTR ,
             DMBTR  LIKE BSEG-DMBTR ,
             OTHR_CHRG LIKE BSEG-DMBTR ,
             MBLNR LIKE MKPF-MBLNR ,
             MJAHR LIKE MSEG-MJAHR ,
             DUE_DATE LIKE BSEG-ZFBDT ,
             PON    LIKE EKKO-EBELN ,
             JMO1  LIKE BSEG-DMBTR ,
             JMO2  LIKE BSEG-DMBTR ,
             JIP1  LIKE BSEG-DMBTR ,
             JIP2  LIKE BSEG-DMBTR ,
    ************CH-ID-ADI-START-28 / 09 / 1999
             JIP4 LIKE BSEG-DMBTR ,
             ZTUT LIKE BSEG-DMBTR ,
    *****************ABEY
             ZOCT LIKE BSEG-DMBTR ,
    *****************END
    ************CH-ID-ADI-START-28 / 09 / 1999
             ZSET  LIKE BSEG-DMBTR ,
             ZPTX  LIKE BSEG-DMBTR ,
             BLART LIKE BKPF-BLART ,
          END OF DOCTAB .
    Download for EDP    "EDP
    DATA : BEGIN OF DOWNLOAD OCCURS 100 ,
           SIGN1(1) ,
           TOT_VAL(11) TYPE N,
           SIGN2(1) ,
           TAXABLE(11) TYPE N ,
           SIGN3(1) ,
           TOT_TAX(11) TYPE N ,
           SIGN4(1) ,
           SURCHARG(9) TYPE N ,
           SIGN5(1) ,
           ST_AMT(9) TYPE N ,
           SIGN6(1) ,
           OTH_CHRG(9) TYPE N ,
    ******************************ch-adi-start-28 / 09 / 1999
           SIGN7(1),
           TOT(9) TYPE N,
    ******************************ch-adi-end-28 / 09 / 1999
           TYPE(1) TYPE N ,
           STKY1(1) TYPE N ,
           STBR(2) ,
           STDV(2) ,
           STCC(1) ,
           STKY(1) ,
           STDC(2) TYPE N ,
           STTYP(1) ,
           STCODE(2) ,
           STRATE(2) TYPE N ,
           STRTT(2) TYPE N ,
           SERIAL_NO(6) TYPE N ,
           STACP(9) ,
           BLANK1(3) ,
           STYRMN(6) ,
           BLANK2(7) TYPE C .
    DATA : END OF DOWNLOAD .
    DATA : BEGIN OF GLTAB OCCURS 5 ,
               MWSKZ LIKE BSEG-MWSKZ,      " << ADD A.A. (01.02.2000)
               HKONT LIKE BSEG-HKONT ,
               DMBTR LIKE BSEG-DMBTR ,     " Prod-amount
               EXCISE LIKE BSEG-DMBTR ,    " Excise / ModVAT
               ST_INV LIKE BSEG-DMBTR ,    " Sales Tax Loaded on Inv.
               ST_SET LIKE BSEG-DMBTR ,    " Sales Tax setoff .
               PT_PABLE LIKE BSEG-DMBTR ,  " Purchase tax payable
               ST_TOT LIKE BSEG-DMBTR ,    " Sales Tax total
               OTHR_CHRG LIKE BSEG-DMBTR , " Other Charges
               NEBTR LIKE BSEG-NEBTR.      " Total-amount
    DATA : END OF GLTAB .
    DATA : BEGIN OF ERRORTAB OCCURS 5 .
            INCLUDE STRUCTURE ITAB .
    DATA : END OF ERRORTAB .
    *- Start of change by Raj on 3-Spet-05
    DATA : V_TMPVAL TYPE P DECIMALS 2.
    *- End of change by Raj on 3-Spet-05
    DATA : STRING LIKE BKPF-AWKEY ,
           V_NO TYPE I,
           V_EBELN LIKE BSEG-EBELN,
           V_MATNR LIKE BSEG-MATNR. " ADDED ON 21/01/02 FOR BUZID = 'S'
    Start of Insert by B.Elan on 23/12/2005
    WORK AREA
    DATA : WA_DISPLAY LIKE ITAB_DISPLAY.
    DATA : V_UCOMM TYPE SY-UCOMM.
    CONSTANTS : C_X TYPE C VALUE 'X'.
    End of Insert by B.Elan on 23/12/2005
    AT SELECTION-SCREEN ON T_BUKRS.
      SELECT SINGLE * FROM T001 WHERE BUKRS = T_BUKRS .
      IF SY-SUBRC NE 0 .
        MESSAGE E368 WITH T_BUKRS TEXT-M01 .
      ENDIF .
    AT SELECTION-SCREEN ON T_MONAT.
    PERFORM check_period_year USING 'X'.   " COMMENTED
    AT SELECTION-SCREEN ON T_GJAHR.
    PERFORM check_period_year USING ' '.   "COMMENTED
    Start of Delete by B.Elan on 23/12/2005
    *AT SELECTION-SCREEN ON RADIOBUTTON GROUP grp1 .
    CLEAR fname .
    DATA : BEGIN OF xt247 OCCURS 12 .
             INCLUDE STRUCTURE t247 .
    DATA : END OF xt247 .
    CHECK dload EQ 'X' .
    REFRESH xt247 .
    IF poper EQ 'X' .
       MESSAGE e368 WITH text-m05 .
    ENDIF .
    CALL FUNCTION 'MONTH_NAMES_GET'
       TABLES
         month_names           = xt247
       EXCEPTIONS
         month_names_not_found = 1
         OTHERS                = 2.
    READ TABLE xt247 WITH KEY mnr = t_monat .
    CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
    CONCATENATE  '
    DOWNLOAD\'   fname    INTO fname1.
    CONCATENATE  zfile1   fname    INTO   zfile2.
    CONDENSE fname1 NO-GAPS.
    CONDENSE zfile2 NO-GAPS.
    CONCATENATE 'STAXSUMM.' xt247-ktx INTO fname .
    End of Delete by B.Elan on 23/12/2005
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN .
        IF SCREEN-NAME EQ 'FNAME' .
          SCREEN-INPUT = 0.
          MODIFY SCREEN .
        ENDIF .
        IF SCREEN-GROUP2 EQ 'DBS' .
          SCREEN-ACTIVE = 0 .
          MODIFY SCREEN .
          IF SCREEN-NAME EQ 'BR_BLART-LOW' .
    Form the select option for the LDB .
            CLEAR BR_BLART . REFRESH BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'RE' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'SR' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'SP' .
            APPEND BR_BLART .       " ADD ON 11122003 JAJ
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
           br_blart-low = 'VI' .
            BR_BLART-LOW = 'ST'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'S1'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'P1'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'PM'.
            APPEND BR_BLART .
            BR_BLART-LOW = 'R1'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'KR' .
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
    *************CH-ID-ADI---30 / 09 / 1999.
            BR_BLART-LOW = 'RA'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'EM'.
            APPEND BR_BLART .
            BR_BLART-SIGN = 'I' .
            BR_BLART-OPTION = 'EQ' .
            BR_BLART-LOW = 'EI' .
            APPEND BR_BLART .
          ENDIF .
        ENDIF .
        CHECK SCREEN-GROUP1 EQ 'DAT' .
        SCREEN-INPUT = 0.
        MODIFY SCREEN .
      ENDLOOP .
    START-OF-SELECTION .
    Block 1 - Selection of accounting documents in the posting period
    is done through the LDB
    GET BKPF .
    commented on 22/08
    CHECK BKPF-MONAT = T_MONAT.
      CHECK BKPF-MONAT IN T_MONAT.
      CHECK BKPF-GJAHR = T_GJAHR.
      CHECK BKPF-STBLG IS INITIAL .        "<<<< Reversed
    *CHECK bkpf-budat IN t_budat .
      CHECK BKPF-BUKRS EQ T_BUKRS .
      CHECK BKPF-BUKRS EQ T_BUKRS .
      CHECK BKPF-BSTAT EQ SPACE .          "<<< Sample docs
      CHECK BKPF-BLART EQ 'RE'             "MM-IV
        OR  BKPF-BLART EQ 'KR'             "FI-IV
      OR  bkpf-blart EQ 'VI'          "FI-IV Direct
    *************CH-ID-ADI-30 / 09  / 1999
      OR  bkpf-blart EQ 'RA'           "CASH CCI
      OR  bkpf-blart EQ 'EM'           "MAINTAINANCE
      OR  bkpf-blart EQ 'EI' .        "IDT
        OR BKPF-BLART EQ  'P1'
        OR BKPF-BLART EQ 'PM'
        OR  BKPF-BLART EQ 'R1'
        OR  BKPF-BLART EQ 'S1'
        OR  BKPF-BLART EQ 'ST'
        OR  BKPF-BLART EQ 'SR'      " ADD ON 101203 JAJ
        OR  BKPF-BLART EQ 'SP'.
    *************CH-ID-ADI-30 / 09  / 1999
      CLEAR DOCTAB .
      DOCTAB-BLART = BKPF-BLART .
      DOCTAB-BELNR = BKPF-BELNR .
      DOCTAB-BUDAT = BKPF-BUDAT .
      DOCTAB-XBLNR = BKPF-XBLNR .
    Added By Pankaj                   19.03.99
    Initializing fiscal year for document table
      DOCTAB-GJAHR = BKPF-GJAHR .
      APPEND DOCTAB.
    Tax details
    GET BSET .   " Commented because LDB gives wrong BSET entries
      " for some documents
      CASE BSET-KSCHL .
        WHEN 'JMO1' .
          DOCTAB-JMO1 = DOCTAB-JMO1 + BSET-HWSTE .
        WHEN 'JMO2' .
          DOCTAB-JMO2 = DOCTAB-JMO2 + BSET-HWSTE .
        WHEN 'JIP1' .
          DOCTAB-JIP1 = DOCTAB-JIP1 + BSET-HWSTE .
        WHEN 'JIP2' .
          DOCTAB-JIP2 = DOCTAB-JIP2 + BSET-HWSTE .
        WHEN 'ZSET' .
         break deven .
          DOCTAB-ZSET = DOCTAB-ZSET + BSET-HWSTE .
        WHEN 'ZPTX' .
          DOCTAB-ZPTX = DOCTAB-ZPTX + BSET-HWSTE .
      ENDCASE .
      DOCTAB-MWSKZ = BSET-MWSKZ.
      MODIFY DOCTAB INDEX SY-TABIX.
    Item details
    *changed by srinivas yerra.
    GET BSEG .
      IF BSEG-KOART = 'K' .              "<<< Vendor Line
    IF BSEG-KOART = 'K' .
    *end of chnages by srinivas yerra.
        DOCTAB-LIFNR = BSEG-LIFNR .
        IF NOT BSEG-ZTERM IS INITIAL .
          DOCTAB-ZTERM = BSEG-ZTERM .
          DOCTAB-DUE_DATE = BSEG-ZFBDT + BSEG-ZBD1T .
        ENDIF .
        IF BSEG-SHKZG EQ 'H' .             "<< Add credits
          DOCTAB-AMOUNT = DOCTAB-AMOUNT + BSEG-DMBTR .
        ELSE .                             "<< Subtr debits
          DOCTAB-AMOUNT = DOCTAB-AMOUNT - BSEG-DMBTR .
        ENDIF .
      ENDIF .
      CASE BSEG-KTOSL .
        WHEN 'WRX' .
          DOCTAB-PON = BSEG-EBELN .
          IF DOCTAB-MWSKZ IS INITIAL .
            DOCTAB-MWSKZ = BSEG-MWSKZ .
          ENDIF .
        WHEN 'BSX' .
    ***********ABEY
          IF NEXT = BSEG-BUZEI
             AND
             DOC = BSEG-BELNR
             AND
             ( BSEG-BUZID = 'M'
               OR
               BSEG-HKONT = 50765 ).
            DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
            IF BSEG-SHKZG EQ 'H' .         "<< Subtr credits
              DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
            ELSE .                         "<< Add debits
              DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
            ENDIF .
          ENDIF .
    ************END
          IF BSEG-SHKZG EQ 'S' .
            DOCTAB-DMBTR = DOCTAB-DMBTR + BSEG-DMBTR .
          ELSE .
            DOCTAB-DMBTR = DOCTAB-DMBTR - BSEG-DMBTR .
          ENDIF .
        WHEN 'OCT' OR 'FRE' OR 'FR1' OR SPACE .
    *****CH-ID-ADI-30 / 09 /1999.
          IF ( ( BKPF-BLART = 'EM'  OR  BKPF-BLART = 'RA'  OR  BKPF-BLART =
          'EI')
           AND BSEG-KTOSL = SPACE ) OR  BSEG-MWSKZ = '9W' OR BSEG-MWSKZ =
           'K9' OR
                                                                BSEG-MWSKZ =
                                                                'X9'.
            DOCTAB-OTHR_CHRG = 0.
          ELSE.
    *********CH-ID-ADI--01 / 10 / 1999
         Other Charges only for accounts other than vendor acc.
            CHECK BSEG-BUZID NE 'T' .
            CHECK BSEG-BUZID NE 'P' .
            IF BSEG-KOART NE 'K' .
    *********ABEY (25/02/2000), (21/02/2000)
              IF BSEG-BUZID = 'F'
               OR BSEG-HKONT = 75461.
                NEXT = BSEG-BUZEI + 1.
                DOC = BSEG-BELNR.
                DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
              ENDIF.
              IF BSEG-BUZEI = NEXT
                 AND
                 ( BSEG-BUZID = 'M'
                   OR
                   BSEG-HKONT = 50765 ).
                DOCTAB-ZOCT = DOCTAB-ZOCT + BSEG-DMBTR.
              ENDIF.
    *********END
              IF BSEG-SHKZG EQ 'H' .       "<< Subtr credits
                DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG - BSEG-DMBTR .
              ELSE .                       "<< Add debits
                DOCTAB-OTHR_CHRG = DOCTAB-OTHR_CHRG + BSEG-DMBTR .
              ENDIF .
            ENDIF .
    *****NEXT-LINE ADDED BY ADI
          ENDIF .
    *************END.
      ENDCASE .
    *CHANGED BY SRINIVAS YERRA
    *MODIFY DOCTAB INDEX SY-TABIX.
      APPEND DOCTAB.
    *END OF CHANGES.
    PO History
    GET EKBE .
      CHECK DOCTAB-BELNR EQ EKBE-BELNR .
      DOCTAB-MBLNR = EKBE-LFBNR .
      DOCTAB-MJAHR = EKBE-LFGJA .
      MODIFY DOCTAB INDEX SY-TABIX .
    PERFORM show_indicator USING text-m02 .
    *PERFORM convert_data.
    END-OF-SELECTION .
    Data read from LDB is converted into printable format.
      PERFORM SHOW_INDICATOR USING TEXT-M04 .
      PERFORM CONVERT_DATA .
    Start of Delete by B.Elan on 23/12/2005
    IF stax_reg EQ 'X' .                 "<<< Add
       SORT itab BY mwskz hkont belnr .
    ELSE .                               "<<< Add
       SORT itab BY belnr .               "<<< Add
        SORT itab BY pon.
    ENDIF .                              "<<< Add
    Perform further operation based on user input
    IF display EQ 'X' .
       PERFORM write_itab.
       PERFORM write_data .
    ELSE .
      PERFORM download_data .
    ENDIF .
    End of Delete by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
      SORT ITAB BY BELNR.
      PERFORM WRITE_DATA.
      IF MAT_SM = C_X.
        PERFORM WRITE_MATERIAL_SUMMARY.
      ELSEIF MAT_DT = C_X.
        PERFORM WRITE_MATERIAL_DETAILS.
      ELSEIF VEN_SM = C_X.
        PERFORM WRITE_VENDOR_SUMMARY.
      ELSEIF VEN_DT = C_X.
        PERFORM WRITE_VENDOR_DETAILS.
      ENDIF.
    End of Insert by B.Elan on 23/12/2005
    Start of Insert by B.Elan on 23/12/2005
    AT USER-COMMAND.
      V_UCOMM = SY-UCOMM.
      CASE V_UCOMM.
        WHEN 'DETLS'.
          NEW-PAGE.
          PUR_DB = C_X.
          PERFORM CLEAR_DETAILS.
          PERFORM WRITE_DATA.
        WHEN 'MSUMRY'.
          PERFORM WRITE_MATERIAL_SUMMARY.
        WHEN 'MDETL'.
          PERFORM WRITE_MATERIAL_DETAILS.
        WHEN 'VSUMRY'.
          PERFORM WRITE_VENDOR_SUMMARY.
        WHEN 'VDETL'.
          PERFORM WRITE_VENDOR_DETAILS.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    End of Insert by B.Elan on 23/12/2005
    *- - - - - - - - - End Of Execution .- - - - - - - - - - - - - - - - - -
    TOP-OF-PAGE .
      IF PUR_DB = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_PUR_DB.
      ELSEIF MAT_SM = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_MAT_SM.
      ELSEIF MAT_DT = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_MAT_DT.
      ELSEIF VEN_SM = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_VEN_SM.
      ELSEIF VEN_DT = C_X.
        PERFORM TOP_OF_PAGE.
        PERFORM TOP_OF_PAGE_VEN_DT.
      ENDIF.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE V_UCOMM.
        WHEN 'DETLS'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_PUR_DB.
        WHEN 'MSUMRY'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_MAT_SM.
        WHEN 'MDETL'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_MAT_DT.
        WHEN 'VSUMRY'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_VEN_SM.
        WHEN 'VDETL'.
          PERFORM TOP_OF_PAGE.
          PERFORM TOP_OF_PAGE_VEN_DT.
      ENDCASE.
    *&      Form  WRITE_DATA
          text                                                           *
    FORM WRITE_DATA.
      DATA:     V_SALES LIKE ITAB_DISPLAY-SALES,
                V_RATE LIKE ITAB_DISPLAY-RATE,
                V_DISCOUNT LIKE ITAB_DISPLAY-DISCOUNT,
                V_PROD-AMT LIKE ITAB_DISPLAY-PROD-AMT,
                V_EXCISE1 LIKE ITAB_DISPLAY-EXCISE,
                V_EXCISE LIKE ITAB_DISPLAY-EXCISE,
                V_PON LIKE ITAB_DISPLAY-PON,
                V_OTHERS LIKE ITAB_DISPLAY-OTHERS,
                V_FREIGHT LIKE ITAB_DISPLAY-FREIGHT.
      CLEAR ITAB .
    Write the correct data i.e. tax code and G/L code both available .
      LOOP AT ITAB .
    *************CH-ID-ADI-30 / 09 / 1999
        IF ( ITAB-MWSKZ = '9W' OR ITAB-MWSKZ = 'K9' OR ITAB-MWSKZ = 'X9' )
                                                   AND ITAB-OTHR_CHRG NE 0 .
          ITAB-DMBTR = ITAB-OTHR_CHRG.
          ITAB-OTHR_CHRG = 0.
          MODIFY ITAB.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB.
        I_LFA1-LIFNR = ITAB-LIFNR.
        APPEND I_LFA1.
        CLEAR I_LFA1.
      ENDLOOP.
      SORT I_LFA1.
      DELETE ADJACENT DUPLICATES FROM I_LFA1 COMPARING ALL FIELDS.
      SELECT LIFNR
             NAME1
        FROM LFA1 INTO TABLE I_VENDOR
        FOR ALL ENTRIES IN I_LFA1 WHERE
                                       LIFNR = I_LFA1-LIFNR.
      FREE I_LFA1.
      LOOP AT ITAB.
        READ TABLE I_VENDOR WITH KEY LIFNR = ITAB-LIFNR .
        IF SY-SUBRC EQ 0.
          ITAB-NAME1_VENDOR = I_VENDOR-NAME1.
          MODIFY ITAB  TRANSPORTING NAME1_VENDOR.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB.
        IF NOT  ITAB-LIFNR IN S_VENDOR.
          DELETE ITAB.
        ENDIF.
      ENDLOOP.
      SELECT BUKRS  BELNR GJAHR BUZEI BUZID SHKZG EBELN EBELP ERFMG WRBTR
       MATNR HKONT SGTXT " ERFMG for MENGE,HKONT,SGTXT Added by KrishnaMohan
             INTO TABLE ITAB_FINAL
            FROM BSEG FOR ALL ENTRIES IN ITAB
            WHERE BUKRS = T_BUKRS AND                           "'1000' AND
                  BELNR = ITAB-BELNR AND
    *added by srinivas
                 hkont in zgl and
    *end
                  GJAHR = T_GJAHR AND
    *- Start of change by Raj on 030905
                 buzid IN ('W', 'M', 'K', 'S', 'F' , 'P' ) AND
                   BUZID IN ('W', 'M', 'K', 'S', 'F' , 'P' , 'T', ' ') AND
                   " ADD T 090206  JAJ
                   KOART <> 'K'   AND    " mod by vik on 21.08.2008" sjaj si
    *- End of change by Raj on 030905
    BUZID = P Added on 21/01/02 by Krishna Mohan
                  GSBER IN P_GSBER AND
                 gsber IN p_gsber OR gsber = ' ' AND
                  MATNR IN S_MATNR.
      SELECT BELNR BLART INTO TABLE ITAB_DOC FROM BKPF
                FOR ALL ENTRIES IN ITAB_FINAL WHERE
                           BUKRS = T_BUKRS AND                  "'1000' AND
                           BELNR  = ITAB_FINAL-BELNR AND
                           GJAHR = T_GJAHR AND
                           BLART NOT IN ('WA' , 'WE').
      SORT ITAB_DOC BY BELNR BLART.
      LOOP AT ITAB_DOC.
        IF NOT ITAB_DOC-BLART IN S_DOCTYP .
          DELETE ITAB_DOC.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB_FINAL.
        READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_FINAL-BELNR BINARY SEARCH.
        IF SY-SUBRC NE 0.
          DELETE ITAB_FINAL.
        ENDIF.
      ENDLOOP.
      DELETE ITAB_FINAL WHERE BUZID = 'K' AND BUZEI = '1'.
      LOOP AT ITAB_FINAL WHERE SHKZG = 'H'.
        ITAB_FINAL-WRBTR = ITAB_FINAL-WRBTR * ( -1 ).
        MODIFY ITAB_FINAL TRANSPORTING WRBTR.
      ENDLOOP.
      LOOP AT ITAB_FINAL WHERE BUZID = 'M'.
        IF ITAB_FINAL-SGTXT NE ' '.
          TRANSLATE ITAB_FINAL-SGTXT TO UPPER CASE.
          MODIFY ITAB_FINAL.
        ENDIF.
      ENDLOOP.
      LOOP AT ITAB_FINAL .
        IF ITAB_FINAL-BUZID = 'W'.
          CLEAR V_MATNR.
          V_EBELN = ITAB_FINAL-EBELN.
          V_MATNR = ITAB_FINAL-MATNR.
          ITAB_PO_ITEM-BELNR = ITAB_FINAL-BELNR.
          ITAB_PO_ITEM-BUZID = ITAB_FINAL-BUZID.
          ITAB_PO_ITEM-MATNR = ITAB_FINAL-MATNR.
          ITAB_PO_ITEM-EBELN = ITAB_FINAL-EBELN.
          ITAB_PO_ITEM-EBELP = ITAB_FINAL-EBELP.
          ITAB_PO_ITEM-MENGE = ITAB_FINAL-MENGE.
          ITAB_PO_ITEM-WRBTR = ITAB_FINAL-WRBTR.
          COLLECT ITAB_PO_ITEM.
          CLEAR ITAB_PO_ITEM.
        ELSEIF ITAB_FINAL-BUZID = 'M' OR ITAB_FINAL-BUZID = 'K' OR
                                          ITAB_FINAL-BUZID = 'S' OR
            ITAB_FINAL-BUZID = 'P' OR      " ADDED ON 21/01/02
    *- Start of change by Raj on 030905
            ITAB_FINAL-BUZID = ' ' OR
             ITAB_FINAL-BUZID = 'T' OR   " ADD BY JAJ ON 090206
    *- End of change by Raj on 030905
                                          ITAB_FINAL-BUZID = 'F'.
          IF ITAB_FINAL-MATNR IS INITIAL.
            ITAB_FINAL-MATNR = V_MATNR.
          ENDIF.
        CLEAR V_MATNR.
          ITAB_PO_OTHERS-BELNR = ITAB_FINAL-BELNR.
         ITAB_PO_OTHERS-MATNR = ITAB_FINAL-MATNR.
         ITAB_PO_OTHERS-EBELN = ITAB_FINAL-EBELN.
         ITAB_PO_OTHERS-EBELP = ITAB_FINAL-EBELP.
         ITAB_PO_OTHERS-MENGE = ITAB_FINAL-MENGE.
          ITAB_PO_OTHERS-WRBTR = ITAB_FINAL-WRBTR.
    IF CONDITION,ADDED ON 21/01/02 FOR GETTING EXCISE WHEN CONDITION MEETS
    ie TOTAL AMOUNT = EXCISE WHEN BUZID = S AND HKONT = 27500
    *IF itab_final-buzid = 'S' AND ( itab_final-hkont = '0000027500' OR  "
    *COMM BY JAJ ON 090206
          IF ITAB_FINAL-BUZID = 'S' OR ITAB_FINAL-BUZID = 'T' AND (
          ITAB_FINAL-HKONT = '0000027500' OR
                                        ITAB_FINAL-HKONT = '0000027515'
            OR  ITAB_FINAL-HKONT = '0000027550'       " jaj on 090206
           OR  ITAB_FINAL-HKONT = '0000027507' OR
            ITAB_FINAL-HKONT = '0000027508').  "Added on 050905 - Raj
            ITAB_FINAL-EBELN = V_EBELN.
    to get ebeln value into header so that when there are 2 po's
    and 2 W's excise can go into only one po which is v_ebeln
    Start of insert by B.Elan on 10/02/2006
            READ TABLE ITAB_PO_ITEM WITH KEY BELNR = ITAB_FINAL-BELNR
                                             EBELN = ITAB_FINAL-EBELN
                                             MATNR = ITAB_FINAL-MATNR.
            ITAB_PO_ITEM-EXCISE = ITAB_PO_ITEM-EXCISE + ITAB_FINAL-WRBTR.
    End of insert by B.Elan on 10/02/2006
    Start of delete by B.Elan on 10/02/2006
          itab_po_item-excise = itab_final-wrbtr.
    End of delete by B.Elan on 10/02/2006
            MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
                  WHERE BELNR EQ ITAB_FINAL-BELNR AND
                        EBELN EQ ITAB_FINAL-EBELN.
            CLEAR ITAB_PO_ITEM.
          ELSE.
            COLLECT ITAB_PO_OTHERS.
          ENDIF.
          CLEAR ITAB_PO_OTHERS.
        ENDIF.
      ENDLOOP.
    sateesh
      SORT ITAB_PO_ITEM BY BELNR EBELN.
      LOOP AT ITAB_PO_ITEM.
       AT NEW BELNR.
        AT NEW EBELN.
          READ TABLE ITAB_PO_ITEM INDEX SY-TABIX.
          ITAB_PO_ITEM-FLAG = 'X'.
          MODIFY ITAB_PO_ITEM INDEX SY-TABIX.
        ENDAT.
       ENDAT.
      ENDLOOP.
      LOOP AT ITAB_PO_ITEM.
        ITAB_PO_ITEM-EXCISE = 0.
        MODIFY ITAB_PO_ITEM TRANSPORTING EXCISE
         WHERE EXCISE > 0
           AND FLAG = SPACE.
      ENDLOOP.
    end
      LOOP AT ITAB_PO_ITEM.
        ITAB_PO-EBELN = ITAB_PO_ITEM-EBELN.
        ITAB_PO-EBELP = ITAB_PO_ITEM-EBELP.
        APPEND ITAB_PO.
        CLEAR ITAB_PO.
      ENDLOOP.
      LOOP AT ITAB_PO_OTHERS.
        ITAB_PO-EBELN = ITAB_PO_OTHERS-EBELN.
        ITAB_PO-EBELP = ITAB_PO_OTHERS-EBELP.
        APPEND ITAB_PO.
        CLEAR ITAB_PO.
      ENDLOOP.
      SORT ITAB_PO.
      DELETE ADJACENT DUPLICATES FROM  ITAB_PO COMPARING ALL FIELDS.
      SELECT EKPO~EBELN
             EBELP
             MENGE
             BRTWR
             KZWI5
             EKKO~KNUMV
             EKPO~MATNR
             EKPO~TXZ01
             INTO TABLE ITAB_RATE_MODVAT
             FROM EKPO INNER JOIN EKKO
                 ON EKPO~EBELN = EKKO~EBELN
        FOR ALL ENTRIES IN ITAB_PO WHERE
                        EKPO~EBELN = ITAB_PO-EBELN AND
                        EBELP = ITAB_PO-EBELP.
      SELECT KNUMV KPOSN STUNR ZAEHK KSCHL KWERT
        INTO TABLE ITAB_KONV
        FROM KONV
        FOR ALL ENTRIES IN ITAB_RATE_MODVAT
            WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND
      KSCHL IN ('YT02', 'YF07', 'YOTH', 'YPF1', 'YD01', 'YD02', 'YD03' ) .
      SORT ITAB_KONV BY KNUMV KSCHL.
      SORT ITAB BY BELNR.
      SORT ITAB_RATE_MODVAT BY EBELN EBELP.
      SORT ITAB_PO_OTHERS BY BELNR MATNR.
      LOOP AT ITAB_PO_ITEM.
        ITAB_DISPLAY-BELNR = ITAB_PO_ITEM-BELNR.
        READ TABLE ITAB_DOC WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY
        SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-BLART = ITAB_DOC-BLART.
        ENDIF.
        READ TABLE ITAB WITH KEY BELNR = ITAB_PO_ITEM-BELNR BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-XBLNR = ITAB-XBLNR.
          ITAB_PO_ITEM-XBLNR = ITAB-XBLNR.
          ITAB_DISPLAY-NAME1_VENDOR = ITAB-NAME1_VENDOR.
          ITAB_DISPLAY-HKONT = ITAB-HKONT.
          ITAB_DISPLAY-MWSKZ = ITAB-MWSKZ.
          ITAB_DISPLAY-BUDAT = ITAB-BUDAT.
          ITAB_DISPLAY-DUE_DATE   = ITAB-DUE_DATE.
         ITAB_DISPLAY-PON    =  ITAB_PO_ITEM-EBELN.
        ENDIF.
        ITAB_DISPLAY-QTY  =    ITAB_PO_ITEM-MENGE.
        READ TABLE ITAB_RATE_MODVAT WITH KEY EBELN = ITAB_PO_ITEM-EBELN
                                             EBELP = ITAB_PO_ITEM-EBELP
                                             BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-PON    =  ITAB_PO_ITEM-EBELN.
          ITAB_DISPLAY-MATNR = ITAB_RATE_MODVAT-MATNR.
          ITAB_DISPLAY-MAKTX  =  ITAB_RATE_MODVAT-TXZ01.
          ITAB_DISPLAY-RATE = ITAB_RATE_MODVAT-BRTWR /
          ITAB_RATE_MODVAT-MENGE.
          ITAB_DISPLAY-PROD-AMT = ITAB_DISPLAY-RATE * ITAB_PO_ITEM-MENGE.
          IF ITAB_PO_ITEM-EXCISE NE 0.
            ITAB_DISPLAY-EXCISE = ITAB_PO_ITEM-EXCISE.
        ELSE.
    *ITAB_DISPLAY-EXCISE = ( ITAB_PO_ITEM-MENGE * ITAB_RATE_MODVAT-KZWI5 ) /
                                      ITAB_RATE_MODVAT-MENGE.
    *commentedon 210102 to get excise directly from BSEG - IV
          ENDIF.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YT02' .
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-SALES  = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                 ITAB_RATE_MODVAT-MENGE.
          READ TABLE ITAB_FINAL WITH KEY BELNR = ITAB_PO_ITEM-BELNR
                                         BUZID = 'M'
                                        SGTXT(9) = 'SALES TAX'.
          IF SY-SUBRC EQ 0.
          IF ITAB_FINAL-SGTXT(9) EQ 'SALES TAX'
             OR ITAB_FINAL-SGTXT(9) EQ 'sales tax'.
            ITAB_DISPLAY-SALES = ITAB_DISPLAY-SALES + ITAB_FINAL-WRBTR.
          ENDIF.
          ENDIF.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YF07'.
        IF SY-SUBRC EQ 0.
          ITAB_DISPLAY-FREIGHT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                  ITAB_RATE_MODVAT-MENGE.
        ENDIF.
        READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                      KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YD01' .
        IF SY-SUBRC EQ 0.
         ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                              ITAB_RATE_MODVAT-MENGE.
        ELSE.
          READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                        KPOSN = ITAB_RATE_MODVAT-EBELP
                                      KSCHL = 'YD02' .
          IF SY-SUBRC EQ 0.
           ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT )
    ITAB_RATE_MODVAT-MENGE.
          ELSE.
            READ TABLE ITAB_KONV WITH KEY KNUMV = ITAB_RATE_MODVAT-KNUMV
                                          KPOSN = ITAB_RATE_MODVAT-EBELP
                                          KSCHL = 'YD03' .
            IF SY-SUBRC EQ 0.
             ITAB_DISPLAY-DISCOUNT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT
    ITAB_RATE_MODVAT-MENGE.
            ENDIF.
          ENDIF.
        ENDIF.
        LOOP AT ITAB_KONV WHERE KNUMV = ITAB_RATE_MODVAT-KNUMV AND KPOSN =
                                 ITAB_RATE_MODVAT-EBELP AND
                       (  KSCHL = 'YPF1' OR KSCHL = 'YOTH' ) .
          ITAB_KONV-KWERT = ( ITAB_PO_ITEM-MENGE * ITAB_KONV-KWERT ) /
                                   ITAB_RATE_MODVAT-MENGE.
          ITAB_DISPLAY-OTHERS = ITAB_DISPLAY-OTHERS + ITAB_KONV-KWERT.
        ENDLOOP.
        READ TABLE ITAB_PO_OTHERS WITH KEY BELNR = ITAB_PO_ITEM-BELNR.
                                          EBELN = ITAB_PO_ITEM-EBELN.
                                          BINARY SEARCH.
    sateesh as on 10092003
        IF SY-SUBRC NE 0. CLEAR ITAB_PO_OTHERS. ENDIF.
    end
        IF NOT ITAB_PO_OTHERS-EBELN IS INITIAL.
          READ TABLE ITAB_PO_OTHERS WITH KEY EBELN = ITAB_PO_ITEM-EBELN
                                             EB

  • Can I get a sample code on how to use CL_GUI_ALV_GRID........

    Can I get a sample code and documents on how to use CL_GUI_ALV_GRID, cl_gui_custom_container. Or cl_salv_table
    I want to create an ALV report and pick my columns with header information.
    Thanks,
    Eric.
    Moderator Message: There are enough sample codes and documents on how to use CL_GUI_ALV_GRID. Please search for them.
    Edited by: kishan P on Nov 12, 2010 10:53 AM

    Hi Eric Adinku,
    There are many reports available. In SE38 check reports starting with BCALV & SALV. Few examples include :
    BCALV_EDIT_01
    BCALV_EDIT_02
    Thanks & Regards,
    Faheem.

  • How to use traffic lights concept in alv in webdynpro abap

    Hai ,
              How to use traffic lights concept for alv in webdynpro abap. If possible give me some code.

    Hi Ravi,
    You can create ICON  to get traffic light.
    Go through this step by step.. in this example
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9?quicklink=index&overridelayout=true
    Please go through this...
    Re: Display ICON in the ALV table column
    Re: Image in ALV
    cheers,
    Kris.

  • How to use CL_GUI_ALV_GRID in background run

    Hi expert,
    is possible to use CL_GUI_ALV_GRID in background run?
    Usually I do a call screen and I put the set_table_for_first_display method in the PBO.
    How I can use the ALV GRID in a background run?
    Moderator message: please search for information and try yourself before asking.
    Edited by: Thomas Zloch on Jul 11, 2011 10:17 AM

    Hi,
    Check out standard examples in SAP by passing BCALV* & pressing F4 in SE38.
    Regards,
    Amit
    Reward all helpful answers.

  • How to use AVDocPrintPagesWithParams for printing without any prompt dialog or alert message ?

    Hi Friends,
    I have a problem to print the pages of a pdf, but with out any dialog box prompt. So I choosed the api AVDocPrintPagesWithParams(avDoc, avDocPrintParam);
    But I don't know how to set parameter for 2nd parameter of the funtion. My requirement is I want to print pdf's using default printer of the system i.e. Print As PDF using Abode PDF print.
    Page Dimension should be same as previous, with postscript value 3 (best print).
    I have used AVDocPrintPages (AVDoc doc, ASInt32 firstPage,ASInt32 lastPage, ASInt32 psLevel, ASBool binaryOK,ASBool shrinkToFit); But it gives an error message for some pdf's that PDF may not printed correctly because font information couldn't be found.
    So can anyone let me know please how to set the parameter of AVDocPrintParam, so that I can use AVDocPrintPagesWithParams and do the same job.
    Thanks and Regards,
    Saffiuddin Sheikh.

    Dear lrosenth,
    I am into an operation where I have check whether each objects falls inside my rectangular region or not. For this I am taking help of BBox and matrix information. The problem is that when I find PDF's those have form or container objects, their matrix and BBox is depenedent on matirx of the form or container containing them.
    In most cases by adding(concetinating ) the matrix value of form and the element gives the correct matrix, BBox value, but some cases I am yet to understand the behaviours. So to avoid these form and container for our immidiate project delivery, we are using this option to print the pdf and then process for checking the position of elements.
    My original requirement is :
    How to know objects position inside a form or container ?  
    This is just an alternative time being way to achieve the task. But if you have any idea of how to detect postion of objects inside form/container then please let me know. 

  • Don't know how to use the air print with my ipads.

    i just bought an mg3222 printer and i don't know how to figure out how to use air print with my ipad and ipad minis. Can anybody help??? Thanks

    Hello.
    In order to use the printer with your iOS devices, please make sure that the units are all connected to the same WI-Fi router.  Once this has been done you should be able to print.
    The initial Wi-Fi setup of the MG3222 would have to be done from a compatible Windows or Mac OSX computer.
    If additional assistance is needed, feel free to call us at 1-800-OKCANON.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How to use javascript to print on the client side

    hi all,
    Now i'm facing a problem:
    I want to use javascript to print something(for example, a table) on the client side. So i must get a connection with the printer installed in the client computer.
    some says that getObject() function can do this,but i don't know how?
    Who please help me!

    window.print();

  • How to use Applescript to print out a certain calendar at 7am every morning?

    Hey guys,
    I am trying to use AppleScript to print out one of my calendars each day at 7am every morning.
    I have come up with this so far:
    tell application "Calendar"
           view calendar "My Appointments" at (my (current date))
           switch view to day view
           activate
                        tell application "System Events"
                     keystroke "p" using command down
                     delay 1 -- (seconds)
                     tell process "Calendar"
                                                      tell window "Print"
                                                                     if value of checkbox "Calendar Keys" is not 0 then
                                      click checkbox "Calendar Keys"
                               end if
                                                      end tell
                                       end tell
                        end tell
    end tell
    The problem with this is that it will print out whatever calendars are currently viewable. I can't figure out how to tell it to deselect other calendars and just select the one I want. I also want to tell it to print this out at 7am every morning.
    Any help would be very appreciated!

    If you wanted to do the printout over multiple days, you would be best to loop through each day's events in the way the current script does, but to put a new loop around it that gets each new day's data:
    --opens a temporary file
    set fileRef to open for access ((path to desktop) as string) & "meetings.txt" with write permission
    --effectively empties the file
    set eof fileRef to 0
    tell application "Calendar"
              set dayCount to 9 --this will be the number of days to look forward (not including today)
              repeat with currentDay from 0 to dayCount
                        set startList to {}
      --get's today's date
      --set startRange to ((current date) + 12 * days) -- I used this for testing, to point to a day that had many appointments.  I've left it so you can use it, too.
                        set startRange to ((current date) + (currentDay * days))
      --set the start of the range to previous midnight
                        set hours of startRange to 0
                        set minutes of startRange to 0
                        set seconds of startRange to 0
      --set end of the range to next midnight
                        set endRange to (startRange + 1 * days)
      --get today's events
                        set todaysEvents to get (events of calendar "My Appointments" whose (start date is greater than startRange) and (end date is less than endRange))
      --make a new list with start time of the event for sort purposes
                        repeat with theEvent in todaysEvents
                                  set end of startList to {startdate:start date of theEvent, eventID:theEvent}
                        end repeat
      --sort using a bubble sort (suitable for short lists)
                        repeat with i from 1 to (count of startList) - 1
                                  repeat with j from i + 1 to count of startList
                                            if startdate of item j of startList < startdate of item i of startList then
                                                      set temp to item i of startList
                                                      set item i of startList to item j of startList
                                                      set item j of startList to temp
                                            end if
                                  end repeat
                        end repeat
      --empty the original list
                        set todaysEvents to {}
      --repopulate the list in correct chronological order
                        repeat with theEvent in startList
                                  set end of todaysEvents to eventID of theEvent
                        end repeat
      --write today's date to the file
      write (date string of startRange & return & return) to fileRef
      --if there are no events, write this to the file as well
                        if length of todaysEvents is 0 then
                                  write "No events" & return & return to fileRef
                        else
      --process each event into format: hh:mm-hh:mm/new line/event summary
                                  repeat with theEvent in todaysEvents
                                            set startdate to start date of theEvent
                                            set enddate to end date of theEvent
                                            set startHours to hours of startdate as string
                                            if length of startHours is 1 then set startHours to "0" & startHours
                                            set startMins to minutes of startdate as string
                                            if length of startMins is 1 then set startMins to "0" & startMins
                                            set starttime to startHours & ":" & startMins
                                            set endHours to hours of enddate as string
                                            if length of endHours is 1 then set endHours to "0" & endHours
                                            set endMins to minutes of enddate as string
                                            if length of endMins is 1 then set endMins to "0" & endMins
                                            set endTime to endHours & ":" & endMins
      --write the event to the file
                                            set theSummary to (starttime & "-" & endTime & return & summary of theEvent & return & return) as string
      write theSummary to fileRef
                                  end repeat
                        end if
      write return to fileRef
              end repeat
    end tell
    --close the file
    close access fileRef
    --print the file
    set theFile to (((path to desktop) as text) & "meetings.txt") as alias
    tell application "TextEdit"
              print theFile without print dialog
    end tell

  • How to use Smartform to print check as payment method?

    Actually I'm using Sapscript to print checks as payment method.
    The configuration is at OBVS transaction, but at detail of payment method in "form data" option I can only choice Sapscripts.
    How can I to migrate Sapscript existing to new Smartform to print check as payment method?

    Hi,
    Please check this path :
    Financial Accounting (New) > A/R A/P > Business Transactions > Outgoing Payments > Automatic Outgoing Payments >
    Payment Media > Make settings for classic payment medium programs.
    Here you assign your smart form and the relative program.
    Regards,
    Sadashivan

  • How to use interactive internal report in alv

    hey expert i want to know who i will used interactive internal report in alv report by various tables in my one assingment.
    They have told us to do the various steps which i was giving down:
    1) In first step they have told me to use of call transaction 'XD03' in the report .I have got that problem solved.
    2)  In second they have told in this assingment to use of interactive internal report you have to prepare in alv format.
    a)I  want to know about this .They have told in assingment that in the customer details we have to click to the net value field record and go to the details of sales order detail in which it show the detail of all the details related net values .
    b) I want to know about this lines also from you:
    Qty field refers to the Target Qty field in the table VBAP.
    To get Price in the unit divide the price by Condition Pricing Unit.
    If SHKZG field is set, then multiply the amount by -1, making it negative. (understand why?).
    3) In the third step they have told to used of drill down which it is in the at line selection ,when i click to the list order of sales it go to  the next report and show me the detail of all the list order details. 
    But i have to use the  '2.b' condition there .
    cna u please send me reply for all this step.
    Edited by: AjaySAPmumbai on Nov 28, 2011 8:55 AM
    Moderator message : Spec / requirements dumping is not allowed, search for available information, read forum rules before posting.  Thread locked.
    Edited by: Vinod Kumar on Nov 28, 2011 1:26 PM

    hey expert i want to know who i will used interactive internal report in alv report by various tables in my one assingment.
    They have told us to do the various steps which i was giving down:
    1) In first step they have told me to use of call transaction 'XD03' in the report .I have got that problem solved.
    2)  In second they have told in this assingment to use of interactive internal report you have to prepare in alv format.
    a)I  want to know about this .They have told in assingment that in the customer details we have to click to the net value field record and go to the details of sales order detail in which it show the detail of all the details related net values .
    b) I want to know about this lines also from you:
    Qty field refers to the Target Qty field in the table VBAP.
    To get Price in the unit divide the price by Condition Pricing Unit.
    If SHKZG field is set, then multiply the amount by -1, making it negative. (understand why?).
    3) In the third step they have told to used of drill down which it is in the at line selection ,when i click to the list order of sales it go to  the next report and show me the detail of all the list order details. 
    But i have to use the  '2.b' condition there .
    cna u please send me reply for all this step.
    Edited by: AjaySAPmumbai on Nov 28, 2011 8:55 AM
    Moderator message : Spec / requirements dumping is not allowed, search for available information, read forum rules before posting.  Thread locked.
    Edited by: Vinod Kumar on Nov 28, 2011 1:26 PM

  • How to use at-line selection in ALV

    Can someone help me about how to use at-line selection in an ALV

    u can try in user_command
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
             I_CALLBACK_PROGRAM = G_REPID
             IT_FIELDCAT = GT_FIELDCATALOG
             I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
             I_CALLBACK_HTML_END_OF_LIST = G_HTML_END_OF_LIST
             I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
             I_GRID_SETTINGS = GS_SETTINGS
             IS_LAYOUT = GS_LAYOUT
             I_SAVE = G_SAVE
             IS_VARIANT = GS_VARIANT
             IT_EVENTS = GT_EVENTS[]
    *      I_SCREEN_START_COLUMN = 0 "Use coordinates for
    *      I_SCREEN_START_LINE = 0 "display as dialog box
    *      I_SCREEN_END_COLUMN = 0
    *      I_SCREEN_END_LINE = 0
        IMPORTING
             E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER
             ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER
        TABLES
             T_OUTTAB = I_REP
        EXCEPTIONS
             PROGRAM_ERROR = 1
             OTHERS = 2.
    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
        WHEN '&IC1'.
          CASE RS_SELFIELD-FIELDNAME.
            WHEN 'XXXXX'.
              READ TABLE I_xxx INTO V_xxx
                WITH KEY XXX = RS_SELFIELD-VALUE.
              IF SY-SUBRC = 0.
              ENDIF.
            WHEN OTHERS
          ENDCASE.
      ENDCASE.
    ENDFORM.

  • Flex 3  :How to use trace for printing data in console

    Hi ,
    I heard that we can use trace to print data on to Flex Builder 3 console . But when i tries it was of no luck .
    The below is a simple program , in which i was out of luck .
    public function callMe():void
                trace("AAA");
    <mx:Button id="Register" name="Register" label="Register" height="23" click="callMe()"/>
    Here in the above porogram , after clicking the Button , i cant see 'AAA 'related  inside my Flex Builder .
    Any help ??
    Thank you .

    Hi Kiran
                Make a break point at trace line and debug the application  There u can find the message u typed in console..  trace works only under debugging mode... not in development mode ..
               Have a nice day
    Thanks
    Ram

  • How to use a check box in ALV

    Hi All,
    I have a urgent requirement in my <b>ALV list</b>.
    Where in the output list i need to create a check box, which is followed by Sales order, quantity columns etc......
    Requirement:  1. tell me how to <b>create</b> a <b>check box</b>
    2.   i need to select the checkbox(Sales Order) and press  a push button which is above the list(push button) in the tool bar.
    I am able to see the output using  <b>reuse_alv_grid_display</b>.
    <b>But kindly let me know how to <b>link</b> the <b>check box</b> and the <b>push button</b> which is above the list for further processing.</b>
    Possibly a sample code will help a lot.
    Thanks in advance.
    Rajesh Kumar.

    TO create a check box, take one field in your internal table as:
    CHK TYPE C.
    Now, pass the LAYOUT by filling up the LAYOUT strucutre.
    LAYOUT-BOX_FIELDNAME = 'CHK' .
    This will provide you the BOX field in the GRID and Checkbox in the LIST.
    When you select the  checkbox the field value will set to 'X' in the table.
    Regards,
    Naimesh Patel

  • How to use   RLB_INVOICE standard print program

    my program is copy of  RLB_INVOICE
    when i press execute i m not getting any output
    how can i see print preview by executing print program.

    hi,
    check this
    REPORT  ZRE_SD_INVOICE.
    *&      Form  ENTRY
          text
         -->P_ENT_RETCO   text
         -->P_ENT_SCREEN  text
    FORM ENTRY  USING    P_ENT_RETCO
                         P_ENT_SCREEN.
      DATA: lf_formname TYPE TDSFNAME,
            lf_fm_name  TYPE RS38L_FNAM,
            g_adrnr LIKE ADRC-ADDRNUMBER.
                      TABLES DECLARATIONS                                *
      TABLES: NAST,                          "Messages
              *NAST,                         "Messages
              TNAPR,                         "Programs & Forms
              ITCPO,                         "Communicationarea for Spool
              ARC_PARAMS,                    "Archive parameters
              TOA_DARA,                      "Archive parameters
              ADDR_KEY,                      "Adressnumber for ADDRESS
              T005U ,                        "FOR RETRIVAL OF STATE
              ADRC .                         "FOR RETRIVAL OF ADDRESS
                      DATA DECLARATIONS                                  *
      DATA:   RETCODE   LIKE SY-SUBRC.         "Returncode
      DATA:   XSCREEN(1) TYPE C.               "Output on printer or screen
      DATA:   REPEAT(1) TYPE C.
    DATA: NAST_ANZAL LIKE NAST-ANZAL.      "Number of outputs (Orig. + Cop.)
      DATA: NAST_TDARMOD LIKE NAST-TDARMOD.  "Archiving only one time
      DATA: GF_LANGUAGE LIKE SY-LANGU.
      DATA: L_FMNAME    TYPE   rs38l_fnam.
      data: CS_BIL_INVOICE  type  LBBIL_INVOICE.
      data: IS_PRINT_DATA_TO_READ type LBBIL_PRINT_DATA_TO_READ value
      'XXXXXXXXXXXXXXXXXXXXXXXX'.
      DATA: BILL_DOC_EXP    LIKE     VBCO3.
      DATA: BILL_DOC_IMP_H  LIKE     VBDKR.
      DATA: BILL_DOC_IMP_I  LIKE VBDPR OCCURS 0 WITH HEADER LINE.
      DATA: T_RC  LIKE ADRC OCCURS 0 WITH HEADER LINE.
      DATA: T_T00  LIKE T005U OCCURS 0 WITH HEADER LINE.
      DATA: L_WERKS LIKE J_1IEXCHDR-WERKS.
    DATA: I_LIKP     LIKE     LIKP OCCURS 0 WITH HEADER LINE,
         I_VBAK     LIKE     VBAK OCCURS 0 WITH HEADER LINE,
         I_LIPS     LIKE     LIPS OCCURS 0 WITH HEADER LINE,
         I_VBKD     LIKE     VBKD OCCURS 0 WITH HEADER LINE,
         I_EIKP     LIKE     EIKP OCCURS 0 WITH HEADER LINE,
         I_MARC     LIKE     MARC OCCURS 0 WITH HEADER LINE,
         I_KNA1     LIKE     KNA1 OCCURS 0 WITH HEADER LINE,
         I_T604T     LIKE     T604T OCCURS 0 WITH HEADER LINE,
         I_KONV     LIKE     KONV OCCURS 0 WITH HEADER LINE,
         I_VBRK     LIKE     VBRK OCCURS 0 WITH HEADER LINE,
          I_VBRP     LIKE     VBRP OCCURS 0 WITH HEADER LINE.
         I_T685T     LIKE     T685T OCCURS 0 WITH HEADER LINE,
         I_KONV1     LIKE     KONV OCCURS 0 WITH HEADER LINE.
    *types begin of t_vbrp.
    *include structure vbrp.
    *types grp_counter type i .
    *types end of t_vbrp.
    *data i_vbrp type standard table of t_vbrp with header line.
    *NAST-OBJKY = BILL_DOC .
      DATA : inv_code LIKE vbak-vbeln.
      BILL_DOC_EXP-SPRAS = 'E'.
      BILL_DOC_EXP-VBELN = nast-objky(10).
      inv_code = nast-objky(10).
      SELECT SINGLE WERKS INTO L_WERKS FROM J_1IEXCHDR WHERE  RDOC =
    inv_code.
    select * from vbrp into table i_vbrp where vbeln = inv_code.
    lf_formname = tnapr-sform.
    IF L_WERKS = '2000'.
        tnapr-sform = 'ZSF_SD_INVOICE'.
    ELSE.
       tnapr-sform = 'ZSD_FACTORY_EXCISE_INVOICE_PAT'.
    ENDIF.
    Read print data
      CALL FUNCTION 'LB_BIL_INV_OUTP_READ_PRTDATA'
        EXPORTING
          IF_BIL_NUMBER         = NAST-OBJKY
          IF_PARVW              = NAST-PARVW
          IF_PARNR              = NAST-PARNR
          IF_LANGUAGE           = NAST-SPRAS
          IS_PRINT_DATA_TO_READ = IS_PRINT_DATA_TO_READ
        IMPORTING
          ES_BIL_INVOICE        = CS_BIL_INVOICE
        EXCEPTIONS
          RECORDS_NOT_FOUND     = 1
          RECORDS_NOT_REQUESTED = 2
          OTHERS                = 3.
    GET THE DATA RELATED TO THE BILLING DOCUMENT BASED ON THE BILLING
    *DOCUMENT NUMBER
      CALL FUNCTION 'RV_BILLING_PRINT_VIEW'
        EXPORTING
          COMWA                              = BILL_DOC_EXP
       IMPORTING
         KOPF                               = BILL_DOC_IMP_H
        TABLES
          POS                                = BILL_DOC_IMP_I
    EXCEPTIONS
      TERMS_OF_PAYMENT_NOT_IN_T052       = 1
      OTHERS                             = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = tnapr-sform
        VARIANT                  = ' '
        DIRECT_CALL              = ' '
       IMPORTING
         FM_NAME                  = L_FMNAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 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.
      CALL FUNCTION L_FMNAME
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
      ITAB_LANDX                 =
      ITAB_ZOLLA                 =
      ITAB_AZOLL                 =
      ITAB_KZGBE                 =
      ITAB_IEVER                 =
      ITAB_LADEL                 =
      ITAB_LANDX50               =
      ITAB_VTEXT                 =
      ITAB_EXPVZ                 =
      I_KZABE                    =
      NN_LINES                   =
      S                          =
      D                          =
      I_TOTAL                    =
      I_MAKTG                    =
      I_CAL_NET                  =
          IS_BIL_INVOICE             = CS_BIL_INVOICE
          IS_KOPF                    = BILL_DOC_IMP_H
      IS_NAST                    =
      IS_REPEAT                  =
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        TABLES
       I_LIKP                     = I_LIKP
       I_VBAK                     = I_VBAK
       I_LIPS                     = I_LIPS
       I_VBKD                     = I_VBKD
       I_EIKP                     = I_EIKP
       I_MARC                     = I_MARC
       I_KNA1                     = I_KNA1
       I_T604T                    = I_T604T
       I_KONV                     = I_KONV
       I_VBRK                     = I_VBRK
         I_VBRP                     = I_VBRP
       I_T685T                    = I_T685T
       I_KONV1                    = I_KONV1
          IS_PO                      = BILL_DOC_IMP_I
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR          `   = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "ENTRY
    Regards
    Santosh.

Maybe you are looking for

  • Notificati​on usage

    This may be an obvious question, but I've been unable to find an answer in the forums. I'm using a Teststand Rendezvous with the batch process model. I cannot find a way to recover if one of the batch sockets fails before the Rendezvous is reached. F

  • Video driver for a snake cam

    I recently bought an Otek Flexi Snake Cam for technical inspections. It is like a USB webcam on a long flexible lead and has adjustable LED lighting. This cost AU$50 whereas self-contained professional devices cost over $500. It only came with Window

  • Is face time between Apple devices free if one person is in France and the other person is in the U.S.?

    IS face time free between two persons if one person is in France and the other person is in the U.S.?  One is on an iPad Mimi and the other an apple laptop or iPad.

  • SAP APO Learning

    Dear all, This is Veeresh here, worked in MES,SAP MII and now into EHS area.I have got 7 years in IT ,now wanted to learn SAP SCM-APO/PP. Please let me know different sources to learn this one.Also I wanted to Install both ECC and SCM-APO in my syste

  • Navigation with a target

    Hi all masters, I have a Question..... I'm working with two frames  ( FR1 and FR2 ) with a tableView in FR1 I'm getting somethings events, (rowselect), and with the data of that row, i need show in the frame FR2 the content of it.. I try with, naviga