ABAP Workbench - ABAP Programming Hits
How to edit entries of table in se11 ?
To update the data of any table, go to transaction SE16N, type “&SAP_EDIT”. It will activate SAP editing function.
Go to table and press Ctrl+ shift + F10 where you will go to table entries. Click on F8 (execute).
And then select the entries that you want to edit by selecting the checkbox and goto menu Table entry - > select change. There you edit and save the entries.
You cannot edit entries in SE11 unless it contains a Table maintenance generator.
So just build a Table maintenance generator.
Do not delete any entries using &SAP_EDIT...it is not recommended.
You can edit through debugging.
How to delete a record in SE16 ?
To delete the records from particular table its easy.
Goto : se11
- Give the table name
- Execute the table with the selection fields
- Then data (list) screen will be displayed.
- Now select the record which has to be deleted.
- Select that and switch 'on' the Debugging mode press enter.
- Then press F6 goes to subroutine where there is field called display.
- Instead change it to edit and then save the changes then it will take you to the screen where you can edit that records & also delete that particular records.
Note: After displaying the contents of the list.
Switch ON the Debug Mode the select the particular record then click display then it will take u to Debug Screen when there is a program for sy-ucomm then click F7 Button and then Change Code = EDIT then save the code the afterwards it will take u to edit mode of that particular record.
How can I insert new data in the table?
Give the transaction code as se11
In that give the table name and press display
Then in that field name above there is delivery and maintenance click the same and change it as display maintenance allowed
ABAP Fine Tuning
- Always check the driver internal tables is not empty, while using FOR ALL ENTRIES.
- Avoid for all entries in JOINS.
- Try to avoid joins and use FOR ALL ENTRIES.
- Try to restrict the joins to 1 level only ie only for 2 tables.
- Avoid using Select *.
- Avoid having multiple Selects from the same table in the same object.
- Try to minimize the number of variables to save memory.
- The sequence of fields in 'where clause' must be as per primary/secondary index ( if any).
- Avoid creation of index as far as possible.
- Avoid operators like <>, > , < & like % in where clause conditions.
- Avoid select/select single statements in loops.
- Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
- Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,).
- Avoid using ORDER BY in selects.
- Avoid Nested Selects.
- Avoid Nested Loops of Internal Tables.
- Try to use FIELD SYMBOLS.
- Try to avoid into Corresponding Fields of .
- Avoid using Select Distinct, Use DELETE ADJACENT.
To clarify the following doubts:
1. Suppose if we are in 3rd list and want to jump to 8th list, how is it possible?
You can try SY-LSIND.
2. What exactly the statement "select for all entries" mean?
You can only use FOR ALL ENTRIES IN ...WHERE ...in a SELECT statement.
SELECT ... FOR ALL ENTRIES IN itab WHERE cond returns the union of the solution sets of all SELECT
statements that would result if you wrote a separate statement for each line of the internal table replacing the symbol
itab-f with the corresponding value of component f in the WHERE condition.Duplicates are discarded from the result
set. If the internal table itab does not contain any entries, the system treats the statement as though there were
no WHERE cond condition, and selects all records (in the current client).
for example:
SELECT * FROM sflight INTO wa_sflight
FOR ALL ENTRIES IN ftab
WHERE CARRID = ftab-carrid AND
CONNID = ftab-connid AND
fldate = '20010228'.
this condition, return all entries of the sflight
3. Is it possible to create a table without the data element?
Yes, there is option of direct type in se11.
4. Suppose in selection screen if we provide two values for the fields then how to populate the other fields?
You can go for select option, there you can choose low and high values.
5. How to send the sap-script in pdf format thru email?
It is automatically converted to PDF once the Basis people have the auto conversion rules configured.
6. How many selection-screens does a report have?
Any number of selction screen can be there
You haven't provided us with many information about your problem.
Anyway a few tips you can use:
1. restrict the the fields retrieved by your select sentences to the minimal set. (avoid select *)
2. try to use specify where clause so the abap sql optimizer chooses the right index.
3. avoid sentences like select lifnr name1 into corresponding fields of lfa1 from lfa1 where ....
(you should declare a working area and select into the working area, is twice faster)
4. use hashed tables instead of standard tables. They are faster.
5. Avoid the use of collect as much as you can.
|