DDIC-Structure - Need Byte Length of a DDIC-STRUCTURE!!!

Hello,
how can I write a Report/ Function that becomes in Input each DDIC-Structurename and gives the user an Output back, that contains the whole Byte Length of the STRUCTURE.
For Example, we have an DDIC-Structure with name structure_example:
Name          TYPE     c     LENGTH     15,
Firstname   TYPE     c     LENGTH      10,
Street         TYPE     c     LENGTH      30,
ZIP-Code    TYPE     int2 LENGTH      5.
Their must existing a Functionality which can used the structurename and gives the user the Byte Length of the Structure back.
In our example the user gets for "structure_Example" the Output "60" Bytes back.
Input:          structure_example
Output:       60
I hope someone can give me a solution to solve this problem.
Thanks for all help in this forum.
With kind regards
ETN

Hi,
check out the below code...
my be this might help you.
TYPES:
  BEGIN OF my_struct,
    comp_a type i,
    comp_b type f,
  END OF my_struct.
DATA:
  my_data   TYPE my_struct,
  descr_ref TYPE ref to cl_abap_structdescr.
FIELD-SYMBOLS:
  <comp_wa> TYPE abap_compdescr.
START-OF-SELECTION.
  descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).
  WRITE: / 'Typename     :', descr_ref->absolute_name.
  WRITE: / 'Kind         :', descr_ref->type_kind.
  *WRITE: / 'Length       :', descr_ref->length.*
WRITE: / 'Decimals     :', descr_ref->decimals.
  WRITE: / 'Struct Kind  :', descr_ref->struct_kind.
  WRITE: / 'Components'.
  WRITE: / 'Name              Kind   Length   Decimals'.
  LOOP AT descr_ref->components ASSIGNING <comp_wa>.
    WRITE: / <comp_wa>-name, <comp_wa>-type_kind,
             <comp_wa>-length, <comp_wa>-decimals.
  ENDLOOP.
regards,
Santosh Thorat

