Increase Scope of CTE?

I am really starting to like CTEs. My only qualm is that you can only use them within the first statement after you declare them. I wish they would remain active for the duration of the sql batch just like everything else (variables,local temp tables, ect). Is there any trick so that you can use them multiple times? Maybe define them as a string and do dynamic sql or something like that? Hopefully (i have not researched the new version of sql server) in SQL Server 2008 the scope has increase. Anyways any help would be appreciated.
thanks,
Ncage

I'm sorry but i have to respectfully disagree. Maybe in your environment this is ok but in ours its not. We already have over 10,000 stored procedures. To create a view for every subquery you have in each stored procedure and create one or more deployable units is something we consider to be unnecessary and im sure a lot of people feel the same. Sure we use views but we only use them when we know they are going to be used multiple times for good code reuse. Now definining your subquery at the top of the stored procedure is VERY plausable and its something we would like to do because it would make our stored procedures cleaner. Please i am trying to ask if there is a way to do what i was asking in the original post and not trying to have a discuss of how we should design/structure things in our system.
Ncage 

Similar Messages

  • Increase Scope of Custom variables in Oracle JVM

    We on our project are facing the following problem, any suggestions to work around this would be appreciated :
    We our using Oracle 9i JVM for development
    Our Sample problem flow is as follows :
    A package PKG1 has three procedures PROC1/PROC2/PROC3
    A java class JC1 is invoked by a procedure PROC1 - JC1 is running under oracle JVM.
    JC1 does the task of mapping a custom user defined java object to an oracle collection and invokes a procedure PROC2 (we are using thin client connection object in JAVA by means of simple JDBC calls to connect to the database.) which takes the oracle collection as input parameter and does processing over it.
    A procedure PROC3 does the task of calling PROC1 and then tries to access global variables defined in the package set by PROC2 , which comes out as a failed operation throwing the error as:
         ORA-06531: Reference to uninitialized collection
    The reason for the above behavior is : In the parent oracle session invoked by PROC1 the class JC1 opens another child database session for PROC2 and thus values set in the child thread are not visible to the parent.
    Required support: Is there a means for setting up of some property in ORACLE or Java which can enforce the JAVA CLASS to use its parent / invoking oracle session or if there is any other approach to overcome the above situation.

    Anand,
    I believe the Java in the Oracle Database forum is more appropriate for your question.
    You said:
    The reason for the above behavior is the parent oracle session opens
    another child database session
    How do you do this? And why? And what evidence makes you certain that this is the problem?
    Good Luck,
    Avi.

  • An interesting trend for Novell

    This is my own observation, and I hope I am not right
    During the last couple of years I am noticing an interesting trend for where Novell is going as a company and as software products. As a starter, the Identity&Security portfolio was taken away from Novell and into NetIQ. I'm talking fundamental Novell systems with great value (at least for me) and/or strong market position - Identity Manager, Access Manager, Sentinel, eDirectory!!!, and few others that are not so important. These have always been recognizable as Novell products, but now they are NetIQ's. Not a big deal at first glance, at least until Novell and NetIQ get acquired by 2 different companies.
    What is left for Novell is OES, GroupWise, ZENworks and few others which are not so important. I see that current Novell software gets modified in order to work in AD environments - this is the case with GW2014, this is the case with the coming OES2015 and this is the case with ZENworks since quite a while. Every Novell software was separated from eDirectory, and made compatible with AD. At least so far everything works still with eDirectory. Not only this, but in many official Novell documentation (user guides, admin guides, training materials, etc.) in the compatibility for directory systems part, they always put Microsoft Active Directory before eDirectory, and Windows before SLES! This pisses me off, but hey - who am I to object... Microsoft on the other hand has competitive products that everybody is using (so they must be gorgeous, perfect, the best, no?) - Exchange, Windows Server, SCCM, AD. I still don't understand what could be a reason, provided one is entirely MS shop (and using the best perfect gorgeous one-and-only products from MS), to add another vendor into their infrastructure (along with everything that comes from that - other suppliers, other support, other bugs, incompatibilities, etc.. Price? Hmmm, I am not quite convinced. Anyway, the Novell Marketing has to worry about this, not me.
    My question is, is Novell becoming just another software company (thousands like it out there) that writes pieces of software for Microsoft environments? And instead of competing with Microsoft, it is going to compete with thousands of others for what's left from Microsoft's table? Hmmm...

    Simeonof wrote:
    > During the last couple of years I am noticing an interesting trend for
    > where Novell is going as a company and as software products. As a
    > starter, the Identity&Security portfolio was taken away from Novell
    > and into NetIQ. I'm talking fundamental Novell systems with great
    > value (at least for me) and/or strong market position - Identity
    > Manager, Access Manager, Sentinel, eDirectory!!!, and few others that
    > are not so important.
    Keep in mind that before The Attachmate Group acquired Novell, TAG
    consisted of Attachmate and NetIQ. NetIQ had a long history of
    focusing on security and identity products. Then TAG acquired Novell,
    and really Novell didn't have a focus. Novell did file & networking,
    collaboration, endpoint management, workload automation, datacenter,
    security, identity... the list went on and on. So the idea was to have
    each business unit focus on its core competencies. Novell for the
    longest time of course had file & networking (since 1983), and both
    collaboration and endpoint management had been around since the
    mid-90s. The products you mentioned were moved to NetIQ since that had
    always been their focus, and the Linux/datacenter stuff got moved over
    to SUSE. Each BU now could focus on what had made it great instead of
    being sidetracked by being a mile wide and a foot deep.
    > What is left for Novell is OES, GroupWise, ZENworks and few others
    > which are not so important.
    Those three products are the "heritage" products. But I wouldn't say
    that things such as Filr, iPrint, and File Management Suite aren't so
    important. The Enterprise File Sync & Share (EFSS) space is huge right
    now as there's more and more organizations need a way to get to their
    files from home and work, from mobile devices, share large files with
    those outside the organization, etc and they want to do it securely.
    They need something better than Dropbox/BOX/OneDrive/Google Drive, and
    we're seeing tons of interest in Filr as a result. In many cases
    customers that have migrated away completely from our heritage products
    are coming back to Novell purely for Filr. iPrint is a similar story
    now that it's been broken out of NW/OES. Also as more and more
    organizations try to get a handle on their file server architectures,
    and we're seeing a lot of interest there, then things such as File
    Reporter and Storage Manager (both part of FMS) become very important.
    > I see that current Novell software gets
    > modified in order to work in AD environments - this is the case with
    > GW2014, this is the case with the coming OES2015 and this is the case
    > with ZENworks since quite a while.
    Yes, and it's also the case with Filr, iPrint, and FMS. Basically
    every product in the Novell portfolio has full support for AD so that
    customers aren't forced to run the entire Novell stack to get the
    advantages of a particular product.
    > At least so
    > far everything works still with eDirectory.
    There are no plans to change this, either.
    > Not only this, but in
    > many official Novell documentation (user guides, admin guides,
    > training materials, etc.) in the compatibility for directory systems
    > part, they always put Microsoft Active Directory before eDirectory,
    > and Windows before SLES!
    Well, the MS stuff comes first alphabetically. :-) Active Directory
    comes before eDirectory, Microsoft comes before Novell. A lot of the
    docs I see take this approach which then doesn't give any preferential
    treatment to any technology. It just uses the alphabet.
    > Microsoft on the other hand has competitive products that
    > everybody is using
    Many are using, but not everybody. If everybody was using Microsoft's
    products, then all other software vendors would be gone. :-)
    > My question is, is Novell becoming just another software company
    > (thousands like it out there) that writes pieces of software for
    > Microsoft environments?
    Not at all. We still have the products that made us great, we're
    innovating new products, and we're making sure all of our products have
    an increased scope to support Microsoft, Novell, even Google
    environments. This strategy allows us to support existing customers
    while also bringing back former ones.
    Does this washcloth smell like chloroform?

  • BI presentation service connection BI Server use ODBC.why?

    why not use JDBC replace ODBC?
    what the advantage for ODBC?

    some other points..
    ODBC ships default with windows OS installation, where as JDBC drivers need to be installed manually where needed.
    ODBC performance is better than Java, odbc directly works with native libraries of OS, where java internally uses JVM to do it.
    JDBC is only for Java, while ODBC works with C, Visual Basic, and other languages. This obviously increases scope of application to integrate with the new components/applications.
    BI server can be accessible only using ODBC DSN( Analytics Web)
    For databases like Oracle you can use OCI interface,which is a JDBC driver internally.
    - Madan

  • Download all programs

    Guys,
    I want to download the programs from application server into one folder.If there is any program please help on this.
    If there is any attachment please mail to this id.
    mailid:[email protected]
    regards,
    vijay

    HI Vijay,
    the following program works on 47..
    [code]
    REPORT ZDOWN.
    $$================================================================$$
    Direct download ver 4.12.
    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,
       INDIRECT, SPECIAL OR INCIDENTAL DAMAGES, EVEN IF PROVIDER
       HAS BEEN ADVISED BY CLIENT OF THE POSSIBILITY OF SUCH
       POTENTIAL LOSS OR DAMAGE. CLIENT AGREES TO HOLD PROVIDER
       HARMLESS FROM AND AGAINST ANY AND ALL CLAIMS, LOSSES,
       LIABILITIES AND EXPENSES.  BY INSTALLING OR RUNNING
       THIS PROGRAM YOU ARE AGREEING TO THE TERMS AND CONDITONS STATED
       ABOVE.
    $$----
    $$
    PROGRAM DESCRIPTION
    Allows a user to download ABAPs, 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.
    Compatible with R/3 versions 3 and 4.
    $$----
    $$
    AUTHORS         : E.Mellodew & John Davies-Hale
    PROGRAM HISTORY
    1.0   Original program created
    2.0   Modified selection texts so they are now stored within
            the actual abap program.
          Added functionality to download text elements and selection
            texts for any downloaded online programs.
          Added functionality to download message classes.
          Added functionality to download screens.
    2.1   Fixed program names being truncated when downloading
            programs on version 4 systems.
    3.0   New version - allows you to download files in HTML format as
            well as text format.
    3.1   Added the ability to download nested include programs.
    3.2   Added the ability to download custom dictionary structures
             referenced within programs.
           Added the option to include/exclude local private objects.
           Fixed problem with HTML documents not displaying correctly
             within Netscape Communicator.
    3.21   Added domain name texts to HTML dictionary structure download.
           Fixed issue whereby field symbols displayed incorrectly within
             HTML documents.
    4.00   Re-structured program.
           Increased scope of options on parameter screen
           Created user friendly screen showing downloads
           Allows user to download function modules
           Program is now fully recursive and allows downloading of
             includes within includes/functions
             and functions within functions/includes.
    4.02   Added ability to download module pools
           Added 'key' flag to dictionary downloads
    4.03   Screen 1000's can now be downloaded if they belong to a
             module pool and are not a parameter screen
    4.10   Added ability to download function module documentation
    4.11   Problem with some documentation not being downloaded fixed
    Limitations
    SAP does not have the provision to create sub-folders at present.
    Messages are not downloaded for nested includes
    TABLES - DATABASES
    TABLES: RS38M, TADIR, TRDIR, DD01T, "REPOSRC,
    TRDIRE, T100, TLIBV,
            DD02L, DD03L, DD04T, V_FDIR, TFDIR, TFTIT, D010INC, DD02T.
    TYPES
    *----- Text element structure
    TYPES: T_TEXTTAB LIKE TEXTPOOL.
    *--- Message classes
    TYPES: BEGIN OF T_MESSAGES,
             MSGID LIKE TRDIRE-MSGID,
             MSGNR LIKE T100-MSGNR,
             TEXT  LIKE T100-TEXT,
           END OF T_MESSAGES.
    *--- screen flow.
    TYPES: BEGIN OF T_SCREEN_FLOW,
             SCREEN LIKE D020S-DNUM,
             CODE LIKE D022S-LINE,
           END OF T_SCREEN_FLOW.
    *--- Data dictionary objects - tables, structures.
    TYPES: BEGIN OF T_DICT_STRUCT,
             TABNAME   LIKE DD03L-TABNAME,
             TABTEXT    LIKE DD02T-DDTEXT,
             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 T_DICT_STRUCT.
    *--- Function Modules
    TYPES: BEGIN OF T_FUNCTIONS,
             FUNCNAME LIKE TFDIR-FUNCNAME,
             INCLUDE  LIKE TFDIR-INCLUDE,
             PNAME    LIKE TFDIR-PNAME,
             STEXT    LIKE TFTIT-STEXT,
           END OF T_FUNCTIONS.
    *--- Include program names
    TYPES: BEGIN OF T_INCLUDES,
             PROG LIKE TRDIR-NAME,
             TEXT(255),
           END OF T_INCLUDES.
    *----- ABAP program list
    TYPES: BEGIN OF T_PROGRAMMES,
             DEVCLASS        LIKE TADIR-DEVCLASS,
             PROG            LIKE TRDIR-NAME,
             TEXT(255),
             SUBC(1)         TYPE C,
             FUNCTIONS       TYPE T_FUNCTIONS  OCCURS 0,
           END OF T_PROGRAMMES.
    DATA - INTERNAL TABLES
    *---- Program texts - declaration only not used
    DATA: I_TEXTTAB TYPE T_TEXTTAB OCCURS 0 WITH HEADER LINE.
    DATA: I_MESSAGES TYPE T_MESSAGES OCCURS 0 WITH HEADER LINE.
    DATA: I_SCREEN_FLOW TYPE T_SCREEN_FLOW.
    *----- Program content for text download
    DATA: BEGIN OF CONTENT OCCURS 0,
            LINE(255),
          END OF CONTENT.
    *--- Programme texts.
    DATA: I_PROGRAMME_TEXTS TYPE T_TEXTTAB OCCURS 0 WITH HEADER LINE.
    *--- dictionary object
    DATA: I_DICTIONARY TYPE T_DICT_STRUCT OCCURS 0 WITH HEADER LINE.
    *--- Allows HTML routines to create an HTML without the table name on
         each line.
    DATA: BEGIN OF I_DICT_MINUS_TABNAME OCCURS 0,
             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 I_DICT_MINUS_TABNAME.
    *--- Table names of customer tables, used for searching for tables
    DATA: BEGIN OF TABLE_NAMES OCCURS 0,
            TABNAME LIKE I_DICTIONARY-TABNAME,
            TABTEXT  LIKE DD02T-DDTEXT,
          END OF TABLE_NAMES.
    *--- Function Modules.
    DATA: I_FUNCTIONS TYPE T_FUNCTIONS OCCURS 0 WITH HEADER LINE.
    DATA: I_FUNCTIONS_2 TYPE T_FUNCTIONS OCCURS 0 WITH HEADER LINE.
    *--- Customer function names, used for searching for functions
    DATA: BEGIN OF FUNCTION_NAMES OCCURS 0,
           FUNCNAME LIKE I_FUNCTIONS-FUNCNAME,
          END OF FUNCTION_NAMES.
    DATA: BEGIN OF I_PROGRAMMES OCCURS 0,
            DEVCLASS        LIKE TADIR-DEVCLASS,
            PROG            LIKE TRDIR-NAME,
            TEXT(255),
            SUBC(1)         TYPE C,
            MESSAGES        TYPE T_MESSAGES OCCURS 0,
            TEXT_ELEMENTS   TYPE T_TEXTTAB OCCURS 0,
            SELECTION_TEXTS TYPE T_TEXTTAB OCCURS 0,
            SCREEN_FLOW     TYPE T_SCREEN_FLOW OCCURS 0,
            INCLUDES        TYPE T_INCLUDES OCCURS 0,
            FUNCTIONS       TYPE T_FUNCTIONS OCCURS 0,
            DICT_STRUCT     TYPE T_DICT_STRUCT OCCURS 0,
          END OF I_PROGRAMMES.
    *--- Names of function modules used within programmes
    data: i_prog_includes type t_includes occurs 0 with header line.
    *--- Includes to download
    DATA: I_INCLUDES LIKE I_PROGRAMMES OCCURS 0 WITH HEADER LINE.
    *--- Tree display structure.
    DATA: I_NODE LIKE SNODETEXT OCCURS 0 WITH HEADER LINE.
    *--- Temp table of downloaded objects.
    DATA: BEGIN OF I_DOWNLOADED OCCURS 0,
            OBJECT(30),
          END OF I_DOWNLOADED.
    DATA - WORKING FIELDS
    DATA: FOOTER_MESSAGE LIKE CONTENT-LINE.
    DATA: MESS(100).
    DATA: TEMP_FUNC_NAME LIKE I_FUNCTIONS-FUNCNAME.
    DATA: FORCED_EXIT TYPE I VALUE 0.
    DATA: START_TIME LIKE SY-UZEIT.
    DATA: RUN_TIME LIKE SY-UZEIT.
    DATA: RUN_TIME_CHAR(8).
    RANGES: S_PROG   FOR TRDIR-NAME.
    RANGES: S_DEV    FOR TADIR-DEVCLASS.
    RANGES: S_AUTH   FOR USR02-BNAME.
    RANGES: S_TABLE  FOR DD02L-TABNAME.
    RANGES: S_FNAME  FOR TFDIR-FUNCNAME.
    RANGES: S_FGROUP FOR ENLFDIR-AREA.
    CONSTANTS
    CONSTANTS: C_TABLES(6) VALUE 'TABLES'.
    CONSTANTS: C_LIKE(4) VALUE 'LIKE'.
    CONSTANTS: C_TYPE(4) VALUE 'TYPE'.
    CONSTANTS: C_STRUCTURE(9) VALUE 'STRUCTURE'.
    CONSTANTS: C_COMMA(1) VALUE ','.
    CONSTANTS: C_PERIOD(1) VALUE '.'.
    CONSTANTS: C_VERSION_NO(4) VALUE '4.12'.
    SELECTION SCREEN
    *--- Author
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE T_B1.
      selection-screen begin of line.
      SELECTION-SCREEN COMMENT 5(23) T_AUTH.
      PARAMETERS: P_AUTH LIKE USR02-BNAME.
      selection-screen end of line.
    selection-screen begin of line.
       SELECTION-SCREEN COMMENT 5(36) T_PMOD.
       parameters: p_mod as checkbox.
    selection-screen end of line.
    SELECTION-SCREEN: END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE T_B2.
    *--- Tables
      selection-screen begin of line.
        PARAMETERS: R_TABLE RADIOBUTTON GROUP R1.
        SELECTION-SCREEN COMMENT 5(20) T_RTABLE.
      selection-screen end of line.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 10(18) T_PTABLE.
        PARAMETERS: P_TABLE LIKE DD02L-TABNAME.
      SELECTION-SCREEN END OF LINE.
      selection-screen begin of line.
        SELECTION-SCREEN COMMENT 10(69) T_TNOTE.
      selection-screen end of line.
    selection-screen begin of line.
       SELECTION-SCREEN COMMENT 14(61) T_TNOTE1.
    selection-screen end of line.
    *--- Function Modules
      SELECTION-SCREEN BEGIN OF LINE.
        PARAMETERS: R_FUNC RADIOBUTTON GROUP R1.
        SELECTION-SCREEN COMMENT 5(30) T_RFUNC.
      selection-screen end of line.
      selection-screen begin of line.
        SELECTION-SCREEN COMMENT 10(18) T_PFNAME.
        PARAMETERS: P_FNAME LIKE TFDIR-FUNCNAME.
      selection-screen end of line.
      selection-screen begin of line.
        SELECTION-SCREEN COMMENT 10(18) T_FGROUP.
        PARAMETERS: P_FGROUP LIKE ENLFDIR-AREA.
      selection-screen end of line.
    *--- Programs / Includes
      SELECTION-SCREEN BEGIN OF LINE.
        PARAMETERS: R_PROG RADIOBUTTON GROUP R1.
        SELECTION-SCREEN COMMENT 5(18) T_RPROG.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 10(18) T_RPNAME.
        PARAMETERS: P_PROG LIKE TRDIR-NAME MEMORY ID RID.
      SELECTION-SCREEN END OF LINE.
      selection-screen begin of line.
        SELECTION-SCREEN COMMENT 10(18) T_SDEV.
       PARAMETERS: P_DEV LIKE TADIR-DEVCLASS.
      selection-screen end of line.
    *--- Local objects
      SELECTION-SCREEN SKIP.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(27) T_$TMP.
        PARAMETERS: P_$TMP AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B2.
    *-----  Additional things to download.
    SELECTION-SCREEN: BEGIN OF BLOCK B3 WITH FRAME TITLE T_B3.
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(30) T_PTEXT.
      PARAMETERS: P_TEXT AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(30) T_PMES.
      PARAMETERS: P_MES AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(30) T_PINC.
      PARAMETERS: P_INC AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN COMMENT 40(20) T_RECU.
      PARAMETERS: P_RECI AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
      selection-screen begin of line.
      SELECTION-SCREEN COMMENT 1(30) T_PFUNC.
      PARAMETERS: P_FUNC AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN COMMENT 40(20) T_RECF.
      PARAMETERS: P_RECF AS CHECKBOX DEFAULT 'X'.
      selection-screen end of line.
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(30) T_DOC.
      PARAMETERS: P_DOC AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
      selection-screen begin of line.
      SELECTION-SCREEN COMMENT 1(30) T_PSCR.
      PARAMETERS: P_SCR AS CHECKBOX.
      selection-screen end of line.
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(30) T_PDICT.
      PARAMETERS: P_DICT AS CHECKBOX DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B3.
    *-----  File details
    SELECTION-SCREEN: BEGIN OF BLOCK B4 WITH FRAME TITLE T_B4.
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(20) T_PHTML.
        PARAMETERS: P_HTML RADIOBUTTON GROUP G1 DEFAULT 'X'.
        SELECTION-SCREEN COMMENT 30(20) T_PHEXT.
        PARAMETERS: P_HEX(4) TYPE C DEFAULT 'Html' LOWER CASE.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(20) T_PTXT.
        PARAMETERS: P_TXT RADIOBUTTON GROUP G1.
        SELECTION-SCREEN COMMENT 30(20) T_PEXT.
        PARAMETERS: P_TEX(4) TYPE C DEFAULT 'Txt' LOWER CASE.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(20) T_PPATH.
        PARAMETERS: P_PATH LIKE RLGRAP-FILENAME
                                               OBLIGATORY DEFAULT 'C:\temp'.
        SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK B4.
      INITIALIZATION
    INITIALIZATION.
    *--- parameter screen texts.
    T_B1     = 'Author (Optional)'.
    T_B2     = 'Objects to download'.
    T_B3     = 'Additional downloads'.
    T_B4     = 'Download parameters'.
    T_AUTH   = 'Author name'.
    T_PMOD   = 'Include programs modified by author'.
    T_RTABLE = 'Tables'.
    T_PTABLE = 'Table name'.
    T_TNOTE  = 'Please note: tables are stored under the username of'.
    T_TNOTE1 = '             the last person who modified them.'.
    T_RFUNC  = 'Function modules'.
    T_PFNAME = 'Function name'.
    T_FGROUP = 'Function group'.
    T_RPROG  = 'Programs'.
    T_RPNAME = 'Program name'.
    T_SDEV   = 'Development class'.
    T_PTXT   = 'Text document'.
    T_PHTML  = 'HTML document'.
    T_PTEXT  = 'Text elements'.
    T_PINC   = 'Include programs'.
    T_RECU   = 'Recursive search'.
    T_PHEXT  = 'File extension'.
    T_PEXT   = 'File extension'.
    T_PPATH  = 'File path'.
    T_PMES   = 'Message classes'.
    T_PFUNC  = 'Function modules'.
    T_DOC    = 'Function module documentation'.
    T_RECF   = 'Recursive search'.
    T_PSCR   = 'Screens'.
    T_PDICT  = 'Dictionary structures'.
    T_$TMP   = 'Include local objects'.
    CONCATENATE 'Extracted by Direct download v' C_VERSION_NO
                             ' 1998-2000.' INTO FOOTER_MESSAGE.
    START-OF-SELECTION.
    START-OF-SELECTION.
      PERFORM CHECK_COMBO_BOXES.
      PERFORM FILL_RANGES.
      START_TIME = SY-UZEIT.
      TRANSLATE P_HEX TO LOWER CASE.
      TRANSLATE P_TEX TO LOWER CASE.
    *--- Main program flow.
      CASE 'X'.
    *--- Select tables
        WHEN R_TABLE.
          PERFORM RETRIEVE_TABLES TABLES I_DICTIONARY
                                         TABLE_NAMES
                                         S_TABLE.
        WHEN R_FUNC.
    *--- Select function modules
          PERFORM RETRIEVE_FUNCTIONS TABLES S_FNAME
                                            S_FGROUP
                                            I_PROGRAMMES
                                            I_FUNCTIONS
                                     USING 1.
          LOOP AT I_FUNCTIONS.
             PERFORM FUNC_INCLUDE_NAME USING I_FUNCTIONS-PNAME
                                             I_FUNCTIONS-INCLUDE
                                             TEMP_FUNC_NAME
                                             0.
             PERFORM FIND_INCLUDE_PROGRAMS USING TEMP_FUNC_NAME.
             PERFORM FIND_CUSTOM_FUNCTIONS TABLES I_FUNCTIONS
                                           USING TEMP_FUNC_NAME.
          ENDLOOP.
          SORT I_PROG_INCLUDES ASCENDING BY PROG.
          DELETE ADJACENT DUPLICATES FROM I_PROG_INCLUDES COMPARING PROG.
          perform retrieve_functions tables s_fname
                                            s_fgroup
                                            I_FUNCTIONS
                                            I_FUNCTIONS_2
                                     USING 0.
          I_FUNCTIONS[] = I_FUNCTIONS_2[].
    *--- Select programs
        WHEN R_PROG.
          MESS = 'Processing please wait...'.
          PERFORM DISPLAY_STATUS USING MESS 0.
          PERFORM RETRIEVE_PROGRAMS TABLES I_PROGRAMMES
                                           S_PROG
                                           S_DEV
                                           S_AUTH.
      ENDCASE.
    END-OF-SELECTION
    END-OF-SELECTION.
      IF FORCED_EXIT = 0.
        CASE 'X'.
          WHEN R_TABLE.
            IF NOT ( I_DICTIONARY[] IS INITIAL ).
              PERFORM DOWNLOAD_DD_STRUCTURES TABLES I_DICTIONARY
                                             USING P_PATH.
              PERFORM FILL_TREE_NODE_TABLES TABLES I_DICTIONARY.
            ENDIF.
          WHEN R_FUNC.
            IF NOT ( I_FUNCTIONS[] IS INITIAL ).
              PERFORM DOWNLOAD_FUNCTIONS TABLES I_FUNCTIONS
                                         USING P_PATH.
              PERFORM FILL_TREE_NODE_FUNCTIONS TABLES I_FUNCTIONS.
            ENDIF.
          WHEN R_PROG.
            IF NOT ( I_PROGRAMMES[] IS INITIAL ).
              PERFORM DOWNLOAD_PROGRAMS TABLES I_PROGRAMMES
                                        USING P_PATH.
              PERFORM FILL_TREE_NODE_PROGRAMS TABLES I_PROGRAMMES.
            ENDIF.
        ENDCASE.
        IF NOT ( I_NODE[] IS INITIAL ).
          PERFORM DISPLAY_TREE TABLES I_NODE.
        ELSE.
          MESS = 'No items found matching selection criteria'.
          PERFORM DISPLAY_STATUS USING MESS 2.
        ENDIF.
      ENDIF.
    *--- Name parameters
      SET PARAMETER ID 'RID' FIELD P_PROG.
      SET PARAMETER ID 'DOB' FIELD P_TABLE.
    SET PARAMETER ID 'DVC' FIELD P_DEV.
      SET PARAMETER ID 'LIB' FIELD P_FNAME.
    ****************************SUBROUTINES*******************************
    CHECK_COMBO_BOXES...
    FORM CHECK_COMBO_BOXES.
        IF P_AUTH IS INITIAL.
          CASE 'X'.
            WHEN R_TABLE.
              IF P_TABLE IS INITIAL.
                MESS = 'You must enter a table name or author'.
              ENDIF.
            WHEN R_FUNC.
              IF ( P_FNAME IS INITIAL AND P_FGROUP IS INITIAL ).
                CONCATENATE 'You must enter a function name,'
                            'function group or author'
                            INTO MESS SEPARATED BY SPACE.
              ENDIF.
            WHEN R_PROG.
              IF P_PROG IS INITIAL.
                CONCATENATE 'You must enter a program name'
                            'development class or author'
                            INTO MESS SEPARATED BY SPACE.
              ENDIF.
          ENDCASE.
        ELSE.
          IF R_FUNC = 'X'.
            IF ( ( P_AUTH <> '' ) AND
               ( ( P_FNAME <> '' ) OR ( P_FGROUP <> '' ) ) ).
                  CONCATENATE 'You cannnot enter an author as well as'
                              'a func name or func group'
                              INTO MESS SEPARATED BY SPACE.
            ENDIF.
          ENDIF.
        ENDIF.
        IF NOT MESS IS INITIAL.
          PERFORM DISPLAY_STATUS USING MESS 3.
          FORCED_EXIT = 1.
          STOP.
        ENDIF.
    ENDFORM.                    " CHECK_COMBO_BOXES
    FILL_RANGES...      for selection routines
    FORM FILL_RANGES.
      if not p_auth is initial.
        s_auth-sign = 'I'.
        s_auth-option = 'EQ'.
        s_auth-low = p_auth.
        append s_auth.
      endif.
      IF NOT P_TABLE IS INITIAL.
        S_TABLE-SIGN = 'I'.
        S_TABLE-OPTION = 'EQ'.
        S_TABLE-LOW = P_TABLE.
        APPEND S_TABLE.
      endif.
      IF NOT P_FNAME IS INITIAL.
        S_FNAME-SIGN = 'I'.
        S_FNAME-OPTION = 'EQ'.
        S_FNAME-LOW = P_FNAME.
        APPEND S_FNAME.
      endif.
      IF NOT P_FGROUP IS INITIAL.
        S_FGROUP-SIGN = 'I'.
        S_FGROUP-OPTION = 'EQ'.
        S_FGROUP-LOW = P_FGROUP.
        APPEND S_FGROUP.
      endif.
      IF NOT P_PROG IS INITIAL.
        S_PROG-SIGN = 'I'.
        S_PROG-OPTION = 'EQ'.
        S_PROG-LOW = P_PROG.
        APPEND S_PROG.
      ENDIF.
    IF NOT P_DEV IS INITIAL.
       S_DEV-SIGN = 'I'.
       S_DEV-OPTION = 'EQ'.
       S_DEV-LOW = P_DEV.
       APPEND S_DEV.
    ENDIF.
      IF P_$TMP IS INITIAL.
        S_DEV-SIGN = 'E'.
        S_DEV-OPTION = 'EQ'.
        S_DEV-LOW = '$TMP'.
        APPEND S_DEV.
      ENDIF.
    ENDFORM.
    FIND_TABLES...             Search for tables in dictionary
    FORM RETRIEVE_TABLES TABLES I_DICTIONARY STRUCTURE I_DICTIONARY
                                TABLE_NAMES STRUCTURE TABLE_NAMES
                                RANGE_TABLE STRUCTURE S_TABLE.
      SELECT TABNAME FROM DD02L
                     INTO TABLE_NAMES-TABNAME
                     WHERE TABNAME IN RANGE_TABLE
                     AND AS4USER IN S_AUTH.
        SELECT SINGLE DDTEXT FROM DD02T
                             INTO TABLE_NAMES-TABTEXT
                             WHERE TABNAME = TABLE_NAMES-TABNAME
                             AND DDLANGUAGE = SY-LANGU.
        APPEND TABLE_NAMES.
      ENDSELECT.
      IF NOT ( TABLE_NAMES[] IS INITIAL ).
        PERFORM FIND_TABLE_DEFINITION TABLES I_DICTIONARY
                                             TABLE_NAMES.
      ENDIF.
    ENDFORM.
    find_table_definition... from sap database.
    FORM FIND_TABLE_DEFINITION TABLES I_DICT STRUCTURE I_DICTIONARY
                                      TABLENAMES STRUCTURE TABLE_NAMES.
    DATA gotstate LIKE  dcobjif-gotstate.
    DATA dd02v_wa LIKE dd02v.
    DATA dd09l_wa LIKE dd09l.
    DATA: DEFINITION LIKE DD03P OCCURS 0 WITH HEADER LINE.
      LOOP AT TABLENAMES.
       CALL FUNCTION 'DDIF_TABL_GET'
         EXPORTING
              NAME          = TABLENAMES-TABNAME
              STATE         = 'A'
              LANGU         = 'E'
         IMPORTING
             GOTSTATE      = GOTSTATE
             DD02V_WA      = DD02V_WA
             DD09L_WA      = DD09L_WA
         TABLES
              DD03P_TAB     = DEFINITION
         EXCEPTIONS
              ILLEGAL_INPUT = 1
              OTHERS        = 2.
        IF SY-SUBRC = 0 AND GOTSTATE = 'A'.
          LOOP AT DEFINITION.
            MOVE-CORRESPONDING DEFINITION TO I_DICT.
            MOVE TABLE_NAMES-TABTEXT TO I_DICT-TABTEXT.
            APPEND I_DICT.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    RETRIEVE_FUNCTIONS...   Retrieve function modules from SAP DB
    FORM RETRIEVE_FUNCTIONS TABLES S_FNAME STRUCTURE S_FNAME
                                   S_FGROUP STRUCTURE S_FGROUP
                                   FUNC_NAMES STRUCTURE I_FUNCTIONS
                                   FOUND_FUNC STRUCTURE I_FUNCTIONS
                            USING MAIN_SCAN.
    RANGES: SEL_FNAME  FOR TFDIR-FUNCNAME.
    RANGES: SEL_FGROUP FOR ENLFDIR-AREA.
      SEL_FNAME[] = S_FNAME[].
      SEL_FGROUP[] = S_FGROUP[].
      IF  MAIN_SCAN = 1.
        IF NOT P_AUTH IS INITIAL.
    *---  select all function groups by author
          SELECT AREA FROM TLIBV INTO SEL_FGROUP-LOW
                           WHERE UNAME = P_AUTH.
            SEL_FGROUP-SIGN = 'I'.
            SEL_FGROUP-OPTION = 'EQ'.
            APPEND SEL_FGROUP.
          ENDSELECT.
        ENDIF.
    *--- Select by function name and/or function group.
          SELECT * FROM V_FDIR
                   WHERE FUNCNAME IN SEL_FNAME
                     AND AREA IN SEL_FGROUP
                     AND GENERATED = ''.
            SELECT SINGLE FUNCNAME
                          PNAME
                          INCLUDE  FROM TFDIR
                                   INTO (FOUND_FUNC-FUNCNAME,
                                         FOUND_FUNC-PNAME,
                                         FOUND_FUNC-INCLUDE)
                                   WHERE FUNCNAME = V_FDIR-FUNCNAME.
            SELECT SINGLE STEXT FROM TFTIT
                                INTO FOUND_FUNC-STEXT
                                WHERE SPRAS = SY-LANGU
                                  AND FUNCNAME = V_FDIR-FUNCNAME.
            APPEND I_FUNCTIONS.
          ENDSELECT.
      ELSE.
        LOOP AT FUNC_NAMES.
            SELECT SINGLE FUNCNAME
                          PNAME
                          INCLUDE  FROM TFDIR
                                   INTO (FOUND_FUNC-FUNCNAME,
                                         FOUND_FUNC-PNAME,
                                         FOUND_FUNC-INCLUDE)
                                   WHERE FUNCNAME = FUNC_NAMES-FUNCNAME.
            SELECT SINGLE STEXT FROM TFTIT
                                INTO FOUND_FUNC-STEXT
                                WHERE SPRAS = SY-LANGU
                                  AND FUNCNAME = FUNC_NAMES-FUNCNAME.
            APPEND FOUND_FUNC.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    RETRIEVE_PROGRAMS...    find programs and sub objects from SAP DB
    FORM RETRIEVE_PROGRAMS TABLES I_PROG STRUCTURE I_PROGRAMMES
                                  SEL_PROG STRUCTURE S_PROG
                                  SEL_DEV  STRUCTURE S_DEV
                                  SEL_AUTH STRUCTURE S_AUTH.
    DATA: COUNTER TYPE I VALUE 1.
    DATA: WA_INCLUDES TYPE T_INCLUDES.
    *----- Select by name, development class and author
      IF P_MOD IS INITIAL.
        SELECT  PROGNAME SUBC FROM REPOSRC
                                  INTO (I_PROG-PROG,
                                        I_PROG-SUBC)
                                  WHERE PROGNAME IN SEL_PROG
                                  AND DEVCLASS IN SEL_DEV
                                    AND CNAM     IN SEL_AUTH.
                                   AND ( SUBC     = '1'
                                         OR SUBC  = 'M' ).
          APPEND I_PROG.
        ENDSELECT.
      ELSE.
        SELECT PROGNAME SUBC FROM REPOSRC
                                  INTO (I_PROG-PROG,
                                        I_PROG-SUBC)
                                  WHERE PROGNAME IN SEL_PROG
                                  AND DEVCLASS IN SEL_DEV
                                   AND SUBC     = '1'
                                    AND ( CNAM     IN SEL_AUTH
                                     OR   UNAM     IN SEL_AUTH ).
          APPEND I_PROG.
        ENDSELECT.
      ENDIF.
    *----- Find extra items
      LOOP AT I_PROG.
        PERFORM FIND_PROGRAM_NAME USING I_PROG-PROG
                                  CHANGING I_PROG-TEXT.
        IF P_TEXT = 'X'.
          PERFORM FIND_PROGRAM_TEXTS TABLES I_PROG.
        ENDIF.
        IF P_MES = 'X'.
          PERFORM FIND_MESSAGES TABLES I_PROG USING I_PROG-PROG.
        ENDIF.
        IF P_SCR = 'X'.
          PERFORM FIND_SCREEN_FLOW TABLES I_PROG USING I_PROG-PROG.
        ENDIF.
        if p_dict = 'X'.
          perform find_custom_dict_structures tables i_prog
                                                     table_names
                                              using i_prog-prog.
        endif.
        if p_func = 'X'.
          PERFORM FIND_CUSTOM_FUNCTIONS TABLES FUNCTION_NAMES
                                        USING I_PROG-PROG.
        endif.
        IF P_INC = 'X'.
           PERFORM FIND_INCLUDE_PROGRAMS USING I_PROG-PROG.
           PERFORM SORT_INCLUDES TABLES I_PROG.
    *---   find all relevant data for the includes table.
           IF NOT ( I_INCLUDES[] IS INITIAL ).
             LOOP AT I_PROG-INCLUDES INTO WA_INCLUDES.
               IF P_DICT = 'X'.
                  PERFORM FIND_CUSTOM_DICT_STRUCTURES TABLES I_PROG
                                                             TABLE_NAMES
                                                     USING WA_INCLUDES-PROG.
               ENDIF.
               IF P_FUNC = 'X'.
                  PERFORM FIND_CUSTOM_FUNCTIONS TABLES FUNCTION_NAMES
                                                USING WA_INCLUDES-PROG.
               ENDIF.
             ENDLOOP.
           ENDIF.
        ENDIF.
        PERFORM SORT_DICT_STRUCTURES TABLES I_PROG TABLE_NAMES.
        PERFORM SORT_FUNCTIONS TABLES I_PROG FUNCTION_NAMES.
        MODIFY I_PROG INDEX COUNTER.
        COUNTER = COUNTER + 1.
      ENDLOOP.
    ENDFORM.
    FIND_PROGRAM_NAME... find programme name
    FORM FIND_PROGRAM_NAME USING PROGramme_name
                           CHANGING programme_TEXT.
      READ TEXTPOOL PROGRAMME_NAME INTO I_PROGRAMME_TEXTS LANGUAGE SY-LANGU.
      READ TABLE I_PROGRAMME_TEXTS WITH KEY 'R'.
      IF SY-SUBRC EQ 0.
        PROGRAMME_TEXT = I_PROGRAMME_TEXTS-ENTRY.
        DELETE I_PROGRAMME_TEXTS INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                               " FIND_PROGRAMME_NAME
      FIND_PROGRAM_TEXTS...  Messages and text elements
    FORM FIND_PROGRAM_TEXTS TABLES I_PROG STRUCTURE I_PROGRAMMES.
    DATA: TEMP_SELECTION TYPE T_TEXTTAB.
    *--- selection texts.
      LOOP AT I_PROGRAMME_TEXTS WHERE ID = 'S'.
        APPEND I_PROGRAMME_TEXTS TO I_PROG-SELECTION_TEXTS.
        DELETE I_PROGRAMME_TEXTS INDEX SY-TABIX.
      ENDLOOP.
    *--- Text elements.
      LOOP AT I_PROGRAMME_TEXTS WHERE ID = 'I'.
        APPEND I_PROGRAMME_TEXTS TO I_PROG-TEXT_ELEMENTS.
      ENDLOOP.
    ENDFORM.
      FIND_MESSAGES... finds all program messages including dynamically
                         called messages - providing they have been
                         declared on one complete line.
    FORM FIND_MESSAGES TABLES I_PROG STRUCTURE I_PROGRAMMES
                       USING PROGNAME.
    *--- lines for main program
    DATA: I_REPORT_LINES LIKE CONTENT OCCURS 0 WITH HEADER LINE.
    *-- Separate working area for internal table
    DATA: WA_MESSAGES TYPE T_MESSAGES.
    DATA: msgid LIKE trdire-msgid.
    DATA: HEAD LIKE I_REPORT_LINES-LINE.
    DATA: TAIL LIKE I_REPORT_LINES-LINE.
    DATA: headlength TYPE i VALUE 0.
    DATA: TAILLENGTH TYPE I VALUE 0.
    *--- Read the program contents into memory
      READ REPORT PROGNAME INTO I_REPORT_LINES.
    *--- Read the report content looking for message calls.
      LOOP AT I_REPORT_LINES.
        TRANSLATE I_REPORT_LINES TO UPPER CASE.
        IF NOT ( I_REPORT_LINES IS INITIAL ) AND I_REPORT_LINES(1) <> '*'.
        Find the main message definition.
          IF I_REPORT_LINES CS 'MESSAGE-ID'.
            SHIFT I_REPORT_LINES LEFT DELETING LEADING SPACE.
            SPLIT I_REPORT_LINES AT 'MESSAGE-ID' INTO HEAD TAIL.
            SPLIT TAIL AT '.' INTO HEAD TAIL.
            SHIFT HEAD LEFT DELETING LEADING SPACE.
            MSGID = HEAD.
          ELSE.
        There are three different ways of calling a message to display
        this routine looks for all three of them and strips the message
        class and number out of the code
            IF I_REPORT_LINES CS 'MESSAGE'.
              SHIFT I_REPORT_LINES-LINE UP TO 'MESSAGE'.
              IF I_REPORT_LINES-LINE CS '('.
                SPLIT I_REPORT_LINES-LINE AT '(' INTO HEAD TAIL.
                HEADLENGTH = STRLEN( HEAD ).
                HEADLENGTH = HEADLENGTH - 3.
                WA_MESSAGES-MSGNR = HEAD+HEADLENGTH(3).
                SPLIT TAIL AT ')' INTO HEAD TAIL.
                WA_MESSAGES-MSGID = HEAD.
              ELSEIF I_REPORT_LINES-LINE CS 'ID'.
                SHIFT I_REPORT_LINES UP TO 'ID'.
                SPLIT I_REPORT_LINES AT SPACE INTO HEAD TAIL.
                SHIFT TAIL LEFT DELETING LEADING SPACE.
                HEAD = TAIL.
                SPLIT HEAD AT SPACE INTO HEAD TAIL.
                WA_MESSAGES-MSGID = HEAD.
                SPLIT TAIL AT 'NUMBER' INTO HEAD TAIL.
                SHIFT TAIL LEFT DELETING LEADING SPACE.
                TAILLENGTH = STRLEN( TAIL ).
                IF TAILLENGTH = 3.
                  WA_MESSAGES-MSGNR = TAIL+0(3).
                ELSE.
                  CONTINUE.
                ENDIF.
              ELSE.
    *---        use message class from main program
                SPLIT I_REPORT_LINES-LINE AT SPACE INTO HEAD TAIL.
                SHIFT TAIL LEFT DELETING LEADING SPACE.
                WA_MESSAGES-MSGID = MSGID.
                WA_MESSAGES-MSGNR = TAIL+1(3).
              ENDIF.
              APPEND WA_MESSAGES TO I_PROG-MESSAGES.
              CLEAR WA_MESSAGES.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
    *--- Sort the messages and delete multiple occurrences from the
       internal table.
      SORT I_PROG-MESSAGES ASCENDING BY MSGID MSGNR.
      DELETE I_PROG-MESSAGES WHERE MSGID(1) <> 'Y'
                               AND MSGID(1) <> 'Z'.
      DELETE ADJACENT DUPLICATES FROM I_PROG-MESSAGES.
      DELETE I_PROG-MESSAGES WHERE MSGID IS INITIAL.
      DELETE I_PROG-MESSAGES WHERE MSGNR IS INITIAL.
      DELETE I_PROG-MESSAGES WHERE MSGNR CN '0123456789'.
      LOOP AT I_PROG-MESSAGES INTO WA_MESSAGES.
        SELECT SINGLE TEXT FROM T100 INTO WA_MESSAGES-TEXT
                           WHERE SPRSL = SY-LANGU
                             AND ARBGB = WA_MESSAGES-MSGID
                             AND MSGNR = WA_MESSAGES-MSGNR.
         MODIFY I_PROG-MESSAGES FROM WA_MESSAGES INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.
    FIND_SCREEN_FLOW...
    FORM FIND_SCREEN_FLOW TABLES I_PROG STRUCTURE I_PROGRAMMES
                          USING PROGNAME.
    DATA: FLOW TYPE T_SCREEN_FLOW OCCURS 0 WITH HEADER LINE.
       call function 'DYNPRO_PROCESSINGLOGIC'
            exporting
                 REP_NAME  = PROGNAME
            tables
                 SCR_LOGIC = FLOW.
      SORT FLOW ASCENDING BY SCREEN.
      DELETE ADJACENT DUPLICATES FROM FLOW COMPARING SCREEN.
      IF I_PROG-SUBC <> 'M'.
        DELETE FLOW WHERE SCREEN = '1000'.
      ENDIF.
      LOOP AT FLOW.
        APPEND FLOW TO I_PROG-SCREEN_FLOW.
      ENDLOOP.
    ENDFORM.                    " FIND_SCREEN_FLOW
    FIND_INCLUDE_PROGRAMS... Search each program for INCLUDE programs
    FORM FIND_INCLUDE_PROGRAMS USING VALUE(PROGRAM).
    DATA: FIP_PROG(255),
          TAIL(255).
    *--- Lines for include
    DATA: I_INC_LINES LIKE CONTENT OCCURS 0 WITH HEADER LINE.
    *----- Read ABAP
        READ REPORT PROGRAM INTO I_INC_LINES.
    *----- Examine each line of ABAP
        LOOP AT I_INC_LINES.
    *--- find include programs.
          IF I_INC_LINES(1) = '*' OR I_INC_LINES IS INITIAL.
            CONTINUE.
          ENDIF.
          TRANSLATE I_INC_LINES-LINE TO UPPER CASE.
          SHIFT I_INC_LINES-LINE UP TO 'INCLUDE'.
          IF ( I_INC_LINES-LINE(9) EQ 'INCLUDE Z' ) OR
             ( I_INC_LINES-LINE(9) EQ 'INCLUDE Y' )
          AND I_INC_LINES-LINE+8(9) NE SPACE
          AND SY-TABIX <> 1.
            FIP_PROG = I_INC_LINES-LINE+8(64).
            SPLIT FIP_PROG AT '.' INTO FIP_PROG TAIL.
          Append program name to list of include programs
            SELECT SINGLE * FROM TRDIR WHERE NAME EQ FIP_PROG.
            CHECK SY-SUBRC EQ 0.
            I_PROG_INCLUDES-PROG = FIP_PROG.
            APPEND I_PROG_INCLUDES.
    *--- Recursively look for other includes.
            IF P_RECI = 'X'.
              PERFORM FIND_INCLUDE_PROGRAMS USING FIP_PROG.
            ENDIF.
          ENDIF.
        ENDLOOP.
    ENDFORM.                               " FIND_INCLUDE_PROGRAMS
    SORT_INCLUDES.. Remove any duplicates from include table.
    FORM SORT_INCLUDES TABLES I_PROG STRUCTURE I_PROGRAMMES.
      SORT I_PROG_INCLUDES.
      DELETE ADJACENT DUPLICATES FROM I_PROG_INCLUDES COMPARING PROG.
      LOOP AT I_PROG_INCLUDES.
        PERFORM FIND_PROGRAM_NAME USING    I_PROG_INCLUDES-PROG
                                  CHANGING I_PROG_INCLUDES-TEXT.
        MODIFY I_PROG_INCLUDES.
        MOVE-CORRESPONDING I_PROG_INCLUDES TO I_INCLUDES.
        APPEND I_INCLUDES.
      ENDLOOP.
      APPEND LINES OF I_PROG_INCLUDES TO I_PROG-INCLUDES.
      CLEAR I_PROG_INCLUDES. REFRESH I_PROG_INCLUDES.
    ENDFORM.
    FIND_CUSTOM_DICT_STRUCTURES... Look for any dictionary objects
                                    not created by SAP
    FORM FIND_CUSTOM_DICT_STRUCTURES TABLES I_PROG STRUCTURE I_PROGRAMMES
                                            TABLE_NAMES
                                            STRUCTURE TABLE_NAMES
                                     USING VALUE(PROGRAM).
    DATA I_LINES LIKE CONTENT OCCURS 0 WITH HEADER LINE.
    DATA: HEAD(76).
    DATA: TAIL(76).
    DATA: LINETYPE(9).
    DATA: END_OF_LINE TYPE I VALUE 1.
    *--- read abap
       READ REPORT PROGRAM INTO I_LINES.
       LOOP AT I_LINES.
    *--- find custom tables.
         IF I_LINES-LINE(1) = '*' OR I_LINES IS INITIAL.
           CONTINUE.
         ENDIF.
         TRANSLATE I_LINES-LINE TO UPPER CASE.
    Determine the linetype.
         IF END_OF_LINE = 1.
           SHIFT I_LINES-LINE UP TO C_TABLES.
           IF SY-SUBRC = 0.
             LINETYPE = C_TABLES.
           ELSE.
             SHIFT I_LINES-LINE UP TO C_LIKE.
             IF SY-SUBRC = 0.
               LINETYPE = C_TYPE.
             ELSE.
               SHIFT I_LINES-LINE UP TO C_TYPE.
        

  • DHCP scope increase and changes in wlc

    hi,
    i am using wlc 4402 with a mgt ip 172.26.150.x/24 and ap manager ip 172.26.150.x/24, my all ap get the ip address from dhcp . currently in dhcp server 172.26.150.3 to 254 dhcp scope is configured. at mysite some devices are configured like ipad,iphone or galaxy tab with mac binding in dhcp server. now this pool is almost full. i have a policy configured for these devices for mac binding is done in DHCP. to increase pool what are the changes i need to do in wlc. what are the changes i need to do in dhcp server . is policy made for mac binding in dhcp server will get affected by this ?
    regards
    rajat                  

    Hi Rajat,
    Use a /23 range ip address rather than using 172.26.150.x/24. So at first this change need to be carried out on the L3 device (which will the default gateway of the WLC managment interface). Accordingly the AP managment ip and ap manager ip's subnet mask is going to change from /24 to /23.
    Then ensure that on the dhcp server you expand the scope from /24 to /23. This is will not affect the MAC bindings as long as you are using the same ip range with a different subnet mask.
    Hope that helps
    Regards
    Najaf
    Please rate when applicable or helpful !!!

  • Increase DHCP scope/subnet mask

    Hi,
    Windows Server 2003, IP Range 192.168.0.1 - 192.168.0.254, Subnet 255.255.255.0.
    Now I'm facing shortage of IP.
    Planing to increase the IP range. Which one is preferable -
    Scope Extension
    Resubnetting
    Superscoping
    Which one would not affect or less affect my current settings.
    Thanks,
    Sathish

    Hi,
    I've Configured Superscope as suggested.
    First IP range - 192.168.0.1
    Superscope IP I've added is - 192.168.3.1
    Both the IP's are communication each other. I'm in a critical situation now.
    None of the above IP's are communicating with the Internet. When I ping to the google dns 8.8.8.8 it's replying, but when I ping or browse google or any other the page is not loading.
    I'm using a Wingate Proxy, given Wingate Proxy server IP (192.168.0.140) as gateway IP while configuring superscope.
    When I tracert 8.8.8.8
    *  *  *  * request timedout
    ping to 192.168.1.1
    ping to public IP
    Here 192.168.1.1 is the router IP.
    Could any one Suggest me the solution, what is to be done to resolve this issue.
    Sathish

  • How to increase dynamically open_cursors and session_cached_cursors

    how to increase dynamically open_cursors and session_cached_cursors
    for Ex. alter system open_cursors = 500

    instane level:
    alter system set session_cached_cursors=200 scope = spfile; or set init.ora file.
    alter system set open_cursors=400;
    More details about open_cursor and session_cached_cursor, refer the below link
    http://www.orafaq.com/node/758
    Regards
    RajaBaskar

  • What are the key requirements to write a recursive cte?

    what are the key requirements to write a recursive cte?
    when we will go for a recursive cte.

    A common table expression (CTE) can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE, or CREATE VIEW statement. A CTE is similar to a derived table in that it is not stored as an
    object and lasts only for the duration of the query. Unlike a derived table, a CTE can be self-referencing and can be referenced multiple times in the same query.
    A CTE can be used to:
    Create a recursive query. For more information, see https://technet.microsoft.com/en-us/library/ms186243%28v=sql.105%29.aspx
    Substitute for a view when the general use of a view is not required; that is, you do not have to store the definition in metadata.
    Enable grouping by a column that is derived from a scalar subselect, or a function that is either not deterministic or has external access.
    Reference the resulting table multiple times in the same statement.
    Source : https://technet.microsoft.com/en-us/library/ms190766%28v=sql.105%29.aspx

  • Best way in using models & Increasing performance

    Hi all,
    I had some doubts in creation of model objects.
    1.How many RFCs can a model object can contain?
    2.I had a business senario where i had to use 4 Fm for performing a task.If i craete a single model object for this 4 Fun modules.Will it increase performance or else creating a model object for each fun module.will incresae the performance.
    3.Are there any good docs in SDN for Best practices or performance increasing in creation and using of model objects.please do paste the links or anyone have any docs plz send me.
    Thanks & Rgards,
    Lokesh

    HI...
    1.How many RFCs can a model object can contain?
    SAP recommonds...
    RFC Connection pools are specific to JCO Destination.
    Therefore, all deployed applications using the same model object pointing to the same JCO destination will share the SAME CONNECTION POOL.
    This fact defines both the scope of the connection management and determines the number of oncurrent application that may use the JCO destination.
    A MODEL OBJECT SHOULD CONTAIN THOSE RFMS THAT SUPPLY THE FUNCTIONALITY OF EITHER A DISCRETE BUSINESS TASK OR SOME ATOMIC SUBSET OF THE BUSINESS TASK
    -> HAVING ONE RFM PER MOEDL IS INEFFICIENT FROM A CONNECTION MANAGEMENT POINT OF VIEW.
    -> HAVING ALL YOUR RFMS IN ONE BIG MODEL OBJECT IS INEFFICIENT FROM A REUSE POINT OF VIEW
    2.I had a business senario where i had to use 4 Fm for performing a task.If i craete a single model object for this 4 Fun modules.Will it increase performance or else creating a model object for each fun module.will incresae the performance.
    As above described if the RFMs supply the functionality for a single task then put it in one model
    3.Are there any good docs in SDN for Best practices or performance increasing in creation and using of model objects.please do paste the links or anyone have any docs plz send me.
    This is described in JA310 ( Web dynpro JAVA) book. you can download it from marketplace.
    PradeeP

  • Iam trying to increase the size of the font on my homepage on fox

    My homepage on Firefox is mytelus.com. The print is too small and I want to increase the size of the print. How do I do that? I have been able to increase the size of the print on my homepage on Internet Explorer, but can't seem to find instructions on how to do the same on my Firefox homepage. thanks

    Hi , 
     Your RV215W wont support for secondary IP address , only option for your to expand your subnet mask from 24 to 23 on your LAN interface . 
    Like XX.XX.24.0/23
    Configure your DHCP scope accordingly to support /23 sub net .
    HTH
    Sandy

  • Need to increase max process in the init file. Please check and correct me

    Friends,
    We have Oracle9iR2 database in the RHEL AS 3.0 box.
    Sometimes we are getting ORA-00020, means the max process is reached.
    We have planned to increase the max process from 150 to 250 in the init.ora file.
    i think the init.ora will be in /u01/app/oracle/admin/ourdb/pfile/
    correct me if i am wrong......
    Step1: vi init.ora file and change the process from
    processes=150
    to
    processes=250
    while the database is running.
    Step2:shutdown the database and start the database.
    is there only 2 steps or i have to shutdown the db at the beginning itself?
    Or i have to take any precautions. Our server is HP ML-370 with dual processor.
    Thanks
    Sathyguy

    hi sathy
    SQLNET.AUTHENTICATION_SERVICES
    Purpose
    Use the parameter SQLNET.AUTHENTICATION_SERVICES to enable one or more authentication services. If authentication has been installed, it is recommended that this parameter be set to either none or to one of the authentication methods.
    Default
    None
    Values
    Authentication Methods Available with Oracle Net Services:
    none for no authentication methods. A valid username and password can be used to access the database.
    all for all authentication methods
    nts for Windows NT native authentication
    SQL> conn hr as sysdba
    Enter password:
    Connected.
    SQL>--change sqlnet.ora ( authentication setting to 'NONE')
    SQL> conn hr as sysdba
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    Warning: You are no longer connected to ORACLE.
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> show user
    USER is "SYS"
    SQL>
    set processes parameter through two methods
    first.
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> show parameter spfile
    NAME                                 TYPE        VALUE
    spfile                               string      D:\ORACLE\DB_1\DATABASE\SPFILE
                                                     ORCL.ORA
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     150
    SQL> alter system set processes = 175 scope=spfile;
    System altered.
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     150
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    Database opened.
    SQL> show parameter spfile
    NAME                                 TYPE        VALUE
    spfile                               string      D:\ORACLE\DB_1\DATABASE\SPFILE
                                                     ORCL.ORA
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     175
    SQL>
    second method.
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> create pfile from spfile;
    File created.
    SQL> startup pfile=D:\oracle\Db_1\database\initorcl.ora
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    Database opened.
    SQL> show parameter spfile
    NAME                                 TYPE        VALUE
    spfile                               string
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     175
    SQL> --- now my database is  start through pfile instead of spfile and i will
    SQL> -- change in pfile again processes parameter 150.
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     175
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup pfile=D:\oracle\Db_1\database\initorcl.ora
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    Database opened.
    SQL> show parameter processes
    NAME                                 TYPE        VALUE
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     150
    SQL>
    1. Why can't i just edit the init.ora file to change the processes=250 while the db is running?
    you can edit the init.ora file.
    If i edit the init.ora file by shutting down the db will there any problem
    not problem
    init.ora file is text file you can edit easly
    spfilesid.ora file is binary file you can not edit directly ... if you want to edit spfile file first change in pfile then create spfile from pfile...
    hope this helps
    Taj.

  • How to increase no. of processes

    Dear friends,
    I need to increase no. of processes.
    Kindly anybody tell me the proces how to icrease it?
    Thanx in advance.
    Prashant T.

    do you use a pfile or spfile, sysdba privileges are needed
    to tell:
    SQL> show parameter spfile
    NAME TYPE VALUE
    spfile string $ORACLE_HOME/dbs/spfilehmdw10.ora
    if you get a value u have spfile
    spfile:
    alter system set processes=151 scope=spfile;
    stop start db.
    pfile:
    edit your init.ora file parameter process=new value
    stop start db.
    Note: The default values of the SESSIONS and TRANSACTIONS parameters are derived from this parameter. Therefore, if you change the value of PROCESSES, you should evaluate whether to adjust the values of those derived parameters.
    Message was edited by:
    Slater

  • Increasing SGA_MAX_SIZE  in Oracle 10.2.0.1

    Hi,
    we have successfully upgrade our database from 8.1.7.0 to 10.2.0.1
    now in the database control, SGA max size is 524MB
    i want to increase it, as to increase the size of SHARED_POOL_SIZE and DATBASE_BUFFER size
    i have checked the init.ora file, in that there is no parameter mentioned as sga_max_size
    from where and how to increase the SGA_MAX_SIZE in 10g version ?
    with regards

    Hi,
    Database is using init.ora file in the pfile folder
    In the init.ora file i have increased the SGA_MAX_SIZE parameter to 1024Mb from 524Mb
    Now, from dbcontrol screen, Automatic Shared Memory Managment is Disabled and i want to make it ENABLE
    now when i click on ENABLE button, on the next page it shows total SGa size i.e 332 Mb
    and further wheni click on "OK" button for ASSM configuration, it shows the error as below :-
    1.) SGATargetSize - ORA-02097 : parameter cannot be modified because specified vale is invalid ORA : cannot set sga_target due to existing internal settings, see alert log for information
    in the alert log , it mentions
    Cannot set sga_target with db_block_buffers set
    and
    Alter system set java_pool_size='0' SCOPE=MEMORY;
    2) sharedPoolsize - ORA-02097 parameter cannot be modified because specified value is invalid ORA-04034: unable to shrink pool to specified size
    now i just mentioned the memory component details for reference :
    shared pool : 104 Mb
    buffer cache : 169 Mb
    large pool : 0
    java pool : 4 Mb
    other : 54 Mb
    total SGA -- 332 Mb
    Maximum SGA Size -- 1024 Mb
    how to make ASSM Enable ???
    With Regards

  • Increase the SGA_MAX_SIZE and SGA_TARGET parameters

    HI ,
    I am using oracle 10g R2 and windows server 2003 .
    My server is having 8 GB RAM .
    I want to increase the SGA_MAX_SIZE and SGA_TARGET parameters .
    I am using the below command , but getting the error
    SQL> alter system set sga_max_size=2000M scope=spfile ;
    alter system set sga_max_size=2000M scope=spfile
    ERROR at line 1:
    ORA-32001: write to SPFILE requested but no SPFILE specified at startup
    Can someone please help ..

    hi
    connect as sys user and then try...
    first make folder as backup and then copy the old SPFILEorcl to the same folder(backup)
    now you can easily modify the files otherwise you will get error..
    you will find here..
    C:\ORACLE_HOME\database
    SQL>  alter system set sga_max_size=2000M scope=spfile ;
    System altered.OR.
    connect as sys user.
    and do the following...
    1).SQL>create pfile from spfile;
    2).modify the pfile and decrease\increase the size of pools.
    3).shutdown database.
    4). Startup database using created pfile.
    if it start ok then.
    5.) Recreate the Spfile with the created Pfile.
    SQL>create spfile from pfile;sarah

Maybe you are looking for