Single program to covering all concepts...

I need a single program which covers all the concepts like
<b>Module Pool Programming,
Include Structure,
ABAP Objects...</b>
can u plz send it...

Hi,
Refer to ABAPDOCU u will get e.g of all u want .
if u want evertying in one prog then refer program called by tcode ME21N, but u will be confused.
Jogdand M B

Similar Messages

  • Using all types of resultset Objects i need a single program

    i think all of u know that there are 8 types of resultset objects are there in jdbc technology i.e
    # next() - moves the cursor forward one row. Returns true if the cursor is now positioned on a row and false if the cursor is positioned after the last row.
    # previous() - moves the cursor backwards one row. Returns true if the cursor is now positioned on a row and false if the cursor is positioned before the first row.
    # first() - moves the cursor to the first row in the ResultSet object. Returns true if the cursor is now positioned on the first row and false if the ResultSet object
    does not contain any rows.
    # last() - moves the cursor to the last row in the ResultSet object. Returns true if the cursor is now positioned on the last row and false if the ResultSet object
    does not contain any rows.
    # beforeFirst() - positions the cursor at the start of the ResultSet object, before the first row. If the ResultSet object does not contain any rows, this method has
    no effect.
    # afterLast() - positions the cursor at the end of the ResultSet object, after the last row. If the ResultSet object does not contain any rows, this method has no effect.
    # relative(int rows) - moves the cursor relative to its current position.
    # absolute(int n) - positions the cursor on the n-th row of the ResultSet object.
    Using all these result set methods i need a sample program all these methods must be used in a single program itself

    BalajiEnntech123 wrote:
    i think all of u know that there are 8 types of resultset objects are there in jdbc technology i.e I don't know who "u" are but they're wrong if they think there are "8 types of resultset objects are there in jdbc technology".
    They'd be especially wrong to think that the methods you mention are "types of resultset objects".

  • SD Flow program using For all entries.

    using simple ALV grid: I have the urgent requirement of changing the following program using 'For all entries' instead of joins and I should not use 'TABLES' -- For top-of-page I need to get dynamic fields like if I select company code in the selection screen then I need to get 'This report is base on COMPANY CODE'.
    This program is about sales flow where i shud get only those records that have ebeln in vbak, delivery, invoice.
    The original program is as follows:
    *& Report  ZSD_DOCU_FLOW                                               *
    REPORT  zsd_docu_flow  NO STANDARD PAGE HEADING                    .
    * Program     : ZCOS_SALES                                           *
    * Dev. Class  :  ZSD
    * Functional  :
    * Created on  :                                                        *
    * Project     :
    * CR Number   :
    * Transaction :  ZSDCSUT                                               *
    * Description :   * Sales document life cylce for given customer
    *                  to declaired period displaying the sales document
    *                  details ,with relevant del details and corresponding
    *                  Invocie Details
    *-----------     Tables Declaration      -----------*
    TABLES: vbak,vbap,vbfa,kna1,vbrk,vbrp,likp,lips,t001.
    TYPE-POOLS : slis.
    *-----------    Internal Tables Declaration      -----------*
    *      Internal Table for Sales Order data                   *
    DATA: BEGIN OF it_so OCCURS 0,
            vbeln LIKE vbak-vbeln,
            kunnr LIKE vbak-kunnr,
            posnr LIKE vbap-posnr,
            matnr LIKE vbap-matnr,
            kwmeng LIKE vbap-kwmeng,
            netwr LIKE vbap-netwr,
         END OF it_so.
    *      Internal Table for Delivery Order data                   *
    DATA: BEGIN OF it_del OCCURS 0,
            delnum  LIKE likp-vbeln,
            lfdat LIKE likp-lfdat,
            delitem LIKE lips-posnr,
            lfimg LIKE lips-lfimg,
          END OF it_del.
    *      Internal Table for Invoice data                          *
    DATA: BEGIN OF  it_inv OCCURS 0,
            invnum LIKE vbrk-vbeln,
            invitem LIKE vbrp-posnr,
            fkimg LIKE vbrp-fkimg,
            amount LIKE vbrp-netwr,
         END OF it_inv.
    *      Internal Table for Final data                            *
    DATA: BEGIN OF it_final OCCURS 0,
            vbeln LIKE vbak-vbeln,
            posnr LIKE vbap-posnr,
            kunnr LIKE vbak-kunnr,
            name LIKE kna1-name1,
            matnr LIKE vbap-matnr,
            kwmeng LIKE vbap-kwmeng,
            netwr LIKE vbap-netwr,
            delnum  LIKE likp-vbeln,
            lfdat LIKE likp-lfdat,
            delitem LIKE lips-posnr,
            lfimg LIKE lips-lfimg,
            invnum LIKE vbrk-vbeln,
            invitem LIKE vbrp-posnr,
            fkimg LIKE vbrp-fkimg,
            amount LIKE vbrp-netwr,
         END OF it_final.
    *-----------    Variables Declaration      -----------*
    DATA: v_name LIKE kna1-kunnr," variable for customer name
          v_delnum LIKE likp-vbeln," variable for delivery number
          v_invnum LIKE vbrk-vbeln." variable for invoce number
    DATA : ls_layout TYPE slis_layout_alv,
           it_fcat TYPE slis_t_fieldcat_alv ,
           wa_fcat TYPE slis_fieldcat_alv,
           lh TYPE slis_t_listheader,
           ls TYPE slis_listheader,
           it_events TYPE slis_t_event  ,
           ls_event TYPE slis_alv_event ,
           i_sort     TYPE slis_t_sortinfo_alv,
           w_var TYPE i.
    DATA : l_date(10).
    DATA : l_date1(20).
    DATA : l_repid LIKE trdir-name.
    l_repid = 'ZSD_DOCU_FLOW1'.
    *-----------    Select-options & parameters Declaration  ---*
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_bukrs LIKE vbak-bukrs_vf,
                 p_vkorg LIKE vbak-vkorg,
                p_vtweg LIKE vbak-vtweg,
                p_spart LIKE vbak-spart.
    SELECT-OPTIONS: s_kunnr FOR vbak-kunnr,
                    s_audat FOR vbak-audat.
    SELECTION-SCREEN END OF BLOCK b1.
    *----------- AT SELECTION-SCREEN  --------------------------*
    AT SELECTION-SCREEN.
      SELECT SINGLE * FROM  t001 INTO t001
                                WHERE bukrs = p_bukrs.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Company Code'.
      ENDIF.
      SELECT SINGLE * FROM vbak INTO vbak
                              WHERE vkorg = p_vkorg.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Sales Organization'.
      ENDIF.
      SELECT SINGLE * FROM vbak INTO vbak
                                WHERE vtweg = p_vtweg.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid distribution channel'.
      ENDIF.
      SELECT SINGLE * FROM vbak INTO vbak
                                WHERE spart = p_spart.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Division'.
      ENDIF.
      SELECT SINGLE * FROM kna1 INTO kna1
                                WHERE kunnr IN s_kunnr.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Customer Number'.
      ENDIF.
    *----------- START-OF-SELECTION-----------------------------*
    START-OF-SELECTION.
      ls-typ = 'H'.
      ls-info = 'Sales Document Flow'.
      APPEND ls TO lh.
      ls-typ = 'S'.
      WRITE: sy-datum TO l_date USING EDIT MASK '__/__/____'.
      CONCATENATE 'DATE :' l_date INTO l_date1 SEPARATED BY space.
      ls-info = l_date1.
      APPEND ls TO lh.
      PERFORM field_cat.
      PERFORM t_sort_build USING i_sort.
      PERFORM get-data.
    *----------- END-OF-SELECTION-----------------------------*
    END-OF-SELECTION.
    IF it_final[] IS INITIAL.
        MESSAGE i000(8i) WITH 'No data Found'.
        EXIT.
      ENDIF.
    PERFORM print-data.
    *&      Form  get-data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get-data .
    *  Accesing Sales Data
      SELECT a~vbeln a~kunnr b~posnr b~matnr b~kwmeng b~netwr
       INTO CORRESPONDING FIELDS OF TABLE it_so
       FROM vbak AS a INNER JOIN vbap AS b
                             ON a~vbeln = b~vbeln
                              WHERE a~bukrs_vf = p_bukrs
                                 AND a~vkorg = p_vkorg
                                 AND  a~vtweg = p_vtweg
                                    AND a~spart = p_spart
                                     AND a~kunnr IN s_kunnr
                                          AND a~audat IN s_audat.
      LOOP AT it_so.
        SELECT SINGLE name1 FROM kna1 INTO v_name
                                         WHERE kunnr = it_so-kunnr.
        SELECT SINGLE vbeln FROM vbfa INTO v_delnum
                                          WHERE vbelv = it_so-vbeln
                                            AND  vbtyp_n = 'J'.
        IF sy-subrc = 0.
          SELECT SINGLE  vbeln FROM vbfa INTO v_invnum
                                WHERE vbelv = v_delnum
                                  AND  vbtyp_n = 'M'.
        ENDIF.
        MOVE-CORRESPONDING it_so TO it_final.
        it_final-name = v_name.
        it_final-delnum = v_delnum.
        it_final-invnum = v_invnum.
        APPEND it_final.
        CLEAR it_final.
        CLEAR v_delnum.
        CLEAR v_invnum.
      ENDLOOP.
      LOOP AT it_final.
        IF it_final-delnum NE ' '.
    * Reading Del Data.
          SELECT SINGLE  a~vbeln  a~lfdat b~posnr b~lfimg   INTO
                    (it_del-delnum, it_del-lfdat, it_del-delitem,
                     it_del-lfimg ) FROM
                        likp AS a INNER JOIN lips AS b ON a~vbeln = b~vbeln
                                   WHERE a~vbeln = it_final-delnum
                                   AND b~posnr = it_final-posnr.
          MOVE-CORRESPONDING it_del TO it_final.
          MODIFY it_final.
        ENDIF.
        IF it_final-invnum NE ' '.
    * Reading Invoice Data.
          SELECT SINGLE vbeln posnr fkimg netwr INTO
         (it_inv-invnum, it_inv-invitem, it_inv-fkimg, it_inv-amount )
                       FROM vbrp  WHERE vbeln = it_final-invnum
                                  AND   posnr = it_final-posnr.
          MOVE-CORRESPONDING it_inv TO it_final.
          MODIFY it_final.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " get-data
    *&      Form  print-data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM print-data .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = l_repid
    *     I_CALLBACK_PF_STATUS_SET          = ' '
    *     I_CALLBACK_USER_COMMAND           = ' '
         i_callback_top_of_page            = 'TOP'
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  =
    *     I_BACKGROUND_ID                   = ' '
    *     I_GRID_TITLE                      =
    *     I_GRID_SETTINGS                   =
    *     IS_LAYOUT                         =
         it_fieldcat                       = it_fcat
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
         IT_SORT                           = i_sort[]
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
    *     I_SAVE                            = ' '
    *     IS_VARIANT                        =
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *     IS_PRINT                          =
    *     IS_REPREP_ID                      =
    *     I_SCREEN_START_COLUMN             = 0
    *     I_SCREEN_START_LINE               = 0
    *     I_SCREEN_END_COLUMN               = 0
    *     I_SCREEN_END_LINE                 = 0
    *     IT_ALV_GRAPHICS                   =
    *     IT_HYPERLINK                      =
    *     IT_ADD_FIELDCAT                   =
    *     IT_EXCEPT_QINFO                   =
    *     I_HTML_HEIGHT_TOP                 =
    *     I_HTML_HEIGHT_END                 =
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER           =
    *     ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it_final.
    *   EXCEPTIONS
    *     PROGRAM_ERROR                     = 1
    *     OTHERS                            = 2
    *  IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDFORM.                    " print-data
    *&      Form  field_cat
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM field_cat .
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'VBELN'.
      wa_fcat-key = 'X'.
      wa_fcat-ref_fieldname = 'VBELN'.
      wa_fcat-ref_tabname = 'VBAK'.
      wa_fcat-seltext_m = 'Sales Order NO'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'POSNR'.
      wa_fcat-ref_fieldname = 'POSNR'.
      wa_fcat-ref_tabname = 'VBAP'.
      wa_fcat-seltext_m = 'SalesItemNO'.
      wa_fcat-fix_column = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'KUNNR'.
      wa_fcat-seltext_m = 'CUSTNUM'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'NAME'.
      wa_fcat-seltext_m = 'CUSTNAME'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-seltext_m = 'MATNUM'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'KWMENG'.
      wa_fcat-seltext_m = 'Sales Quantity'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'NETWR'.
      wa_fcat-seltext_m = 'Value'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'DELNUM'.
      wa_fcat-seltext_m = 'DeloveryNum'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'DELITEM'.
      wa_fcat-seltext_m = 'DelItemNO'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'LFDAT'.
      wa_fcat-seltext_m = 'DelDate'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'LFIMG'.
      wa_fcat-seltext_m = 'DelQuantity'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'INVNUM'.
      wa_fcat-seltext_m = 'InvoiceNum'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'INVITEM'.
      wa_fcat-seltext_m = 'InvoiceItem'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'FKIMG'.
      wa_fcat-seltext_m = 'INVQuantity'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_FINAL'.
      wa_fcat-fieldname = 'AMOUNT'.
      wa_fcat-seltext_m = 'INVvalue'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
    ENDFORM.     " field_cat
    *&      Form  top
    *       text
    FORM t_sort_build USING l_sort TYPE slis_t_sortinfo_alv.
      DATA: ls_sort TYPE slis_sortinfo_alv.
      ls_sort-fieldname = 'VBELN'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
      ls_sort-subtot    = 'X'.
      APPEND ls_sort TO l_sort.
      ls_sort-fieldname = 'KUNNR'.
      ls_sort-spos      = 2.
      ls_sort-up        = 'X'.
      APPEND ls_sort TO l_sort.
    ENDFORM.                    "t_sort_bui
    FORM top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = lh
    *   I_LOGO                   =
    *   I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP
    ===========================================================================
    I have started the new program but i have trouble with the final internal table. Since i'm using For all entries I have declared internal tables for each table. My incomplete new program is as follows(not sure if the logic is correct till what I have coded):
    *& Report  Z_SDFLOW                                                    *
    REPORT  Z_SDFLOW  NO STANDARD PAGE HEADING.
    ********* TABLES TO BE USED ***********************
    **** VBAK - SALES DOCUMENT HEADER
    * VBAP - SALES ITEM
    * VBFA - SALES DOCUMENT FLOW
    * KNA1- CUSTOMER MASTER
    * VBRK - BILLING DOCUMENT HEADER
    * VBRP - BLLING DOCUMENT ITEM
    * LIKP - DELIVERY HEADER
    * LIPS - DELIVERY ITEM
    * TOO1 - COMPANY CODES
    * SLIS.
    TYPE-POOLS: SLIS.
    ** STRUCTURE DECLARATIONS ********
    **STRUCTURE FOR ENQUIRY.
    **STRUCTURE FOR QUOTATION.
    **STRUCTURE FOR SALES ORDER HEADER- VBAK.
    TYPES: BEGIN OF XT_VBAK,
    VBELN TYPE VBAK-VBELN,     "SALES DOCUMENT NUMBER
    KUNNR TYPE VBAK-KUNNR,     " SOLD-TO-PARTY
    END OF XT_VBAK.
    **STRUCTURE FOR SALES ORDER  ITEM-VBAP
    TYPES: BEGIN OF XT_VBAP,
    POSNR TYPE VBAP-POSNR,     " SALES ITEM NUMBER
    MATNR TYPE VBAP-MATNR,     " MATERIAL NUMBER
    KWMENG TYPE VBAP-KWMENG,   " CUMMULATIVE ORDER QUANTITY IN SALES UNITS
    NETWR TYPE VBAP-NETWR,     " NET VALUE OF THE ORDER ITEM
    END OF XT_VBAP.
    ** STRUCTURE FOR DELIVERY HEADER -LIKP
    TYPES: BEGIN OF XT_LIKP,
    DELVBELN TYPE LIKP-VBELN,           "DELIVERY DOCUMENT NUMBER
    LFDAT TYPE LIKP-LFDAT,           " DELIVERY DATE
    END OF XT_LIKP.
    **STRUCTURE FOR DELIVERY ITEM - LIPS
    TYPES: BEGIN OF XT_LIPS,
    DELPOSNR TYPE LIPS-POSNR,           " DELIVERY ITEM NUMBER
    LFIMG TYPE LIPS-LFIMG,           " ACTUAL QUANTITY DELIVERED
    END OF XT_LIPS.
    **STRUCTURE FOR BILLING DOCUMENT HEADER -VBRK
    TYPES: BEGIN OF XT_VBRK,
    INVVBELN TYPE VBRK-VBELN,          "BILLING DOCUMENT NUMBER
    END OF XT_VBRK.
    **STRUCTURE FOR BILLING DOCUMENT ITEM - VBRP
    TYPES: BEGIN OF XT_VBRP,
    INVPOSNR TYPE VBRP-POSNR,          "BILLING ITEM NUMBER
    FKIMG TYPE VBRP-FKIMG,          "ACTUAL INVOICED QUANTITY
    INVNETWR TYPE VBRP-NETWR,          "NET VALUE OF THE BILLING ITEM
    END OF XT_VBRP.
    **STRUCTURE FOR FINAL INTERNAL TABLE.
    TYPES: BEGIN OF XT_FINAL,
    VBELN TYPE VBAK-VBELN,
    DELVBELN TYPE LIKP-VBELN,
    INVBELN TYPE VBRK-VBELN,
    KUNNR TYPE VBAK-KUNNR,
    POSNR TYPE VBAP-POSNR,
    DELPOSNT TYPE LIPS-POSNR,
    INVPOSNR TYPE VBRP-POSNR,
    MATNR TYPE VBAP-MATNR,
    KWMENG TYPE VBAP-KWMENG,
    NETWR TYPE VBAP-NETWR,
    INVNETWR TYPE VBRP-NETWR,
    LFDAT TYPE LIKP-LFDAT,
    LFIMG TYPE LIPS-LFIMG,
    FKIMG TYPE VBRP-FKIMG,
    NAME1 TYPE KNA1-NAME1,
    END OF XT_FINAL.
    **DATA DECLARATIONS
    DATA: V_NAME1 TYPE KNA1-NAME1,  "#EC *
          V_DELVBELN TYPE LIKP-VBELN,
          V_INVVBELN TYPE VBRK-VBELN,
          V_BUKRS TYPE T001-BUKRS,    "COMPANY CODE "#EC *
          V_AUDAT TYPE VBAK-AUDAT,
          V_VKORG TYPE VBAK-VKORG,
          V_VKGRP TYPE VBAK-VKGRP,
          V_SPART TYPE VBAK-SPART.
    **INTERNAL TABLE DECLARATIONS
    DATA: IT_VBAK TYPE STANDARD TABLE OF XT_VBAK,
          WA_VBAK TYPE XT_VBAK,
          IT_VBAP TYPE STANDARD TABLE OF XT_VBAP,
          WA_VBAP TYPE XT_VBAP,
          IT_LIKP TYPE STANDARD TABLE OF XT_LIKP,
          WA_LIKP TYPE XT_LIKP,
          IT_LIPS TYPE STANDARD TABLE OF XT_LIPS,
          WA_LIPS TYPE XT_LIPS,
          IT_VBRK TYPE STANDARD TABLE OF XT_VBRK,
          WA_VBRK TYPE XT_VBRK,
          IT_VBRP TYPE STANDARD TABLE OF XT_VBRP,
          WA_VBRP TYPE XT_VBRP,
          IT_FINAL TYPE STANDARD TABLE OF XT_FINAL,
          WA_FINAL TYPE XT_FINAL.
    **ALV DECLARATIONS
    DATA: IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FLDCAT TYPE SLIS_FIELDCAT_ALV,
          IT_LSTHDR TYPE SLIS_T_LISTHEADER,
          WA_LSTHDR TYPE SLIS_LISTHEADER,
          IT_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENTS TYPE SLIS_ALV_EVENT,
          IT_SORT TYPE SLIS_T_SORTINFO_ALV,
          IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: S_BUKRS FOR V_BUKRS NO INTERVALS NO-EXTENSION,
                    S_VBELN FOR WA_VBAK-VBELN,  "SALES DOCUMENT NUMBER
                    S_KUNNR FOR WA_VBAK-KUNNR,  "SOLD-TO-PARTY
                    S_AUDAT FOR V_AUDAT,      "SALES DOCUMENT DATE
                    S_VKORG FOR V_VKORG,      "SALES ORGANISATION
                    S_VKGRP FOR V_VKGRP,      "SALES GROUP
                    S_SPART FOR V_SPART.      "DIVISION
    SELECTION-SCREEN END OF BLOCK b1.
    *****************SCREEN VALIDATION***************
    AT SELECTION-SCREEN.
    SELECT SINGLE BUKRS FROM T001 INTO V_BUKRS WHERE BUKRS IN S_BUKRS."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID COMPANY CODE'.
    ENDIF.
    SELECT SINGLE VBELN FROM VBAK INTO
              CORRESPONDING FIELDS OF WA_VBAK WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER VALID SALES DOCUMENT NUMBER'.
    ENDIF.
    SELECT SINGLE KUNNR FROM VBAK INTO
              CORRESPONDING FIELDS OF WA_VBAK WHERE KUNNR IN S_KUNNR. "EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID CUSTOMER NUMBER'.
    ENDIF.
    SELECT SINGLE AUDAT FROM VBAK INTO V_AUDAT WHERE AUDAT IN S_AUDAT."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES DOCUMENT DATE'.
    ENDIF.
    SELECT SINGLE VKORG FROM VBAK INTO V_VKORG WHERE VKORG IN S_VKORG."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES ORGANISATION'.
    ENDIF.
    SELECT SINGLE VKGRP FROM VBAK INTO V_VKGRP WHERE VKGRP IN S_VKGRP."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES GROUP'.
    ENDIF.
    SELECT SINGLE SPART FROM VBAK INTO V_SPART WHERE SPART IN S_SPART."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES DIVISION'.
    ENDIF.
    PERFORM GET_DATA.
    *&      Form  GET_DATA
    FORM GET_DATA .
    SELECT VBELN KUNNR
            INTO TABLE IT_VBAK
            FROM VBAK
            WHERE VBELN IN S_VBELN.
    *        BUKRS_VF IN S_BUKRS AND
    *        VKORG IN S_VKORG AND
    *        VKGRP IN S_VKGRP AND
    *        SPART IN S_SPART AND
    *        KUNNR IN S_KUNNR AND
    *        AUDAT IN S_AUDAT.
    IF IT_VBAK[] IS NOT INITIAL.
    SELECT POSNR MATNR KWMENG NETWR
            INTO TABLE IT_VBAP
            FROM VBAP
            FOR ALL ENTRIES IN IT_VBAK
            WHERE VBELN = IT_VBAK-VBELN.
    ENDIF.
    IF IT_VBAK[] IS NOT INITIAL.
    SELECT VBELN LFDAT
            INTO TABLE IT_LIKP
            FROM LIKP
            FOR ALL ENTRIES IN IT_VBAK
            WHERE VBELN = IT_VBAK-VBELN.
    ENDIF.
    IF IT_VBAP[] IS NOT INITIAL.
    SELECT POSNR LFIMG
            INTO TABLE IT_LIPS
            FROM LIPS
            FOR ALL ENTRIES IN IT_VBAP
            WHERE POSNR = IT_VBAP-POSNR.
    ENDIF.
    IF IT_LIKP[] IS NOT INITIAL.
    SELECT VBELN
            INTO TABLE IT_VBRK
            FROM VBRK
            FOR ALL ENTRIES IN IT_LIKP
            WHERE VBELN = IT_LIKP-DELVBELN.
    ENDIF.
    IF IT_LIPS[] IS NOT INITIAL.
    SELECT POSNR FKIMG NETWR
            INTO TABLE IT_VBRP
            FROM VBRP
            FOR ALL ENTRIES IN IT_LIPS
            WHERE POSNR = IT_LIPS-DELPOSNR.
    ENDIF.
    ENDFORM.                    " GET_DATA
    Edited by: srk s on Jan 29, 2008 7:33 PM
    Edited by: Alvaro Tejada Galindo on Jan 29, 2008 9:49 AM

    Hi Satish,
    I have started the new program but i have trouble with the final internal table. Since i'm using For all entries, I have declared internal tables for each table. My incomplete new program is as follows(not sure if the logic is correct till what I have coded):
    *& Report  Z_SDFLOW                                                    *
    REPORT  Z_SDFLOW  NO STANDARD PAGE HEADING.
    ********* TABLES TO BE USED ***********************
    **** VBAK - SALES DOCUMENT HEADER
    * VBAP - SALES ITEM
    * VBFA - SALES DOCUMENT FLOW
    * KNA1- CUSTOMER MASTER
    * VBRK - BILLING DOCUMENT HEADER
    * VBRP - BLLING DOCUMENT ITEM
    * LIKP - DELIVERY HEADER
    * LIPS - DELIVERY ITEM
    * TOO1 - COMPANY CODES
    * SLIS.
    TYPE-POOLS: SLIS.
    ** STRUCTURE DECLARATIONS ********
    **STRUCTURE FOR ENQUIRY.
    **STRUCTURE FOR QUOTATION.
    **STRUCTURE FOR SALES ORDER HEADER- VBAK.
    TYPES: BEGIN OF XT_VBAK,
    VBELN TYPE VBAK-VBELN,     "SALES DOCUMENT NUMBER
    KUNNR TYPE VBAK-KUNNR,     " SOLD-TO-PARTY
    END OF XT_VBAK.
    **STRUCTURE FOR SALES ORDER  ITEM-VBAP
    TYPES: BEGIN OF XT_VBAP,
    POSNR TYPE VBAP-POSNR,     " SALES ITEM NUMBER
    MATNR TYPE VBAP-MATNR,     " MATERIAL NUMBER
    KWMENG TYPE VBAP-KWMENG,   " CUMMULATIVE ORDER QUANTITY IN SALES UNITS
    NETWR TYPE VBAP-NETWR,     " NET VALUE OF THE ORDER ITEM
    END OF XT_VBAP.
    ** STRUCTURE FOR DELIVERY HEADER -LIKP
    TYPES: BEGIN OF XT_LIKP,
    DELVBELN TYPE LIKP-VBELN,           "DELIVERY DOCUMENT NUMBER
    LFDAT TYPE LIKP-LFDAT,           " DELIVERY DATE
    END OF XT_LIKP.
    **STRUCTURE FOR DELIVERY ITEM - LIPS
    TYPES: BEGIN OF XT_LIPS,
    DELPOSNR TYPE LIPS-POSNR,           " DELIVERY ITEM NUMBER
    LFIMG TYPE LIPS-LFIMG,           " ACTUAL QUANTITY DELIVERED
    END OF XT_LIPS.
    **STRUCTURE FOR BILLING DOCUMENT HEADER -VBRK
    TYPES: BEGIN OF XT_VBRK,
    INVVBELN TYPE VBRK-VBELN,          "BILLING DOCUMENT NUMBER
    END OF XT_VBRK.
    **STRUCTURE FOR BILLING DOCUMENT ITEM - VBRP
    TYPES: BEGIN OF XT_VBRP,
    INVPOSNR TYPE VBRP-POSNR,          "BILLING ITEM NUMBER
    FKIMG TYPE VBRP-FKIMG,          "ACTUAL INVOICED QUANTITY
    INVNETWR TYPE VBRP-NETWR,          "NET VALUE OF THE BILLING ITEM
    END OF XT_VBRP.
    **STRUCTURE FOR FINAL INTERNAL TABLE.
    TYPES: BEGIN OF XT_FINAL,
    VBELN TYPE VBAK-VBELN,
    DELVBELN TYPE LIKP-VBELN,
    INVBELN TYPE VBRK-VBELN,
    KUNNR TYPE VBAK-KUNNR,
    POSNR TYPE VBAP-POSNR,
    DELPOSNT TYPE LIPS-POSNR,
    INVPOSNR TYPE VBRP-POSNR,
    MATNR TYPE VBAP-MATNR,
    KWMENG TYPE VBAP-KWMENG,
    NETWR TYPE VBAP-NETWR,
    INVNETWR TYPE VBRP-NETWR,
    LFDAT TYPE LIKP-LFDAT,
    LFIMG TYPE LIPS-LFIMG,
    FKIMG TYPE VBRP-FKIMG,
    NAME1 TYPE KNA1-NAME1,
    END OF XT_FINAL.
    **DATA DECLARATIONS
    DATA: V_NAME1 TYPE KNA1-NAME1,  "#EC *
          V_DELVBELN TYPE LIKP-VBELN,
          V_INVVBELN TYPE VBRK-VBELN,
          V_BUKRS TYPE T001-BUKRS,    "COMPANY CODE "#EC *
          V_AUDAT TYPE VBAK-AUDAT,
          V_VKORG TYPE VBAK-VKORG,
          V_VKGRP TYPE VBAK-VKGRP,
          V_SPART TYPE VBAK-SPART.
    **INTERNAL TABLE DECLARATIONS
    DATA: IT_VBAK TYPE STANDARD TABLE OF XT_VBAK,
          WA_VBAK TYPE XT_VBAK,
          IT_VBAP TYPE STANDARD TABLE OF XT_VBAP,
          WA_VBAP TYPE XT_VBAP,
          IT_LIKP TYPE STANDARD TABLE OF XT_LIKP,
          WA_LIKP TYPE XT_LIKP,
          IT_LIPS TYPE STANDARD TABLE OF XT_LIPS,
          WA_LIPS TYPE XT_LIPS,
          IT_VBRK TYPE STANDARD TABLE OF XT_VBRK,
          WA_VBRK TYPE XT_VBRK,
          IT_VBRP TYPE STANDARD TABLE OF XT_VBRP,
          WA_VBRP TYPE XT_VBRP,
          IT_FINAL TYPE STANDARD TABLE OF XT_FINAL,
          WA_FINAL TYPE XT_FINAL.
    **ALV DECLARATIONS
    DATA: IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FLDCAT TYPE SLIS_FIELDCAT_ALV,
          IT_LSTHDR TYPE SLIS_T_LISTHEADER,
          WA_LSTHDR TYPE SLIS_LISTHEADER,
          IT_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENTS TYPE SLIS_ALV_EVENT,
          IT_SORT TYPE SLIS_T_SORTINFO_ALV,
          IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: S_BUKRS FOR V_BUKRS NO INTERVALS NO-EXTENSION,
                    S_VBELN FOR WA_VBAK-VBELN,  "SALES DOCUMENT NUMBER
                    S_KUNNR FOR WA_VBAK-KUNNR,  "SOLD-TO-PARTY
                    S_AUDAT FOR V_AUDAT,      "SALES DOCUMENT DATE
                    S_VKORG FOR V_VKORG,      "SALES ORGANISATION
                    S_VKGRP FOR V_VKGRP,      "SALES GROUP
                    S_SPART FOR V_SPART.      "DIVISION
    SELECTION-SCREEN END OF BLOCK b1.
    *****************SCREEN VALIDATION***************
    AT SELECTION-SCREEN.
    SELECT SINGLE BUKRS FROM T001 INTO V_BUKRS WHERE BUKRS IN S_BUKRS."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID COMPANY CODE'.
    ENDIF.
    SELECT SINGLE VBELN FROM VBAK INTO
              CORRESPONDING FIELDS OF WA_VBAK WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER VALID SALES DOCUMENT NUMBER'.
    ENDIF.
    SELECT SINGLE KUNNR FROM VBAK INTO
              CORRESPONDING FIELDS OF WA_VBAK WHERE KUNNR IN S_KUNNR. "EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID CUSTOMER NUMBER'.
    ENDIF.
    SELECT SINGLE AUDAT FROM VBAK INTO V_AUDAT WHERE AUDAT IN S_AUDAT."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES DOCUMENT DATE'.
    ENDIF.
    SELECT SINGLE VKORG FROM VBAK INTO V_VKORG WHERE VKORG IN S_VKORG."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES ORGANISATION'.
    ENDIF.
    SELECT SINGLE VKGRP FROM VBAK INTO V_VKGRP WHERE VKGRP IN S_VKGRP."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES GROUP'.
    ENDIF.
    SELECT SINGLE SPART FROM VBAK INTO V_SPART WHERE SPART IN S_SPART."#EC *
    IF SY-SUBRC <> 0.
    MESSAGE E000(Z_SD2) WITH 'ENTER A VALID SALES DIVISION'.
    ENDIF.
    PERFORM GET_DATA.
    *&      Form  GET_DATA
    FORM GET_DATA .
    SELECT VBELN KUNNR
            INTO TABLE IT_VBAK
            FROM VBAK
            WHERE VBELN IN S_VBELN.
    *        BUKRS_VF IN S_BUKRS AND
    *        VKORG IN S_VKORG AND
    *        VKGRP IN S_VKGRP AND
    *        SPART IN S_SPART AND
    *        KUNNR IN S_KUNNR AND
    *        AUDAT IN S_AUDAT.
    IF IT_VBAK[] IS NOT INITIAL.
    SELECT POSNR MATNR KWMENG NETWR
            INTO TABLE IT_VBAP
            FROM VBAP
            FOR ALL ENTRIES IN IT_VBAK
            WHERE VBELN = IT_VBAK-VBELN.
    ENDIF.
    IF IT_VBAK[] IS NOT INITIAL.
    SELECT VBELN LFDAT
            INTO TABLE IT_LIKP
            FROM LIKP
            FOR ALL ENTRIES IN IT_VBAK
            WHERE VBELN = IT_VBAK-VBELN.
    ENDIF.
    IF IT_VBAP[] IS NOT INITIAL.
    SELECT POSNR LFIMG
            INTO TABLE IT_LIPS
            FROM LIPS
            FOR ALL ENTRIES IN IT_VBAP
            WHERE POSNR = IT_VBAP-POSNR.
    ENDIF.
    IF IT_LIKP[] IS NOT INITIAL.
    SELECT VBELN
            INTO TABLE IT_VBRK
            FROM VBRK
            FOR ALL ENTRIES IN IT_LIKP
            WHERE VBELN = IT_LIKP-DELVBELN.
    ENDIF.
    IF IT_LIPS[] IS NOT INITIAL.
    SELECT POSNR FKIMG NETWR
            INTO TABLE IT_VBRP
            FROM VBRP
            FOR ALL ENTRIES IN IT_LIPS
            WHERE POSNR = IT_LIPS-DELPOSNR.
    ENDIF.
    ENDFORM.                    " GET_DATA
    Code Formatted by: Alvaro Tejada Galindo on Jan 29, 2008 9:48 AM

  • Z program to download all Z programs

    HI All!
    I herad that there is sample program which downloads all z programs in SAP and writes it onto PS into individual word documents.I mean it stores all z programs on a system which will be useful for one who moves onto the next project as a backup.
    Can anyone give me that sample code please..
    Regards
    Pavan

    Hi Pavan,
    Take this code the,. This is from http://www.dalestech.com/. It downloads everything. Programs, Tables, Screen Elements,  Function Modules....... Explore the options further.
    PROGRAM zdown.
    *=======================================================================
    *=================================
    Direct Download Enterprise version 1.2.
    THIS SOFTWARE IS FOR PERSONAL USE ONLY.
    THIS PROGRAM IS FREEWARE AND IS PROVIDED ON AN AS-IS BASIS WITHOUT
    *WARRANTY OF ANY KIND.
    THE PROVIDER SPECIFICALLY DISCLAIMS ANY OTHER WARRANTY, EXPRESS OR
    *IMPLIED, INCLUDING ANY WARRANTY OF
    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
    IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY CONSEQUENTIAL,
    PROGRAM DESCRIPTION & USE
    Allows a user to download programs, Functions, DD definitions, etc
    *to the presentation server.  This
    version searches recursively for nested includes and function
    *modules, and allows you to download
    the resulting code as standard text or HTML web pages within a
    *suitable directory structure.
    You can either search by object name, using wildcards if you wish,
    *or a combination of Author and
    object name.  If you want all objects returned for a particular
    *author then select the author name
    and choose the most suitable radiobutton.  All objects will be
    *returned if the fields to the right
    hand side of the radiobutton are left completely blank.
    Compatible with R/3 Enterprise only, for older versions of SAP you
    *will need Direct Download version 5.xx.
    This version removes the programming limitations imposed by
    *developing across SAP releases 3 to 4.6.
    This program is intended to allow a person to keep a visual
    *representation of a program for backup
    purposes only as has not been designed to allow programs to be
    *uploaded to SAP systems.
    AUTHOR          : E.G.Mellodew
    PROGRAM CONTACT : [email protected]
                      www.dalestech.com
    Types
    text element structure
    TYPES: ttexttable LIKE textpool.
    GUI titles
    TYPES: tguititle LIKE d347t.
    Message classes
    TYPES: BEGIN OF tmessage,
             arbgb LIKE t100-arbgb,
             stext LIKE t100a-stext,
             msgnr LIKE t100-msgnr,
             text  LIKE t100-text,
           END OF tmessage.
    Screen flow.
    TYPES: BEGIN OF tscreenflow,
             screen LIKE d020s-dnum,
             code LIKE d022s-line,
           END OF tscreenflow.
    Holds a tablestructure definition
    TYPES: BEGIN OF tdicttablestructure,
             fieldname LIKE dd03l-fieldname,
             position  LIKE dd03l-position,
             keyflag   LIKE dd03l-keyflag,
             rollname  LIKE dd03l-rollname,
             domname   LIKE dd03l-domname,
             datatype  LIKE dd03l-datatype,
             leng      LIKE dd03l-leng,
             ddtext    LIKE dd04t-ddtext,
           END OF tdicttablestructure.
    Holds a tables attributes + its definition
    TYPES: BEGIN OF tdicttable,
             tablename    LIKE dd03l-tabname,
             tabletitle   LIKE dd02t-ddtext,
             istructure TYPE tdicttablestructure OCCURS 0,
           END OF tdicttable.
    Include program names
    TYPES: BEGIN OF tinclude,
             includename LIKE trdir-name,
             includetitle LIKE tftit-stext,
           END OF tinclude.
    Method
    TYPES: BEGIN OF tmethod,
             cmpname LIKE vseomethod-cmpname,
             descript LIKE vseomethod-descript,
             exposure LIKE vseomethod-exposure,
             methodkey TYPE string,
           END OF tmethod.
    Class
    TYPES: BEGIN OF tclass,
             scanned(1),
             clsname LIKE vseoclass-clsname,
             descript LIKE vseoclass-descript,
             msg_id LIKE vseoclass-msg_id,
             exposure LIKE vseoclass-exposure,
             state LIKE vseoclass-state,
             clsfinal LIKE vseoclass-clsfinal,
             r3release LIKE vseoclass-r3release,
             imethods TYPE tmethod OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
             itextelements TYPE ttexttable OCCURS 0,
             imessages TYPE tmessage OCCURS 0,
             textelementkey TYPE string,
             publicclasskey TYPE string,
             privateclasskey TYPE string,
             protectedclasskey TYPE string,
             typesclasskey TYPE string,
             exceptionclass TYPE i,
           END OF tclass.
    function modules
    TYPES: BEGIN OF tfunction,
             functionname LIKE tfdir-funcname,
             functiongroup LIKE enlfdir-area,
             includenumber LIKE tfdir-include,
             functionmaininclude LIKE tfdir-funcname,
             functiontitle LIKE tftit-stext,
             topincludename LIKE tfdir-funcname,
             progname LIKE tfdir-pname,
             programlinkname LIKE tfdir-pname,
             messageclass LIKE t100-arbgb,
             itextelements TYPE ttexttable OCCURS 0,
             iselectiontexts TYPE ttexttable OCCURS 0,
             imessages TYPE tmessage OCCURS 0,
             iincludes TYPE tinclude OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
             iguititle TYPE tguititle OCCURS 0,
             iscreenflow TYPE tscreenflow OCCURS 0,
           END OF tfunction.
    TYPES: BEGIN OF tprogram,
             progname LIKE trdir-name,
             programtitle LIKE tftit-stext,
             subc LIKE trdir-subc,
             messageclass LIKE t100-arbgb,
             imessages TYPE tmessage OCCURS 0,
             itextelements TYPE ttexttable OCCURS 0,
             iselectiontexts TYPE ttexttable OCCURS 0,
             iguititle TYPE tguititle OCCURS 0,
             iscreenflow TYPE tscreenflow OCCURS 0,
             iincludes TYPE tinclude OCCURS 0,
             idictstruct TYPE tdicttable OCCURS 0,
           END OF tprogram.
    Internal tables
    Dictionary object
    DATA: idictionary TYPE STANDARD TABLE OF tdicttable WITH HEADER LINE.
    Function modules.
    DATA: ifunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
    Tree display structure.
    DATA: itreedisplay TYPE STANDARD TABLE OF snodetext WITH HEADER LINE.
    Message class data
    DATA: imessages TYPE STANDARD TABLE OF tmessage WITH HEADER LINE.
    Holds a single message class an all of its messages
    DATA: isinglemessageclass TYPE STANDARD TABLE OF tmessage WITH HEADER
    LINE.
    Holds program related data
    DATA: iprograms TYPE STANDARD TABLE OF tprogram WITH HEADER LINE.
    Classes
    DATA: iclasses TYPE STANDARD TABLE OF tclass WITH HEADER LINE.
    Table prototypes
    DATA: dumidictstructure TYPE STANDARD TABLE OF tdicttablestructure.
    DATA: dumitexttab TYPE STANDARD TABLE OF ttexttable.
    DATA: dumiincludes TYPE STANDARD TABLE OF tinclude.
    DATA: dumihtml TYPE STANDARD TABLE OF string.
    DATA: dumiheader TYPE STANDARD TABLE OF string .
    DATA: dumiscreen TYPE STANDARD TABLE OF tscreenflow .
    DATA: dumiguititle TYPE STANDARD TABLE OF tguititle.
    DATA: dumimethods TYPE STANDARD TABLE OF tmethod.
      Global objects
    DATA: objfile TYPE REF TO cl_gui_frontend_services.
    DATA: objruntimeerror TYPE REF TO cx_root.
    Constants
    CONSTANTS: versionno TYPE string VALUE '1.2'.
    CONSTANTS: tables TYPE string VALUE 'TABLES'.
    CONSTANTS: like TYPE string VALUE 'LIKE'.
    CONSTANTS: type TYPE string VALUE 'TYPE'.
    CONSTANTS: typerefto TYPE string VALUE 'TYPE REF TO'.
    CONSTANTS: structure TYPE string VALUE 'STRUCTURE'.
    CONSTANTS: lowstructure TYPE string VALUE 'structure'.
    CONSTANTS: occurs TYPE string VALUE 'OCCURS'.
    CONSTANTS: function TYPE string VALUE 'FUNCTION'.
    CONSTANTS: callfunction TYPE string VALUE ' CALL FUNCTION'.
    CONSTANTS: message TYPE string  VALUE 'MESSAGE'.
    CONSTANTS: include TYPE string VALUE 'INCLUDE'.
    CONSTANTS: lowinclude TYPE string VALUE 'include'.
    CONSTANTS: destination TYPE string VALUE 'DESTINATION'.
    CONSTANTS: is_table TYPE string VALUE 'T'.
    CONSTANTS: is_program TYPE string VALUE 'P'.
    CONSTANTS: is_screen TYPE string VALUE 'S'.
    CONSTANTS: is_guititle TYPE string VALUE 'G'.
    CONSTANTS: is_documentation TYPE string VALUE 'D'.
    CONSTANTS: is_messageclass TYPE string VALUE 'MC'.
    CONSTANTS: is_function TYPE string VALUE 'F'.
    CONSTANTS: is_class TYPE string VALUE 'C'.
    CONSTANTS: is_method TYPE string VALUE 'M'.
    CONSTANTS: asterix TYPE string VALUE '*'.
    CONSTANTS: comma TYPE string VALUE ','.
    CONSTANTS: period TYPE string VALUE '.'.
    CONSTANTS: dash TYPE string VALUE '-'.
    CONSTANTS: true TYPE i VALUE 1.
    CONSTANTS: false TYPE i VALUE 0.
    CONSTANTS: lt TYPE string VALUE '<'.
    CONSTANTS: gt TYPE string VALUE '>'.
    CONSTANTS: unix TYPE string VALUE 'UNIX'.
    CONSTANTS: non_unix TYPE string VALUE 'not UNIX'.
    CONSTANTS: background_colour TYPE string VALUE '#FFFFE0'.
    CONSTANTS: colour_white TYPE string VALUE '#FFFFFF'.
    CONSTANTS: colour_black TYPE string VALUE '#000000'.
    CONSTANTS: colour_yellow TYPE string VALUE '#FFFF00'.
    CONSTANTS: comment_colour TYPE string VALUE '#0000FF'.
    CONSTANTS: htmlextension TYPE string VALUE 'html'.
    CONSTANTS: textextension TYPE string VALUE 'txt'.
    Global variables
    DATA: statusbarmessage(100).
    DATA: forcedexit TYPE i VALUE 0.
    DATA: starttime LIKE sy-uzeit.
    DATA: runtime LIKE sy-uzeit.
    DATA: downloadfileextension TYPE string.
    DATA: downloadfolder TYPE string.
    DATA: slashseparator TYPE string.
    DATA: frontendopsystem TYPE string.
    DATA: customernamespace TYPE string.
    RANGES: soprogramname FOR trdir-name.
    RANGES: soauthor FOR usr02-bname.
    RANGES: sotable FOR dd02l-tabname.
    RANGES: sofunctionname  FOR tfdir-funcname.
    RANGES: soclassname FOR vseoclass-clsname.
    RANGES: sofunctiongroup FOR enlfdir-area.
    FIELD-SYMBOLS:  TYPE tdicttable.
    Selection screen declaration
    Author
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE tblock1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(23) tauth.
    PARAMETERS: pauth LIKE usr02-bname MEMORY ID mauth.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) tpmod.
    PARAMETERS: pmod AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    *--- Local objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(36) t$tmp.
    PARAMETERS: p$tmp AS CHECKBOX DEFAULT ''.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE tblock2.
    Tables
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rtable RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(20) trtable.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tptable.
    PARAMETERS: ptable LIKE dd02l-tabname MEMORY ID mtable.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) ttnote.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(79) ttnote1.
    SELECTION-SCREEN END OF LINE.
    Message classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rmess RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(18) tpmes.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tmname.
    PARAMETERS: pmname LIKE t100-arbgb MEMORY ID mmname.
    SELECTION-SCREEN END OF LINE.
    Function modules
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rfunc RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(30) trfunc.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tpfname.
    PARAMETERS: pfname LIKE tfdir-funcname MEMORY ID mfname.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tfgroup.
    PARAMETERS: pfgroup LIKE enlfdir-area MEMORY ID mfgroup.
    SELECTION-SCREEN END OF LINE.
    Classes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rclass RADIOBUTTON GROUP r1.
    SELECTION-SCREEN COMMENT 5(30) trclass.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) tpcname.
    PARAMETERS: pclname LIKE seoclass-clsname MEMORY ID mcname.
    SELECTION-SCREEN END OF LINE.
    Programs / includes
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: rprog RADIOBUTTON GROUP r1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(18) tprog.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 10(18) trpname.
    PARAMETERS: pprog LIKE trdir-name MEMORY ID mprog.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    Language
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) tmlang.
    PARAMETERS: pmlang LIKE t100-sprsl DEFAULT 'EN'.
    SELECTION-SCREEN END OF LINE.
    Package
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) tpack.
    PARAMETERS: ppack LIKE tadiv-devclass MEMORY ID mpack.
    SELECTION-SCREEN END OF LINE.
    Customer objects
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(27) tcust.
    PARAMETERS: pcust AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 32(25) tnrange.
    PARAMETERS: pcname TYPE namespace MEMORY ID mnamespace.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b2.
    Additional things to download.
    SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE tblock3.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tptext.
    PARAMETERS: ptext AS CHECKBOX DEFAULT 'X' MEMORY ID mtext.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tmess.
    PARAMETERS: pmess AS CHECKBOX DEFAULT 'X' MEMORY ID mmess.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpinc.
    PARAMETERS: pinc AS CHECKBOX DEFAULT 'X' MEMORY ID minc.
    SELECTION-SCREEN COMMENT 40(20) trecc.
    PARAMETERS: preci AS CHECKBOX DEFAULT 'X' MEMORY ID mreci.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpfunc.
    PARAMETERS: pfunc AS CHECKBOX DEFAULT 'X' MEMORY ID mfunc.
    SELECTION-SCREEN COMMENT 40(20) trecf.
    PARAMETERS: precf AS CHECKBOX DEFAULT 'X' MEMORY ID mrecf.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tdoc.
    PARAMETERS: pdoc AS CHECKBOX DEFAULT 'X' MEMORY ID mdoc.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpscr.
    PARAMETERS: pscr AS CHECKBOX DEFAULT 'X' MEMORY ID mscr.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tpdict.
    PARAMETERS: pdict AS CHECKBOX DEFAULT 'X' MEMORY ID mdict.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(33) tsortt.
    PARAMETERS: psortt AS CHECKBOX DEFAULT ' ' MEMORY ID msortt.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b3.
    File details
    SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE tblock4.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tphtml.
    PARAMETERS: phtml RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(25) tcomm.
    PARAMETERS: pcomm AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 5(25) tback.
    PARAMETERS: pback AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tptxt.
    PARAMETERS: ptxt RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) tppath.
    PARAMETERS: pfolder LIKE rlgrap-filename OBLIGATORY MEMORY ID
    mfolder.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b4.
    Display a directory picker window
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfolder.
      DATA: objfile TYPE REF TO cl_gui_frontend_services.
      DATA: pickedfolder TYPE string.
      DATA: initialfolder TYPE string.
      CREATE OBJECT objfile.
      IF NOT pfolder IS INITIAL.
        initialfolder = pfolder.
      ELSE.
        objfile->get_temp_directory( CHANGING temp_dir = initialfolder
                                     EXCEPTIONS cntl_error = 1
                                               error_no_gui = 2
                                               not_supported_by_gui = 3 ).
      ENDIF.
      objfile->directory_browse( EXPORTING initial_folder = initialfolder
                                 CHANGING selected_folder = pickedfolder
                                 EXCEPTIONS cntl_error = 1
                                            error_no_gui = 2
                                            not_supported_by_gui = 3 ).
      IF sy-subrc = 0.
        pfolder = pickedfolder.
      ELSE.
        WRITE: / 'An error has occured picking a folder'.
      ENDIF.
    initialisation
    INITIALIZATION.
    Parameter screen texts.
      tblock1 = 'Author (Optional)'.
      t$tmp   = 'Programs only: include local objects'.
      tblock2 = 'Objects to download'.
      tblock3 = 'Additional downloads for progs, func modules and classes'.
      tblock4 = 'Download parameters'.
      tauth   = 'Author name'.
      tpmod   = 'Include programs modified by author'.
      tcust   = 'Only customer objects'.
      tnrange = 'Alt customer name range'.
      trtable = 'Tables / Structures'.
      tptable = 'Table name'.
      ttnote  = 'Please note: tables are stored under the username of the'.
      ttnote1 = 'last person who modified them.'.
      trfunc  = 'Function modules'.
      tpfname = 'Function name'.
      tfgroup = 'Function group'.
      trclass  = 'Classes'.
      tpcname = 'Class name'.
      tmess   = 'Message class'.
      tmname  = 'Class name'.
      tmlang  = 'Language'.
      tprog   = 'Programs'.
      trpname = 'Program name'.
      tpack   = 'Package'.
      tptxt   = 'Text document'.
      tphtml  = 'HTML document'.
      tcomm   = 'Highlight comments'.
      tback   = 'Include background colour'.
      tptext  = 'Text elements'.
      tpinc   = 'Include programs'.
      trecc   = 'Recursive search'.
      tppath  = 'File path'.
      tpmes   = 'Message classes'.
      tpfunc  = 'Function modules'.
      tdoc    = 'Function module documentation'.
      trecf   = 'Recursive search'.
      tpscr   = 'Screens'.
      tpdict  = 'Dictionary structures'.
      tsortt  = 'Sort table fields alphabetically'.
    Determine the frontend operating system type.
      PERFORM determinefrontendopsystem USING slashseparator.
    start-of-selection.
    START-OF-SELECTION.
      PERFORM checkcomboboxes.
      PERFORM fillselectionranges.
      downloadfolder = pfolder.
      starttime = sy-uzeit.
    Fool the HTML routines to stop them hyperlinking anything with a space
    *in them
      IF pcname IS INITIAL.
        customernamespace  = '^'.
      ELSE.
        customernamespace = pcname.
      ENDIF.
    Main program flow.
      CASE 'X'.
      Select tables
        WHEN rtable.
          PERFORM retrievetables USING idictionary[]
                                       sotable[]
                                       soauthor[].
      Select message classes tables
        WHEN rmess.
          PERFORM retrievemessageclass USING imessages[]
                                   soauthor[]      "Author
                                   pmname          "Message classname
                                   pmlang          "Message classanguage
                                  pmod.           "Modified by author
      Select function modules
        WHEN rfunc.
          IF pfname+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          IF pfgroup+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrievefunctions USING sofunctionname[]   "Function name
                                          sofunctiongroup[]  "Function group
                                      ifunctions[]       "Foundfunctions
                                      pauth         "Author
                                      ptext         "Get textelements
                                      pscr          "Get screens
                                      pcust         "Customer data only
                              customernamespace. "Customer name range
          LOOP AT ifunctions.
          Find Dict structures, messages, functions, includes etc.
            PERFORM scanforadditionalfuncstuff USING ifunctions[]
                                                     preci
          "Search for includes recursively
                                                     precf
          "Search for functions recursively
                                                     pinc
          "Search for includes
                                                     pfunc
          "Search for functions
                                                     pdict
          "search for dictionary objects
                                                     pmess
          "Search for messages
                                                     pcust
          "Customer data only
                                                     customernamespace.
            "Customer name range
          ENDLOOP.
      Select Classes
        WHEN rclass.
          IF pclname+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrieveclasses USING iclasses[]
                                        ifunctions[]
                                        soclassname[]       "Class name
                                        soauthor[]          "Author
                               customernamespace   "Customer namerange
                                        pmod       "Also modifiedby author
                                        pcust       "Customer objectonly
                                        pmess       "Find messages
                                        ptext               "Text Elements
                                   pdict               "Dictionarystructures
                                        pfunc               "Get functions
                                        pinc                "Get includes
                 precf               "Searchrecursively for functions
                preci               "Searchrecursively for includes
                'X'                 "Searchrecursively for classes
               pmlang.             "Language
          LOOP AT ifunctions.
          Find Dict structures, messages, functions, includes etc.
            PERFORM scanforadditionalfuncstuff USING ifunctions[]
                                                     preci
          "Search for includes recursively
                                                     precf
          "Search for functions recursively
                                                     pinc
          "Search for includes
                                                     pfunc
          "Search for functions
                                                     pdict
          "search for dictionary objects
                                                     pmess
          "Search for messages
                                                     pcust
          "Customer data only
                                                     customernamespace.
            "Customer name range
          ENDLOOP.
      Select programs
        WHEN rprog.
          IF pprog+0(1) CA asterix.
          Restrict the search to customer objects only.
            pcust = 'X'.
          ENDIF.
          PERFORM retrieveprograms USING iprograms[]
                                         ifunctions[]
                                         soprogramname[]    "Program name
                                         soauthor[]         "Author
                               customernamespace  "Customer nam range
                               pmod               "Also modifiedby author
                               pcust              "Customer object only
                                         pmess              "Find messages
                                         ptext              "Text Elements
                                         pdict         "Dictionaystructures
                                         pfunc            "Get functions
                                         pinc               "Get includes
                                         pscr               "Get screens
           precf              "Search recursively for functions
           preci              "Searchrecursively for includes
                                        p$tmp              "local objects
                                         ppack.             "Package
      ENDCASE.
    end-of-selection
    END-OF-SELECTION.
      IF forcedexit = 0.
      Set the file extension and output type of the file
        IF ptxt IS INITIAL.
          downloadfileextension = htmlextension.
        ELSE.
          downloadfileextension = textextension.
        ENDIF.
      Decide what to download
        CASE 'X'.
        Download tables
          WHEN rtable.
            IF NOT ( idictionary[] IS INITIAL ).
              PERFORM downloadddstructures USING idictionary[]
                                                 pfolder
                                                 htmlextension
                                                 space
                                                 psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT idictionary.
                FREE MEMORY ID idictionary-tablename.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodetables USING idictionary[]
                                               itreedisplay[]
                                               runtime.
              CLEAR idictionary[].
            ENDIF.
        Download message class
          WHEN rmess.
            IF NOT ( imessages[] IS INITIAL ).
              SORT imessages ASCENDING BY arbgb msgnr.
              LOOP AT imessages.
                APPEND imessages TO isinglemessageclass.
                AT END OF arbgb.
                  PERFORM downloadmessageclass USING isinglemessageclass[]
                                                     imessages-arbgb
                                                     pfolder
                                                     downloadfileextension
                                                     phtml
                                                     space
                                                     pcomm
                                                     customernamespace
                                                     pinc
                                                     pdict
                                                     pmess.
                  CLEAR isinglemessageclass[].
                ENDAT.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodemessages USING imessages[]
                                                 itreedisplay[]
                                                 runtime.
              CLEAR imessages[].
            ENDIF.
        Download functions
          WHEN rfunc.
            IF NOT ( ifunctions[] IS INITIAL ).
              PERFORM downloadfunctions USING ifunctions[]
                                              pfolder
                                              downloadfileextension
                                              space
                                              pdoc
                                              phtml
                                              pcomm
                                              customernamespace
                                              pinc
                                              pdict
                                              textextension
                                              htmlextension
                                              psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodefunctions USING ifunctions[]
                                                  itreedisplay[]
                                                  runtime.
              CLEAR ifunctions[].
            ENDIF.
        Download Classes
          WHEN rclass.
            IF NOT ( iclasses[] IS INITIAL ).
              PERFORM downloadclasses USING iclasses[]
                                            ifunctions[]
                                            pfolder
                                            downloadfileextension
                                            htmlextension
                                            textextension
                                            phtml
                                            pcomm
                                            customernamespace
                                            pinc
                                            pdict
                                            pdoc
                                            psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodeclasses USING iclasses[]
                                                ifunctions[]
                                                itreedisplay[]
                                                runtime.
              CLEAR iclasses[].
              CLEAR ifunctions[].
            ENDIF.
        Download programs
          WHEN rprog.
            IF NOT ( iprograms[] IS INITIAL ).
              PERFORM downloadprograms USING iprograms[]
                                             ifunctions[]
                                             pfolder
                                             downloadfileextension
                                             htmlextension
                                             textextension
                                             phtml
                                             pcomm
                                             customernamespace
                                             pinc
                                             pdict
                                             pdoc
                                             psortt.
            Free up any memory used for caching HTML versions of tables
              LOOP AT ifunctions.
                LOOP AT ifunctions-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING -tablename.
                ENDLOOP.
              ENDLOOP.
              GET TIME.
              runtime = sy-uzeit - starttime.
              PERFORM filltreenodeprograms USING iprograms[]
                                                 ifunctions[]
                                                 itreedisplay[]
                                                 runtime.
              CLEAR iprograms[].
              CLEAR ifunctions[].
            ENDIF.
        ENDCASE.
        IF NOT ( itreedisplay[] IS INITIAL ).
          PERFORM displaytree USING itreedisplay[].
        ELSE.
          statusbarmessage = 'No items found matching selection criteria'.
          PERFORM displaystatus USING statusbarmessage 1.
        ENDIF.
      ENDIF.
    *--- Memory IDs
    User name
      SET PARAMETER ID 'MAUTH' FIELD pauth.
    Table name
      SET PARAMETER ID 'MTABLE' FIELD ptable.
    Message class
      SET PARAMETER ID 'MMNAME' FIELD pmname.
    Function
      SET PARAMETER ID 'MFNAME' FIELD pfname.
    Function group
      SET PARAMETER ID 'MFGROUP' FIELD pfgroup.
    Class
      SET PARAMETER ID 'MCNAME' FIELD pclname.
    Program
      SET PARAMETER ID 'MPROG' FIELD pprog.
    Customer namespace
      SET PARAMETER ID 'MNAMESPACE' FIELD pcname.
    Folder
      SET PARAMETER ID 'MFOLDER' FIELD pfolder.
    Package
      SET PARAMETER ID 'MPACK' FIELD ppack.
    Text element checkbox
      SET PARAMETER ID 'MTEXT' FIELD ptext.
    Messages checkbox
      SET PARAMETER ID 'MMESS' FIELD pmess.
    Includes checkbox
      SET PARAMETER ID 'MINC' FIELD pinc.
    Recursive includes checkbox.
      SET PARAMETER ID 'MRECI' FIELD preci.
    Functions checkbox
      SET PARAMETER ID 'MFUNC' FIELD pfunc.
    Recursive functions checkbox
      SET PARAMETER ID 'MRECF' FIELD precf.
    Function module documntation checkbox
      SET PARAMETER ID 'MDOC' FIELD pdoc.
    Screens checkbox
      SET PARAMETER ID 'MSCR' FIELD pscr.
    Dictionary checkbox
      SET PARAMETER ID 'MDICT' FIELD pdict.
    Sort table ascending checkBox
      SET PARAMETER ID 'MSORTT' FIELD psortt.
    ****************************************SUBROUTINES*******************
    checkComboBoxes...  Check input parameters
    FORM checkcomboboxes.
      IF pauth IS INITIAL.
        CASE 'X'.
          WHEN rtable.
            IF ptable IS INITIAL.
              statusbarmessage = 'You must enter either a table name or author.'.
            ENDIF.
          WHEN rfunc.
            IF ( pfname IS INITIAL ) AND ( pfgroup IS INITIAL ).
              IF pfname IS INITIAL.
                statusbarmessage = 'You must enter either a function name or author.'.
              ELSE.
                IF pfgroup IS INITIAL.
                  statusbarmessage = 'Must enter either a func gp, or an author name.'.
                ENDIF.
              ENDIF.
            ENDIF.
          WHEN rprog.
            IF pprog IS INITIAL.
                statusbarmessage = 'You must enter either a program name or
    author name.'.
            ENDIF.
        ENDCASE.
    Check the user name of the person objects are to be downloaded for
      ELSE.
        IF pauth = 'SAP*' OR pauth = 'SAP'.
          statusbarmessage = 'Sorry cannot download all objects for SAP
    standard user'.
        ENDIF.
      ENDIF.
      IF NOT statusbarmessage IS INITIAL.
        PERFORM displaystatus USING statusbarmessage 3.
        forcedexit = 1.
        STOP.
      ENDIF.
    ENDFORM.                    "
    "checkComboBoxes
    fillSelectionRanges...      for selection routines
    FORM fillselectionranges.
      DATA: valuetofind TYPE string.
      IF NOT pauth IS INITIAL.
        soauthor-sign = 'I'.
        soauthor-option = 'EQ'.
        soauthor-low = pauth.
        APPEND soauthor.
      ENDIF.
      IF NOT ptable IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT ptable+0(1) = '/'.
          CONCATENATE pcname ptable INTO valuetofind.
        ELSE.
          valuetofind = ptable.
        ENDIF.
        sotable-sign = 'I'.
        sotable-option = 'EQ'.
        sotable-low = valuetofind.
        APPEND sotable.
      ENDIF.
      IF NOT pfname IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pfname+0(1) = '/'.
          CONCATENATE pcname pfname INTO valuetofind.
        ELSE.
          valuetofind = pfname.
        ENDIF.
        sofunctionname-sign = 'I'.
        PERFORM addoption USING valuetofind sofunctionname-option.
        sofunctionname-low = valuetofind.
        APPEND sofunctionname.
      ENDIF.
      IF NOT pfgroup IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pfgroup+0(1) = '/'.
          CONCATENATE pcname pfgroup INTO valuetofind.
        ELSE.
          valuetofind = pfgroup.
        ENDIF.
        sofunctiongroup-sign = 'I'.
        PERFORM addoption USING valuetofind sofunctiongroup-option.
        sofunctiongroup-low = valuetofind.
        APPEND sofunctiongroup.
      ENDIF.
      IF NOT pclname IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pclname+0(1) = '/'.
          CONCATENATE pcname pclname INTO valuetofind.
        ELSE.
          valuetofind = pclname.
        ENDIF.
        soclassname-sign = 'I'.
        PERFORM addoption USING valuetofind soclassname-option.
        soclassname-low = valuetofind.
        APPEND soclassname.
      ENDIF.
      IF NOT pprog IS INITIAL.
        IF NOT pcname IS INITIAL AND NOT pprog+0(1) = '/'.
          CONCATENATE pcname pprog INTO valuetofind.
        ELSE.
          valuetofind = pprog.
        ENDIF.
        soprogramname-sign = 'I'.
        PERFORM addoption USING valuetofind soprogramname-option.
        soprogramname-low = valuetofind.
        APPEND soprogramname.
      ENDIF.
    ENDFORM.                    "
    " fillSelectionRanges
    addOption...  fills the option value of ranges
    FORM addoption USING value(valuetofind)
                               option.
      IF valuetofind CA asterix.
        option = 'CP'.
      ELSE.
        option = 'EQ'.
      ENDIF.
    ENDFORM.                    "
    "addOption
    retrieveTables...             Search for tables in dictionary

  • Single stroke insertion in all fmb?

    Hi,
    Is there possible to Insert a line into all fmb/rdf with single stoke of actions.
    Version
    Forms/Reports 6i
    kanish

    What you mean with "Insert a line"? You want to modify some program units of all your forms by batch? If so for forms 6i there exists a C++ API where you can modify your forms by batch; I've found a document in my oracle home
    $ORACHE_HOME/toos/doc60/us/fapi.pdf; but I haven't used openAPI by now...
    Also this might worth reading although it seems to be about the 10g Open API...
    Or you could use a commercial product like [pitss.con|http://www.pitss.com/] or [Forms API Master|www.orcl-toolbox.com]
    regards

  • I'm using 9.2.1.  Every time I open an album, I get a "face (the same one)" covering every picture. If I click on the picture, I can see the real picture.  How do I get rid of this "face" that covers all?

    I'm usingiPhoto 9.2.1.  Recently, everytime I open an album, I get a "face (the same one)" covering every picture. If I click on the picture, I can see the real picture.  How do I get rid of this "face" that covers all?

    Make a temporary backup of your library (if you don't already have a backup of it) and launch iPhoto with the Command +Option key held down and rebuild the library with options #1, 2, 3 and 6 selected.
    OT

  • Is it possible to maintain multiple payment formats with a single Program

    Hi,
    Is it possible to maintain multiple payment formats with in a single program.
    For example let us assume that we have created 2 payments formats as 'XX-PAY1' & 'XX-PAY2'.
    When i select the parameter as '1' then 'XX-PAY1' has to run else 'XX-PAY2'.
    if its possible could you please tel us where to define the parameters in Setups.
    Many thanks,
    Zaheer S

    nazzu wrote:
    Hi,
    Is it possible to maintain multiple payment formats with in a single program.
    For example let us assume that we have created 2 payments formats as 'XX-PAY1' & 'XX-PAY2'.
    When i select the parameter as '1' then 'XX-PAY1' has to run else 'XX-PAY2'.
    if its possible could you please tel us where to define the parameters in Setups.
    Many thanks,
    Zaheer SSounds like an Apps question. Start here: https://forums.oracle.com/forums/category.jspa?categoryID=3

  • How to call the 2 Tcodes from single program.

    Dear Friends,
    I would like to call 2 tcodes form a single program based on some conditions like :
    I have a program ZRR wich is madule pool report with selection screen and screen 100, 200.
    If I excuted tcode ZXX then I need to call the report with selectin screen ( from there with giving some input data I will go to screen 100 ),
    If I excuted tcode ZYY then I need to call the same report skiping the selection screen and need to go directly screen 200.
    Pls help me on this if any bady is faced the similar problem.
    Thanks,
    Sridhar

    hi,
    yes you can do this..
    try this
    create a two screen suppose 9000 and 9001..
    then right click on your program name...
    create a TCODE say TONE..
    in this give the screen number 9000..
    now again right click on the program name
    create a TCODE say Tsecond
    in this give the screen number 9001...
    hope this will help you..
    Regards
    Ritesh J

  • When installing itunes on PC with Windows Vista, the itunes program "took over" all of my desktop icons.

    When installing itunes of my PC with Windows Vista, the itunes program "took over" all of my desktop icons.  How can I install it so it doesn't do that?  Thanks!

    You can force Vista to rebuild the desktop icons by changing your monitor's color depth momentarily. In the display properties, change to 16-bit color. Then change back to 32-bit.

  • For the first time, I downloaded a podcast in the podcast app by clicking on the cloud icon. Now, every single play button for all of my podcast episodes is grayed out. Why can't I play any of my podcasts any more?

    For the first time, I downloaded a podcast in the podcast app by clicking on the cloud icon. Now, every single play button for all of my podcast episodes is grayed out. Why can't I play any of my podcasts any more?

    Greetings Heather,
    After reading your post, it sounds like you are experiencing an error with the Podcasts app. You may want to consider restarting the device first, and then resetting if that does not work. This article provides detailed instructions for Restarting, and Reseting:
    Turn your iOS device off and on (restart) and reset
    How to restart
    Press and hold the Sleep/Wake button on the top of your device until the red slider appears. Then drag the slider to turn your device completely off.
    After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
    How to reset
    You should reset your device as a last resort and only if you can't restart it.
    To reset, press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo.
    Thank you for contributing to Apple Support Communities,
    BobbyD

  • Tcode to create single delivery document for all line items in PO

    Hi all,
    Sorry if it is a simple question, But I am from SD module. What is Tcode to create a single delivery documents for all line items in PO. I have 3 line items with Different materials having diffent quantities and there are different delivery dates and different delivery schedule dates. I need to create single delivery. Could you please tell me how to do it? What is the Tcode?
    Thanks
    Anil

    Hi,
    Inbound delivery T.code VL31N.
    Regards,
    JS

  • Love Acrobat XI, but when I installed it became the default program to open all my photos.  I'd like them to open in theirr native (JPEG, etc. format) How do I disable the PDF default conversion ? Cant' find anything in Preferences that works.

    Love Acrobat XI, but when I installed it became the default program to open all my photos.  I'd like them to open in theirr native (JPEG, etc. format) How do I disable the PDF default conversion ? Cant' find anything in Preferences that works.

    Sounds like a file association issue in Windows. Right click on the files of interest and select Open With>Choose Default Program and select the program you want used (be sure the "always use" box is checked. The Acrobat installation should not have done this change, but this is the process to make the change on each file type.

  • Use multiple LDB in  a single program

    Hi,
    I want to use multiple log Database in a single program, is there a way to acheive the same..
    Thanx.
    Arjun.G

    Hi,
    You can use function module "LDB_PROCESS" to call a second Logical Database from a program where you already assigned one Logical DB.
    There is a documentation and sample program available in every SAP system.
    1. Call transaction ABAPDOCU
    2. Expand node: Database Access > Logical Databases
    3. Double click on node: Calling LDBs using a Function Module
    There you will see an example how this can be achieved.
    <<text removed>>
    Regards,
    Ogeday
    Edited by: Matt on Feb 17, 2009 5:54 AM - please do not ask for points

  • I recently upgraded to ML and now I find that CS5.5 programs crash unexpectedly all the time. Help

    I recently upgraded to ML and now I find that CS5.5 programs crash unexpectedly all the time. Is anyone else having this issue and what's the best way to resolve this. Help.

    You might check and see if there are any Console entries about what happened when you attempted to launch a CS 5.5 app.
    Adobe links its apps with the particular volume on which it is running, and altho' I can't recall specifics, I know in the past I have had to reset Adobe's settings after OS upgrade. I do recall that it's a fairly easy procedure; just don't exactly recall what it is.
    BTW, CS 4 runs on Mountain Lion for me.

  • Single screen to extract all KPI's

    Hi
    I have 10 Reports to develop in webi with BI as backend. Is it possible to show a single screen which has all these 10 reports with radio buttion for each, so that if i check on one of the report and click OK button only that report should pop up.
    Is it possible? if it is then can any one please explain me.
    Thanks

    yeah i got same idea, and it worked well. Thanks a lot.
    But i didn't get the second one. you asked me to create a new document and with empty report, Yeah i will do it but i cannot save it though i implement open document?
    Thanks a lot for your reply, hey i got a question is there any document to know all the functionalities of Infoview? like alerters, formulas etc etc and mainly formatting reports.
    Why i am asking is until i get issue in the project i am learning but if i have some basic knowledge before in hand it make easy..:)
    If not any material just suggest me what should i do to get minimum knowledge on all the functionalities(formulas, properties, merging, purging dimensions, alerters...formating reports.. etc)
    It would be really great and helpful to me if you give your ideas.
    -Thanks

Maybe you are looking for

  • Downloading from alv to excel file

    hai    while downloading from alv grid to excel  file   i am not getting values properly. i have taken 110 fields. i am not getting prper way. can u plz tel me way....

  • Error targeting server for the EJB module while deploying the sample banking application

    I am currently having a very difficult time attempting to deploy the example banking application that I downloaded from the BEA website. I have followed all of the steps in the "Hands On: Deploying the Sample Banking Application" document, and I do f

  • Moving TM disk from wired to wireless

    Can you do an initial backup onto an external disk via firewire (from a MacBook) and then plug the disk into airport extreme to subsequent wireless backups? thanks!

  • Icons in JList (Applet)

    is it possible to display icons next to text data in a JList? (For use from with in an un-signed Applet) do I have to jar it? or can I have it grab the images from the webserver it loaded from? thanx.

  • Detecting Corrupt PDF Files

    I've got a large number of image+text multipage pdf files.  Some have corrupt images. I believe the compressed image data was truncated. Reader X and Acrobat X both display "Insufficient data for an image" when I open a bad file and scroll to the pag