Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Addition of 'created by' and 'created on' field in customized table

Former Member
0 Kudos

I have created a Z table with the following fields:

Mandt

Bukrs (Company Code)

Saknr (General Ledger)

Created_by

Created_on

As per the requirement, whenever a new entry is created in the Z table, by default 'created by' and 'created on' field should be populated in the Z table.

For eg.

When I'll do an entry with Bukrs = 7000 and Saknr = 123456 and my table entry should look like

Company_Code General_Ledger Created_by Created_On

7000 123456 John <date-Time>

So how will I get Createdby and createdon field

Edited by: reshma.rbi on Jul 23, 2010 11:22 AM

3 REPLIES 3

former_member182387
Active Participant
0 Kudos

Hi,

You need to create one FM for inserting or updating your ZTABLE. Input should be BUKRS and SAKNR.

Inside that Fm, Insert or update the table with SY-UNAME for created by, SY_DATUM for Created on....

Ask your developers to use your FM to update or insert the table

Another way is, create Table maintenance and write your code to insert created by and created on.......

Former Member
0 Kudos

Hi ,

For this you have to use Table Events in SE11.

create a table maintainance generator for the ztable u have created.

goto utilities click on table maintainance generator.

give auth. grp as &nc&

give ur table name as function group.

goto environments ->modification->events.

create a new entry use 05 event before updating to the database.

write ur form routine there. to populate the field with counter.

Steps to implement

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-876528725...

Former Member
0 Kudos

Moderator message - FAQ locked