We can extend a BAPI using BAPI Extensions provided in the BAPI design
"By simply looking at BAPI_TRANSACTION_COMMIT code, we see quickly what is different from COMMIT WORK. It calls BUFFER_REFRESH_ALL function module right after COMMIT WORK.
So BAPI_TRANSACTION_COMMIT additionally refreshes a ""BAPI buffer"".
Assuming your program calls BAPIs consecutively and use a COMMIT WORK/BAPI_TRANSACTION_COMMIT only at the end so that to commit all BAPI updates once (better performance).Let's suppose the update during the COMMIT WORK fails (for any reason), the data is not written to database. If you have not refreshed the buffer using BAPI_TRANSACTION_COMMIT, the next BAPI calls will consider that some data will exist later, that is wrong."
So BAPI_TRANSACTION_COMMIT additionally refreshes a ""BAPI buffer"".
Assuming your program calls BAPIs consecutively and use a COMMIT WORK/BAPI_TRANSACTION_COMMIT only at the end so that to commit all BAPI updates once (better performance).Let's suppose the update during the COMMIT WORK fails (for any reason), the data is not written to database. If you have not refreshed the buffer using BAPI_TRANSACTION_COMMIT, the next BAPI calls will consider that some data will exist later, that is wrong."
We need to create a Parameter Transaction type Tcode in SE93 for the TMG
"SY-TABIX is a syatem variable which stores the index current processing record of an internal table. Ex.Loop over ITAB
SY-INDEX is a system variable which acts as a loop iteration counter, it stores loop iteration number. Ex. DO WHILE ENDO"
SY-INDEX is a system variable which acts as a loop iteration counter, it stores loop iteration number. Ex. DO WHILE ENDO"
AT NEW and ENDAT is used to detect a change in the value of the field between the loop passes. The field that is specified in AT NEW is called control level. The code between AT NEW and ENDAT will be executed during the first loop pass and every time the value of the control level changes or any other field left to the control level changes. Between AT NEW and ENDAT all the fields in the work area that are right to the control level are filled with zeros and asterisks. We can declare a local workarea apart from Loop's work area to resolve this issue
"Control break statements are such statements which is used for processing the records over loop based on the following statments AT-NEW, AT-LAST,AT-FIRST,ON-CHANGEOF.
"
"
Singleton class is a class which can have one active instance of the class at a time. Singleton Class can be created as: Create a Private Class, Create a private static attribute of type Class, have a public static method which returns the instance of the class.
While preparing the Field Catalogue we need to make the property EDIT = X for the fields which need to be editable
"gr_columns->set_exception_column( value = 'LIGHTS' ). Here LIGHTS is the name of column to be added in the internal table.
1 for RED, 2 for YELLOW and 3 for GREEN."
1 for RED, 2 for YELLOW and 3 for GREEN."
TMG is specific to a particular table on which its created however Maintenance view clubs fields from multiple tables based on foreign key relationship.