Copy a program standard

Hi experts  , a client of a friend of mine is asking her to create a program similar to transaction MM01 ( Create materials ) because this client wants theirs own set of Z tables with the same info manage for this tnx, is there a easy way to do this ? thank you very much for your ideas.

This is a rubbish business requirement.
A client shouldn't ask we want a copy of mm01 so we can use custom tables.
The real requirement should explain the required functionality.
Then with a consultant you can look at the options of realizing said functionality, which could be in SAP and could even be with custom tables, but could also be realized using something altogether differently.
Tell your friend to retrieve the requirement which is now basically hidden by a custom report request.
Kind regards, Rob Dielemans

Similar Messages

  • Runtime Error In copy Of SAP Standard Program

    How do people,
    I have copied a SAP standard program H99CWTR0 because I need to add an extra
    column output in the report. I have made a few chnages regarding the INCLUDES
    When I run the program I am getting the following runtime error:
    " The structure of the COMMON PART "DRIVER_DATA_EXCHANGE"
    in program "%_T01050" is different from the calling program .....
    My question is that it says the error in program "%_T01050"  !!
    But when I enter this in SE38 it says it doesn't exist !
    Any ideas???
    Andy

    Thanks mate for replying.
    I'll have a look at what you suggest
    Andy

  • Link copy SapScript with Standard program

    hi experts,
    I have copied one sapscript form from one standard script and copied print program from standard program....
    can u tell me how to link both of them (print program and form)and how to make changes in the form  and program  ?
    regards,
    rohit
    Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:11 PM

    Assigning Form and Driver proram to an Output type is as follows.
    1) Go to NACE transaction
    2) Select an Applicatin(V1-Sales,V2-Shipping,V3-Billing)
    3) Click on Outputtypes Button
    4) Comes to Change Mode
    5) Click on New Entries button
    6) Specify Output type,Form name and Program and Save it.
    Check these links
    /people/venkata.ramisetti/blog/2006/09/21/configuring-output-types-for-pdf-based-print-forms
    NACE is the Tcode used to link the Application type, Output Types and its processing Routines like ( Driver programs and attached Script forms or Smartforms).
    You should know the Application of a document first Like:
    for PO it is EF, for sales Doc's it is V1, for Delivery docs it is V2, for billing Doc's it is V3 etc.
    so first select the Application type (ex: EF) for PO and press OUtput types
    then a list will come in that you should know the related output type for PO.
    in this case it is NEU,
    select that and click on the processing Routines button on the left side
    it will display the Medium, Driver Program and the Script form or smartform related to that document..
    All nace entries are stored in TNAPR table
    1. In simple words, it
    is used for printing documents eg. purchase order, sales order etc.
    2. eg.
    For company1, there is purchase order A,
    for company2, there is purchase order B,
    for purchasing organisation 3, there is purchase order C.
    Now, this type of MAPPING (which is totally dynamic and changeable)
    cannot be HARDCODED in the standard sap program.
    3. Hence, NACE,
    provides this facility to MAP
    as per users requirement.
    ie. We can determine the OUTPUT using NACE.
    Output means for eg. Printing of purchase order
    Determine means = dynamically detecting which output (PO eg)
    hence, it is also called OUTPUT DETERMINATION using NACE.
    Regards.

  • Copy and add standard report

    I have a request to add few column in the standard report (T-code F.19, program, RFWERE00), so i copy the program and proceed modification, when i check the code, it has error. I would like to know can I have any solution to add column into the report. Thanks!

    hi
    make changes in ur list_item table then u wll get the required output in ur tcod
    hey the ouptput is comging for me
    with Regards
    Rohan Shetty
    Edited by: Rohan Shetty on May 7, 2008 6:41 AM

  • Copying abap programs

    Dear Pals,
    I need some tips from you pals.
    My question is we have a development sytem there one transactions is running, I just wanted to copy the program, screens etc for that transaction to disk and move to some other company as it is for support. I had tried but i could not copy the screen painter forms etc.. How can i do it as it is very important.
    Your help will be appreciated.
    Regards
    Omer.

    Hi Mohamed,
    Here is a program given by someone last week in the forum.
    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 table\structure 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: <wadictstruct> 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 <wadictstruct>.
                  FREE MEMORY ID <wadictstruct>-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 <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-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 <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-tablename.
                ENDLOOP.
              ENDLOOP.
            Free up any memory used for caching HTML versions of tables
              LOOP AT iprograms.
                LOOP AT iprograms-idictstruct ASSIGNING <wadictstruct>..
                  FREE MEMORY ID <wadictstruct>-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...       

  • BPEL programming standards document

    Does anyone have a programming standards doc they would be willing to share? We're new to BPEL and our IT manager is asking for a programming standards document. The doc would include details on naming conventions of files, variables, procedures, comments, formatting, best practices, etc - all the boring standards stuff that I do not have the experience to write. Thank you.

    Each site will have their own standards.
    Check these links
    http://sapland.com/index.php?option=com_content&task=view&id=68&Itemid=35
    http://www.sap-basis-abap.com/abap/abap-4-development-code-efficiency-guidelines.htm
    if you leave an email address I will mail you a copy of the standards I use if it would be of help

  • Error while copying Z program to another enviroment

    Hi, experts
    I have a Z program into one client's enviroment, which works fine. I tried copying this program into another client's enviroment, and i get the following error message, while syntax check:
    "RC_IN1 must be a byte-type field. (Typ X or XSTRING)."
    And this error is on the following form:
    form xor using rc_in1 type c rc_in2 type c rc_out type c.
      data:
        li_abit type i,
        li_bbit type i.
      rc_out = space.
      if rc_in1 <> space.
        do 8 times.
          get bit sy-index of rc_in1 into li_abit.
          get bit sy-index of rc_in2 into li_bbit.
          if li_abit <> li_bbit.
            set bit sy-index of rc_out to 1.
          else.
            set bit sy-index of rc_out to 0.
          endif.
        enddo.
        if rc_out = space.
          rc_out = rc_in1.
        endif.
      endif.
    endform.
    When I check into one client's enviroment, it does not gives error. Only in THAT client.
    Why is this happening?
    Thanks in advance,
    Brian Gonsales

    Hi,
    are the both client environments hav same version (ECC 6).
    In ECC 6 version type X is not allowed.
    To avoid this problem,
    you need to declare the field of TYPE C.
    you need to get the value from Cl_ABAP_CHAR_UTILITIES.
    Regards
    Sandeep Reddy

  • ABAP programming standards for SELECT...ORDER BY....

    I recently saw a set of programming standards that stated it was better not to use an ORDER BY clause on a SELECT statement. Instead SELECT into an internal table and use SORT. The actual statement was....."In most cases it is preferable to do the sorting within the ABAP program instead of on the database server.  That means: fill the internal table via a SELECT statement and then sort via the SORT statement instead of coding a SELECT u2026 ORDER BY.  The sorting of large amounts of data on the database server affects the performance of all users on the system, whereas the sorting within the ABAP program u2018onlyu2019 affects the application server.  However, if an index exists on the table that can be used for the sorting then the SELECT u2026 ORDER BY doesnu2019t cause any undue strains on the system."
    I think this is no longer correct particularily with regards to Systemi/iSeries which we normally run in 2 tier mode.
    What are people opinion on this?

    Peter,
    the correct answer for DB2 on IBM i is "it depends". To implement "ORDER BY", the optimizer has basically these choices:
    - If an index with the columns of the "ORDER BY" clause exists, the database can access the data through this index, which returns them in the desired order. However, the data needs to be fetched row by row, so for each returned row you need one I/O request.
    - If such an index does not exist, the database can choose to perform a sequential read into a temporary storage and sort the temporary result set before returning the data to the caller. This is basically the same as reading the data into an internal table and let ABAP do the sort. Even if an index exist, reading the whole table into memory and sorting it there may be faster, because on a sequential read, the database can execute a "blocked" fetch rather than many individual I/O operations. You may see this if the table is relatively small.
    - If such an index does not exist, the database could also choose to create a temporary index and access the data through the temporary index. For the first execution, you don't gain much, but subsequent executions may perform much better. However, after an IPL you loose all temporary indexes, so the index needs to be built again on the first execution after the IPL.
    If you code your ABAP to read the table sequentially and sort it in memory, you are forcing the second implementation. If you code ABAP with the ORDER BY in the SELECT statement, you allow the database optimizer to choose the best possible implementation depending on the size of the table, the size of the result set, and the available indexes.
    If your table is relatively large but the result set (based on the WHERE clause) is relatively small, make sure to have an index that combines the WHERE clause elements returning only one value with the ORDER BY clause elements.
    For example, if you have a query like:
    SELECT * FROM T
    WHERE A = ? AND B = ? AND C IN (?, ?, ?)
    ORDER BY D, E
    you should have an index over columns A, B, D, and E for the best possible performance. A and B in the index can be used to limit the result set without any influence on the sort order D, E, but C cannot.
    Kind regards,
    Christian Bartels.

  • ABAP Programming Standards

    Hi ,
    Does SAP give any guidelines / document on Programming standards ? I understand that it is specific to individual implementations , but wondered if there could be any guideline by SAP .
    Regards ,
    Sujatha

    Lots of things can be included in standards.
    It somewhat depends on your system size, number of users, how much development etc. as to how detailed you want to get.
    Some of the common (programming) standards I have used at various sites:
    P_ for parameters
    s_ for select options
    gv_ for global variables
    lv_ for local variables
    pv_ for passed variables in forms
    gt_ for global itabs
    lt_ for local itabs
    gs_ for global structures
    ls_ for local structures
    co_ for constants
    V_ = For local & global Variables; Field Strings.
    W_ = For workflow container elements.
    I_ = For internal tables 
    Program names need to be something that you and your company are comfortable with. Many sites used to do something like
    Z - custome prefix
    FI - module
    R - report
    nnnn
    reward points if it is usefull ..
    Girish

  • Have an iMac & buying a second one, how to copy my programs?

    I copied my programs from my son's macbook, no cds, now I want to copy them to a new imac. some software to buy?

    The easiest way would be to join the two machines with an Ethernet cable, create a network between the two, turn on file sharing and just copy whatever files you want to copy across.
    Or you could join them with a firewire cable and boot up one of them in Target mode (holding down the 'T' key). Again, just copy files across.
    Or you could download the new Airport 'N' enabler and use the extra speed to accomplish the Ethernet cable thing - but wirelessly.
    If you want to copy all the files across I would use the Migration Assistant in the iMac. Just join the two machines with a Firewire cable, turn both machines on. The iMac will give you the chance to use the MA as part of the initial startup process. It will do a search, find the MacBook and ask if you want to copy the files from it and as they say in Britain, Bob's your Uncle!
    Griff

  • Copy and edit standard smartform...

    In tcode VA03, there is a form for printing the header. I want to add additional data to that smartform not by editing the standard form. Instead, I should edit the copy of the standard form.

    Then go to transaction smartforms, enter the name of your smartform, and then click on the Copy button on top left.
    You need to then also amend your config to call your smartform. Plenty of posts/blogs on this.

  • Help! PL/SQL Programming standards

    Hello,
    I need help from experienced developers urgently.
    I am in process of applying for new job and I have received two documents from my potential employer (software company).
    One document represents design and programming standards and other documents represents test PL/SQL package that is written according to those rules.
    My task is to analyze programming standards and send my opinion about correctness of those standards, whether they are according to current best practices or not, whether they represent current industrial standards in programming in general and specifically in PL/SQL programming and so on. I have already sent them my answer and I wish to estimate my chances of getting that job.
    Abstract from standard:
    1.     All variables and objects should be named according to their type (integer, varchar, character...etc) (sufix Hungarian notation)
    2.     All variables in PL/SQL should be prefixed with “v_” and written in camel case
    3.     SQL and PL/SQL built in functions should all be written in lower case.
    4.     All procedures should be prefixed with “pr_”
    5.     All functions should be prefixed with “fn_”
    6.     All packages should be sufixed with “_pkg”
    7.     View names should be prefixed with “v_”
    8.     All tables in Oracle schema should be prefixed with that schema name
    9.     Variables declared in package specification should be prefixed with “pksv_“
    10.     Variables declared in package body should be prefixed with “pkbv_“
    11.     Embeded SQL query in FOR LOOP statements should never be used because programm code is „dirty“ and unreadable.
    example:
    instead of : FOR v_User_Rec in (select * from all_users) LOOP...
    use:          FOR v_User_Rec in cursor_name LOOP...
    12.     Every query that retrieves more than 1000 rows should be optimized.
    13.     Font for writing code in PL/SQL Developer editor should be Arial and tabs should be used.
    I would appreciate replies from experienced PL/SQL developers especially those that have also experience in other programming languages.
    I have sent my answer to employer that programming standard is according to best practices and according to industry standard.
    I am worried a little about that Hungarian notation, is it still being used?
    If not when it was stopped being used?
    What are my chances of getting job?
    Would you hire a programmer that works according to those standards?
    Thanks.

    Hi,
    Welcome to the forum!
    924589 wrote:
    Hello,
    I need help from experienced developers urgently.
    I am in process of applying for new job and I have received two documents from my potential employer (software company).
    One document represents design and programming standards and other documents represents test PL/SQL package that is written according to those rules.
    My task is to analyze programming standards and send my opinion about correctness of those standards, whether they are according to current best practices or not, whether they represent current industrial standards in programming in general and specifically in PL/SQL programming and so on. I have already sent them my answer and I wish to estimate my chances of getting that job.There is no agreement about what the "best practice" is. I'm sure you'll see that as soon as you have 2 replies. I'll tell you what I use and how strictly I do it, what I find useful, and what other experienced programmers seem to do, in my experience.
    Abstract from standard:
    1.     All variables and objects should be named according to their type (integer, varchar, character...etc) (sufix Hungarian notation)I use suffixes that show, not only the data type, but how the variable is being used. Fo example, abbr means an abbreviation (something that reminds you of the full spelling), cd means a code (something that does not necessarily resemble its meaning), name is a complete name (not abbreviated or coded).  These are all VARCHAR2 types.  (Actually, cd may be a NUMBER.) I do this for maybe 25% of the variables I use in production code, when I think confusion with other variables, or doubts about the meaning, would be likely. For column names in tables, I might do it more than 50% of the time. Many people don't bother at all.
    2.     All variables in PL/SQL should be prefixed with “v_” and written in camel caseI don't know of any experieced programmers who always use v_. Maybe 1 out of 4 programmers use CamelCase. I use lower case myself in PL/SQL. In languages where names are case-sensitive, this is much more important. I use CamelCase all the time when I program in PostScript.
    3.     SQL and PL/SQL built in functions should all be written in lower case.I do almost exactly the opposite: I put keywords and built-in funtions in UPPER case, and I find it very helpful. A lot of experienced programmers do the same, though some use lower case, and a few don't follow any pattern.
    4.     All procedures should be prefixed with “pr_”
    5.     All functions should be prefixed with “fn_”I don't know anybody who does 4 or 5, or anything like them.
    6.     All packages should be sufixed with “_pkg”
    7.     View names should be prefixed with “v_”Some people do 6 and 7, or something similar.
    8.     All tables in Oracle schema should be prefixed with that schema nameI never seen this. If you want to clarify who owns a table, you can explictly give the owner name, e.g. scott.emp.
    9.     Variables declared in package specification should be prefixed with “pksv_“
    10.     Variables declared in package body should be prefixed with “pkbv_“I've never seen 9 or 10 done, but I can see why somebody might find it helpful.
    11.     Embeded SQL query in FOR LOOP statements should never be used because programm code is „dirty“ and unreadable.
    example:
    instead of : FOR v_User_Rec in (select * from all_users) LOOP...
    use:          FOR v_User_Rec in cursor_name LOOP...It's often unnecessary, and it can be more efficient to combine them. Sometimes it simply isn't possible.
    If code gets difficult to read, it's often because it's not being modularized properly.
    12.     Every query that retrieves more than 1000 rows should be optimized.Every query (and other statement) should be optimized, regardless of how many rows it retrieves. How much time you spend optimizing any one query depends on several factors. How often the query is done, and the table sizes are more important than how many rows will be returned.
    13.     Font for writing code in PL/SQL Developer editor should be Arial and tabs should be used.I find a fixed-width font, such as Courier, is much more convenient.
    Whitespace, including tabs, should definitely be used.
    I would appreciate replies from experienced PL/SQL developers especially those that have also experience in other programming languages.
    I have sent my answer to employer that programming standard is according to best practices and according to industry standard.
    I am worried a little about that Hungarian notation, is it still being used?
    If not when it was stopped being used?
    What are my chances of getting job? Either I'm on the committee that's deciding, and therefore can't tell you, or I'm not, and therefore I don't know.
    Would you hire a programmer that works according to those standards?Sure. I'd also hire programmers who preferred other standards, or didn't care about some of the items above.

  • Copying print program for sapscript

    Hello all,
    I would like to customize the print program PSFCPICK which we are using to print a sap script for shop orders.
    So I did a copy of the program and named the new one ZPSFCPICK and assigned the copied print program to the list in OPK8. I know the copied print program is called when printing the script,
    but no output is coming out of the printer. When I change it back to the original program, it is working fine.
    Is there anything I have to pay attention when copying a print program??
    Thanks
    Anne

    HI Anne,
    Check in this custom program or copied program whether you are calling FM -  CLOSE_FORM
    The function module closes the layout set opened using OPEN_FORM. The system executes any terminating processing steps for the last opened layout set. You must use this function module to close layout set printing. Otherwise, no output appears on printer or screen.
    Best Regards,
    Krishna

  • Copy a program from one sap system to another

    hi all,
       i need to copy a program from one sap system to another..along with the text symbols, selection-texts and includes without any transport request release...how can i do that?
    thanx in adv

    Hi,
    You need to Download the Program first in to Local desktop then upload the same to another server, we can not move the code directly from a server to another server without a Transport request.
    but you can call the program from other server using RFC destination, create a RFC for that server and create a function module in the server which the program is there and use the SUBMIT statmet in that function module, then from the other server call this function module using RFC destination
    Regards
    Sudheer

  • NOT ABLE TO COPY A PROGRAM.

    DEAR ALL,
    SIR I WANTED TO COPY A PROGRAM AND EDIT THT AFTR COPYING,
    AS I M COPYING,BUT IT IS NOT GETTING EXECUTED ,AS SAME CODE IS COPIED.

    Hi Robin
    May be you havent copied some include programs or user interfaces linked with this program. The best way to copy any program completely is
    Go to se38-> write the program name ->(dnt execute or change it or display) Go to menu PROGRAM -> Copy->it will show you source program and target program name->In Target program Give name what you want to give to new program(copied) like zprogram45->In next screen that it show Copy all Documentations , variants, screens,User Interfaces, INCLUDES ->click copy button-> Give the package name
    Your new program is copied and will work same as the source program
    Now you can modify it according to your requirements .
    Hope it will solve your problem

Maybe you are looking for