Similar Messages

  • How to get the string's byte length?

    I have some string,I want to get the string's byte length,how
    can do it?
    for example:
    <cfoutput>#len('hihi,这是测试')#</cfoutput>
    output is 9
    I want to get the byte length is 14, how can i get it?
    Thanks.

    >> Fair cop. I didn't realise that asc() returned the
    codepoint rather than the
    > actual character code.
    >
    > and what would be the difference?
    Oh, sorry, whatever the term is (I'm crap with jargon). The
    value returned
    by asc() for those chars was only two bytes (ie: four hex
    digits). I
    didn't realise there was more to it than that, and that
    2-byte value maps
    to some other THREE byte value. I need to do some reading...
    > that's what both cf & java counted as the length.
    CHARACTER length, sure. No-one's disputing that. On the other
    hand,
    no-one's asking about it, either.
    > by adding a BOM you've already effected the encoding,
    which may or may not
    > match the original. so you still don't know how many
    bytes were in the original
    > string.
    [groan]
    Yes, that's a reasonable strawman there. I was only putting
    it in a file
    so I could save it and check the number of bytes occupied by
    the data.
    Clearly... CLEARLY... the OP is not asking for a character
    length of that
    string. They've said as much.
    I copy and pasted the string from their post, and used it as
    a
    demonstration of how "nine" is not the right answer for the
    BYTE LENGTH of
    that string. Whether or not the original string was UTF-8,
    UTF-16 or
    special-marmoset-encoding, it almost certainly was NOT in a
    fictitious kind
    encoding in which each of those particular characters only
    occupied one
    byte each, which would mean that "nine" is the correct answer
    to the
    question.
    When I copied those characters from either the web browser
    for from my
    text-based news agent, notepad identified them (and rendered
    them
    correctly) as UTF-8, so I'm fairly confident they ARE UTF-8.
    Of course
    this could be down to some intermediary encoding (pasting
    them in to the
    original posting, for example, via some encoding-transforming
    mechanism),
    but Occam's Razor suggests the original question was from a
    UTF-8 POV.
    But maybe we should quit speculating and ask the OP. Unless
    they've
    buggered off in despair of how drawn out all this is getting.
    For which I
    would not blame them.
    Adam

  • Is there any way to specify a URL in the servlet-mapping that doesn't need to be in the directory structure?

              I migrated from WebLogic 5.1 to 7.0.2 Something I used to have set-up in 5.1 no
              longer
              works.
              I am using the weblogic.servlet.FileServlet and have the URL "/cxedocs/" mapped
              to this
              servlet. So whenever the URL http://localhost:7001/cxedocs/en_US/index.html
              is used it would use the docHome associated with the /cxedocs/ URL and then append
              the "en_US/index.html" on to it. So let's say d:\temp\en_US\index.html
              But now for WL 7.0.2 it appears that the URL also needs to be in the directory
              structure.
              So it now takes the docHome "d:\temp" adds the URL "/cxedocs/" and then appends
              the
              rest - so d:\temp\cxedocs\en_US\index.html.
              I can't require that the "cxedocs" directory be there. Is there anyway to map
              a certain URL
              without requiring it in the directory structure. I looked at virtual directory
              mapping too but
              it still seemed to require this.
              Any help would be appreciated!
              Thanks!
              -Lori
              

              I opened up a case with support on this. After some research they came back with
              that
              NO there is no way to do this. In 6.0 it was changed to follow the spec which
              restricts this.
              The URL must be part of the directory path.
              -Lori
              "Lori Ronning" <[email protected]> wrote:
              >
              >I migrated from WebLogic 5.1 to 7.0.2 Something I used to have set-up
              >in 5.1 no
              >longer
              >works.
              >
              >I am using the weblogic.servlet.FileServlet and have the URL "/cxedocs/"
              >mapped
              >to this
              >servlet. So whenever the URL http://localhost:7001/cxedocs/en_US/index.html
              >is used it would use the docHome associated with the /cxedocs/ URL and
              >then append
              >the "en_US/index.html" on to it. So let's say d:\temp\en_US\index.html
              >
              >But now for WL 7.0.2 it appears that the URL also needs to be in the
              >directory
              >structure.
              >So it now takes the docHome "d:\temp" adds the URL "/cxedocs/" and then
              >appends
              >the
              >rest - so d:\temp\cxedocs\en_US\index.html.
              >
              >I can't require that the "cxedocs" directory be there. Is there anyway
              >to map
              >a certain URL
              >without requiring it in the directory structure. I looked at virtual
              >directory
              >mapping too but
              >it still seemed to require this.
              >Any help would be appreciated!
              >Thanks!
              >-Lori
              

  • Problem with byte[].length

    dear sir
    I am working with javacard 2.2.2, windows, jdk 1.5 and JCWDE
    I would like to know the byte length of an array ("aCrypter" in this fallowing code)
    1     public byte[] cryter(byte[] Crypter){
    2
    3          ecipher.init(key, Cipher.MODE_ENCRYPT);
    4          ecipher.doFinal(Crypter, (short)0, (short)aCrypter.length, donneeCrypter , (short)0);
    5          
    6          return donneeCrypter;
    7     }
    JCVM return an error on line 4 (it works with "(short)1"
    there is a solution to know the array length?
    regards
    Alexis
    Edited by: Alexis &amp;quot;le francais&amp;quot; on 21 mars 2011 07:33

    thanks for your help.
    In fact I would like to crypt and after decrypt with this fallowing code:
           private byte[] Crypto = {(byte)0xA0, (byte)0x00,
                 (byte)0x00, (byte)0x00, (byte)0x62, (byte)0x03, (byte)0x01, (byte)0x0C,
                 (byte)0x0f, (byte)0x01, (byte)0x01};
    public void process(APDU apdu) throws ISOException {
              // TODO Auto-generated method stub
              byte[] buffer = apdu.getBuffer();
              if (this.selectingApplet()) return;
              if (buffer[ISO7816.OFFSET_CLA] != CLA_MONAPPLET) {
                   ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
              switch (buffer[ISO7816.OFFSET_INS]) {
                   case INS_INTERROGER_COMPTEUR:
                        tab = new byte[1000];
                        tab[0]= compteur;               
                        tableau = cryter(tab);
                        tableau2= decrypter(tableau);                    
                        apdu.setOutgoing();
                        apdu.setOutgoingLength((short) 7);
                        apdu.sendBytesLong(tableau2,(short) 0, tableau2.lenght);
                        break;          
         public void initialisation(){
            key = (DESKey)KeyBuilder.buildKey(KeyBuilder.TYPE_DES_TRANSIENT_DESELECT,KeyBuilder.LENGTH_DES, false);
            key.setKey(Crypto, (short)0);
            ecipher = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M2,false);
         public byte[] decrypter(byte[] aDecrypter){
              ecipher.init(key, Cipher.MODE_DECRYPT);
              donneeDecrypte = new byte[10000];
              ecipher.doFinal(aDecrypter, (short)0, (short)aDecrypter.length, donneeDecrypte, (short)0);
              return donneeDecrypte;
         public byte[] cryter(byte[] Crypter){
              ecipher.init(key, Cipher.MODE_ENCRYPT);
              donneeCrypter = new byte[10000];
              ecipher.doFinal(Crypter, (short)0, (short)Crypter.length, donneeCrypter, (short)0);
              return donneeCrypter;
         }Now "crypter" method is executed, but when the debugger is at this fallowing line there is a problem :
    tableau2= decrypter(tableau);maybe the size of the array?
    >
    return ecipher.doFinal(aCrypter);
    >
    I work with Javacard 2.2.2, this method does not exist in the API only :
    abstract short doFinal270(byte[] inBuff, short inOffset, short inLength,byte[] outBuff, short outOffset)Edited by: le francais on 22 mars 2011 03:07

  • Need help with some Coldfusion data structures

    Hello,
    I need to keep some sort of a list that contains a page, and then that page will have associated with it values.  So,
    if I have page 1, I may have values 240, 245, 300.  Then, on to page 2, and I will have say, 344, 29, etc.
    So, what I will have is something that "could maybe" be a 2 dimensional array where one of the elements is a list?
    Or, do I set up a struct say, page.number and page.value list, and put that struct in an array?
    Plus, the fun part is I have to save this bad boy in session.  I've been looking around the web for some examples, no
    luck.  So, to reiterate:
    I have a page number that has to be associated with a list.  That entire structure needs to be in an array or list of
    some sort, and stored in session.
    Thanks in advance!

    Really Google did not show anything like:
    <cfset session.pageAry = [
         {page="pageOne", numList="240,245,300"},
         {page="pageTwo", numList="344,29"}]>
    <cfdump var="#session.pageAry#">
    OR
    <cfset session.pageAry = arrayNew(1)>
    <cfset arrayAppend(session.pageAry, strutNew())>
    <cfset session.pageAry[1].page = "pageOne">
    <cfset session.pageAry[1].numList = "240,245,300">
    <cfset arrayAppend(session.pageAry, strutNew())>
    <cfset session.pageAry[2].page = "pageTwo">
    <cfset session.pageAry[2].numList = "344,29">
    OR
    The <cfscript> version of these examples.

  • NVARCHAR UTF-8 byte length

    The following call returns the wrong byte length when the databasee character set is UTF8 for NVARCHAR2 columns. It returns double the character length rather than triple. Oracle version 10.1.0.3.
    OCIAttrGet((dvoid *)param,
    OCI_DTYPE_PARAM,
    (dvoid *)&outcol->data_size,
    (dvoid *)0,
    OCI_ATTR_DATA_SIZE,
    statement->pError)
    This seems like a bug.

    Yes there is a maximum length. A short look at the docs for DataOutputStream.writeUTF tells you:
    >>>
    Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
    First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string.
    <<<
    So writeUTF bails whenever the number of bytes written would be more than what fits into a short, which is 32767. That's your max length (note, that this is the number of bytes, not chars, since in UTF-8 encoding, all non-ASCII chars are saved as 2 or 3 bytes!)

  • Install(byte[] buffer,short offset, byte length)

    Anyone could tell me where i can find the defination of data format of 'buffer' in 'install(byte[] buffer,short offset, byte length)', it is standard, right?!

    Look in appendix A.2 of the GlobalPlatform Card Specifications 2.1.1 (pages 160,161). The same information is specified for the install() method in the Java Card 2.2 API spec. The format is the same for Java Card 2.1.1 and GlobalPlatform 2.0.1'.
    G

  • Remove Structured Anchored Frame  without disturbing the XML Structure - Reg.

    Dear All,
    Please any one help me!, How to remove the xml Structured Anchored Frame without disturbing the XML Structure.
    Manually If I'm removing the XML Structured Anchored Frame, the XML Structured is gone.
    I tried so many ways.  If  I am removing manually in Grouped Frame, then this problem is not happens.
    I mean, Create 2 separate frames Move any xml structured contents to that frames. Group that 2 frames and make it anchored.
    Now you can remove that anchored, this xml Structure is not disturbing (I mean not removed).
    If I did the same in above method for Single Text Frame, this xml Structure is gone.
    Kindly any one person resolve this problem, Thanks in advance!!!
    Note:
    (1) I tried through in InDesign CS6 Plug-In, this is working perfectly. But I need in Javascript to do this.
    Thanks & Regards
    T.R.Harihara SudhaN

    Hm – if you can do it with a Group object, why don't you wrap around a group object?
    With ExtendScript it's quite possible to create Groups with only one single object.
    If we have a text frame selected, you could add a "helper" rectangle to the spread.
    Group the text frame and the rectangle, then remove the rectangle from the group.
    Now you have a Group with a single text frame.
    var myTextFrame = app.selection[0];
    var myHelperRectangle = app.documents[0].layoutWindows[0].activeSpread.rectangles.add();
    var myGroup = app.documents[0].layoutWindows[0].activeSpread.groups.add([myTextFrame,myHelperRectangle]);
    myGroup.rectangles[0].remove();
    app.documents[0].select(myGroup);
    Uwe

  • GUI_DOWNLOAD give 2 bytes for each chinese character - I need fixed length

    Due to the Unicode system takes each Chinese character as a byte, the field(10) can take 10 Chinese Characters, not like before only 5 characters allowed.
    The problem is when the data is downloaded to a txt file. Some records contains only Western Europe charactes and will fill 10 bytes in the output file and other records contains only Chinese characters and will fill up 20 bytes in the output file.
    The data is exported for a system that can upload chinese characters, but only allow fixed record length file (always 10 bytes).
    In other words: the records with Western Europe characters should contain 10 characters = 10 bytes but the records with Chinese characters should only contain 5 characters = 10 bytes.
    Anyone who can solve this, thanks in advance.
    My code:
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          FILENAME                = p_file
          CONFIRM_OVERWRITE       = 'X'
          codepage                = '8400' "Chinese
        CHANGING
          DATA_TAB                = it_output
        EXCEPTIONS

    Hi Thomas,
    Now I understand.
    Pl. check the class CL_ABAP_CONV_X2X_CE.
    May it can help u.
    Here is it's documentation.
    CL CL_ABAP_CONV_X2X_CE
    Short Text
    Code Page and Endian Conversion Between External Formats
    Functionality
    Instances of the class CL_ABAP_CONV_X2X_CE allow you to convert text data between different character sets and numeric data between different number formats (byte order).
    Using the class corresponds to transforming data from a binary input stream to a binary output stream: The data objects are read from the input buffer sequentially and written to an output buffer.
    The class methods are normally used as follows:
    CL_ABAP_CONV_X2X_CE=>CREATE
    This creates a conversion instance. Among other options, you can specify the following as parameters: The input buffer (that is the binary string that contains the data to be read), the character format at used in the input buffer, the byte order used in the input buffer, the character format to be used in the output buffer, or the byte order to be used in the output buffer.
    CONVERT_C, CONVERT_...
    This converts the data. Calling this method several times consecutively allows you to read data from the input buffer sequentially and add it to the end of the output buffer.
    GET_OUT_BUFFER
    This gets the output buffer, making it available for further processing (such as writing to a file, sending using RFC).
    RESET
    This allows you to reset individual attributes of the conversion instance. (This method is especially designed for restarting on a new input buffer and deleting the output buffer while retaining the remaining attributes.)
    Relationships
    CL_ABAP_CONV_IN_CE
    Converting Binary Data into ABAP Data Objects
    CL_ABAP_CONV_OUT_CE
    Converting ABAP Data Objects to a  Binary Format.
    CL_ABAP_CHAR_UTILITIES
    Various Attributes and Methods for Character Sets and Byte Order
    Example
    In the following example, UTF-8 texts are converted to the codepage 1100 (Latin-1) and numbers are converted from little-endian to big-endian format:
    DATA:
      in_buffer TYPE XSTRING,
      out_buffer TYPE XSTRING,
      conv TYPE REF TO cl_abap_conv_x2x_ce.
    in_buffer = '414220C3B602010000'.
    conv = cl_abap_conv_x2x_ce=>create(
             in_encoding = 'UTF-8'
             in_endian = 'L'
             out_encoding = '1100'
             out_endian = 'B'
             input = in_buffer
    CALL METHOD conv->convert_c( n = 5 ).
    CALL METHOD conv->convert_i( ).
    out_buffer = conv->get_out_buffer( ).
    The content of the in_buffer variable is made up of  5 bytes (hexadecimal "414220C3B6"), which represent 4 UTF-8 characters (A, B, SPACE, o-Umlaut), and 4 bytes (hexadecimal "02010000"),  which represent the value 258 in little-endian format. This data is converted and the out_buffer variable now contains the hexadecimal string "414220F600000102". It is made up of:
    4 bytes (hexadecimal "414220F6"), which represent the above  4 characters in codepage 1100 (ISO-8859-1). Note that the length specification n = 5 refers to the number of elementary characters to be converted. For multi-byte codepages like UTF-8 this means that the multi-byte character "C3B6" is counted in length 2.
    4 Bytes (hexadecimal "00000102"), which represent the value 258 in big-endian format.
    If you have the desired byte order in the old format as expected by TRANSLATE ... NUMBER FORMAT (as an N(4) value), you can proceed as follows:
    TYPE-POOLS: ABAP.
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    DATA:
      in_number_format(4) TYPE N VALUE '0101',
      out_number_format(4) TYPE N VALUE '0000'.
    DATA:
      in_endian TYPE ABAP_ENDIAN,
      out_endian TYPE ABAP_ENDIAN,
      conv TYPE REF TO cl_abap_conv_x2x_ce..
    in_endian  = cl_abap_char_utilities=>number_format_to_endian(
                   in_number_format
    out_endian = cl_abap_char_utilities=>number_format_to_endian(
                   out_number_format
    conv = cl_abap_conv_x2x_ce=>create(
             in_encoding = 'UTF-8'
             in_endian = in_endian
             out_encoding = '1100'
             out_endian = out_endian
             input = in_buffer
    Notes
    For details refer to the documentation for the individual methods.
    Regards,
    Joy.

  • Need to activate Tables during DDIC Activation Phase

    Hi Experts,
    I am trying to import support packs from SAPKB70009 to SAPKA70011 in a fresh ECC 6.0 IDES Installation. During the DDIC activation phase it got stuck. Request you to please help me with the activation of following tables:
    Table YCRM01_S_BUPM could not be activated
    Table YTEL01_S_BUPM could not be activated
    Table ZICMAG_S_BUPM could not be activated
    When I checked in SE11, the above tables are already active in state.
    I have found one link on forum:
    support package error
    Tried activating RATE component too, but after saving and trying to activate, got following error message:
    TABL YCRM01_S_BUPM was not activated
    Check table YCRM01_S_BUPM (BASIS/31.07.10/14:29)
    Field RATE: Component type or domain used not active or does not exist
    Nametab for table YCRM01_S_BUPM cannot be generated
    Check on table YCRM01_S_BUPM resulted in errors
    I have noticed that the component RATE is containing Component Type PRP_RATE without any definition for Data Type and description. I believe the missing definition here is the source of not able to activate the table here.
    Any suggestions? Please help.
    Thanks and Regards,
    Naresh.
    Edited by: naresh_nmi on Jul 31, 2010 12:22 PM

    Hi,
    I created manually PRP_RATE as data element and gone ahead with the imports of Support Package. DDIC activation phase passed through.
    Regards,
    Naresh.

  • Replacing 20 fixstatements by Global Variable - Problem 255 bytes length

    Hello,
    we have an issue in businessrules with setting the fix statement on 1 dimension:
    we currently use Fix (@RELATIVE("CBU_ALL",0) ) - on level 0 are approx. 3000 members - on medium level are 20 CBUs Seat and 20 CBUs Door
    we have approx. 20-30 similar businessrules - which either calculate on seat or door CBUs
    the requirement is to either calculate with a rule the 20 CBUs for Seats or the 20 CBUs for Doors
    as we currently do not fix properly on either Seat or Door CBUs, we calculate approx. 1500 empty members (empty, if fix in another dimension done correctly) - tests showed, that this doubles the time which would be needed.
    I know we could easily set 20 fixes in each business rule:
    @RELATIVE("CBU_BMW_Seat",0)
    ....20 more....
    @RELATIVE("CBU_Ford_Seat",0)
    (the fix above would then exclude the 1500 members, which are below:
    @RELATIVE("CBU_BMW_Doors",0)
    ....20 more....
    @RELATIVE("CBU_Ford_Doors",0)
    unfortunately, the number of CBUs/Customers is frequently renamed or some are added, so I can not afford to built these 20 fixstatements into 20 different businessrules and maintain them all the time.
    I thought of using UDAs or Attribute Values -
    but it seems not to be possible in a fixstatment to combine a relative or Children fixstatement with UDAs, which are set on the upper member ?
    I assume it works, if I classify all 3000 level 0 members with UDA or attribute SEATS or DOORS - but that's inefficient
    @RELATIVE("CBU_BMW_Seat",0) AND @UDA(CBU,"SEATS")
    @CHILDREN("CBU_BMW_Seat") AND @UDA(CBU,"SEATS")
    @Descendants("CBU_BMW_Seat") AND @UDA(CBU,"SEATS")
    @UDA(CBU,"SEATS")
    generally, it seems not to be allowed to combine Children or descendant fixes with any other relations or conditions ?
    @CHILDREN(@Match(CBU," Seat") ) (attempt to search for all children of all CBUs with Seat in its name)
    So the idea is to define 2 global variables:
    1 for Seats and 1 for Doors:
    [SEAT] includes then then: @children("CBU_BMW_Seat") ... 20 more @children("CBU_Ford_Seat")
    advantage would be, we can maintain the list of CBUs in 1 place
    my problem is: length of global variable is limited to 255 bytes - I need 800 to 900 digits to define the 20 CBUs
    having 8 global variables instead of 40 CBUs referenced in Fixstatements is not really an advantage
    even if I would rename the CBUs to just S1,S2,S3,S4 D1,D2,D3 (S for Seat, D for Door) (and use aliases in Planning and Reporting with full name to have the right meaning for the users), it does not fit into 1 variable: @children("S1"), @Children("S2"), ..... is simply too long (still 400 digits)
    also other attempts to make the statement shorter, failed:
    @children(@list("CBU_BMW_Seat","CBU_Ford_Seat",.....)) is not allowed
    is there any other idea of using global variables, makros, sequences ?
    is there a workaround to extend global variable limit ? we have release 9.3.1 - is this solved in future releases ?
    are there any other commands, which I can combine in clever way in fixstatements with
    @relative
    @children
    @descendants
    with things like @match @list ?
    (Generation and Level are no approrate criteria for Separating Seat and Doors, as the hierarchy is the same)
    please understand, that as we use this application for 5 years with a lot of historic data and it's a planning application with a lot of webforms and financial reports, and all the CBU members are stored members with calculated totals and access rights and setup data on upper members,
    I can not simply re-group the whole cbu structure and separate Seats and Doors just for calculation performance
    CBU dimension details is like this:
    Generation:
    1 CBU_ALL
    2 CBU_BMW
    3 CBU_BMW_Seat
    4 Product A
    4 Product B
    ..... hundreds more
    3 CBU_BMW_Door
    4 Product C
    4 Product D
    .... hundreds more
    2 CBU_Ford
    3 CBU_Ford_Seat
    4 Product E
    4 Product F
    .... hundreds more
    3 CBU_Ford_Doors
    4 Product G
    4 Product H
    .... hundreds more
    20 more CBUs with below 20 CBUs Seat and 20 CBUs Door

    How hard would it be to insert 2 children under CBU_All? Name them CBU_Seats and CBU_Doors, then group all the Seats and Doors under them.
    Then your calc could be @Relative(CBU_Doors, 0).
    I know it's not always easy or feasible to effect change to a hierarchy, but I just had the thought.
    Robert

  • Data Structure Needed

    *** PLEASE DO NOT REPLY TO THIS POSTING UNLESS
    *** YOU KNOW EXACTLY WHAT I AM TALKING ABOUT
    *** AND HAVE SOLUTION AT THE READY.
    *** NO SWING TREE FYIs PLEASE...doesn't apply.
    *** NO UI JAVASCRIPTS .. I HAVE THOSE.
    I need a properly constructed multiway
    (m-way, general, n-ary, etc.) data structure
    implementation that uses non-ui
    dependent/associated classes. This is know as the
    first child/next sibling data structure used in
    Filesystems (similiar to a BTree).
    I am using many delimited strings, similiar to a
    directory/file structure path but the string is a
    software project hierarchy.
    [a string is structured like this]
    root|branch|...|branch|leaf
    [Process]
    1) the strings are fetched from DB by servlet.
    2) servlet feeds strings into data structure
    to eliminate duplicates and place in proper location.
    3) servlet uses contents of data structure to
    construct links that are coupled with the infamous
    ui-tree script.
    If you know your data structures and have an implementation
    that won't take me 6 days to modify for it to work I would
    appreciate your assistance. I am creating on my own as we
    speak but one from a more experienced java programmer would
    be better.
    Thank You,
    Kevin

    Sounds like one hell of a frustrated programmer over there - all those capitals an'all..
    If I understand you correctly, I don't think you'd take six days to implement this; just split your string by the separator;
    String[] split(String path, char sep, char esc) {
      String[] result = new String[0];
      int o = 0;
      int i; for (i=0; i<path.length(); ++i) {
        char c = path.charAt(i);
        if (c == esc) {
          ++i;
          continue;
        if (c == sep) {
          String substring = path.substring(o, i);
          String[] newresult = new String[result.length+1];
          System.arraycopy(result, 0, newresult, 0, result.length);
          newresult[result.length] = substring;
          result = newresult;
          o = i+1;
    }Then have a java.util.Hashtable as root, with all names in it pointers to either more Hashtables (nodes), or Strings (leaves). If it really does not get anymore complex than that (data associated with leaves, for example), you don't really have to use anything more complex than 'instanceof' here.
    Then start looping over all your String[] split paths, retrieve all nodes, if it's a String and you have a child for it, then convert it to a Hashtable, it it's a Hashtable trod along, if it isn't there create a String (unless you know you have an extra child, in which case you create a Hashtable).
    When you're ready to retrieve, just enumerate your root Hashtable, casting to String all the keys, examining all the values; if they are Hashtable, then recurse. If they're Strings, do your Thing (TM).

  • Case Structure using Byte Array

    I have an array that has 9 bytes. I need to determine method for selecting a case in case structure when a bit is high.
    I know how to do it when it is 1 byte but I am not sure the best method to use when its nine byte array.
    Can someone provide me suggestions? Or example code?
    Thanks..... 

    altenbach wrote:
    Assuming you have a Boolean array with 9 elements, use "boolean array to number" and wire to the selector terminal. Create cases for all relevant patterns and leave the default case empty.
    If only one element can be true at any given time, use search array and search for TRUE. Wire the output to the selector. Leave the "-1" case empty.
    I think the poster has an array of nine bytes, each with the appropriate booleans.  Therefore, I like jcarmody's suggestion that he index the array and performs the operations that the poster is already familiar with.
    Assuming an array of booleans, the first method you described is okay if there is a specific action for each pattern.  In most of the scenarios I've worked with, each bit represented a specific test, for instance, and there would be a lot of duplicate code if I used that method.  (For instance, binary cases 10 and 11 would both have test subVIs for test 2.)  For something like that, I would all my tests in sequence (using error in/out for dataflow, of course) and have T/F cases around each one with the indexed boolean array controlling which tests would be run.  Of course I tend to see things in a literal way, so if the requirements say "do the selected tests in this order", that's how I would develop it.  Maybe there's a better way programmatically?
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Name of the structure needed for sales order user exit

    Hi,
    I am planning to write a user exit which will insert the data into my ztable the moment the new sales order is created and is saved.
    I have identified FORM USEREXIT_SAVE_DOCUMENT as the necessary user exit. But the problem is that while inserting the data into the ztable I cannot insert the data from vbak as the data will be inserted into this table after the SO is saved.
    Thus I need to identify a structure which is used to populate the vbak table so that it simultaneously inserts the data in the ztable as well. Can anyone help me with the name of the structure so that these fields i.e. vbeln, vkorg, vtweg, spart are inserted into my ztable?
    Also need to know how to convert the net value i.e. vbak-netwr in Indian Rupees as it gets stored as Dollars ....
    Thanks,
    Vinod.

    Hi,
    One of the structure being used is RV45A, there are several other str's being used as well for various calculations,
    check out program SAPMV45A for the same.
    & in order to convert vbak-netwr to rupees use the below statemetnt,
    WRITE vbak-netwr TO zvbak-netwr CURRENCY INR.
    Regards,
    Raghavendra
    Message was edited by:
            raghavendra ay

  • Need suggestion on Develop the Hierarchical Structure OAF page--priority

    Hi experts,
    i need to develop the hierarchical structure of OAF page, for this devlopment i need suggestions from you side.
    please find below diagram how to develop the OAF page.
    CEO
    |
    vice president vice president
    | |
    managers managers managers managers
    | | | |
    developer develoer developer developer developer
    Like that i need to develop the OAF page please give me some inputs. Is it feasible in OAF.

    CEO
    |
    vicepresident vicepresident
    |
    manager manager manager manager manager
    | | | | |
    develper developer developer developer

Maybe you are looking for

  • Error when starting Repository

    Hi All, We have a new PI 7.1 system and when we start the Repository we are getting "Unexpected Exception: java.lang.reflect.InvocationTargetException" This error occurs when we start java webstart. The Directory is working. Can you please help us? T

  • CreateThread function in windows 8.1 phone Applications

    Hi, can we use the CreateThread function in Windows 8.1 phone App's? Windows Phone 8.1: This function is supported for Windows Phone Store apps on Windows Phone 8.1 and later. Above line from MSDN, I see that it is supported for windows 8.1 and later

  • Compaq Presario CQ50-110US Laptop

    I  have the same mother board problem with my Compaq Presario CQ50-110US Laptop.  HP's Customer Service is very disappointing. My laptop is 1.5 years old, 6 months out of warranty.  My first call to HP was unfortunately useless.  Told too bad.  Mothe

  • Pass a link to sharepoint document

    I am trying to use a sharepoint library to host documents which I would open using from an ssrs hyperlink (url method) has anyone ever been successful at this? KDW

  • Sql query slow from application but executes in 1 min in Toad

    Hello, When I execute a big select query from DB itself , it gives results in a min. But when called from .Net application it takes 10 mins to execute. But after trying to excute no of times, it suddenly works faster sometimes.