"In ABAP it is very convenient to run a report using a Variant. Basically a report can have several Variants linked to it. If you use a variant then the data entry time is reduced considerably and this also reduces data entry errors. The load on the ABAP processing is also reduced. To create a Variant you may need the necessary authorizations. Most of the times while testing programs you will need to run a report using a variant and hence having the authorization to create a Variant is necessary. To create a Variant go to the main reporting screen, enter the name of the report for which you want to create the variant and select goto Variants option from the menu. The system displays the initial screen for the Variants. For creating a Variant you need to enter all the mandatory fields. Also you need to give a unique name for the Variant. Follow the naming convention rules. You may have to create several Variants for a particular report. Once a Variant is created you ca also schedule to run the report in the background using this Variant. For each variant that you create you need to give a brief description which will help to explain the purpose of the variant and help to distinguish the various Variants that you have created. You may want to protect your Variant by selecting the Protect Variant option. This option enables only the person who has created the Variant to change or delete it. While Running a report directly from the menu you can use the Run with Variant option and then select the desired variant from the dropdown list. Remember that Variants are report dependant. So to create a Variant you need to first create an ABAP report (Executable Program with selection screen). Once you successfully create all the variants for an ABAP report, you will save considerable amount of time which would otherwise have been spent in entering the same data again and again."
"The SAP Control Framework is used for the communication between the controls on the presentation server and the ABAP application server. In ABAP Objects, it is programmed, and contains a set of global classes that you can find in the Class Browser under Basis -> Frontend Services. Between the application server and presentation server these classes encapsulate the communication, which is implemented using Remote Function Calls. There is a global class, which encapsulates all application controls. In the class Browser under Basis -> Frontend Services or Basis -> Components Integration, you can find the SAP Basis Controls."
Enter the desired table name. Make sure that you follow the naming convention. Name should either start with 'Z' or 'Y'.
Delivery class needs to be entered as shown in the figure below.
Select A application table master and transaction data.
Check the table maintenance box. And click on the Fields Tab.
Enter the Filed names as shown in the figure below. Matnr with data element 'MATNR' For the 'ADDDESC' field please click on the Data element button as shown in the figure below.
Click on the technical settings button. For data class select APPL0
And For size category select 0
Select buffering not allowed for this table.
Make Material number as the Primary Key.
Activate the table.
Go back to transaction SE11 and select Utilities------> Table maintenance generator.
In the resulting screen for Authorization group select &NC&
Select the one step and standard recording routine
Now we need to create a Function group. For that we need to run transaction SE37.
Select Function group create.
Name the function group as ZMAT_ADD. Give an appropriate description.
Select Generate Objects from the drop down menu and select Create.
We need to activate the function group. To do so run transaction SE80. Select Function group and type the Function group name. Right click on the function group and click activate
Once this is done enter the scree number as 1 or select the available screen number by clicking the find screen number button.
Run transaction SM30
Enter the Table name.
To add entries click on New Entries.
Enter the Desired data and save the data.
2 comments:
Anonymous
said...
Hello,
it is essential to have an CLIENT field (type MANDT) as first primary key field in each Z-table for the data to be client dependend!
Always specify your conditions in the Where-clause instead of checking
them yourself with check statements. The database system can then use an index
(if possible) and the network load is considerably less.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.
2 comments:
Hello,
it is essential to have an CLIENT field (type MANDT) as first primary key field in each Z-table for the data to be client dependend!
Very Useful link for beginners like me, good job
Post a Comment