‎2004 Oct 06 4:46 PM
Hi all,
Thanks for all the help to this point. I would be thankful if someone has the codes for the
ADD
DISPLAY
EDIT
DELETE buttons on a screen.
The screen is a result of a custom transaction that has been created. This screen is connected to a Ztable.
For each of the above functions we need to even store the username and sysdate when the record was changed. From yesterday information that i obtained i could get the userid and date from the following objects sy-uname, the current date from sy-datum.
Thanks in advance
amit
‎2004 Oct 07 10:54 AM
‎2004 Oct 06 5:00 PM
Hi Amit,
Have you tried using Table Generator in SE11? It is easy and will generate all the buttons you need automatically. To do this:
1. Go to SE11.
2. Enter your ZTABLE
3. Maintain it.
4. Select Utilities->Table Maintenance Generator
5. Put in Authorization Group (you can use w/out auth group if you want to secure by transaction code), function group (the Z one that your program will be stored), Maintenance Type (select 2 if you want the detail screen separated), and Overview/Single screens (put it 1 and 2)
6. Click on Create button.
7. To see the result, you can use transaction SM30 and enter the table name.
8. Or you can create a parameter transaction using SE93 to link SM30 to this table automatically.
‎2004 Oct 06 5:10 PM
Nablan,
Thanks for the information . I will try that.
thanks
amit
‎2004 Oct 06 6:48 PM
Hi
It would be an easy way to utilize table maintenance generator. But it seems you need a more specific solution since you require time-stamping, authority checks, etc.... So, I guess you have already created a module-pool or a report program. That will be better to go on with that since it will provide flexibility.
*--Serdar
‎2004 Oct 06 9:35 PM
I am new to ABAP and hence did not get a clue of what you said about pools and stuff.
Well let me clarify , let us say we use the table maintenance generator . Does that link to a add, delete and edit function tabs on the screen. Also what would be the code that will take care of the authorization stuff.
thanks
amit
‎2004 Oct 06 10:05 PM
Hi Amit
Table maintenance generator generates a program which includes utilities to add, delete or edit records of a specific database table .
You can interfere the generated program to some extent. However, it will be difficult and not flexible because you require additional features. That interference will require approximately same knowledge level as required for developing a new program.
So, if you do not feel comfortable to write an ABAP program including screen programming, first try to learn it. You can refer some resources for that:
1. The book :
<b>"ABAP Objects The Official Reference"</b>A comprehensive guide to all ABAP language elements
by Horst Keller & Joachim Jacobitz
--> You can find more info from
http://www.sap-press.com/H958.html
2. <b>SAP Help Portal</b> at http://help.sap.com
3. Standard <b>SAP courses</b>
"BC400 - ABAP Workbench: Foundations and Concepts"
"BC402 - ABAP Programming Techniques"
"BC410 - Programming User Dialogs"
"BC414 - Programming Database Updates"
*--Serdar
‎2004 Oct 06 10:21 PM
From my experience, using Table Maintenance Generator is always the fastest to develop a screen for maintaining a custom table. Once you generate it, all the standard functionality of maintaining a table is already there. If you have some additional functionalities like downloading to excel, you can add it to the logic. The effort will be definitely less than writing it from scratch.
In terms of authorization, it is also taken care already. As I said in the previous answer, you can select an authorization group when you generate the screen. You can create a custom authorization group. Or you can simply use no authorization, but then create a parameter transaction for Display and Maintenance using SE93 with main transaction as SM30. For display transaction, set field SHOW as 'X'. For maintain transaction, set field UPDATE as 'X'.
‎2004 Oct 06 10:26 PM
Hi Nablan
It is OK if it were just adding an authorization check table-wise. However, from Amit's previous thread, he wants an authorization with respect to each specific record.
Secondly, Amit requires to update the date and time of that last action with the record update.
To insert these codings, you need to inspect the generated code and this will somehow require a basic understanding of screen programming in ABAP.
Don't you think so?
*--Serdar
‎2004 Oct 06 10:45 PM
To check authorization for each record, you can do it in the PBO of the first screen. This is to skip the records that you are not authorized to see. You can check in the PAI of the second screen (assume you use 2 screens) for authorization if user enter records that he/she not supposed to maintain. For placing the user id and date/timestamp, you can also do it in the PAI of the second screen within the CHAIN-REQUEST command of the flow logic.
One more advantage with using table generator is that locking is automatically programmed.
‎2004 Oct 06 11:01 PM
Hi Nablan
My point was just to say that the program generated by the table maintenance generator will be more restrictive about performing content operations. By the way, all the operations you've mentioned are about basics of screen programming which I recommend Amit to learn.
Advantages of table maintenance generator are obvious. I also make use of it, even modifying the original code.
I trust your experience, so I hope Amit can handle the generated code to insert his requirements.
Regards...
*--Serdar
‎2004 Oct 07 10:54 AM