Add "resume download" function to my program

Hi,my program is more complete now,and now I want to add the resume download function,I've search on net,and here but I haven't found nothing.I use my own protocol(see this to read the source: http://forum.java.sun.com/thread.jspa?threadID=5220335 ).
I think that I've use the byte buffer...or no?Boh...
Can u help me?Thanks to everyone!!!

ChuckBing wrote:
What "net" were you searching on? The first few hits here are what you are asking about.
http://www.google.com/search?q=java+resumable+download
There they are.
You can also trying searching this forum's old threads for something on the topic.
Edited by: Masterkeedu on Oct 18, 2007 9:47 AM

Similar Messages

  • Help with a function to count program's elasped time

    I want to add a little function to my program where it counts how long it takes for the program to finish. Essentially, you hit run, then the clock starts counting until the end of the program with an indicator so the user can see how long its been/takes to finish.
    Thank you.

    In this community nugget I presented a re-usable timer component that may meet your needs.  I've extracted and attached the Resource Module its enum control type def and a sub-vi that handles the display format.  Feel free to look into the nugget for an example of how the module was used.
    Jeff
    Attachments:
    Execution Timer.vi ‏32 KB
    Exec Timer Meth.ctl ‏11 KB
    Format Rel Time (STR).vi ‏12 KB

  • JMS API and resume download

    Hi!
    Does the JMS API or the Sun Java System Message queue support "resume download" functionality in case there is a probleb in the connection of the client application. From what I have read, the Enterprise Edition of the Sun Java System Message Queue supports this. The standard version does not support this. Is this right?
    Thanks in advance! :)

    Reading messages from a queue is transactional, so if your code commits the transaction then the message is consumed. If your code fails to commit the transaction the message remains on the queue and may be re-read.
    There's nothing in the JMS API which allows you to automatically re-establish a lost connection however - if required you need to write the code to do this yourself.

  • Is there any program to download function group?

    Hi
    I just want to download whole function group  and dictionary object (table type and structure) in specific package.
    not need to table contents though.
    is there anyway to download these object quick?

    Hi
    You can try this code
    [code]tables: trdir, seoclass, tfdir, enlfdir, dd02l.
    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.
    Exception class texts
    types: begin of tConcept,
             constName type string,
             concept type sotr_conc,
           end of tConcept.
    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,
             iConcepts type tConcept 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 of paths created on the SAP server
    data: iServerPaths type standard table of string 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.
    data: dumiConcepts type standard table of tConcept.
      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.3.1'.
    constants: TABLES type string value 'TABLES'.
    constants: TABLE type string value 'TABLE'.
    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: serverSlashSeparator type string.
    data: frontendSlashSeparator type string.
    data: slashSeparatorToUse type string.
    data: serverFilesystem type filesys_d.
    data: serverFolder type string.
    data: frontendOpSystem type string.
    data: serverOpSystem type string.
    data: customerNameSpace type string.
    ranges: soProgramName for trdir-name.
    ranges: soAuthor for usr02-bname.
    ranges: soTableNames 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(15) tRtable.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tPtable.
        select-options: soTable for dd02l-tabname.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(79) tTnote.
      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(15) tPfname.
        select-options: soFname for tfdir-funcName.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 10(15) tFgroup.
        select-options: soFgroup for enlfdir-area.
      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(15) tPcName.
        select-options: soClass for seoclass-clsname.
      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(15) tRpname.
        select-options: soProg for trdir-name.
      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(29) tComm.
        parameters: pComm as checkbox default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 5(29) 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.
    Download to SAP server
      selection-screen begin of line.
        selection-screen comment 1(25) tServ.
        parameters: pServ radiobutton group g2.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 8(20) tSPath.
        parameters: pLogical like filename-fileintern memory id MLOGICAL.
      selection-screen end of line.
      selection-screen comment /28(60) tSDPath.
    Download to PC
      selection-screen begin of line.
        selection-screen comment 1(25) tPc.
        parameters: pPc radiobutton group g2 default 'X'.
      selection-screen end of line.
      selection-screen begin of line.
        selection-screen comment 8(20) tPpath.
        parameters: pFolder like rlgrap-filename memory id MFOLDER.
      selection-screen end of line.
    selection-screen: end of block b4.
    Display options
    selection-screen: begin of block b5 with frame title tBlock5.
    Display final report
      selection-screen begin of line.
        selection-screen comment 1(33) tRep.
        parameters: pRep as checkbox default 'X'.
      selection-screen end of line.
    Display progress messages
      selection-screen begin of line.
        selection-screen comment 1(33) tProMess.
        parameters: pProMess as checkbox default 'X'.
      selection-screen end of line.
    selection-screen: end of block b5.
    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.
      if sy-batch is initial.
        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.
      endif.
    at selection-screen.
      case 'X'.
        when pPc.
          if pFolder is initial.
          User must enter a path to save to
            message e000(oo) with 'You must enter a file path'.
          endif.
        when pServ.
          if pLogical is initial.
          User must enter a logical path to save to
            message e000(oo) with 'You must enter a logical file name'.
          endif.
      endcase.
    at selection-screen on pLogical.
      if not pServ is initial.
        call function 'FILE_GET_NAME' exporting logical_filename = pLogical
                                      importing file_name = serverFolder
                                      exceptions file_not_found = 1
                                                 others = 2.
        if sy-subrc = 0.
          if serverFolder is initial.
            message e000(oo) with 'No file path returned from logical filename'.
          else.
          Path to display on the selection screen
            tSDPath = serverFolder.
          Remove the trailing slash off the path as the subroutine buildFilename will add an extra one
            shift serverFolder right deleting trailing serverSlashSeparator.
            shift serverFolder left deleting leading space.
          endif.
        else.
          message e000(oo) with 'Logical filename does not exist'.
        endif.
      endif.
    at selection-screen on value-request for soProg-low.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'PROG'
                                                          object_name  = soProg-low
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soProg-low
                                                exceptions cancel = 1.
    at selection-screen on value-request for soProg-high.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'PROG'
                                                          object_name  = soProg-high
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soProg-high
                                                exceptions cancel = 1.
    at selection-screen on value-request for soClass-low.
      call function 'F4_DD_ALLTYPES' exporting object = soClass-low
                                               suppress_selection = 'X'
                                               display_only = ''
                                               only_types_for_clifs = 'X'
                                     importing result = soClass-low.
    at selection-screen on value-request for soClass-high.
      call function 'F4_DD_ALLTYPES' exporting object = soClass-high
                                               suppress_selection = 'X'
                                               display_only = ''
                                               only_types_for_clifs = 'X'
                                     importing result = soClass-high.
    at selection-screen on value-request for soFName-low.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUNC'
                                                          object_name  = soFname-low
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFName-low
                                                exceptions cancel = 1.
    at selection-screen on value-request for soFName-high.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUNC'
                                                          object_name  = soFname-high
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFName-high
                                                exceptions cancel = 1.
    at selection-screen on value-request for soFGroup-low.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUGR'
                                                          object_name  = soFGroup-low
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFGroup-low
                                                exceptions cancel = 1.
    at selection-screen on value-request for soFGroup-high.
      call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type  = 'FUGR'
                                                          object_name  = soFGroup-high
                                                          suppress_selection   = 'X'
                                                          use_alv_grid = ''
                                                          without_personal_list = ''
                                                importing object_name_selected = soFGroup-high
                                                exceptions cancel = 1.
    initialisation
    initialization.
    Parameter screen texts.
      tBlock1 = 'Author (Optional)'.
      t$tmp   = 'Programs only: include local objects'.
      tBlock2 = 'Objects to download'.
      tBlock3 = 'Additional downloads for programs, function modules and classes'.
      tBlock4 = 'Download parameters'.
      tBlock5 = 'Display options'.
      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  = 'Note: tables are stored under the username of the 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'.
      tSPath  = 'Logical file name'.
      tPmes   = 'Message classes'.
      tPfunc  = 'Function modules'.
      tDoc    = 'Function module documentation'.
      tRecf   = 'Recursive search'.
      tPscr   = 'Screens'.
      tPdict  = 'Dictionary structures'.
      tSortT  = 'Sort table fields alphabetically'.
      tServ   = 'Download to server'.
      tPc     = 'Download to PC'.
      tRep    = 'Display download report'.
      tProMess  = 'Display progress messages'.
    Determine the frontend operating system type.
      if sy-batch is initial.
        perform determineFrontendOPSystem using frontendSlashSeparator frontendOpSystem.
      endif.
      perform determineServerOpsystem using serverSlashSeparator serverFileSystem serverOpsystem.
    Determine if the external command exists.  If it doesn't then disable the server input field
      perform findExternalCommand.
    start-of-selection.
    start-of-selection.
      perform checkComboBoxes.
      perform fillSelectionRanges.
      startTime = sy-uzeit.
    Don't display status messages if we are running in the background
      if not sy-batch is initial.
        pProMess = ''.
      endif.
    Fool the HTML routines to stop them hyperlinking anything with a space in them
      if pCName is initial.
        customerNameSpace  = '^'.
      else.
        customerNameSpace = pCName.
      endif.
    Determine which operating slash and download directory to use
      case 'X'.
        when pPc.
          slashSeparatorToUse = frontendSlashSeparator.
          downloadFolder = pFolder.
        when pServ.
          slashSeparatorToUse = serverSlashSeparator.
          downloadFolder = serverFolder.
      endcase.
    Main program flow.
      case 'X'.
      Select tables
        when rTable.
          perform retrieveTables using iDictionary[]
                                       soTableNames[]
                                       soAuthor[].
      Select message classes tables
        when rMess.
          perform retrieveMessageClass using iMessages[]
                                             soAuthor[]      "Author
                                             pMname          "Message class name
                                             pMLang          "Message class language
                                             pMod.           "Modified by author
      Select function modules
        when rFunc.
          perform retrieveFunctions using soFunctionName[]   "Function name
                                          soFunctionGroup[]  "Function group
                                          iFunctions[]       "Found functions
                                          soAuthor[]         "Author
                                          pText              "Get text elements
                                          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.
          perform retrieveClasses using iClasses[]
                                        iFunctions[]
                                        soClassName[]       "Class name
                                        soAuthor[]          "Author
                                        customerNameSpace   "Customer name range
                                        pMod                "Also modified by author
                                        pCust               "Customer object only
                                        pMess               "Find messages
                                        pText               "Text Elements
                                        pDict               "Dictionary structures
                                        pFunc               "Get functions
                                        pInc                "Get includes
                                        pRecF               "Search recursively for functions
                                        pRecI               "Search recursively for includes
                                        'X'                 "Search recursively 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.
          perform retrievePrograms using iPrograms[]
                                         iFunctions[]
                                         soProgramName[]    "Program name
                                         soAuthor[]         "Author
                                         customerNamespace  "Customer name range
                                         pMod               "Also modified by author
                                         pCust              "Customer object only
                                         pMess              "Find messages
                                         pText              "Text Elements
                                         pDict              "Dictionay structures
                                         pFunc              "Get functions
                                         pInc               "Get includes
                                         pScr               "Get screens
                                         pRecF              "Search recursively for functions
                                         pRecI              "Search recursively 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[]
                                                 downloadFolder
                                                 HTMLEXtension
                                                 space
                                                 pSortT
                                                 slashSeparatorToUse
                                                 pServ
                                                 pProMess.
            Free up any memory used for caching HTML versions of tables
              loop at iDictionary.
                free memory id iDictionary-tablename.
              endloop.
            Display donwload report
              if not pRep is initial.
                get time.
                runTime = sy-uzeit - startTime.
                perform fillTreeNodeTables using iDictionary[]
                                                 iTreeDisplay[]
                                                 runTime.
              endif.
              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
                                                     downloadFolder
                                                     downloadFileExtension
                                                     pHtml
                                                     space
                                                     pComm
                                                     customerNameSpace
                                                     pInc
                                                     pDict
                                                     pMess
                                                     slashSeparatorToUse
                                                     pServ
                                                     pProMess.
                  clear iSingleMessageClass[].
                endat.
              endloop.
            Display download report
              if not pRep is initial.
                get time.
                runTime = sy-uzeit - startTime.
                perform fillTreeNodeMessages using iMessages[]
                                                   iTreeDisplay[]
                                                   runTime.
              endif.
             clear iMessages[].
           endif.
        Download functions
          when rFunc.
            if not ( iFunctions[] is initial ).
               perform downloadFunctions using iFunctions[]
                                               downloadFolder
                                               downloadFileExtension
                                               space
                                               pDoc
                                               pHtml
                                               pComm
                                               customerNameSpace
                                               pInc
                                               pDict
                                               TEXTEXTENSION
                                               HTMLEXTENSION
                                               pSortT
                                               slashSeparatorToUse
                                               pServ
                                               pProMess.
            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.
            Display donwload report
              if not pRep is initial.
                get time.
                runTime = sy-uzeit - startTime.
                perform fillTreeNodeFunctions using iFunctions[]
                                                    iTreeDisplay[]
                                                    runTime.
              endif.
              clear iFunctions[].
            endif.
        Download Classes
          when rClass.
            if not ( iClasses[] is initial ).
              perform downloadClasses using iClasses[]
                                            iFunctions[]
                                            downloadFolder
                                            downloadFileExtension
                                            HTMLEXTENSION
                                            TEXTEXTENSION
                                            pHtml
                                            pComm
                                            custo

  • Attempting to add aditional functionality to my program. Can it be done?

    I play online poker. I've written a program that keeps track of poker hands I've played, as well as the players I've played against. After every hand, the poker client writes the hand to a text file. My program reads these text files, extracts certain information regarding the hands and stores it in a database.
    I want to add the functionality to the program that would enable it to be aware of things that are happening during the course of a hand; i.e, what cards are displayed on the board, what action each player has taken (raise, bet, check, etc.), how much each player bets, etc. These things can easily be attained AFTER the hand is over by reading through the text file that is saved, but I want the program to have access to this information DURING the hand, so I can have it preform various calculations and various other tasks.
    Now, I'm not sure how to go about doing this, nor am I sure if this can even be done in java. I expect what I would need to do is have the program intercept the data which represents various things - actions taken by players, bet sizes, displayed cards, etc - that is transfered between the poker client and server . Or, perhaps, there is a simpler, more obvious solution to this.
    So, is there any way to do the above with the proposed solution? If not, is there any other way that my program can work with the poker client itself in order to obtain the desired information without dealing with the interaction between the poker client and server?

    Who does this and how? Is the progam dumping this information? Are you manually entering it? Or did you actually write a program that is doing this? And how does it work?What happens is after a hand is completed, the poker client writes the hand to a text file. My program reads through this text file and extracts certain information. So, the text file looks something like this:
    Seat 4: player 1 ($156.50 in chips)
    Seat 6: player 2 ($17.50 in chips)
    player 1: posts small blind $1
    player 2: posts big blind $2
    *** HOLE CARDS ***
    Dealt to player 1 [9s Js]
    player 1: raises $2 to $4
    player 2: raises $2 to $6
    player 1: calls $2
    *** FLOP *** [3d As Jh]
    player 2: bets $2
    player 1: calls $2
    *** TURN *** [3d As Jh] [3h]
    player 2: bets $4
    player 1: raises $4 to $8
    player 2: calls $4
    *** RIVER *** [3d As Jh 3h] [6s]
    player 2: bets $4
    player 1: calls $4
    *** SHOW DOWN ***
    player 2: shows [Ah Kd] (two pair, Aces and Threes)
    player 1: mucks hand
    player 2 collected $39 from pot
    *** SUMMARY ***
    Total pot $41 | Rake $2
    Board [3d As Jh 3h 6s]
    Seat 3: player 2(big blind) showed [Ah Kd] and won ($39) with two pair, Aces and Threes
    Seat 4: player 1 mucked [9s Js]
    So my program just parses this text and extracts certain information, then saves it to a database I created using JDBC. I can then access this info through the GUI I created.
    This question is problematic because I don't see how if you actually wrote a program that actually does something that you couldn't make it working during the game and not just after. What I suspect is happening is that either the client is dumping this information for you or that you are manually capturing it.
    So can you describe how you are getting the information now exactly?The problem is that the text file is written to AFTER the hand takes place, not during. I'm looking for a way to access what is taking place in the hand, during the hand and not after.
    Is that helfpul at all?

  • My computer is functioning really slowly since downloading Mavericks. My programs lag opening if at all. Any suggestions for fixing this?

    My computer is functioning really slowly since downloading Mavericks. My programs lag opening if at all. Any suggestions for fixing this?

    I installed it maybe 2 weeks ago, Here are my results:
    Hardware Information:
        MacBook (13-inch, Late 2009)
        MacBook - model: MacBook6,1
        1 2.26 GHz Intel Core 2 Duo CPU: 2 cores
        2 GB RAM
    Video Information:
        NVIDIA GeForce 9400M - VRAM: 256 MB
    System Software:
        OS X 10.9.2 (13C1021) - Uptime: 0 days 22:44:15
    Disk Information:
        TOSHIBA MK2555GSXF disk0 : (250.06 GB)
            EFI (disk0s1) <not mounted>: 209.7 MB
            Marshmallow (disk0s2) / [Startup]: 249.2 GB (125.02 GB free)
            Recovery HD (disk0s3) <not mounted>: 650 MB
        MATSHITADVD-R   UJ-898 
    USB Information:
        Apple Inc. Built-in iSight
        Apple Inc. Apple Internal Keyboard / Trackpad
        Logitech USB Receiver
        Apple Inc. BRCM2070 Hub
            Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information:
    Gatekeeper:
        Mac App Store and identified developers
    Kernel Extensions:
        [kext loaded]    at.obdev.nke.LittleSnitch (4052 - SDK 10.8) Support
        [not loaded]    com.devguru.driver.SamsungACMControl (1.4.14 - SDK 10.6) Support
        [not loaded]    com.devguru.driver.SamsungACMData (1.4.14 - SDK 10.6) Support
        [not loaded]    com.devguru.driver.SamsungComposite (1.4.14 - SDK 10.6) Support
        [not loaded]    com.devguru.driver.SamsungMTP (1.4.14 - SDK 10.5) Support
        [not loaded]    com.devguru.driver.SamsungSerial (1.4.14 - SDK 10.6) Support
        [not loaded]    com.mobile-stream.driver.EasyTetherUSBEthernet (1.0.4 - SDK 10.4) Support
        [not loaded]    com.motorola-mobility.driver.MotMobileMS (1.0.0 - SDK 10.5) Support
        [not loaded]    com.motorola-mobility.driver.MotMobileMTP (1.2.2 - SDK 10.5) Support
        [not loaded]    com.motorola-mobility.driver.MotMobileUSB (1.2.2 - SDK 10.5) Support
        [not loaded]    com.motorola-mobility.driver.MotMobileUSBLAN (1.2.2 - SDK 10.5) Support
        [not loaded]    com.motorola-mobility.driver.MotMobileUSBLANMerge (1.2.2 - SDK 10.5) Support
        [not loaded]    com.motorola-mobility.driver.MotMobileUSBSwch (1.2.2 - SDK 10.5) Support
    Launch Daemons:
        [running]    at.obdev.littlesnitchd.plist Support
        [running]    com.adobe.ARM.[...].plist Support
        [loaded]    com.adobe.fpsaud.plist Support
        [loaded]    com.adobe.versioncueCS4.plist Support
        [running]    com.autodesk.backburner_manager.plist Support
        [running]    com.autodesk.backburner_server.plist Support
        [failed]    com.autodesk.backburner_start.plist Support
        [loaded]    com.google.keystone.daemon.plist Support
        [running]    com.motorola-mobility.mmcfgd.plist Support
    Launch Agents:
        [running]    at.obdev.LittleSnitchUIAgent.plist Support
        [loaded]    com.adobe.CS4ServiceManager.plist Support
        [running]    com.Affinegy.InstaLANa.plist Support
        [loaded]    com.google.keystone.agent.plist Support
        [loaded]    com.motorola.MDMUpdater.plist Support
        [running]    com.motorola.motohelper.plist Support
        [loaded]    com.motorola.motohelperUpdater.plist Support
    User Launch Agents:
        [loaded]    com.adobe.ARM.[...].plist Support
        [loaded]    com.adobe.ARM.[...].plist Support
        [running]    com.akamai.single-user-client.plist Support
    User Login Items:
        iTunesHelper
        Skype
        Dropbox
        Android File Transfer Agent
        GrowlHelperApp
        TWC-WiFi Menu
        KiesViaWiFiAgent
        KiesViaWiFiAgent
        fuspredownloader
    Internet Plug-ins:
        o1dbrowserplugin: Version: 5.3.1.18536 Support
        Default Browser: Version: 537 - SDK 10.9
        AdobePDFViewerNPAPI: Version: 11.0.02 - SDK 10.6 Support
        FlashPlayer-10.6: Version: 13.0.0.206 - SDK 10.6 Support
        DivXBrowserPlugin: Version: 2.1 Support
        Silverlight: Version: 5.1.20913.0 - SDK 10.6 Support
        Flash Player: Version: 13.0.0.206 - SDK 10.6 Support
        QuickTime Plugin: Version: 7.7.3
        googletalkbrowserplugin: Version: 5.3.1.18536 Support
        iPhotoPhotocast: Version: 7.0
        AdobePDFViewer: Version: 11.0.02 - SDK 10.6 Support
        CouponPrinter-FireFox_v2: Version: Version 1.1.6 Support
        JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
    Safari Extensions:
        DivX HiQ: Version: 2.1.1.94
        DivX Plus Web Player HTML5 <video>: Version: 2.1.1.94
    Audio Plug-ins:
        BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
        AirPlay: Version: 2.0 - SDK 10.9
        AppleAVBAudio: Version: 203.2 - SDK 10.9
        iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
        Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins:
        fbplugin_1_0_3: Version: (null) Support
    3rd Party Preference Panes:
        Adobe Version Cue CS4  Support
        Akamai NetSession Preferences  Support
        Flash Player  Support
        Growl  Support
    Time Machine:
        Skip System Files: NO
        Auto backup: YES
        Volumes being backed up:
            Marshmallow: Disk size: 232.09 GB Disk used: 115.65 GB
        Destinations:
            Patrice [Local] (Last used)
            Total size: 465.44 GB
            Total number of backups: 42
            Oldest backup: 2012-07-09 21:31:08 +0000
            Last backup: 2014-04-28 23:46:05 +0000
            Size of backup disk: Adequate
                Backup size 465.44 GB > (Disk used 115.65 GB X 3)
        Time Machine details may not be accurate.
        All volumes being backed up may not be listed.
    Top Processes by CPU:
             5%    WindowServer
             3%    plugin-container
             1%    firefox
             0%    ps
             0%    Dropbox
    Top Processes by Memory:
        381 MB    firefox
        86 MB    plugin-container
        51 MB    Finder
        39 MB    WindowServer
        33 MB    softwareupdated
    Virtual Memory Information:
        30 MB    Free RAM
        548 MB    Active RAM
        523 MB    Inactive RAM
        363 MB    Wired RAM
        1.04 GB    Page-ins
        151 MB    Page-outs

  • Downloading and Uploading ABAP programs

    I need to move a new GUI program (including all screens, include, subroutines, etc.) that was developed on our SAP 4.5 system to our new, upgraded, ECC 6.0 system.
    There is an old ABAP program that we use to use called ZSABAPUPDOWNLOAD, but it no longer seem to work between these two SAP versions.
    Because of the version differences between these tow systems, our BASIS group does not want us to use a transport to move this code.
    Other than completely recreating this program on the ECC60 system, does anyone know of a program (like the old ZSABAPUPDOWNLOAD) or utility that I could use to transfer this program to the new system?

    welcome to SDN.
    is this the program do u have.
    if not check it with this.
    REPORT ZUPDOWNPROGRAMS LINE-SIZE 132 LINE-COUNT 62 NO STANDARD PAGE HEADING.
      This program up / downloads from / to a local dataset
      all the components of an ABAP - i.e TEXTS, the entire CUA
      including statuses and menus, DYNPROS and source code.
      Program documentation and variants are not handled.
      INCLUDED programs are automatically handled both on upload
      or download. INCLUDE selection can be excluded or generic
      e.g only handle INCLUDES starting with ZIN*
      INCLUDES within INCLUDES also handled.
      The only restriction is on UPLOAD the INCLUDED programs must come
      from the same directory as the main program.
      On Download of course the ABAP must exist in the library.
         Note for LINUX and BATCH users
      This program was originally designed as a one off tool for
      getting ABAPS etc from a SAP R2 (IBM MVS mainframe system) into
      an R3 test system minimising the need for a large amount of
      mainframe sysprogs (anybody remember what they were !!) time
      and support to say nothing of access problems from TSO /JES2 /
      SAP R2. At that time network connections were patchy and the
      transport systems largely incompatable and not very reliable.
      This program was originally designed as a one off tool for
      Must run on Windows front end ---- If you are running SAP with
      LINUX on your work station you will have to change the WS_UPLOAD
      and WS_DOWNLOAD functions to reflect the Linux file system. The
      contents of the data sets themseleves do not need to be changed
      Program can easily be modified to run in batch and store
      the data on a UNIX host. Change the WS_UPLOAD and WS_DOWNLOAD
      to read from and write to UNIX data sets (OPEN FILE etc).
      You will also need to modify the parts of the program that get
      the DOS directory and display the Windows file paths.
      The actual abap data sets do not need to be changed.
    Rel 4.0   names can now be up to 40 bytes long
              Dynpros and CUA have changed from rel 3.1
              Tabstrips now loaded and unloaded in dynpros
       Please note restriction on 4.6 systems for users who
       have ABAP names which include '/'s in their names.
    Rel 4.6b, 4.6c Abap names can include the '/' in their names
    e.g /CUST1/CUST2/ORDER
    This causes problems when storing to a local file.
    a solution is to change the name to %CUST1%CUST2%ORDER i.e / will
    be changed to %. On upload the % should be changed back to /
    again.    This change still needs to be implemented.
    If you don't use the / in the abap name then this is not a problem.
    If file to be uploaded is in rel 3 format then names are only 8
    bytes long.
      program uses 3 datasets per abap
         1) abapname.eee     source, dynpr logic, texts, CUA stuff
         2) abapname.hhh     dynpr header
         3) abapname.fff     dynpro fields.
    because of varying lengths and contents 3 data sets are used. The
    complexity of combining all these to 1 data set would make the
    program far too complex.
      NOTE: This version of the program can only be used on
            release 4.0 or higher. Once an ABAP has been converted
            to rel 4.0 it cannot be converted back to rel 3.0
            on a release 3/3.1 system. Release 4 CUA tables
            are different.  Use release 3 version of this program
           for releases 3.0 and 3.1. Available on SAPFANS website.
      Note that data to be uploaded must have been previously downloaded
      by this program (any version since rel 2.0) - except for Initial
      Load -- see end of these comments.
             Dynpros and CUA statuses have changed since rel 3.1
       This program will handle rel 3.1 format on upload but will
       download in rel 4.0 format. To upload 3.1 format specify an 'X'
       in the rel3 parameter.
       If you have downloaded components in rel 4.0 format and you
       want to re-load to a 3.1 system  you will have to load
       the source via standard upload and re-create dynpros and the CUA
       manually.
       As names can now be longer than 8 characters you can only
       use this program if the SAP front end (SAPGUI) supports
       long file names (WIN 95/98 or WIN NT). Windows 3.x will not
       work as the underlying DOS system cannot handle long file names.
          UPLOAD function and DOS directory.
    When an ABAP is selected for UPLOAD then the DOS
    directory is read into a table. A file called ABAP.BAT is created,
    and down loaded to the 'C' drive and executed.
    This file executes a DOS DIR command and pipes the output
    into a dataset which is then uploaded into an internal
    table on SAP.
    Note on running DOS commands from ABAP
    The first time this procedure is executed you will see a DOS window
    which you will have to close manually. To get round this
    use windows explorer to select the file ABAP.BAT and then
    right mouse click on the file name. Select the
    properties window. From this click the CLOSE on EXIT box. This
    will then automatically close the DOS function after it has
    executed. (Windows restriction).
    The DOS function has not been tested using Windows 2000 so
    it might not work. OK on W95,W98,WME and Windows NT (No Thanks)
    If INCLUDE programs are wanted on UPLOAD only the specified
    directory is searched.
    Instead of entering path name manually you can click on
    the path parameter. Because of Windows restriction you will
    have to select ANY file in the relevant directory.
    The path will then be copied on to the selection screen.
    To do still : Merge 3 files to one and compress output to .ZIP file
                   fix 4.5 4.6 problem of abaps containing '/' in the name
                   possibility to automatically up / download referenced
                   function modules with selection criteria like INCLUDES
    To load the ist time into a system.
    Create program with ABAP editor and Upload the .EEE file.
    Delete ist line  (????SRCE) in the ABAP EDITOR --NOT THE DISK FILE
    Delete all the source from the line that starts ????TEXT (towards
    the end file) till the end so the last line in your source is ENDFORM.
    DO NOT ALTER THE DISK FILE. DO THESE CHANGES IN THE ABAP EDITOR.
    Save file and execute
    Use following parameters (Note the ist time you won't get proper
    text on the selection screen).
    Function      U
    Path          full dos path containing source e.g c:\abaps\
                   NOTE YOU MUST ENTER THE FINAL \ as above.
    REPID         the program name. e.g ZZJIMHXX
                   note that on the DISK you will see 3 files
                   ZZJIMHXX.EEE, ZZJIMHXX.FFF, ZZJIMHXX.HHH
                   just use the name before the dos qualifier - the
                   program will do the rest
    ignore other parameters
    The program will then load itself with all the texts etc.
    It should now be ready for use.
      Macros
    DEFINE DEFINE_TABLE.
      DATA: &1 LIKE &2 OCCURS &3 WITH HEADER LINE.
    END-OF-DEFINITION.
    DEFINE CLS.
      REFRESH &1.
      CLEAR &1.
    END-OF-DEFINITION.
    DEFINE INIT.
      IF &1 NE SPACE.
        SEARCH &1 FOR '. .'.
        IF SY-SUBRC = 0.
          WRITE '*' TO &1+SY-FDPOS(1).
        ENDIF.
        TRANSLATE &1 USING '*%'.
      ELSE.
        MOVE '%' TO &1.
      ENDIF.
    END-OF-DEFINITION.
    end of macros
    /     SAP standard tables                                        */
    TABLES: D020S,                         "Dynpro header
            D020T,                         "Dynpro title
            D021T,                         "Screen field keyword texts
            TRDIR,                         "Attribute table
            TADIR,                         "Dev. class etc.
            EUDB,                          "CUA data
            TSTC,                          "transaction data
            TITLE,                         "CUA titles
            RSMPTEXTS.                     "Function texts (rel 4.0)
    /     Work tables to hold ABAP source etc, and dynpro            */
    /     contents.                                                  */
    DATA: BEGIN OF H.                      "Header
            INCLUDE STRUCTURE D020S.
    DATA: END OF H.
    DATA: BEGIN OF H1 OCCURS 10,           "Header
          NAME(40)               TYPE C,                        "rel 4
          NUMBER(4)              TYPE N.
            INCLUDE STRUCTURE D020S.
    DATA: END OF H1.
    DATA: BEGIN OF H2 OCCURS 0,            "Rel 3  dynp. header
            CNAME(8)   TYPE C,
            CNUM(4)    TYPE C,
            NNAME(8)   TYPE C,
            NNUM(4)    TYPE C,
            FILL(51)   TYPE C,
            CDAT(6)    TYPE C,
            CTIM(6)    TYPE C,
          END OF H2.
    DATA: BEGIN OF F OCCURS 250.           "Dynpro Fields
            INCLUDE STRUCTURE D021S.
    DATA: END OF F.
    DATA: BEGIN OF F1 OCCURS 500,          "Dynpro Fields
          NAME(40)               TYPE C,                        "rel 4
          NUMBER(4)              TYPE N.
            INCLUDE STRUCTURE D021S.
    DATA: END OF F1.
    DATA: BEGIN OF OLD_F1 OCCURS 0,        "Dynpro Fields (rel 3)
          NAME(8)    TYPE C,
          NUMBER(4)     TYPE C.
            INCLUDE STRUCTURE D021SE_OLD.
    DATA: END OF OLD_F1.
    DATA: BEGIN OF F2 OCCURS 0,            "Dynpro Fields (rel 3)
          TFIL(284)  TYPE C,
          END OF F2.
    DATA: BEGIN OF M OCCURS 3.             "Match codes (if any)
            INCLUDE STRUCTURE D023S.
    DATA: END OF M.
    DATA: BEGIN OF E OCCURS 0.             "Dynpro Logic
            INCLUDE STRUCTURE D022S.
    DATA: END OF E.
    DATA: BEGIN OF E1 OCCURS 0,            "Dynpro Logic
          NAME(40)               TYPE C,                        "rel 4
          NUMBER(4)              TYPE N.
            INCLUDE STRUCTURE D022S.
    DATA: END OF E1.
    DATA: BEGIN OF T   OCCURS 0,           "prog name and dynpro nrs
          NAME(40)     TYPE C,                                  "rel 4
          NUMBER(4)    TYPE N,
    END OF T.
    DATA: BEGIN OF R   OCCURS 56,          "prog name and language
          NAME(40)     TYPE C,                                  "rel 4
          LANGUAGE(1)  TYPE C,
       END OF R.
    DATA: BEGIN OF S OCCURS 3000,
          TXT(180)               TYPE C,   "rel 4   was 132
          END OF S.
    DATA: BEGIN OF R1 OCCURS 50,           "for include programs
            NAME(40)             TYPE C,                        "rel 4
            INSTANCE(3)          TYPE P,
          END OF R1.
    DATA: BEGIN OF S1 OCCURS 3000,
          TXT(180)               TYPE C,   "   rel 4  was 132
          END OF S1.
    DATA: BEGIN OF U OCCURS 100,           "Text elements
          TXT(180)               TYPE C,   " rel 4   was 132
          END OF U.
    DATA: BEGIN OF DIR.                    "ABAP Attributes
            INCLUDE STRUCTURE TRDIR.
    DATA: END OF DIR.
    DATA: BEGIN OF DTXT.                   "Dynpro field keyword texts
            INCLUDE STRUCTURE D021T.
    DATA: END OF DTXT.
    /     This data contains all the components of the               */
    /     CUA such as menus, statuses, Pfkeys                        */
    /     As from rel 4.5 Tabstrips are automatically copied as well */
    /     The rel3 parameter must be set however to load the         */
    /     correct version of the CUA tables if uploading rel 3       */
    /     data to a rel 4 system.                                    */
    /     Rel 4.0B can  convert 3.1 and earlier CUA's                */
    /     This could change later however.                           */
    CUA Tables.
    Key of CUA tables in EUDB data set. Name is len 40 in rel 4.0
    DATA BEGIN OF EU_KEY.
            INCLUDE STRUCTURE RSEU1_KEY.
    DATA END OF EU_KEY.
        Status
    DATA BEGIN OF STA OCCURS 0.
            INCLUDE STRUCTURE RSMPE_STAT.                       " rel 4
    DATA END OF STA.
        Functions
    DATA BEGIN OF FUN OCCURS 0.
            INCLUDE STRUCTURE RSMPE_FUNT.                       "rel 4
    DATA END OF FUN.
        Menus
    DATA BEGIN OF MEN OCCURS 0.
            INCLUDE STRUCTURE RSMPE_MEN.   "rel 4.0
    DATA END OF MEN.
        Menus (texts)
    DATA BEGIN OF MTX OCCURS 0.
            INCLUDE STRUCTURE RSMPE_MNLT.  "rel 4.0
    DATA END OF MTX.
        Action Bar
    DATA BEGIN OF ACT OCCURS 0.
            INCLUDE STRUCTURE RSMPE_ACT.   "rel 4.0
    DATA END OF ACT.
        Push Buttons
    DATA BEGIN OF BUT OCCURS 0.
            INCLUDE STRUCTURE RSMPE_BUT.   "rel 4.0
    DATA END OF BUT.
        PF-Keys
    DATA BEGIN OF PFK OCCURS 0.
            INCLUDE STRUCTURE RSMPE_PFK.   "rel 4.0
    DATA END OF PFK.
        Function sets
    DATA BEGIN OF SET OCCURS 0.
            INCLUDE STRUCTURE RSMPE_STAF.  "rel 4.0
    DATA END OF SET.
        Documentation
    DATA BEGIN OF DOC OCCURS 0.
            INCLUDE STRUCTURE RSMPE_ATRT.  "rel 4.0
    DATA END OF DOC.
        Title codes with text
    DATA: BEGIN OF TIT OCCURS 0.
            INCLUDE STRUCTURE RSMPE_TITT.  "rel 4.0
    DATA: END OF TIT.
    DATA BEGIN OF FTX OCCURS 0.            "rel 4.0
            INCLUDE STRUCTURE RSMPTEXTS.
    DATA END OF FTX.
           rel 3.1 CUA components.
        Status
    DATA BEGIN OF OLD_STA OCCURS 0.
            INCLUDE STRUCTURE RSEU1_GEN.   " rel 3.1
    DATA END OF OLD_STA.
        Functions
    DATA BEGIN OF OLD_FUN OCCURS 0.
            INCLUDE STRUCTURE RSEU1_FUN.   "rel 3.1
    DATA END OF OLD_FUN.
        Menus
    DATA BEGIN OF OLD_MEN OCCURS 0.
            INCLUDE STRUCTURE RSEU1_MEN.   "rel 3.1
    DATA END OF OLD_MEN.
        Menus (texts)
    DATA BEGIN OF OLD_MTX OCCURS 0.
            INCLUDE STRUCTURE RSEU1_TXM.   "rel 3.1
    DATA END OF OLD_MTX.
        Action Bar
    DATA BEGIN OF OLD_ACT OCCURS 0.
            INCLUDE STRUCTURE RSEU1_ACT.   "rel 3.1
    DATA END OF OLD_ACT.
        Push Buttons
    DATA BEGIN OF OLD_BUT OCCURS 0.
            INCLUDE STRUCTURE RSEU1_BUT.   "rel 3.1
    DATA END OF OLD_BUT.
        PF-Keys
    DATA BEGIN OF OLD_PFK OCCURS 0.
            INCLUDE STRUCTURE RSEU1_PFK.   "rel 3.1
    DATA END OF OLD_PFK.
        Function sets
    DATA BEGIN OF OLD_SET OCCURS 0.
            INCLUDE STRUCTURE RSEU1_SET.   "rel 3.1
    DATA END OF OLD_SET.
        Documentation
    DATA BEGIN OF OLD_DOC OCCURS 0.
            INCLUDE STRUCTURE RSEU1_ETM.   "rel 3.1
    DATA END OF OLD_DOC.
        Title codes with text
    DATA: BEGIN OF OLD_TIT OCCURS 0.
            INCLUDE STRUCTURE TITLE.       "rel 3.1
    DATA: END OF OLD_TIT.
    dynamic function text
    DATA BEGIN OF FDN OCCURS 1.
            INCLUDE STRUCTURE RSEU1_FDYN.  "not req for rel 4.
    DATA END OF FDN.
    Icons
    DATA BEGIN OF FIN OCCURS 1.
            INCLUDE STRUCTURE RSEU1_ICON.  "not req for rel 4
    DATA END OF FIN.
    dynamic menu texts
    DATA BEGIN OF MDN OCCURS 1.
            INCLUDE STRUCTURE RSEU1_MDYN.  "not req for rel 4.
    DATA END OF MDN.
        Symbol list
    DATA BEGIN OF SYM OCCURS 0.
            INCLUDE STRUCTURE RSEU1_SYMB.
    DATA END OF SYM.
        Status Short text
    DATA BEGIN OF STX OCCURS 0.
            INCLUDE STRUCTURE RSEU1_CTX.
    DATA END OF STX.
        Attributes for function key settings (menu bars)  Rel 3.0
    DATA BEGIN OF ATT OCCURS 0.
            INCLUDE STRUCTURE RSEU1_HAT.
    DATA END OF ATT.
        Include-Menus
    DATA BEGIN OF INC OCCURS 3.
            INCLUDE STRUCTURE RSEU1_INC.
    DATA END OF INC.
    Last used numbers
    DATA BEGIN OF LAST.
            INCLUDE STRUCTURE RSEU1_LST.
    DATA END OF LAST.
      data for call transaction (SE41 to re-generate the CUA)
    DATA: BEGIN OF T_BDC_TAB OCCURS 0.
            INCLUDE STRUCTURE BDCDATA.     "BDC data
    DATA: END OF T_BDC_TAB.
    DATA: BEGIN OF T_MESSTAB OCCURS 0.
            INCLUDE STRUCTURE BDCDATA.
    DATA: END OF T_MESSTAB.
    /     Program data                                               */
    DATA: NUMBER(4)               TYPE N,
          OLDNUM(4)               TYPE N,
          FILESIZE                TYPE I,
          NR_OF_BYTES             TYPE I,
          I(3)                    TYPE P,
          IX(3)                   TYPE P,
          J(3)                    TYPE P,
          L(3)                    TYPE P,
          CUA-FLAG(1)             TYPE C,
          CUA_RETURN(10)          TYPE C,
          DYNPRO_MESSAGE(160)     TYPE C,
          DYNPRO_LINE             TYPE P,
          DYNPRO_WORD(30)         TYPE C,
          NUM(3)                  TYPE N,
          DYNNAME(44)             TYPE C,
          FN1(128)                TYPE C,
          FN2(128)                TYPE C,
          FN3(128)                TYPE C,
          W_ITERATE(1)            TYPE C,
          MAIN(1)                 TYPE C,
          FUNC(1)                 TYPE C,
          OLDNAME(40)             TYPE C,
          OLD-FUNC(8)             TYPE C,
          NEW-FUNC(8)             TYPE C,
          FOUND(1)                TYPE C,
          LANGUAGE                LIKE SY-LANGU,
          FIRST-TIME(1)           TYPE C VALUE 'Y',
          OK-CODE(5)              TYPE C,
          NAME(40)                TYPE C,                       "rel 4
          TXLINE(70)              TYPE C,
          LINE(132)               TYPE C.
    DATA:
          UL_FILE(128)          TYPE C,
          DL_FILE(128)          TYPE C,
          DOSLINE(72)           TYPE C.
    DATA: BEGIN OF DOSDIR OCCURS 0,
            TEXT(72),
          END OF DOSDIR.
    DATA: BEGIN OF I_PROG OCCURS 0,
          NAME(40),
          END OF I_PROG.
    DATA: BEGIN OF I_PROGT OCCURS 0,
          NAME(40),
          END OF I_PROGT.
    DATA: BEGIN OF I_INCLUDE OCCURS 0,
          NAME(40),
          HANDLED(1)   TYPE C,
          END OF I_INCLUDE.
    DATA: BEGIN OF I_INCL OCCURS 0,
          NAME(40),
          END OF I_INCL.
    DATA: BUFFER(1024).
    DATA: WINSYS(3).
    DATA: GLOBAL_FILEMASK_MASK(20), GLOBAL_FILEMASK_TEXT(20).
    DATA: GLOBAL_FILEMASK_ALL(80).
    DATA: T_FILENAME(128),
          TMP_FILENAME(128),
          T_MODE(1),
          FIELDLN     TYPE I.
    DEFINE_TABLE I_DYNPFIELDS DYNPREAD 0.  "dynpro fields to be updated
    DATA: I_FLDS LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE.
    FIELD-SYMBOLS: <F>.
    /     Parameters                                                 */
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS REPID FOR TRDIR-NAME OBLIGATORY .
    PARAMETERS:
          FUNCTION(1)       TYPE C OBLIGATORY,  "Function
          DSNAME(40)        TYPE C,        "Data set name
          INCLUDES(1)       TYPE C DEFAULT 'N', "Resolve Includes
          IMASK(40)         TYPE C,        "Include Mask
          CLASS             LIKE TRDIR-CLAS,
          AUTHOR            LIKE TRDIR-CNAM,          "Author
          APPL              LIKE TRDIR-APPL,
          PATH(88)          TYPE C DEFAULT 'A:\',
          REL3(1)           TYPE C.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-004.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-002.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(70) TEXT-003.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END  OF BLOCK A1.
    /          Check users workstation is running WINDOWS,        */
    /          WINDOWS 95, or WINDOWS NT. OS/2 no good for        */
    /          this application.                                  */
    CALL FUNCTION 'WS_QUERY'
         EXPORTING
              QUERY  = 'WS'
         IMPORTING
              RETURN = WINSYS.
    IF WINSYS(2) NE 'WN'.                  "Win 3.X no good either
      WRITE: / 'Windows NT or Windows 95/98 is required'.
      EXIT.
    ENDIF.
    /          Get names of programs to be handled.               */
    /          Name can be a single value, many values or ranges  */
    /          as per standard SELECT-OPTIONS on selection screen */
    / On Download read TRDIR and store program names in a table   */
    / as per selection options.                                   */
    / On upload read the specified directory for all files of     */
    /  type .EEE from specified directory                         */
    /  compare file names with selection criteria                 */
    MOVE FUNCTION TO FUNC.
    MOVE 'Y' TO MAIN.
    CASE FUNC.
      WHEN 'U'.                            "Upload required
        PERFORM READ_DOS_DIRECTORY.
        PERFORM GET_RANGE_UL.              "Get list of progs to process
      WHEN 'D'.                            "Download required
        PERFORM GET_RANGE_DL.              "Get list of progs to process
      WHEN OTHERS.
        WRITE: / 'Function not performed due to user request'.
        EXIT.
    ENDCASE.
    SORT I_PROG.
    DELETE ADJACENT DUPLICATES FROM I_PROG.
    For download INCLUDE handling can be resolved via function
    module call.
    All Includes within Includes are also resolved by the function
    module call.
    Note that this method does not work if program itself is of type
    I (it's an include)
    In this case we can still search the source.
    IF FUNC = 'D'.
      IF INCLUDES = 'Y'.
        PERFORM GET_INCLUDES_DL.
        PERFORM PROCESS_INCLUDES_DL.
      ENDIF.
    ENDIF.
    Program list from selection criteria i.e excluding INCLUDES found
    LOOP AT I_PROG.
      MOVE I_PROG-NAME TO R1-NAME.
      APPEND R1.
      DESCRIBE TABLE R1 LINES I.
      WHILE I NE 0.
        PERFORM EXECUTE-FUNCTION.
      ENDWHILE.
      REFRESH R1.
    ENDLOOP.
    We need to check now for INCLUDES on DOWNLOAD when the INCLUDE
    program itself is of type I. In this case the function call
    will not return the INCLUDES. For example we could be
    downloading ZTESTTOP (an Include itself) which as an include
    ZTEST01.
    The process fortunately is the same as the UPLOAD function
    except of course we need to read the library instead of the
    DOS directory
    process INCLUDE modules for Upload
    On upload the procedure is more complex as Includes within
    Includes can only be resolved by scanning the code and
    searching if the program exists in the directory.
    To get all INCLUDES within INCLUDES entries in table I_INCL
    that do not exist in I_INCLUDE are copied to table I_INCLUDE
    after each entire pass of table i_INCLUDE and table is then
    re-looped through. Programs in table I_INCLUDE that have already
    been processed have a "Y" indicator set in I_INCLUDE-AVAIL.
    if  func = 'U'.
    IF INCLUDES = 'Y'.
      DESCRIBE TABLE I_INCL LINES I.
      IF I > 0.
        W_ITERATE = 'Y'.
      ELSE.
        W_ITERATE = ' '.
      ENDIF.
      WHILE W_ITERATE = 'Y'.
        PERFORM PROCESS_INCLUDES_UL.
        PERFORM LOOP_THROUGH.
        DESCRIBE TABLE I_INCL LINES I.
        IF I > 0.
          W_ITERATE = 'Y'.
        ELSE.
          W_ITERATE = ' '.
        ENDIF.
      ENDWHILE.
    endif.
    ENDIF.
    DESCRIBE TABLE I_INCLUDE LINES I.
    IF I > 0.
      SKIP 1.
      WRITE: / ' Included Programs found'.
      SKIP 1.
      LOOP AT I_INCLUDE.
        WRITE I_INCLUDE-NAME TO LINE(40).
        CONDENSE LINE.
        WRITE: / LINE(80).
      ENDLOOP.
    ENDIF.
    /       Table R contains ABAP names to up / download.            */
    /       Loop through table R and perform up / download           */
    /       for each program.                                        */
    /       Table R1 contains INCLUDE names found (if any)           */
    /       As each                                                  */
    FORM EXECUTE-FUNCTION.
      LOOP AT R1.
        MOVE-CORRESPONDING R1 TO R.
        APPEND R.
      ENDLOOP.
      REFRESH R1.
      LOOP AT R.
        REFRESH : T, E1, H1, F1, S, U.
        PERFORM PROCESS.
        MOVE 'N' TO MAIN.
      ENDLOOP.
      REFRESH R.
      DESCRIBE TABLE R1 LINES I.
    ENDFORM.
    /     Build file names for UP/DOWNLOAD                           */
    /     3 files are generated per ABAP.                            */
    /       1) ABAP    Path\PROGNAME.EEE (ABAP, Attr,Texts)          */
    /          Logic   Path\PROGNAME.EEE (Dynpro Source Logic)       */
    /          CUA     Path\PROGNAME.EEE (CUA components - keys etc) */
    /       2) Header  Path\PROGNAME.HHH (Dynpro Header)             */
    /       3) Fields  Path\PROGNAME.FFF (Dynpro Field definitions  )*/
    / ( If alternate file name specified -DSNAME- this will          */
    /   be used instead. This is only valid for the main program.    */
    /   INCLUDED programs will have file names as specified          */
    /   above).                                                      */
    /  By using this scheme it saves the user from having to         */
    /  be prompted for 3 file names.                                 */
    /  If you want multiple copies / versions on disk either         */
    /  rename the old versions or specify a different directory in   */
    /  the path parameter.                                           */
    FORM PROCESS.
      MOVE PATH TO FN1.
      CASE MAIN.
        WHEN 'Y'.
          IF DSNAME NE SPACE.
            WRITE DSNAME TO FN1+66.                             "rel 4
          ELSE.
            WRITE R-NAME TO FN1+66.                             "rel 4
          ENDIF.
        WHEN OTHERS.
          WRITE R-NAME TO FN1+66.                               "rel 4
      ENDCASE.
      MOVE FN1 TO FN2.
      MOVE FN1 TO FN3.
      WRITE '.HHH' TO FN1+124(4).                               "rel 4
      WRITE '.FFF' TO FN2+124(4).                               "rel 4
      WRITE '.EEE' TO FN3+124(4).                               "rel 4
      CONDENSE FN1 NO-GAPS.
      CONDENSE FN2 NO-GAPS.
      CONDENSE FN3 NO-GAPS.
      NAME   = R-NAME.
      CASE FUNC.
        WHEN 'D'.
          PERFORM DOWNLOAD_OBJECTS.
          CLEAR LINE.
          WRITE : 'ABAP : ' TO LINE.
          WRITE R-NAME TO LINE+8.
          WRITE 'has been unloaded' TO LINE+55.
          CONDENSE LINE.
          WRITE: / LINE.
          DESCRIBE TABLE T LINES I.
          IF I = 0.
            WRITE: / 'No Dynpros were found for unload function'.
          ELSE.
            WRITE: / 'The following Dynpros have been unloaded : '.
            PERFORM LOOP_THROUGH_T.
          ENDIF.
        WHEN 'U'.
          PERFORM UPLOAD_OBJECTS.
          DESCRIBE TABLE T LINES I.
          CASE I.
            WHEN 0.
              WRITE:  / 'No Dynpros were found for restore function'.
            WHEN OTHERS.
              WRITE: / 'The following Dynpros have been restored : '.
              PERFORM LOOP_THROUGH_T.
          ENDCASE.
          IF MAIN EQ 'Y'.
            CASE OLDNAME.
              WHEN SPACE.
                CLEAR LINE.
                WRITE : 'ABAP : ' TO LINE.
                WRITE R-NAME TO LINE+8.
                WRITE 'has been restored' TO LINE+55.
                CONDENSE LINE.
                WRITE: / LINE.
              WHEN OTHERS.
                CLEAR LINE.
                WRITE : 'ABAP : ' TO LINE.
                WRITE R-NAME TO LINE+8.
                WRITE 'has been restored - original name :'
                   TO LINE+55.
                WRITE OLDNAME TO LINE+92.
                CONDENSE LINE.
                WRITE: / LINE.
            ENDCASE.
          ELSE.
            CLEAR LINE.
            WRITE : 'ABAP : ' TO LINE.
            WRITE R-NAME TO LINE+8.
            WRITE 'has been restored' TO LINE+55.
            CONDENSE LINE.
            WRITE: / LINE.
          ENDIF.
      ENDCASE.
    ENDFORM.
    /      print progname + dynpro nrs that have been processed.     */
    FORM LOOP_THROUGH_T.
      LOOP AT T.
        CLEAR LINE.
        WRITE R-NAME TO LINE.
        WRITE T-NUMBER TO LINE+50.
        CONDENSE LINE.
        WRITE: / LINE.
      ENDLOOP.
    ENDFORM.
    /            Download Objects                                    */
    FORM DOWNLOAD_OBJECTS.
      PERFORM UNLOAD_ABAP.                 "ABAP source, texts, attr
      SELECT SINGLE * FROM TRDIR
       WHERE NAME EQ R-NAME.
      IF TRDIR-SUBC = 'I'.
        CASE INCLUDES.                     "Included file wanted
          WHEN 'Y'.
            PERFORM SCAN4-INCLUDES.
        ENDCASE.
      ENDIF.
      PERFORM UNLOAD_CUA.                  "CUA stuff
      PERFORM DOWNLOAD_DATA.               "Download EEE file to PC
      PERFORM BUILD_T.        "Build table of all dynpros in ABAP
      DESCRIBE TABLE T LINES I.
      CASE I.
        WHEN 0.            "if no dynpros exist then cannot download any
          PERFORM DOWNLOAD_DATA.           "Download EEE file to PC
        WHEN OTHERS.
          PERFORM UNLOAD_DYNPROS.          "Get Raw dynpros from SAP
          PERFORM UNLOAD_DYNPRO_COMPONENTS."Convert to table
          PERFORM DOWNLOAD_DATA.           "Download ABAP etc. to PC
          PERFORM DOWNLOAD_BIN_H1.         "Download dynpro header
          PERFORM DOWNLOAD_BIN_F1.         "Download dynpro fields
      ENDCASE.
    ENDFORM.
    /  Split ABAP up into its component parts                        */
    /                           A) Program source (72)               */
    /                           B) Texts          (132)              */
    /                           C) Attributes     (117)              */
    /                           D) CUA stuff      (Various)          */
    FORM UNLOAD_ABAP.
    /    Get ABAP language. Only required on download.               */
      SELECT SINGLE * FROM TRDIR
        WHERE NAME EQ R-NAME.
      MOVE TRDIR-RLOAD TO R-LANGUAGE.
      READ REPORT R-NAME INTO S.           "Get source into table S
      MOVE '????SRCE' TO S-TXT.
      INSERT  S INDEX 1.
    /    Text elements, Numbered texts, headings, selection texts    */
    /    Read text elements with logon language. If they don't       */
    /    exist read with the value taken from TRDIR.                 */
      READ TEXTPOOL R-NAME INTO U LANGUAGE SY-LANGU.
      IF SY-SUBRC NE 0.
        READ TEXTPOOL R-NAME INTO U LANGUAGE R-LANGUAGE.
      ENDIF.
      DESCRIBE TABLE U LINES I.
      CASE I.
        WHEN 0.
        WHEN OTHERS.
          MOVE '????TEXT' TO S-TXT.
          APPEND S.
          LOOP AT U.
            MOVE U-TXT TO S-TXT.
            APPEND S.
            DELETE U.
          ENDLOOP.
      ENDCASE.
    /    Retrieve Attributes from TRDIR and add to table S           */
    /    Change language to logged on language                       */
      MOVE '????ATTR' TO S-TXT.
      APPEND S.
      SELECT SINGLE * FROM TRDIR
             WHERE NAME EQ R-NAME.
      MOVE SY-LANGU TO TRDIR-RLOAD.
      MOVE-CORRESPONDING TRDIR TO DIR.
      MOVE DIR TO S-TXT.
      APPEND S.
    ENDFORM.
    /             retrieve CUA stuff and append to table S.          */
    FORM UNLOAD_CUA.
      MOVE R-NAME TO EU_KEY-NAME.          "Program name for CUA
      MOVE 'D' TO EU_KEY-SPRSL.            "CUA seems to want D as lang
    MOVE R-LANGUAGE TO EU_KEY-SPRSL.     "Language              "rel 2.2
    IMPORT STA FUN MEN MTX ACT BUT PFK SET LAST INC STX DOC    "rel 2.2
      IMPORT STA STX FUN MEN MTX ACT BUT PFK SET LAST INC DOC     "rel 3.0
             ATT FDN MDN SYM FIN           "rel 3.0
              FROM DATABASE EUDB(CU) ID EU_KEY.
      IF SY-SUBRC NE 0.                    "No statuses
        EXIT.
      ENDIF.
    read titles in logged on language. If not present use
    language from TRDIR.
      CASE REL3.
        WHEN SPACE.                        "(rel 4)
          SELECT * FROM RSMPTEXTS WHERE PROGNAME EQ R-NAME
                            AND SPRSL = SY-LANGU.
            MOVE-CORRESPONDING RSMPTEXTS TO FTX.
            APPEND FTX.
          ENDSELECT.
          IF SY-SUBRC NE 0.
            SELECT * FROM RSMPTEXTS WHERE PROGNAME EQ R-NAME
                              AND SPRSL = R-LANGUAGE.
              MOVE-CORRESPONDING RSMPTEXTS TO FTX.
              APPEND FTX.
            ENDSELECT.
          ENDIF.
          DESCRIBE TABLE FTX LINES I.
          IF   I > 0.
            MOVE '????FTXT' TO S-TXT.
            APPEND S.
            LOOP AT FTX.
              MOVE FTX TO S-TXT.
              APPEND S.
            ENDLOOP.
          ENDIF.
        WHEN OTHERS.
          SELECT * FROM TITLE WHERE PROGNAME   EQ R-NAME
                              AND   DDLANGUAGE EQ SY-LANGU.
            MOVE-CORRESPONDING TITLE TO TIT.
            APPEND TIT.
          ENDSELECT.
          IF SY-SUBRC NE 0.
            SELECT * FROM TITLE WHERE PROGNAME   EQ R-NAME
                                AND   DDLANGUAGE EQ R-LANGUAGE.
              MOVE-CORRESPONDING TITLE TO TIT.
              APPEND TIT.
            ENDSELECT.
          ENDIF.
      ENDCASE.
      DESCRIBE TABLE STA LINES I.
      IF   I > 0.
        MOVE '????STAT' TO S-TXT.
        APPEND S.
        LOOP AT STA.
          MOVE STA TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE FUN LINES I.
      IF   I > 0.
        MOVE '????FUNC' TO S-TXT.
        APPEND S.
        LOOP AT FUN.
          MOVE FUN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE MEN LINES I.
      IF   I > 0.
        MOVE '????MEN1' TO S-TXT.
        APPEND S.
        LOOP AT MEN.
          MOVE MEN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE MTX LINES I.
      IF   I > 0.
        MOVE '????MTX1' TO S-TXT.
        APPEND S.
        LOOP AT MTX.
          MOVE MTX TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE ACT LINES I.
      IF   I > 0.
        MOVE '????ACTN' TO S-TXT.
        APPEND S.
        LOOP AT ACT.
          MOVE ACT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE BUT LINES I.
      IF   I > 0.
        MOVE '????BUTN' TO S-TXT.
        APPEND S.
        LOOP AT BUT.
          MOVE BUT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE PFK LINES I.
      IF   I > 0.
        MOVE '????PFKY' TO S-TXT.
        APPEND S.
        LOOP AT PFK.
          MOVE PFK TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE SET LINES I.
      IF   I > 0.
        MOVE '????SETS' TO S-TXT.
        APPEND S.
        LOOP AT SET.
          MOVE SET TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      IF LAST NE SPACE.
        MOVE '????LIST' TO S-TXT.
        APPEND S.
        MOVE LAST TO S-TXT.
        APPEND S.
      ENDIF.
      DESCRIBE TABLE INC LINES I.
      IF   I > 0.
        MOVE '????INCL' TO S-TXT.
        APPEND S.
        LOOP AT INC.
          MOVE INC TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE STX LINES I.
      IF   I > 0.
        MOVE '????STXT' TO S-TXT.
        APPEND S.
        LOOP AT STX.
          MOVE STX TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE DOC LINES I.
      IF   I > 0.
        MOVE '????DOCN' TO S-TXT.
        APPEND S.
        LOOP AT DOC.
          MOVE DOC TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE TIT LINES I.
      IF   I > 0.
        MOVE '????TITL' TO S-TXT.
        APPEND S.
        LOOP AT TIT.
          MOVE TIT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
    Next 5 tables are rel 3.0 specific  (ATT, FDN, MDN, SYM, FIN)
      DESCRIBE TABLE ATT LINES I.
      IF   I > 0.
        MOVE '????VATT' TO S-TXT.
        APPEND S.
        LOOP AT ATT.
          MOVE ATT TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE FDN LINES I.
      IF   I > 0.
        MOVE '????VFDN' TO S-TXT.
        APPEND S.
        LOOP AT FDN.
          MOVE FDN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE MDN LINES I.
      IF   I > 0.
        MOVE '????VMDN' TO S-TXT.
        APPEND S.
        LOOP AT MDN.
          MOVE MDN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE SYM LINES I.
      IF   I > 0.
        MOVE '????VSYM' TO S-TXT.
        APPEND S.
        LOOP AT SYM.
          MOVE SYM TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE FIN LINES I.
      IF   I > 0.
        MOVE '????VFIN' TO S-TXT.
        APPEND S.
        LOOP AT FIN.
          MOVE FIN TO S-TXT.
          APPEND S.
        ENDLOOP.
      ENDIF.

  • How to replace obsolete download function module in ECC6.0?

    Hi Experts,
    How to replace obsolete download function module in ECC6.0?
    Thanks,
    Adi.

    Hi,
    DOWNLOAD is obsolete FM in ECC 6. To get the same functionality , we need to use
    CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG  method (It provides the File selection feature)
    and
    GUI_DOWNLOAD function module.(It downloads the internal table from program to presentation server)
    Please see the example below:
    Example:
    *CALL FUNCTION 'DOWNLOAD'
              EXPORTING
                   FILENAME            = p_filename
                   FILETYPE            = ‘DAT’
              TABLES
                   DATA_TAB            = T_DOWNL
              EXCEPTIONS
                   INVALID_FILESIZE    = 1
                   INVALID_TABLE_WIDTH = 2
                   INVALID_TYPE        = 3
                   NO_BATCH            = 4
                   UNKNOWN_ERROR       = 5
                   OTHERS              = 6.
    *End of deletion CH01-
    Replacement Method for above code:
    DATA: l_filename    TYPE string,
           l_filen       TYPE string,
           l_path        TYPE string,
           l_fullpath    TYPE string,
           l_usr_act     TYPE I.
    l_filename = P_filename.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
      EXPORTING
        DEFAULT_FILE_NAME    = l_filename
      CHANGING
        FILENAME             = l_filen
        PATH                 = l_path
        FULLPATH             = l_fullpath
        USER_ACTION          = l_usr_act
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4.
    IF sy-subrc = 0
          AND l_usr_act <>
          CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = l_fullpath
       FILETYPE                        = 'DAT'
      TABLES
        DATA_TAB                        = T_DOWNL
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22.

  • Download and Upload Modulepool program

    hai all,
       Could any one say how to Download and Upload Modulepool program from sap.
    Thanks,
    Jeevan.

    Hi Puduru
    Welcome to ABAP forums.
    If you just want to export Module pool program once, you can use transaction SE80 and menu point Utilities->More Utilities->Upload/Download->Download option ( for each include / component ).
    Save it as a text file and then repeat the same process.
    Here's other programs for the same functionality. You can use one of them.
    http://www.members.tripod.com/abap4/Upload_and_Download_ABAP_Source_Code.html
    http://sap.ittoolbox.com/code/d.asp?d=1623&a=s
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/finding your code in bsp applications.article
    http://www.geocities.com/rmtiwari/Resources/Utilities/WebViewer.html
    http://www.dalestech.com/
    Dont forget to rewards pts, if it helps ;>)
    Regards,
    Rakesh

  • Drag and drop not working.  When trying to move a cell or icon the shadow of the cell or icon being moved appears under the cursor but can't be released causing a freeze of function within the program.  Happens in finder numbers and firefox

    Drag and drop not working.  When trying to move a cell or icon the shadow of the cell or icon being moved appears under the cursor but can't be released causing a freeze of function within the program.  Happens in finder numbers, firefox, and when trying to move any file from the downloads folder.
    This is a serious pain.
    Please help.
    WB

    Yes, all I can tell you is that Finder does not have that function in ML. Your system is "working as expected".
    You can file feedback here.

  • Urgent : file upload / download functionality in oracle portal page

    Hi friends
    I am new to portal development and am working on oracle portal 9i rel2 . I need to know how to put the file upload and download functionality in any page. the functionality given in oracle portal user guide is not user friendly (i.e in the content area add item of type file" ) .... i need to now is their any way to achieve the simple , one button click upload download functionality ..like we do in yahoo mails etc.
    any help will be highly appreciated.
    regards
    Dheeraj

    Well, I do not know the exact location of the document, however you can find the document to do this in modplsql User Guide ..(File Upload/Download).
    I am pasting some hint:
    e.g.
    Create an html form..code something like this:
    <html>
    <head>
    <title>test upload</title>
    </head>
    <body>
    <FORM      enctype="multipart/form-data"
    action="pls/mydad/write_info"
    method="POST">
    <p>Author's Name:<INPUT type="text" name="who">
    <p>Description:<INPUT type="text" name="description"><br>
    <p>File to upload:<INPUT type="file" name="file"><br>
    <p><INPUT type="submit">
    </FORM>
    </body>
    </html>
    Create a table
    (who varchar2(..).
    description varchar2(..),
    file varchar2(..));
    Your procedure something like this:
    procedure write_info (
    who in varchar2,
    description in varchar2,
    file in varchar2) as
    begin
    insert into myTable values (who, description, file);
    htp.htmlopen;
    htp.headopen;
    htp.title('File Uploaded');
    htp.headclose;
    htp.bodyopen;
    htp.header(1, 'Upload Status');
    htp.print('Uploaded ' || file || ' successfully');
    htp.bodyclose;
    htp.htmlclose;
    end;
    You should be able to download/access the file using the following URL format:
    http://<host>:<port>/pls/<dad>/docs/<file_name>
    Where file name is = Look for the value in the "myTable" > file.
    Do tell how you get on this.
    Thanx,
    Chetan.

  • The download function is not working....!! When I click on something like download a doc,pdf or any such file, the firefox just doesn't respond, and when I checked the download, i.e. cntrl+j, I don't find anything in the downloads...

    The download function is not working....!! I don't use any add-ons like idm or dap,etc.... When I click on something like download a doc,pdf or any such file, the firefox just doesn't respond, and when I checked the download, i.e. cntrl+j, I don't find anything in the downloads... I am currently using Firefox 7.0.1....... Nothing is being downloaded, and I am forced to use IE8 for everything... I even tried re-installing, but doesn't help... I am using Windows 7

    TonyE is correct the plugin version comes with Adobe's Reader X.
    The failure in communication is two parted:
    1. Reader X is not Acrobat (Mozilla Plugin Checker)
    2. Acrobat is not mentioned in the Reader X download Page (Adobe)
    therefore confused clients.
    For readers '''CAUTION''' check the minimum requirements for Reader X.
    Here: [http://www.adobe.com/products/reader/tech-specs.html Adobe's Reader X requirements link]
    Do not waste the time to download (80+MB and Site is Slow) if your machine does not have the resources to execute it. ie. '''aging''' Hardware
    Unfortunately the Adobe DLM only checks the requirements after it has
    downloaded BEFORE the install occurs.
    This is '''very expensive''' for both the sender and receiver
    It might be why they called it READER X and READER 9 will not sense an update...
    Another Software company pushing Hardware antiquity...

  • Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?

    Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?
    This happens with maybe 1 out of 5 files. These are files that have either an ."aa" extention, or or are libraries that icloud can see, but finder can't.

    Files beginning with a period are invisible and library files are system files. Spotlight cannot find either unless configured to do so (btw, this is not a Finder issue but a Spotlight issue.)
    Get Spotlight to search system files (and more)
    Enter the search term in the Finder window's search field.
    Click the [+] button in the search bar to add a search option.
    In the first drop down menu choose Other.
    Choose “System Files” from the list that pops up (and check the box to place in drop down menu to avoid this step later,) click on the OK button.
    Now back in the Finder choose Include from the second drop down menu.

  • How to add user defined functions in Menu bar of a Selection Screen?

    Hi,
    Can anybody please suggest me that how can I add user defined functions in the menu bar of a Selection Screen?
    Regards
    s@k

    Dear Amit,
    I am referring to the standard SAP program: RIEQUI20.
    On the initial screen, there are 3 tabs.
    Code:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tab FOR 25 LINES.
    SELECTION-SCREEN TAB (20) tab1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (20) tab2 USER-COMMAND ucomm2
                         DEFAULT SCREEN 002.
    SELECTION-SCREEN TAB (20) tab3 USER-COMMAND ucomm2
                         DEFAULT SCREEN 003.
    SELECTION-SCREEN END OF BLOCK tab.
    AT SELECTION-SCREEN.
      CLEAR gv_okcode.
      gv_okcode = sy-ucomm.
      CLEAR sy-ucomm.
      CASE gv_okcode.
        WHEN 'IH08'.
          CALL TRANSACTION 'IH08'. "Equipment Selection
        WHEN 'IW29'.
          CALL TRANSACTION 'IW29'. "Notification Selection
        WHEN 'IW39'.
          CALL TRANSACTION 'IW39'. "Order List Selection
        WHEN OTHERS.
      ENDCASE.
    *   Check date:                                         
      IF NOT datuv IS INITIAL                            
      AND NOT datub IS INITIAL.                         
        IF datub >= datuv.                              
        ELSE.                                           
          MESSAGE e884(ih) WITH datuv datub.            
        ENDIF.                                           
      ENDIF.                                             
      IF variant IS INITIAL AND
         dy_vari IS INITIAL.
        PERFORM get_default_variant_f14 USING variant.
      ENDIF.
      PERFORM variant_existence_f14 USING variant.
      IF datuv IS INITIAL.
        datuv = sy-datum.
      ENDIF.
      IF datub IS INITIAL.
        datub = sy-datum.
      ENDIF.
      IF sy-ucomm = 'ADDR'.
        PERFORM adress_sel_f01 USING 'EQUIR'.
      ENDIF.
      PERFORM check_parnr_f76.
    *  AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      STATICS: l_slset TYPE sy-slset.
    *--- Set initial variant
      PERFORM variant_init_f14 USING 'INST' 'INST' 'INST' 'RIEQUI20'.
      IF variant IS INITIAL AND
         dy_vari IS INITIAL AND
        gv_variant_flag IS INITIAL.
        PERFORM get_default_variant_f14 USING variant.
        gv_variant_flag = 'X'.
      ENDIF.
    *--- Set Icon for adress-button
      PERFORM set_icon_f01 USING dy_adrfl ad_icon text-ad0 text-ad1.
    *--- get classification data from select option
    *--- (if new variant or if called via submit or F3)
      IF ( l_slset NE sy-slset ) OR
         ( s_comw[] IS NOT INITIAL AND gt_clsd_comw[] IS INITIAL ).
        l_slset = sy-slset.
        gv_class_old = dy_class.
        gv_klart_old = dy_klart.
        PERFORM copy_selopt_comw_f79 TABLES gt_clsd_comw s_comw.
        PERFORM class_search_init_f77 USING 'EQUI'.
      ENDIF.
    *--- set Icon for classification
      LOOP AT gt_clsd_comw TRANSPORTING NO FIELDS          
                          WHERE atcod > '0'.               
        EXIT.                                              
      ENDLOOP.                                             
      IF sy-subrc IS INITIAL.
        gv_comw_flag = 'X'.
      ELSE.
        CLEAR gv_comw_flag.
      ENDIF.
      PERFORM set_icon_f01 USING gv_comw_flag cl_icon text-cl0 text-cl1.
      CALL METHOD cl_uid_cust=>selection_screen_output.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant.
      PERFORM variant_inputhelp_f14 USING variant 'RIEQUI20'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR dy_parnr.
      PERFORM f4_for_parnr_f76.
    AT SELECTION-SCREEN ON BLOCK clse.
      IF dy_class NE gv_class_old
        OR dy_klart NE gv_klart_old.
        gv_class_old = dy_class.
        gv_klart_old = dy_klart.
        CLEAR gv_comw_flag.
        REFRESH gt_clsd_comw.
        REFRESH s_comw.
      ENDIF.
      PERFORM class_exist_f77 USING dy_klart dy_class 'DY_CLASS'.
      IF sy-ucomm = 'COMW'.
        CALL FUNCTION 'IHCLSD_VALUATION_POPUP'
          EXPORTING
            i_klart               = dy_klart
            i_class               = dy_class
            i_language            = sy-langu
            i_key_date            = sy-datum
            i_also_subclasses     = dy_subcl
          TABLES
            ct_comw               = gt_clsd_comw
          EXCEPTIONS
            exc_no_class          = 1
            exc_klart_not_allowed = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *--- fill classification data in select option
        PERFORM copy_comw_selopt_f79 TABLES gt_clsd_comw s_comw.
      ENDIF.
      IF sy-ucomm = 'ONLI'.
        sscrfields-ucomm = sy-ucomm.
      ENDIF.
    Regards
    s@k
    Edited by: siemens.a.k on Jan 15, 2010 10:10 AM

  • Download functionality in  WebDynpro

    Hello,
    My WebDynpro application must support download functionality. I have implemented this with the help of FileDownload component. So the user can start Webdynpro application in browser and download some xml files.
    But additionally it must be possible to access the download of file directly by URL: for example
    <i>URL download = new URL(urlToWebDynpro);</i>
    // get file
    Is it possible to do with WebDynpro?
    Thanks in advance
    With best regards
    Belenki Michael

    Hello Michael,
    I can think of no way how you could make your Web Dynpro application act like a servlet and return a file instead of an HTML page containing a UI.
    Inside your Web Dynpro application, you can find out a URL that can be used from outside to download a certain file, even one that is stored in a context attribute. But that would be of limited use because your other Java application on the outside has no good way to learn that URL.
    Thus I agree with Stefan that it sounds more promising to directly program a servlet in this case.
    Best regards,
         Thomas

Maybe you are looking for

  • Adobe Illustrator CC immediate shut down after opening :(

    I've had this problem since I got back to win 7 sp1 pro from win 8.1 pro. (im sure it doesnt happen cuz of this) Illustrator CC v17.1 (64bit) opens and (crashes) closes really quickly so I cant do anything. It happens when I open the program as well

  • Need help for BPM Process Task - Looping

    Hi Folks,     I need some info regarding Task Looping in a BPM Process. Is there any code sample which mentions how to perform task looping and setting the context appropriately. Thanks, Brian.

  • Storing large amounts of data

    Hello, I'd like to use Berkeley DB for logging large amounts of data - i.e. structures that are ~400KB in size and I need to store them ~10 times per second for up to several hours, but I get into quite big performance issues the more records I inser

  • What happened to the radio stations in iTunes 11????

    I used to listen to the radio stations that were in iTunes; I just upgraded and i'll be damned if I can find them.  This is supremely irritating.  Please, someone tell me I've just overlooked them somehow.  Thanks.

  • Imac will not eject cd

    The CD drive in my iMac will not eject CDs.  I often have to shut down the iMac and re-straert it several times before I can get it to eject CDs.  Help!