2006 Sep 18 3:40 PM
Hello,
I need to add the Username(sy-uname) and system time (sy-uzeit) fields automatically when the entries are added into the Ztable using the Tcode defined for sm30 transaction.
The user enters the key fields and the "User" & "Time" should get displayed automatically.
Can anybody please suggest a way out of this please...!
Regards
2006 Sep 18 4:43 PM
Hi,
You can use the event '05' when the user is trying to create the data..
Also...I believe it is not possible to do it in SM30 without events..
Thanks,
Naren
Hello,
I need to add the Username(sy-uname) and system time (sy-uzeit) fields automatically when the entries are added into the Ztable using the Tcode defined for sm30 transaction.
The user enters the key fields and the "User" & "Time" should get displayed automatically.
Can anybody please suggest a way out of this please...!
Regards
2006 Sep 18 3:49 PM
Goto table --> Utlities --> Table maintanence generator --> Environment --> Modification --> Events.
Select the event 01 (Before saving the data in the database)--> Enter some name example USER_NAME_TIME. There is one more column Editor near to that click that.
Write the code inside that.
Example:
FORM user_name_time.
zsw_es_docu-user_name = sy-uname.
zsw_es_docu-time = sy-uzeit.
ENDFORM. "user_name_time
Regards,
Prakash.
2006 Sep 18 3:52 PM
Hi,
Go to the view V_TVIMF.
Add an entry with the following entry.
EVent - '01' (Before saving the data in the database)
Form rourtine - 'ADD_USERNAME'
Save the entry in a CR.
Then in the function group that you created for the table maintenance add this subroutine..
FORM ADD_USERNAME.
Types Declaration
DATA: BEGIN OF WA_ZTABLE.
INCLUDE STRUCTURE ZTABLE.
DATA: update_fl TYPE char1,
mark TYPE char1,
END OF WA_ZTABLE.
LOOP AT TOTAL.
WA_ZTABLE = TOTAL.
WA_ZTABLE-USER_NAME = SY-UNAME.
WA_ZTABLE-USER_TIME = SY-UZEIT.
TOTAL = WA_ZTABLE.
MODIFY TOTAL.
ENDLOOP.
ENDFORM.
Hope this works..
Thanks,
Naren
2006 Sep 18 4:41 PM
Its like when the screen is displayed for the user to enter the records on clicking 'new entries', the Username n Time should get displayed automatically. He'll enter the remaining fields and save the data.
Can anybody suggest a way without using the Events!!
2) Also sometimes the Date n Time fields does not appear on the screen while creating entries.
2006 Sep 18 4:43 PM
Hi,
You can use the event '05' when the user is trying to create the data..
Also...I believe it is not possible to do it in SM30 without events..
Thanks,
Naren
2006 Sep 18 5:18 PM
Hi Naren,
Event 05 could do with us. Thank You.
However sometimes, some of the fields created in the table are missing when the actual Tcode is entered. It doesn't happen all times. Could you please suggest why it could happen? Also when SHOW 'X' is entered, the vaules get displayed improperly. After Show is removed it works fine. Can you please explain in which events can we use 'SHOW'
?
Regards
Innova
2006 Sep 18 5:24 PM
Always u have to remember that if a table as table manintanence, whenever a new field is added to that table change the table maintanence generator. Ie. Go to table main. gen screen press the change button check all the checkboxes and press enter--> In the next pop-up select the overview check box and press enter.
Regards,
Prakash.
2006 Sep 18 5:29 PM
Thanks a lot prakash. it worked.. yippeeeeeeee.....
Dot of giving you a 10.... but its not there.. sorry..:-(
Neewas
Bye
2006 Sep 18 4:47 PM
Hello,
You can do this only by using EVENTS. Go to transaction SE54 and enter the table and navigate to the menu path
ENVIRONMENT-->EVENTS.
Now clikc the button NEW ENTRIES. Now in the first column select the proper EVENT and in the second colúmn give the subroutine name that you have created. Press Save. So you can handle the process in that subroutine.
Regs,
Venkat Ramanan N
2006 Sep 18 5:28 PM
Hi,
When SHOW 'X' give in the tcode will show the values in the display mode..
I am not sure what do you mean by "values getting displayed improperly"...Please explain..
Thanks,
Naren
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |