Separate date elements(yyyy-mm-dd)

i want to get Date from database with the format yyyy-mm-dd then how am i going to separate its elements(String year,String month,String day)?it can be done with the string operations but i want to ask if there is any java functions about it like format operations
thank you

i want to get Date from database with the format
yyyy-mm-dd then how am i going to separate its
elements(String year,String month,String day)?it can
be done with the string operations but i want to ask
if there is any java functions about it like format
operationsIf it's truly a date in the database (that is the colum is a DATE or DATETIME, not a CHAR or VARCHAR), then it doesn't really have a format. It's just a date. In that case, use SimpleDateFormat to create a String.
If it's already a String (char or varchar), or once you turn the Date into a String, then use String.split("-") to get the constituent elements.
[url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#split(java.lang.String)]http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#split(java.lang.String)
Calculating Java dates: Take the time to learn how to create and use dates
Formatting a Date Using a Custom Format
Parsing a Date Using a Custom Format

Similar Messages

  • Data element for mm.yyyy

    Hello Experts,
    Is there any data element for a field with the format mm.yyyy .
    I need to place this field in the selection screen and i want to have an F4 help too.
    It will be better if i am provided with the database table name too.
    Please help.  Useful answer will be rewarded.
    Regards,
    Vijayalakshmi

    Hi ,
    Data element for a field with the format mm.yyyy is FTI_MONTH_YEAR.
    You can use this in selection screen as:
    selection-screen begin of block b1 with frame.
    parameters:p_date TYPE fti_month_year.
    selection-screen end of block b1.
    Regards,
    Shanmugapriya
    **Reward if u find helpful

  • Sql Loader loading separate date parts into a date

    Hello,
    I'm having a question on SQL Loader.
    Suppose I have a flat file with a format:
    "John Jackson", 2007, 12, 31, 23, 59, 01
    "William Smith", 2007, 12, 31, 23, 59, 02
    "Tracy vanDijk", 2007, 12, 31, 23, 59, 03
    And I like to put it in a table TEST with (name varchar(20), mydate date).
    The problem is: how to create a control file for sqlLoader that converts the seperate date-elements into a date field?
    load data
    infile 'mydata.csv'
    badfile 'badfile.log'
    discardfile 'discardfile.log'
    append
    into table TEST
    fields terminated by "," optionally enclosed by '"'          
    ( name, mydate ????)
    I'd like to put it in one step into a date field, and not using seperate tables, stored procedures, triggers and such. I think it must be possible, but I wasn't able to find a working example thus far.
    Hope you can help me out.

    A colleague came up with the BOUNDFILLER option. Searching again on the forum I created the solution, that I'd like to share with you.
    SQL> create table TEST1 (naam varchar(30), meetdatum date);
    Tabel is aangemaakt.
    mydata.csv:
    "Scott Tiger", 2006, 02, 18, 23, 59, 4
    "Frank Naude", 2007, 12, 31, 18, 00, 59
    "Fou TeDatum", 2007, 02, 31, 01, 10, 5
    "Johnny Smith", 2007, 1, 1, 12, 00 , 00
    laden.ctl:
    load data
    infile 'mydata.csv'
    badfile 'badfile.log'
    discardfile 'discardfile.log'
    into table test1
    fields terminated by "," optionally enclosed by '"'     
    trailing nullcols     
    ( naam
    ,b_yyyy boundfiller char
    ,b_mm boundfiller char
    ,b_dd boundfiller char
    ,b_hh24 boundfiller char
    ,b_mi boundfiller char
    ,b_ss boundfiller char
    ,meetdatum "to_date(:b_yyyy || :b_mm || :b_dd || :b_hh24 || :b_mi || :b_ss , 'YYYYMMDDHH24MISS')"
    SQL> alter session set nls_date_format = 'YYYY-MM-DD:HH24:MI:SS' ;
    SQL> select * from test1;
    NAAM MEETDATUM
    Scott Tiger 2006-02-18:23:59:04
    Frank Naude 2007-12-31:18:00:59
    Johnny Smith 2007-11-12:00:00:00
    The wrong date, Feb 31st, is spooled to the badfile.

  • Informatica Date Format(yyyy-MM-dd'T'HH:mm:ss.SSS)

    What's your target? relational or xml? If relational, then check the column datatype. If it's of date type then, the column won't accept such formats (with T). To adopt it, the field must be of varchar type. If your relationa column is of type varchar, then in an exp tx, generate the values as below. TO_CHAR(YOUR_DATE_COL,'YYYY-MM-DD') || 'T' || TO_CHAR(YOUR_DATE_COL,'HH:MI:SS:MS') This is what I meant on use exp tx. IF xml target, then you need not to explicity convert the date column to have T in it. When the IS writes date to XML date element it implicitly convert it to have T in middle. Let me know if you need more help on this.Rajani

    You could do..1)OR 2) in an exp tx, try converting it to your desired format by using TO_CHAR(). -Rajani

  • Working with Spry Data Elements

    As I understand it, I have to format elements such as dates,
    currency, etc. myself. Can someone can tell me how to manipulate
    the data elements in Spry (JS/DOM/?). I don't (necessarily) need
    date and currency examples, just something simple to get me
    started.
    For instance, I would like to alter the way {currency} and
    {date} appear below:
    <tr spry:repeat="dsList">
    <td>{currency}</td>
    <td>{date}</td>
    </tr>
    Currently, this is pretty ugly...
    <tr spry:repeat="dsList">
    <td>2006-10-02 10:18:35.983</td>
    <td>16500000.0000</td>
    </tr>
    Any JS example will help me... for instance, the code adding
    one (+1) to the currency value would get me through this;)
    Not vital to this question, but this is a cfquery that's
    using Raymond Camden's toXML component (which rocks) to convert my
    queries to XML variables for Spry.
    many thanks...

    Nevermind... I figured it out.
    I simply added the following code in between the query object
    and the conversion to xml:
    <cfif len(myQuery.date)>
    <cfoutput query="myQuery">
    <cfset query.date=DateFormat(query.date,"mm/dd/yyyy")/>
    </cfoutput>
    </cfif>
    Raymond's toXML
    http://ray.camdenfamily.com/projects/toxml/
    Maybe it'll help someone else ;)

  • Procedure for creating transparent table, data element and domain

    Hi,
    Can anybody let me know the procedure for creating transparent table, data element and domain.
    Thanks,
    Mahathi

    Hi
    Database table and its components
    A database table is the central data structure of the ABAP/4 data dictionary.
    The structure of the objects of application development are mapped in tables on the underlying relational database.
    The attributes of these objects correspond to fields of the table.
    A table consists of columns (fields) and rows (entries). It has a name and different attributes, such as delivery class and maintenance authorization.
    A field has a unique name and attributes; for example it can be a key field.
    A table has one or more key fields, called the primary key.
    The values of these key fields uniquely identify a table entry.
    You must specify a reference table for fields containing a currency (data type CURR) or quantity (data type QUAN). It must contain a field (reference field) with the format for currency keys (data type CUKY) or the format for units (data type UNIT). The field is only assigned to the reference field at program runtime.
    The basic objects for defining data in the ABAP Dictionary are tables, data elements and domains. The domain is used for the technical definition of a table field (for example field type and length) and the data element is used for the semantic definition (for example short description).
    A domain describes the value range of a field. It is defined by its data type and length. The value range can be limited by specifying fixed values.
    A data element describes the meaning of a domain in a certain business context. It contains primarily the field help (F1 documentation) and the field labels in the screen.
    A field is not an independent object. It is table-dependent and can only be maintained within a table.
    You can enter the data type and number of places directly for a field. No data element is required in this case. Instead the data type and number of places is defined by specifying a direct type.
    The data type attributes of a data element can also be defined by specifying a built-in type, where the data type and number of places is entered directly.
    <b>Two Level Domain Example</b>
    A domain defines a field technically and therefore it may
    be used at different business levels.
    A data element describes the meaning of a domain in a certain business context.
    A domain, however, is used for the technical definition of a table field (for example field type and length).
    Therefore, although a take-off airport (data element S_FROMAIRP) would have a different business meaning from an airport where a plane lands (data element S_TOAIRP), they could still have the same domain(here S_AIRPID) because technically we could assign the same number of characters whether the airport is a take-off or a landing airport.
    <b>Definitions of Table in Database</b>
    In SAP R/3 tables are defined as
    A) Transparent tables: All of the fields of a dictionary table correspond to a field in the real database table.
    B) Pooled tables: Different tables which are not linked to each other with a common key are combined into a TABLE POOL. Several logical tables thus exist as a single real database table.
    C) Cluster tables: Several tables linked by a common key may sometimes be combined by the data dictionary and made to exist on the database schema as a single table.
    SAP is evolving R/3 tables in transparent tables.
    <b>Elaboration on each of the definitions</b>
    A transparent table is automatically created on the database when it is activated in the ABAP Dictionary. At this time the database-independent description of the table in the ABAP Dictionary is translated into the language of the database system used.
    The database table has the same name as the table in the ABAP Dictionary. The fields also have the same name in both the database and the ABAP Dictionary. The data types in the ABAP Dictionary are converted to the corresponding data types of the database system.
    The order of the fields in the ABAP Dictionary can differ from the order of the fields on the database. This permits you to insert new fields without having to convert the table. When a new field is added, the adjustment is made by changing the database catalog (ALTER TABLE). The new field is added to the database table, whatever the position of the new field in the ABAP Dictionary.
    Tables can also reside on the database as Pooled tables or cluster tables
    Pooled Tables: Different tables which are not linked to each other with a common key can be combined into a Table Pool. The tables contained within this pool are called Pooled Tables. A table pool is stored in the database a simple table. The table's data sets contain, in separate fields, the actual key for the data set to be stored, the name of the pooled table and the contents of the data set to be stored.
    Using this schema, several logical tables are combined into a single real database table. Although the data structure of each set is lost during the write to the table pool, it is restored during the read by the ABAP/4 Data Dictionary. The ABAP/4 Data Dictionary utilizes its meta-data to accomplish this.
    Since information must be prepared (defined) within the ABAP/4 Data Dictionary when it is read or written to (or accessed), this process itself defines these as not transparent tables
    Cluster Tables: Occasionally, several tables may be linked by a common key. The ABAP/4 Data Dictionary can also combine these tables into a single table. Each data set of the real table within the database contains a key and in a single data field, several data sets of the subsequent table for this key.
    As mentioned above, these table types require special data handling, therefore they are not transparent tables.
    <b>Technical Settings in Dictionary</b>
    The data class logically defines the physical area of the database (for ORACLE the table space) in which your table should be created. If you choose the data class correctly, the table will automatically be created in the appropriate area on the database when it is activated in the ABAP Dictionary.
    The most important data classes are master data, transaction data, organizational data and system data.
    Master data is data that is rarely modified. An example of master data is the data of an address file, for example the name, address and telephone number.
    Transaction data is data that is frequently modified. An example is the material stock of a warehouse, which can change after each purchase order.
    Organizational data is data that is defined during customizing when the system is installed and that is rarely modified thereafter. The country keys are an example.
    System data is data that the R/3 System itself needs. The program sources are an example.
    Further data classes, called customer data classes (USER, USER1), are provided for customers. These should be used for customer developments. Special storage areas must be allocated in the database.
    The size category describes the expected storage requirements for the table on the database.
    An initial extent is reserved when a table is created on the database. The size of the initial extent is identical for all size categories. If the table needs more space for data at a later time, extents are added. These additional extents have a fixed size that is determined by the size category specified in the ABAP Dictionary.
    You can choose a size category from 0 to 4. A fixed extent size, which depends on the database system used, is assigned to each category.
    Correctly assigning a size category therefore ensures that you do not create a large number of small extents. It also prevents storage space from being wasted when creating extents that are too large.
    Modifications to the entries of a table can be recorded and stored using logging.
    To activate logging, the corresponding field must be selected in the technical settings. Logging, however, only will take place if the R/3 System was started with a profile containing parameter 'rec/client'. Only selecting the flag in the ABAP Dictionary is not sufficient to trigger logging.
    Parameter 'rec/client' can have the following settings:
    rec/client = ALL All clients should be logged.
    rec/client = 000[...] Only the specified clients should be logged.
    rec/client = OFF Logging is not enabled on this system.
    The data modifications are logged independently of the update. The logs can be displayed with the Transaction Table History (SCU3).
    Logging creates a 'bottleneck' in the system:
    Additional write access for each modification to tables being logged.
    This can result in lock situations although the users are accessing different application tables!
    <b>Create transparent table</b>
    Go to transaction SE11. Enter name of table you want to create (beginning with Y or Z) and click on create pushbutton
    Enter the delivery class and the table maintenance criteria
    The delivery class controls the transport of table data when installing or upgrading, in a client copy and when transporting between customer systems .
    The display/maintenance indicator specifies whether it is possible to display/maintain a table/view using the maintenance tools Data Browser (transaction SE16) and table view maintenance (transactions SM30 and SM31).
    Enter the name of the table field and the data element. The
    System automatically populates the technical details for
    existing data elements.
    So far as possible it is advisable to use existing data elements which befit the business requirements.
    However, we may create data elements if need be. The same is shown in the next slide.
    To create a data element simply double click on it.
    Alternately create a data element by simply choosing the
    data type radio button on SE11 initial screen.
    <b>Create data element</b>
    The system prompts you to create a new data element.
    Choose the Yes pushbutton.
    Under the data type tab enter the domain name which
    determines the technical characteristics of the field.
    Further characteristics tab: Allows you to specify a search help assigned to the data element.
    It also allows you to specify a parameter id which helps you populate a field from SAP memory.
    Field label: Can be assigned as prefixed text to a screen field referring to the ABAP Dictionary. The text is displayed on the screen in the logon language of the user (if the text was translated into this language).
    <b>Create domain</b>
    If the domain does not exist in the data dictionary the
    system prompts you to create one.
    Give the technical characteristics under the definition
    tab. Value range allows you value restriction at domain
    level.
    Value range tab:
    As explained in the section Consistency through input checks one can restrict the possible values for a field at domain level itself by either entering fixed values or by specifying a value table under the tab Value range.
    <b>Currency/Quantity fields in a table</b>
    A currency or a quantity field must be assigned a reference field from a reference table containing applicable qty unit or currency unit.
    Field of the reference table, containing the applicable quantity unit or currency
    A field containing currency amounts (data type CURR) must be assigned a reference field including the currency key (data type CUKY).
    A field containing quantity specifications (data type QUAN) must be assigned a reference field including the associated quantity unit (data type UNIT).
    <b>Create transparent table continue</b>
    Maintain the technical settings of the table by clicking on the tab

  • Releation between fields and data element

    Dear Abapers,
    What is the relation between the fields and data element,  while cretion of fields system will ask the data element, can we have one data element to more than one fields.  Can you plese explain me.
    Regards

    Hi,
    data elements are structures defined in SAP Dictionary. 
    Fields you meen in a table? or in programs? in both places you create in reference to SAP Dictionary. 
    data element char20.  TEXT20
    Programs  data:  l_text type char20.
    Tables  ... field   ZTEXT  type CHAR20...TEXT20

  • Adding data element to segment in we31 in ECC 6.0

    hi all,
    I have added field name ( data element ) to segment in we31 in 4.6 C by going Edit u2013> cancel release, then F6 to goto change mode to add our field.
    Now I have to add the same field ( data element ) to segment While adding it is giving system error as " Error while resetting the release of segment ZE1XXXXXX_01"
    Kindly let me know what to do ?
    Thanks in advance

    Problem solved with the help of my collegue.
    It is just using "Segment --> Add version".
    As the old version is already released so we can
    "Edit --> Cancel release".
    Thanks,

  • Adding new data elements to Org Modeler.

    We are trying to add 4 fields to the org Modeler. However it is nowhere to be found like in the orgchart.
    Org Modeler 3.0 SP2
    PA0001, PA0008, HRP1005 and HRP1008. (also linking to the texts in T001P, so we will require a table inner join)

    Hi Wade,
    In order to get the fields in OrgModeler scenarios you need to make sure that your hierarchy data element in the Source OrgChart contains all fields that you want. For this I recommend creating a NakisaRFC function for the additional data, creating a data element for it and then creating a linked data element to link together the new data element and the existing hierarchy data element. There is no data center in OrgModeler so you will need to do this manually.
    Best regards,
    Luke

  • What is domain and dataelement.....diff b/w domain and data element

    dear all
    what is domain?
    what is data element?
    In one domain how many data elements are possible to used?
    with out data element how can u create a table? explain briefly.

    To clarify it little further the Data element and Domains are used in combination where similiar type of data fields are to be used with some more additional characteristics to each Data element.
    For example consider creating a table which contains Employee details. The Columns Name1 and Name2 are to be of type char and length 40. There are 2 ways to do this,
    1. You can assign the fields Name1 and Name2 directly to CHAR40(as the data element) in SE11. But this will make both the fields to have same characteristics with no difference among them.
    2. The other way is to assign the columns Name1 and Name2 to seperate Data elements say DE_NAME1 and DE_NAME2. This method has tha advantage of adding further charectristics and labels to the data element. Hence in this case you can add a label "Name1" for the data element DE_NAME1 and "Name2" for data element DE_NAME2. And both these data element will point to the same domain CHAR40, hence length and type is same.
    Hope this helps.
    Thanks,
    Prasath N

  • Doubt in data element creation

    Hi,
        I have doubt in data element creation ie, there is 2 options elementary type
    (domain and built-in-type) and reference type (name of the reference type &
    ref to predefined type). if there is built in type here then what is the use of
    built-in-type in initial screen of the table and also explain me about the use of
    reference type.
    with regards,
    nanjunda sharma

    Hi!
    With the use of the built-in type, you have to set always in every different data element the exact type.
    With the use of the domains (pre-defined types) you just have to enter the domain name into the data element. If you have to modify the type, you can maintain it in the domain (only once) but the built in types have to modifyed in every data element (which means more work).
    Domains have a little more options also, than the built in types.
    Regards
    Tamá

  • How to make BI Info obj Data element in-herit source DE documntn?

    Say I am in ECC. I go to SE11, give table name MARA and then doubleclick on the dataelement 'MATNR'. Then I click on documentation. I get a popup with Short text " Material Number" and Definition "Alphanumeric key uniquely identifying the material'.
    I am interested in the latter information that is 'Definition' - & in general whatever documentation comes up for data element in ECC.CRM.SCM,SRM.
    Now I log into SAP BI. I find that under characteristic 0Material, the data element is /BI0/oimaterial. When I double-click this datamaterial and press the documentation button, the system says 'No documentation'.
    My Questions:
    1. IS there a switch we could turn on in source ECC/SRM/CRM/SRM so that the data element in SAP BI inherits the original source field data element documentation.
    { I am not too convinced of the argument- that in BI we have info objects in ECC we have fields - since I am talking of data element level information- I would tend to think of this as an oversight of the designers or de-prioritization !!}.
    2. Could we have an ABAP workaround? That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation by function DOCU_GET (from eCC) and use the mapping info above to link SAP BI data element with source data element documentation.
    WHY do I want to punish myself as above? My use case is, we take out SAP BI Table, field, metadata etc and create a model in a modeling tool and physical implementation in a 3rd party DW database as our own canonical, application-agnostic corporate datawarehouse. I would want the source data element documentation to flow to this last system as well as the modeling tool.
    Regards
    Sasanka

    That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation by function DOCU_GET (from eCC) and use the mapping info above to link SAP BI data element with source data element documentation.
    1) SAP don't supply this, I would imagine, because R/3 isn't the only possible source of data.  I'm currently working on an app that extracts from R/3, an Oracle database and APO.  From whence should I take the documentation for my MATERIAL info object?  While being able to transfer the documentation of data elements might be very useful for your app, I can't see that generally it would be of interest to clients - I've certainly never heard of such a requirement.  So, my opinion at least, it isn't a design flaw.
    2) As you've pointed out, you can get the tables that do the mapping, so you know the source data elements, so you can get the documentation.  I'm not sure of how to store the documentation, but the obvious candidate for a link between infoobject and dataelement would be master data of an own infoobject.  You could wrap DOCU_GET in an RFC (if it isn't RFC enabled), and do a direct call between your 3rd party app and r/3 to get the documentation.  For information about the mapping tables, I'd suggest asking that question specifically in one of the BI forums.
    matt

  • URL link in data element documentation

    Is it possible to create a url link within the documentation of a data element to allow the user to launch the web browser and navigate directly to a specified webpage?
    Regards
    Mark Briggs

    Hello,
    I am not sure but you can try this out. Go to se38 and documentation for a test program. Click on Goto and then Change editor. write a text that you want to give a link to. Make its paragraph format as SAPfind Reference. Select the text goto insert link. It will pop you up with a box. give the name of your program but how to link it is another mystery.
    Try these function modules.
    IWB_HTML_HELP_OBJECT_SHOW
    IWB_HTML_HELP_EXTENDED_HELP
    and see this program BCALV_GRID_F4_HELP may be of some help.
    REgards,
    SHekhar Kulkarni

  • Data element-reward point guranteed

    Hi all,
             i am in a peculiar problem.I have to go through a hell lots (50+) of ztable and find the domian used and corresponding data element.
    going thorugh SE11 and finding the things are going to take lots of time.
    i have a report program , sending it to you, it displays details of info of listed table.
    just run the report.
    but the thing is , it rerieves the data type, instead of data element and domain.
    somehow if i get those two things(domian & data element instead of data type of each field) , my work will be easier.
    i will simply run this report and download the content of the priniting internal table int an excel ****.
    can you just do some modification in this report to print DATA ELEMENT AND DOMAINS OF RESPECTIVE.
    here it is ,
    REPORT ZANID_TEST message-id zz NO STANDARD PAGE HEADING
           LINE-SIZE 178 LINE-COUNT 65.
    TABLES: DD03L, DD04T, DD02T, DD02L.
    SELECT-OPTIONS: TABNAME FOR DD02L-TABNAME.
    *SELTEXT E  'SAP Table Name(s)'
    DATA: BEGIN OF TAB OCCURS 500,
         TABNAME LIKE DD03L-TABNAME,
         POSITION LIKE DD03L-POSITION,
         FIELDNAME LIKE DD03L-FIELDNAME,
         STXT LIKE DD04T-DDTEXT,
         KEYFLAG LIKE DD03L-KEYFLAG,
         DATATYPE LIKE DD03L-DATATYPE,
         LENG     LIKE DD03L-LENG,
         DECIMALS LIKE DD03L-DECIMALS,
         CHECKTABLE LIKE DD03L-CHECKTABLE,
         REFTABLE LIKE DD03L-REFTABLE,
         REFFIELD LIKE DD03L-REFFIELD,
         END OF TAB.
    DATA: LINE-COUNT TYPE I.
    SELECT * FROM DD03L WHERE TABNAME IN TABNAME.
      MOVE-CORRESPONDING DD03L TO TAB.
      IF TAB-FIELDNAME CS '.inc'.
      ELSE.
        SELECT * FROM DD04T WHERE ROLLNAME   = DD03L-ROLLNAME
                              AND DDLANGUAGE = SYST-LANGU
                              AND AS4LOCAL   = 'A'.
        ENDSELECT.
        IF SYST-SUBRC = 0.
          TAB-STXT = DD04T-DDTEXT.
        ENDIF.
        APPEND TAB.
      ENDIF.
    ENDSELECT.
    DESCRIBE TABLE TAB LINES LINE-COUNT.
    IF LINE-COUNT EQ 0.
      MESSAGE E009 WITH 'Table Not Found'.
    ENDIF.
    SORT TAB BY TABNAME POSITION.
    LOOP AT TAB.
      ON CHANGE OF TAB-TABNAME.
        NEW-PAGE.                          "Page Break for New Table
      ENDON.
      WRITE: /  TAB-FIELDNAME, 20 TAB-STXT,
               81 TAB-KEYFLAG,  85 TAB-DATATYPE,
               90 TAB-LENG, 100 TAB-DECIMALS,
               110 TAB-CHECKTABLE,
               121 TAB-REFTABLE,
               132 TAB-REFFIELD.
    ENDLOOP.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED OFF.
      WRITE: /  SY-REPID,
               'Run by', SY-UNAME(8), 'on', SY-DATUM, SY-UZEIT,
               'System', SY-SYSID(4), 'Client', SY-MANDT.
      WRITE: / SY-TITLE CENTERED.
      FORMAT INTENSIFIED ON.
    *include zconinc3.
    FORMAT INTENSIFIED OFF.
    CLEAR DD02T.
    SELECT * FROM DD02T WHERE TABNAME EQ TAB-TABNAME
                          AND DDLANGUAGE EQ SYST-LANGU
                          AND AS4LOCAL   EQ 'A'.
    ENDSELECT.
    CLEAR DD02L.
    SELECT * FROM DD02L WHERE TABNAME EQ TAB-TABNAME
                          AND AS4LOCAL   EQ 'A'.
    ENDSELECT.
    WRITE: / 'Table Name   ', TAB-TABNAME,
             'Type=', DD02L-TABCLASS,
              DD02T-DDTEXT.
    WRITE: /  'Field',       20 'Description',
             81 'Key',        75 'Type',
             90 'Length', 100 'Decimals',
             110 'Check Table',
             121 'REF Table',
             132 'REF Field'.
    FORMAT INTENSIFIED ON.

    Here you go:
    REPORT ZANID_TEST message-id zz NO STANDARD PAGE HEADING
    LINE-SIZE 255 LINE-COUNT 65.
    TABLES: DD03L, DD04T, DD02T, DD02L.
    SELECT-OPTIONS: TABNAME FOR DD02L-TABNAME.
    *SELTEXT E 'SAP Table Name(s)'
    DATA: BEGIN OF TAB OCCURS 500,
      TABNAME LIKE DD03L-TABNAME,
      POSITION LIKE DD03L-POSITION,
      FIELDNAME LIKE DD03L-FIELDNAME,
      STXT LIKE DD04T-DDTEXT,
      KEYFLAG LIKE DD03L-KEYFLAG,
      DATATYPE LIKE DD03L-DATATYPE,
      LENG LIKE DD03L-LENG,
      DECIMALS LIKE DD03L-DECIMALS,
      CHECKTABLE LIKE DD03L-CHECKTABLE,
      REFTABLE LIKE DD03L-REFTABLE,
      REFFIELD LIKE DD03L-REFFIELD,
      rollname like dd03l-rollname,
      domname like dd04l-domname,
    END OF TAB.
    DATA: LINE-COUNT TYPE I.
    SELECT * FROM DD03L WHERE TABNAME IN TABNAME.
      MOVE-CORRESPONDING DD03L TO TAB.
      select single domname from dd04l into tab-domname
        where rollname = dd03l-rollname.
      IF TAB-FIELDNAME CS '.inc'.
      ELSE.
        SELECT * FROM DD04T WHERE ROLLNAME = DD03L-ROLLNAME
        AND DDLANGUAGE = SYST-LANGU
        AND AS4LOCAL = 'A'.
        ENDSELECT.
        IF SYST-SUBRC = 0.
          TAB-STXT = DD04T-DDTEXT.
        ENDIF.
        APPEND TAB.
      ENDIF.
    ENDSELECT.
    DESCRIBE TABLE TAB LINES LINE-COUNT.
    IF LINE-COUNT EQ 0.
      MESSAGE E009 WITH 'Table Not Found'.
    ENDIF.
    SORT TAB BY TABNAME POSITION.
    LOOP AT TAB.
      ON CHANGE OF TAB-TABNAME.
        NEW-PAGE. "Page Break for New Table
      ENDON.
      WRITE: / TAB-FIELDNAME, 20 TAB-STXT,
      81 TAB-KEYFLAG, 85 TAB-DATATYPE,
      90 TAB-LENG, 100 TAB-DECIMALS,
      110 TAB-CHECKTABLE,
      tab-rollname,
      tab-domname.
    ENDLOOP.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED OFF.
      WRITE: / SY-REPID,
      'Run by', SY-UNAME(8), 'on', SY-DATUM, SY-UZEIT,
      'System', SY-SYSID(4), 'Client', SY-MANDT.
      WRITE: / SY-TITLE CENTERED.
      FORMAT INTENSIFIED ON.
    *include zconinc3.
      FORMAT INTENSIFIED OFF.
      CLEAR DD02T.
      SELECT * FROM DD02T WHERE TABNAME EQ TAB-TABNAME
      AND DDLANGUAGE EQ SYST-LANGU
      AND AS4LOCAL EQ 'A'.
      ENDSELECT.
      CLEAR DD02L.
      SELECT * FROM DD02L WHERE TABNAME EQ TAB-TABNAME
      AND AS4LOCAL EQ 'A'.
      ENDSELECT.
      WRITE: / 'Table Name ', TAB-TABNAME,
      'Type=', DD02L-TABCLASS,
      DD02T-DDTEXT.
      WRITE: / 'Field', 20 'Description',
      81 'Key', 75 'Type',
      90 'Length', 100 'Decimals',
      110 'Check Table',
      141 'Data Element',
      172 'Domain'.
      FORMAT INTENSIFIED ON.
    Message was edited by: Erik Verbeeck

  • How to make use of adjacent data elements within the same buffer

    Hi,
             Does anyone know how to make use of adjacent data elements within the same buffer? To make my question clearly, I would like to give you an example. In my application, I set "sample to read" as 10 which means at each loop 10 data samples will be taken into a buffer. Now, what I would like to do is to do some calculations on adjacent data samples in same buffer. I tried to use "shift register" for this, but it seemed to me that it only can deal with the calculation between data from adjacent loops. In other words, it skips 9 data elements and take the 10th one for the calculation.
             Here I also attach my VI showing what I did.
        Thank you very much in advance,
                            Suksun
    Attachments:
    wheel_encoder_1.vi ‏98 KB

    Hi Suksun,
          I hope you'll forgive me for distilling your code - mainly to understand it better.  I tried to duplicate your logic exactly - which required reversing the "derivatives"-array before concatination with the current samples array.  As in your code, the last velocity is being paired with the first position.  If first velocity is really supposed to be paired with first position, just remove the "Reverse 1D Array" node.
    cheers
    Message Edited by Dynamik on 01-07-2006 03:17 AM
    Message Edited by Dynamik on 01-07-2006 03:19 AM
    When they give imbeciles handicap-parking, I won't have so far to walk!
    Attachments:
    encoder2.GIF ‏14 KB
    encoder2.vi ‏102 KB

Maybe you are looking for