If you wish to Lock or UnLock a program Editor Lock it can be done by the program given below. The SAP System Table TRDIR has a field called EDTX which is basically the EDITOR lock filed. Edit Lock facility is given in the PROGRAM ATTRIBUTES. The EDITOR LOCK is a check box given in the PROGRAM ATTRIBUTES. If this field is SET then the program gets locked and if this is Unchecked the the program is unlocked.
If the EDITOR lock is ON then only the program's author user who has created the program can edit it. Please find the program below.
A logical database can be used in the following ways.
By linking it was an executable program in Program Attributes. By using the function module LDB_PROCESS
The SELECTION SCREEN is displayed only if link the Logical Database in the Program Attributes. It is not displayed if you call it using the Function Module LDB_PROCESS.
Editing Logical Databases:
The Logical Database can be edited using the following methods.
By using the Logical Database Builder in ABAP workbench. Transaction SE36 or SLDB the menu path is given below.
Tools---------->ABAP Work Bench--------------->Development------------->Programming Environment-------------->Logical Database Builder
Naming the Logical Database: The name can be upto 20 characters. It can also contain a three to to ten character namespace prefix, enclosed in forward slashes. From the initial screen the Logical Database can be created, copied or deleted. Before deleting the Logical Database its links form any program should be removed. You can use the where used link to find exactly where a Logical Database used before deleting it.
If you wish to edit a Material, you can use the following BAPI.
BAPI_MATERIAL_EDIT
The above mentioned BAPI makes use of CALL TRANSACTION MM02 or MM42 to edit the MATERIAL. The selection of the appropriate transaction is made based on the entered material. The table MAW1 is checked for the existence of material, if the material exists in MAW1 then the transaction MM02 is called else transaction MM42 is called.
BAPI_MATERIAL_EDIT in turn calls the following function modules.
BAPI_MATERIAL_EXISTENCECHECK and CONVERSION_EXIT_MATN1_OUTPUT
The user is then presented with the change material screen either for MM02 or MM42.
The code below shows the values of the input parameters for the BAPI BAPI_MATERIAL_EDI
REPORT ZEX_CHANGEMAT .
Parameters: p_matnr like BAPIMATALL-MATERIAL, p_fscrn like BAPIMATALL-SKIP_1ST_SCREEN.
Data: d_ret like BAPIRET1.
CALL FUNCTION 'BAPI_MATERIAL_EDIT' EXPORTING MATERIAL = p_matnr SKIP_1ST_SCREEN = p_fscrn IMPORTING RETURN = d_ret .
Material Plant BOM Usage Alternative BOM Change Number Valid From Valid to Revision Level Required Quantity
CS03 CS09 CS15 CS14 CS12 CS11
Responsible for giving information related to Bill of Materials. Comparison of BOM between two Materials.
Production
2
Work Center Information System
Work center Plant Work center cat. Person responsible Capacity category Capacity planner Name of hierarch Plant Controlling area Cost center
CR60 CR05
In this report Machines used for manufacturing are displayed. Labor work center is also displayed.
Production
3
Operation Analysis Dates Selection
Plant Work center Material Order Operation/Activity Date Exception
MCPB MCPY MCPK MCPQ
This report is used to extract the information of operation quantity, scrap quantity, lead time, target lead time.
Production
4
Material Analysis
Plant MRP controller Material Month Exception
MCPW MCPF MCPO MC89
Used to give information of target against actual lead time. Planned ordered quantity against actual ordered quantity. Planned cost against actual cost.
Production
5
Operation Analysis: Selection
Plant Work center Material Order Operation/Activity
MCP1 MCP3 MCP5 MCPB MCPU MCPW
The order information system is a tool for shop floor control with a reporting function for production orders and planned orders. These reports are useful in discreet manufacturing set up.
SAP Standard Programs can be easily modified/changed using Business Add-Ins or BADIs. And all this can be done without any system level modifications. Business Add-Ins are a new SAP enhancement technique based on ABAP Objects.
BADIs are based on ABAP objects and are new techniques introduced by SAP for changing the SAP Standard programs as per the user requirements. The concept is similar to User Exits but BADIs make use of ABAP Objects. Many industries have some specific requirements that may not be configurable in SAP. This can be easily achieved using BADIs. The original Object does not change as this piece of code is inserted in specific points using BADIs.
Go To IMG( Implementation guide) Transaction SPRO.
Find the BADI in implementation Guide (IMG)
Search for BADI Check the Documentation For BADI for functionality
Functionality will be implemented in the Method.
Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria.
User Exits / Enhancements use Transactions SMOD/CMOD. See also: User Exits in SAP
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.