2 Table Maintenance generation & validation using events
Create table lets say ZXXXX hold Object Locations.
Field key data element Type Length Dec text
MANDT x MANDT Clnt 3 0 Client
ZCTRY x LAND1 Char 3 Country Key
ZOLOC x ZOLOC Char 15 Object
Location
ZOLOC20 ZOLOC20 Char 20 Object
Location short text
ZOLOC40 ZOLOC40 Char 40 Object
Location long text
ZAWSYS LOGSYSTEM Char 10
Logical System
ZSTREET AD_STREET Char 60
Street
ZSTREET2 AD_STRSPP1 Char 40
Street 2
ZPOSTAL_CODE AD_PSTCD1 Char 10
City postal code
ZCITY AD_CITY1 Char 40 City
ZCOUNTRY ZLAND Char 3
Address Country
ZOBJ_SIGN ZOBJ_SIGN Char 10
Object Sign
ZREF1 ZREF1 Char 10 Reference 1
ZREF2 ZREF2 Char 10 Reference 2
ZREF3 ZREF3 Char 10 Reference 3
ZREF4 ZREF4 Char 10 Reference 4
ZNOTE1 ZNOTE1 Char 20 Note 1
ZNOTE2 ZNOTE2 Char 20 Note 2
ZCREAETDATE CREATEDATE Dats 8
Creation/Change Date
ZCREATETIME CREATIETIME Tims 6
Creation/Change Time


Create a table maintenance generator for ZXXXX.

Create two events in Table Maintenance Generator:
- To update the filed value SAP in ZAWSYS and
creation date and time
- To update change date and time after saving the
entry

Event ‘21’ – At Create:
ZXXXX-ZAWSYS = SAP.
ZXXXX-ZCREATEDATE = sy-datum.
ZXXXX-ZCREATETIME = sy-uzeit.

Event ‘01’- After Save
ZXXXX-mandt = extract+0(3).
ZXXXX-zctry = extract+3(3).
ZXXXX-zoloc = extract+6(15).
ZXXXX-zoloc20 = extract+21(20).
ZXXXX-zoloc40 = extract+41(40).
ZXXXX-zawsys = log_sys.
ZXXXX-zstreet = extract+91(60).
ZXXXX-zstreet2 = extract+151(40).
ZXXXX-zpostal_code = extract+191(10).
ZXXXX-zcity = extract+201(40).
ZXXXX-zcountry = extract+241(3).
ZXXXX-zobj_sign = extract+244(10).
ZXXXX-zref1 = extract+254(10).
ZXXXX-zref2 = extract+264(10).
ZXXXX-zref3 = extract+274(10).
ZXXXX-zref4 = extract+284(10).
ZXXXX-znote1 = extract+294(20).
ZXXXX-znote2 = extract+314(20).
ZXXXX-zcreatedate = sy-datum.
ZXXXX-zcreatetime = sy-uzeit.
modify ZXXXX.

Answer Posted / pravin

Views
Match code
Lock object

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is step-loop?

667


Which FM do you use to find out who is reporting to whom

5183


What does nw 7.4 sp 05/nw 7.5 sp 02 offers in abap?

692


What are the types of views? : sap abap data dictionary

644


What is the significance of technical settings (specified while creating a table in the data dictionary) ?

588






if u take one worst program,in this program user write the logic is session method.in that program user can get some errors ,that errors we will see in call transaction method,how it is possible.?

1674


Explain the disadvantages of logical databases?

555


What are the page windows? How many main windows will be there in a page window?

564


What are the aggregate objects in the data dictionary? : abap data dictionary

1050


Hi, I have a requirement for locking the fax field in user master records. As you know user can edit the details using the System>profile>own data (SU3), it is causing some security threat to our model. What i want is users should not be able to change the fax field under communications when they get into su3.I have heard of user Exist functionality but don't know how to implement it. Can you suggest something, it will be greatly appreciated.

1467


What is web dynpro for abap?

577


Explain what is the difference between sy-tabix and sy-index? Where it is used?

566


How to specify a client for database table processing?

617


What is off cycle payroll run

1951


How memory management happens for internal tables and work areas in abap?

733