Is there a String(char, ntimes) function ?

Hello
I'm looking for a simple function that creates a string with some char , n times.
In the old VBasic it can be possible with: a=String("h",4) >>> hhhh
Is there something similar in Java ?
Thanks

sabre150 wrote:
tonnot wrote:
( If you want .... what number of lines of code are need to construct a string with 15 characters - obviously not always the same )
String s1 = new String(Arrays.copyOf(new char[]{}, 15)).replace('\0', '4');Just replace the '15' with the length and the '4' with the desired character.Why not
String s1 = new String(new char[15]).replace('\0', '4');

Similar Messages

  • Is there any String format class available in J2ME?

    Hello,
    I am looking for a Formating class which should format a string. For example ( This is Java SE code):
    int num = 999;
                String str = " is my lucky number.";
                String s = String.Format("The Number : %d %s", num, str);I could not find any formatter class nor any direct api from String/StringBuffer class to format a string.
    Any suggestion on this is highly appreciated.
    Thank You.
    Regards,
    DK

    sojourner_jdk wrote:
    Hi DarrylBurke,
    You are right. Its not "Format". String has "format" function ..
    String s = String.format("The Number : %d %s", num, str);Is there such class/api in J2ME?
    Thanks,
    Regards,
    -DKIn J2ME MIDP, [String has no "format" function|http://java.sun.com/javame/reference/apis/jsr118/java/lang/String.html|javadoc].

  • Expected type [NUMBER] found [STRING] (["member"]) in function[operator@div

    Hi,
    I am trying to recalculate a figure based on an annual percentage. The script is
    FIX(yr2011, Plan, CC_4363,draft)
    "AC_&&&&&& Salary" ="AC_&&&&&&Salary"* ("pay increase%"/100)
    endfix
    endexclude
    I receive the error "expected type [NUMBER] found [STRING] (["AC_&&&&&&"]) in function[operator@div"
    I looked at this forum and someone suggested using the @match function. I tried
    "AC_&&&&&& Salary" ="AC_&&&&&& Salary"* (@match(Accounts," pay increase%")/100);
    This validated but the salary figure disappeared.
    The reason I am not loading at monthly (level zero) is due to a business requirement. I am having to spread the figures down the months from the total year but if the total year is wrong or missing the montly data obviously disappears too.
    Thanks,
    Nathan

    A few questions:
    1) I see an ENDEXCLUDE, but no starting EXCLUDE. How does that relate to the code?
    2) Do you really have member names with six ampersands in them? Is that even an allowed character? I guess it is but it looks odd as & is the character used to define the usage of an Essbase Substitution Variable. Okay, that was a comment, not a question, I guess.
    3) Do you have a Pay Increase% in every month? Or is it annual?
    3) Why don't you stick the salary value to be allocated into another Account, e.g., "Annual Salary" and place it in a single month. Then your code could look like:
    FIX(yr2011, Plan, CC_4363,draft, "Jan":"Dec")
    "AC_&&&&&& Salary" ="Annual Salary"->"BegBalance" * ("pay increase%"->"BegBalance" / 100)
    endfix
    I created a BegBalance member which you may not have -- chose Dec or Jan as your home for Annual Salary and Pay Increase and go from there. I also forced the calc to happen at the month level -- I am assuming you have months in your app, but maybe not. Salt to taste.
    Regards,
    Cameron Lackpour

  • 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

  • How to to scan a string, char by char?

    Hi i have some xml data, i want to scan the string char until it sees > for the first time. Then it adds the following data until it sees <, at which point it stops. So i should get s2tidm1 from "<server>s2tidm1</server>"
    The problem with the below code is that sa.next() gives me the whole string as there is no space, is there a sa.nextChar() or something similar?
    Code following -- Thanks Peter
    import java.io.*;
    import java.util.Scanner;
    import java.util.*;
    public class xmltestmod {
    static String data =  "<server>s2tidm1</server>";
        public static void main(String args[]) {
              Scanner sa = new Scanner(data);
              String pete = " ";
              String temp =" ";
              while (sa.hasNext())          {
                   temp = sa.next();
                   System.out.println(temp);
                   if (temp.contains(">")){
                        while (true){
                        System.out.println("Entering if");
                        temp = sa.next();
                        pete = pete + temp;
                             if(temp.contains("<")) break;
         System.out.println(pete);               
         sa.close();
    }

    >
    I got muiltiple xml lines in a array, i want to loop
    the array and strip out the tags so only the data is
    left. Thats why i didn't use the xml apis out there
    as you need to say starttag = "<Server>";, endtag =
    "/Server>", but i just want to say store all data
    inbetween < and >, that way i can loop through the
    whole array.
    Actually if you use the SAX parser, rather than the DOM parser, it will call a method of your chosing for each text element, and you can just ignore the callbacks for tags etc. if you wish.
    Can you explain abit more about hte substring and
    index of part please.Check the Javadocs. Substring chops part of a string out, indexOf finds the first occurance of a character.

  • Why there is no quick selection function in adobe photoshop 6.0.1 [was: cs6.01]?

    Some one my help? why there is no quick selection function in my adobe photoshop 6.0.1 [was: cs 6.01]?

    What John Waller just said.
    And your screen shows it is the archaic, totally superseded Photoshop 6.01, and that was in no way associated with any CS (Creative Suite), so your question title indicating you had "cs6.0.1" was massively and annoyingly misleading and wrong.
    You must be running an ancient machine if that oldie runs on it.
    What's worse you are running an illegal, pirated and hacked version of Photoshop.  You are breaking the law.
    Please don't come back here until you have bought a legal copy of Photoshop.  

  • Unexpected behavior of spreadsheet string to array function

    Hello,
    I found some weirdness in LabVIEW 2011 that I do not understand. In the attached vi, I provide a one-dimensional spreadsheet string separated by spaces. I use the spreadsheet string to array function to convert this spreadsheet string into an array of strings.
    I ran into problems when I wanted to specify a space character as the delimiter.
    The conversion works as intended, if I do not specify a delimiter (i.e., the default tab delimiter is used). But if I specify the delimiter, only the first element of the spreadsheet string is converted. I do not understand this behavior.
    Thanks for your help.
    Peter
    Solved!
    Go to Solution.
    Attachments:
    Test spreadsheet string to array.vi ‏9 KB

    You don't have spaces in your string. You have tabs and of course the default delimiter works. Right click and select '\' Codes Display and see the \t.

  • Searching strings in procedures, function and packages (OWB)

    Hi all,
    I'm working on an OMB script to look for a string in procedures, function and packages in OWB. So far, I found how to do it for functions and procedures:
    string match -nocase \*text_to_find* [OMBRETRIEVE FUNCTION 'my_function' GET PROPERTIES(IMPLEMENTATION)]
    string match -nocase \*text_to_find* [OMBRETRIEVE PROCEDURE 'my_procedure' GET PROPERTIES(IMPLEMENTATION)]
    I have tried something similar for packages but it didn't work. Does someone know how to do this search in packages? Any help will be appreciated.
    Regards,
    Mauricio

    Of course, if you are looking for a match in any source - including procedures and packages not imported into OWB, then OMB+ isn't going to be a ton of help as it won't be aware of those other packages.
    In that case, you can always find those dependencies by doing a standard select owner, name, type, text from all_source where text like '%YOUR_SEARCH_CRITERIA%' query.
    and you can embed that in your OMB+ using the Java/SQL library: How to run SQL from OMB+
    Cheers,
    Mike

  • [svn:fx-trunk] 13501: Bug: BLZ447 - AMF3 Deserialization: Wrongly counted reference ID of duplicated String when in the same message there are Strings with only wildcards

    Revision: 13501
    Revision: 13501
    Author:   [email protected]
    Date:     2010-01-14 06:01:23 -0800 (Thu, 14 Jan 2010)
    Log Message:
    Bug: BLZ447 - AMF3 Deserialization: Wrongly counted reference ID of duplicated String when in the same message there are Strings with only wildcards
    QA: Yes - please keep an eye on AMFX (HTTPChannel) tests.
    Doc: No
    Checkintests: Pass - except the usual 4-5 tests that time out on my machine.
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXDecoder.as

    Dear Pallavi,
    Very useful post!
    I am looking for similar accelerators for
    Software Inventory Accelerator
    Hardware Inventory Accelerator
    Interfaces Inventory
    Customization Assessment Accelerator
    Sizing Tool
    Which helps us to come up with the relevant Bill of Matetials for every area mentioned above, and the ones which I dont know...
    Request help on such accelerators... Any clues?
    Any reply, help is highly appreciated.
    Regards
    Manish Madhav

  • Is there an aggregate or-bit function?

    Below is a simple example of what I am trying to do.
    select sum(part) from PARTS where roleID=4; PARTS table has two attributes:
    part (bitPattern)
    role_ID
    part is a bitPattern, so instead of using “sum”, use an aggregate or-bit function.
    Is there an aggregate or-bit function?
    Thank you.

    From Oracle 9.2 you can use the following
    Anton
    create or replace type bit_type as object
      total number,
      static function ODCIAggregateInitialize( sctx in out bit_type )
      return number,
      member function ODCIAggregateIterate
        ( self in out bit_type
        , value in number
      return number,
      member function ODCIAggregateTerminate
        ( self in bit_type
        , returnValue out number
        , flags in number
      return number,
      member function ODCIAggregateMerge
        ( self in out bit_type
        , ctx2 in bit_type
      return number,
    create or replace function bit_or_agg( value in number )
    return number
    parallel_enable aggregate using bit_type;
    create or replace type body bit_type
    is
      static function ODCIAggregateInitialize( sctx in out bit_type )
      return number
      is
      begin
        sctx :=  bit_type( 0 );
        return ODCIConst.Success;
      end;
      member function ODCIAggregateIterate
        ( self in out bit_type
        , value in number
      return number
      is
      begin
        self.total := self.total + value - bitand( self.total, value );
        return ODCIConst.Success;
      end;
      member function ODCIAggregateTerminate
        ( self in bit_type
        , returnValue out number
        , flags in number
      return number
      is
      begin
        returnValue := self.total;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateMerge
        ( self in out bit_type
        , ctx2 in bit_type
      return number
      is
      begin
        self.total := self.total + ctx2.total - bitand( self.total, ctx2.total );
        return ODCIConst.Success;
      end;
    end;
    /

  • I have photos in a DVD. In order to visualize them in iPhoto, must I necessarily import them? Can't I see the pictures from the media without importing? If not, is there any application with this functionality? I dont't like pre-visualization for photos.

    I have photos in a DVD. In order to visualize them in iPhoto, must I necessarily import them? Can't I see the pictures from the media without importing? If not, is there any application with this functionality? I need an app that allows me to navigate through the photos without selecting all of them. I realy dont't like pre-visualization for photos...

    In order to visualize them in iPhoto, must I necessarily import them?
    iPhoto is a Database. Before it can work with any data it must be imported to the database, so yes it is necessry to import them.
    Can't I see the pictures from the media without importing?
    See above.
    If not, is there any application with this functionality?
    Hundreds. Any image viewer will do the job. On your Mac the Finder has QuickLook and there is the Preview app as well. Online you can download any of these:
    http://www.macupdate.com/find/mac/image%20viewer

  • Is there any delivered BAPI or Functional modules available for MCHB table

    Hi Experts,
    I have a requirement where I have to pull inventory data from MCHB table without custom code. Is there any delivered BAPI or Functional modules available for MCHB table?
    Kindly help!
    Thanks
    Gopal

    Hi,
    Can you check using the Fun Modules
    MG_BATCH_CHECK_STOCK
    VB_READ_BATCH_WITHOUT_STOCK
    VB_BATCH_GET_ALL_STOCKS
    Regards,
    Anji

  • Is there any String variable or something what have input and output data?

    Is there any String variable or something what have input and output data?
    Solved!
    Go to Solution.

    elefank wrote:
    I have a "A"String and i want to merge this "A"String  an other "B"String and I want to get it back to the "A" String 
    I would store the A String in a shift register and then you can use Concatinate Strings whenever you want to add the additional characters to it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is there a string comparasion function?

    I want to compare a list of strings to see wether they are the same or not. for example: If they are the same then I should do this and if they aren't then I should do that. Is there any such function in labview?

    How about using the "=" function in comparison pallete?
    as it is a polymorphic function.
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com

  • Assigning a variant string to a function pointer issue?

    Hello,
    This is a little complex for me to describe, so I will try my best to explain !
    I don't know if this is doable in C?
    Basically, I need a function pointer to hold the name of a function coming form a character array!
    From the examples I have seen, it seems that what I am trying to do is not the conventional way of doing function pointers, but I don't see any other way of doing what I need to do.
    In one instance, the function pointer in my code, will require to be assigned a function name like this:
    _g_BlkFuncs_ =_BUF_FUNC_PTR_ParseBlockStatus;
    and at other instances, the same function pointer needs to be assigned to a function called:
    _g_BlkFuncs_ =_INV_FUNC_PTR_ParseBlockStatus;
    and at other instances:
    _g_BlkFuncs_ =_AND_FUNC_PTR_ParseBlockStatus;
    or
    _g_BlkFuncs_ =_OR_FUNC_PTR_ParseBlockStatus;
    etc....
    The only time I will know which function to assign is when I will retrieve the first part of the function name from a table called
    _x_UserPrgBlock_. The first part being the name differentiator such as "_BUF_", "_INV_", "_AND_", "_OR_" and so forth which
    is initially stored in the one of the table members called m_LogicElement_ residing in the _x_UserPrgBlock_ table or struct.
    In the example below, I made it simple by hard coding the assigning of the m_LogicElement_ member as "_BUF_" (see the line commented as "Manual assignment line" below). In reality the  m_LogicElement_ member is assigned from
    a user defined string which will vary from time to time. 
    Here is the sample snippet which shows the issue.
    ================================STRUCT.h
    #ifndef STRUCT_H
    #define STRUCT_H
    typedef struct USR_PRG_CNV{ // User program converter table
    char m_LogicElement_[2][knst_BUF_LOGIC_ELEM]; // Name of the logic block
    } User_Prg_Block;
    #endif
    =================================_BUF.h
    #ifndef BUF_H
    #define BUF_H
    void _BUF_FUNC_PTR_ParseBlockStatus(void);
    #endif
    ================================_BUF.c
    void _BUF_FUNC_PTR_ParseBlockStatus(void){
    int i = 0;
    i = 10;
    ===============================UPC.h
    #ifndef UPC_H
    #define UPC_H
    void AssignmentFunc();
    #endif
    ===============================UPC.c
    User_Prg_Block _x_UserPrgBlock_[2];
    void AssignmentFunc(){
    strcpy(_x_UserPrgBlock_[0].m_LogicElement_, "_BUF_"); // Manual assignment line
    ===============================DFP.c
    #include "_BUF.h"
    void (*_g_BlkFuncs_) (void);
    char volatile _g_FuncPtrStrVariant_[35];
    void SomeFunction(){
    strcpy(_g_FuncPtrStrVariant_, _x_UserPrgBlock_[0].m_LogicElement_); // Get "_BUF_"
    strcat(_g_FuncPtrStrVariant_, "FUNC_PTR_ParseBlockStatus"); // Complete the function name
    // Now try to assign the full function name to the function pointer
    //_g_BlkFuncs_ = _BUF_FUNC_PTR_ParseBlockStatus;
    //_g_BlkFuncs_ = &_g_FuncPtrStrVariant_;
    _g_BlkFuncs_ = _g_FuncPtrStrVariant_; // ???
    ==============================Main.c
    void main(){
    AssignmentFunc();
    SomeFunction();
    In reference to the following line listed above:
    _g_BlkFuncs_ = _g_FuncPtrStrVariant_;
    I do realize that conventionally, it should be:
    _g_BlkFuncs_ =_BUF_FUNC_PTR_ParseBlockStatus;
    The problem I find myself faced with is that the function that "_g_BlkFuncs_" points to, has to vary in accordance to the name of the function stored in the _g_FuncPtrStrVariant_ character array! The reason is that the _g_FuncPtrStrVariant_
    array is actually built up to the name of the function based on the current contents of m_LogicElement_ residing in the _x_UserPrgBlock_ table.
    I think!!!!! that even if I use an array of function pointers, it won't solve the issue.
    In summary, in C, is there a way to assign a name of a function built from a character array to a function pointer?
    All help sincerely appreciated!
    Thanks

    I am interpreting your question a little different than Brian.
    If I understand you correctly you are asking:  "Given the name of a function as a string, how do I get a pointer to that function".
    The unfortunately fact is that C++ does not support reflection, so getting a function by name is not possible.  By the time the linker has done its thing, the function name has been stripped from code.
    This means if you need to support string lookup of a function name you need to support an alternate mechanism to handle this.  If you were using C++, a map would be an ideal mechanism.  C can still do this, but the mechanism is a lot uglier
    due to the lack of data structures like std::string and std::map.

Maybe you are looking for

  • Best Buy Customer Service

    I ordinarily accept that companies will have less than adequate customer service, but my experience with Best Buy has been so bad, I actually decided to take the time to create a profile an write about it. I ordered a front load washer as a christmas

  • File port query  File transfer from SAP R/3 to Webmethods using Unix Script

    SAP drops the files in the /sapio/ directory and triggers an unix script using File port partner destination. Unix script will perform a secure copy of files to Webmethods server. If in unix script, error occurs then an RFC function will be called to

  • Crystal 8.5 report not displaying graphs

    I have an issue where a client is using MYOB RetailManager v8 which uses Crystal 8.5 engine. I have written a report that includes Graphs for him. The report works fine on PC with Crystal 8.5 or XI installed but does not print graphs on PC with the M

  • VM Boot Error

    Hi, I have imported OVM_OL5U7_X86_64_PVM_10GB.tgz templte using OVM 3.0.2 manager. Created a VM using this template and when I start VM, it is failing with the following error messages about 'bootloader': can someone help me understand what the error

  • Can't transfer my purchases from iPhone to iTunes

    Hey guys ...Hope anyone can help me.. I did restored my iPhone 4 today, before that I created a backup (Using iTunes) .. after the restore, my iPhone turned into a brand new iPhone (lost all apps), I created a new Apple ID in the welcome screen. Afte