1. The types of tables in SAP?
Pool and cluster tables are the tables that are assigned to table pool and cluster pools.
SE11->Utilities->Other dictionary objects->Select radio button cluster/pool name and give a pool name->give the tabname and varkey lengths and data type->save and activate.
Now goto SE11->create a ztable and choose table category option from the menu and choose table type as pooled table-> in delivery maintenance option in technical settings give pool/cluster name.
This is how a pool table is created.
2. Is there a way to set up a sequence to the implementations of a multiple-use BADI?
BADI_SORTER is the answer. Create a new implementation to this BADI. Now for this BADI set up a filter with the field being BADI_NAME and the value being the name of the BADI you want to set up the sort sequence for. Implement the method IF_BADI_SORTER according to your sort criterion.
3. What is a dynamic internal table and its advantages?
A dynamic internal table is used when the number or rows required are decided only at runtime.
Advantages:
1. Very flexible
2. Avoids Redundancy
Some of the important attributes of an internal table which can be set dynamically are
Field symbols are like the pointers in C. They are direct pointers to the address of the value in a field. These are very much useful in performance improvement.
Field symbols can be used inside the loop too. And are particularly useful in the append statements to avoid declaring extra work areas.
Ex:
<fs_1>-name = gv_name.
<fs_1>-num = gv_num.
append <fs_1> to gt_num.
Field symbols are also useful in extracting data from other programs.
Identify the program which can give you your desired value.
gv_val = (PROGRAM)evbak-vbeln.
ASSIGN gv_val to <fs_1>.
gv_val1 = <fs_1>.
Here gv_val is a variable of type char and gv_val1 is of the required field type or table type. Since field symbol can be of any type it will automatically take the field or the table type when the value is assigned to it. Hence gv_val1 which is of the exact field type or table type could accept the data from the field symbol.
5. What is a Update function module?
Update function modules are necessary when you want a certain part of your program to run after DB updates. That is, lets say your program is updating a DB after a particular occurrence and as soon as the DB updates you want a indicator to be set for further processing, in this case you can use a update function module which will run only after a COMMIT WORK appears.
Syntax: CALL FUNCTION 'func' IN UPDATE TASK
Exp
When the compiler sees this statement, it wont go into the function module to execute it but skips and goes to the next line of code. At the end of the program when it sees the COMMIT WORK statement all the update tasks begin to execute.
To function module to run in update task the process type of the function module should be set to one of the below -
Update with immediate start
Update with immediate start and no restart
Update with delayed start.
6. What is a LUW?
A logical unit of work is an inseparable sequence of DB actions that either must be fully completed or completely rolled back. They are those sequence of actions that together form one business transaction. Also in other words its the span of time during which 2 DB operations are performed. It is primarily useful in keeping the DB integrity.
There are 3 types of LUW -
DB transaction which is otherwise called LUW -
Its the time between the operation initiated must be either completed as a unit or no operation should happen. When we are talking of LUW it generally is because of the implicit COMMIT WORK statements.
Update transaction which is also call the SAP LUW -
SAP LUW is a bundle of different LUWs. To avoid errors SAP bundles all the LUWs into a single LUW and commits them in a single go to the DB. Generally an SAP LUW ends with an explicit COMMIT WORK statement.
7. What is SAP memory and ABAP memory?
SAP memory is like the global data which all the main sessions have access to. To extract data from SAP memory use SET/GET parameters.
SET PARAMETER ID ' ' field ' ',
CALL TRANSACTION ' ' .
ABAP memory is the local data. It is the memory that all the programs within the same internal session can access using the EXPORT and IMPORT statements.
Ex: During a particular execution of a program or a transaction, two exits are being called. You want to use a value from exit1 in exit2. So in exit1 you can use a EXPORT statement to a memory id and import the same from the same memory id in exit2. Here you are the local ABAP memory.
8. Transport request TCodes?
To organize transport requests SE09 , SE10
To move TRs from one client to other SCC1.
9. How to debug a background job?
Go to SM37, select your job and in the transaction screen give /JDBG. Make sure you put a breakpoint in your program. The compiler will stop in your program at the breakpoint.
Note: This debugging will only help you to traverse through your program for the previously ran test data. Particularly useful to find out the reason for a job cancel.
10. Difference between CLEAR, REFRESH and FREE?
CLEAR: This statement clears the workarea
REFRESH: Clears the internal table contents.
FREE: Clears the contents and also frees the allocated memory to the table.
- Transparent table
- Pooled table
- Cluster table
Pool and cluster tables are the tables that are assigned to table pool and cluster pools.
SE11->Utilities->Other dictionary objects->Select radio button cluster/pool name and give a pool name->give the tabname and varkey lengths and data type->save and activate.
Now goto SE11->create a ztable and choose table category option from the menu and choose table type as pooled table-> in delivery maintenance option in technical settings give pool/cluster name.
This is how a pool table is created.
2. Is there a way to set up a sequence to the implementations of a multiple-use BADI?
BADI_SORTER is the answer. Create a new implementation to this BADI. Now for this BADI set up a filter with the field being BADI_NAME and the value being the name of the BADI you want to set up the sort sequence for. Implement the method IF_BADI_SORTER according to your sort criterion.
3. What is a dynamic internal table and its advantages?
A dynamic internal table is used when the number or rows required are decided only at runtime.
Advantages:
1. Very flexible
2. Avoids Redundancy
Some of the important attributes of an internal table which can be set dynamically are
- Column position
- Field name of internal table field
- Column width
- Reference field
- Reference table
- Data type of the fields
- Domain name of the fields
- Check table
Field symbols are like the pointers in C. They are direct pointers to the address of the value in a field. These are very much useful in performance improvement.
Field symbols can be used inside the loop too. And are particularly useful in the append statements to avoid declaring extra work areas.
Ex:
<fs_1>-name = gv_name.
<fs_1>-num = gv_num.
append <fs_1> to gt_num.
Field symbols are also useful in extracting data from other programs.
Identify the program which can give you your desired value.
gv_val = (PROGRAM)evbak-vbeln.
ASSIGN gv_val to <fs_1>.
gv_val1 = <fs_1>.
Here gv_val is a variable of type char and gv_val1 is of the required field type or table type. Since field symbol can be of any type it will automatically take the field or the table type when the value is assigned to it. Hence gv_val1 which is of the exact field type or table type could accept the data from the field symbol.
5. What is a Update function module?
Update function modules are necessary when you want a certain part of your program to run after DB updates. That is, lets say your program is updating a DB after a particular occurrence and as soon as the DB updates you want a indicator to be set for further processing, in this case you can use a update function module which will run only after a COMMIT WORK appears.
Syntax: CALL FUNCTION 'func' IN UPDATE TASK
Exp
When the compiler sees this statement, it wont go into the function module to execute it but skips and goes to the next line of code. At the end of the program when it sees the COMMIT WORK statement all the update tasks begin to execute.
To function module to run in update task the process type of the function module should be set to one of the below -
Update with immediate start
Update with immediate start and no restart
Update with delayed start.
6. What is a LUW?
A logical unit of work is an inseparable sequence of DB actions that either must be fully completed or completely rolled back. They are those sequence of actions that together form one business transaction. Also in other words its the span of time during which 2 DB operations are performed. It is primarily useful in keeping the DB integrity.
There are 3 types of LUW -
DB transaction which is otherwise called LUW -
Its the time between the operation initiated must be either completed as a unit or no operation should happen. When we are talking of LUW it generally is because of the implicit COMMIT WORK statements.
Update transaction which is also call the SAP LUW -
SAP LUW is a bundle of different LUWs. To avoid errors SAP bundles all the LUWs into a single LUW and commits them in a single go to the DB. Generally an SAP LUW ends with an explicit COMMIT WORK statement.
7. What is SAP memory and ABAP memory?
SAP memory is like the global data which all the main sessions have access to. To extract data from SAP memory use SET/GET parameters.
SET PARAMETER ID ' ' field ' ',
CALL TRANSACTION ' ' .
ABAP memory is the local data. It is the memory that all the programs within the same internal session can access using the EXPORT and IMPORT statements.
Ex: During a particular execution of a program or a transaction, two exits are being called. You want to use a value from exit1 in exit2. So in exit1 you can use a EXPORT statement to a memory id and import the same from the same memory id in exit2. Here you are the local ABAP memory.
8. Transport request TCodes?
To organize transport requests SE09 , SE10
To move TRs from one client to other SCC1.
9. How to debug a background job?
Go to SM37, select your job and in the transaction screen give /JDBG. Make sure you put a breakpoint in your program. The compiler will stop in your program at the breakpoint.
Note: This debugging will only help you to traverse through your program for the previously ran test data. Particularly useful to find out the reason for a job cancel.
10. Difference between CLEAR, REFRESH and FREE?
CLEAR: This statement clears the workarea
REFRESH: Clears the internal table contents.
FREE: Clears the contents and also frees the allocated memory to the table.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.