Skip to Content
author's profile photo Former Member
Former Member

Include SY_DATUM and SY-UZEIT in a Z-Table

Dear Friends,

We have a Z table with three fields and data has been populated over the past one year. I now need two additional fields which should capture the Server Date & Time (SY-DATUM & SY_UZEIT).

The other issue is that these fields should reflect the new data for historical records as well.

Your help will be highly appreciated.

Regards

Paddy

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 07:07 AM

    HI

    include this fields or create a structure for these fileds and append that structure to your table

    refer SYST table to refer about that fileds declare your fileds same as like in SYST

    <b>Enhance tables using Append structures</b>

    Append structures allow you to attach fields to a table without actually having to modify the table itself. You can use the fields in append structures in ABAP programs just as you would any other field in the table.

    1)Click on the append structure tab and opt to create new

    structure.

    Append structures allow you to enhance tables by adding fields to them that are not part of the standard. With append structures; customers can add their own fields to any table or structure they want.

    Append structures are created for use with a specific table. However, a table can have multiple append structures assigned to it

    2) Customers can add their own fields to any table or structure they want.

    The customer creates append structures in the customer namespace. The append structure is thus protected against overwriting during an upgrade. The fields in the append structure should also reside in the customer namespace, that is the field names should begin with ZZ or YY. This prevents name conflicts with fields inserted in the table by SAP

    <b>Enh. using Customizing includes</b>

    Some of the tables and structures delivered with the R/3 standard contain special include statements. These are often inserted in those standard tables that need to have customer-specific fields added to them. Such includes are Customizing includes. (CI).

    1)A Customizing include is a structure that satisfies a special naming convention. (name begins with CI_).

    A Customizing include is a structure that satisfies a special naming convention. The name of a Customizing include begins with ‘CI_’ and the include is in the customer namespace .

    If enhancements are already planned in the R/3 standard using customer-specific fields, such Customizing includes are included. in the corresponding standard table or standard structure. The Customizing include (that is the definition of the structure itself) is usually first created in the customer system and filled with fields by special Customizing transactions.

    2)Customers can add their own fields to any table or structure they want.

    The Customizing include field names must lie in the customer namespace just like field names in append structures. These names must all begin with either YY or ZZ.

    <b>Append structures v/s Customizing includes</b>

    In contrast to append structures, Customizing includes can be inserted into more than one table.

    As an example the customizing include that we created (CI_DEMO) could be a part of multiple tables in the database whereas the append structure (ZDEMO_APPEND) can only be assigned to one table. (here MARA).

    This provides for data consistency throughout the tables and structures affected whenever the include is altered.

    <b>Reward if usefull</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 20, 2007 at 07:18 AM

    <b>New records</b>

    Append the structure and add two fields linked to creation TYPE AEDAT and AEZEIT.

    Find the program that insert into the Z-table (use Where used option and search for INSERT/MODIFY instruction). and add a GET TIME instruction to synchronise your transaction with the server and then move SY-UDATE, SY-UTIME to the new fields.

    <b>Old records</b>

    You could find these values from

    - <b>change document tables</b> - activation via SCDO and filled in update task function modules - look at CDHDR/CDPOS

    - <b>Table history</b> - logged table log, activated via SE11 under technical settings "Log data changes" - look at DBTABLOG via transaction SCU3

    - Other tables are linked to these record and have a CPUDT/TM field

    - Tools of the database system (out of SAP scope)

    Else it's too late...

    Build a program which update the old records.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 07:19 AM

    include two new fields with the data element similar to those system fields and use .APPEND or .INCLUDE toadd those fields to that tabel.and then populate the data.

    reward if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 07:33 AM

    Open SE11. Goto=> Append structure. Create new & include sy-uzeit, sy-datum.

    & Save. Need to adjust database thru se14.

    Regards

    Srimanta

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.