Working with the Material Master Data

In the SAP MM module, material master data refers to all the material master records that are stored in the system. In other words, material master data consists of the description of all the materials that an organization not only purchases but also produces and keeps in its stock. The material master data acts as a central database of information for the materials in an organization.

Maintaining the details of all the materials at a central location not only minimizes the risk of data redundancy but also allows other departments of the organization to share this data among themselves. The other departments of the organization can use the material master data to perform various tasks, such as invoice verification and inventory management. The material master record is used by different departments of an organization, and each department requires different information about the material. For example, the purchasing department might require only the price of the material to perform price control functions; whereas, the sales department might require the sales data to prepare the sales graph of a given period of time.

To facilitate locating the relevant data, various fields have been provided in the Create Material (Initial Screen). Every department can easily locate and access the data required by it by entering the relevant details in these fields.
Continue reading Working with the Material Master Data

What are Enjoy transactions in SAP?


An enjoy transaction is one that was released with the release, which is also know as the “Enjoy” release.
Enjoy transactions are the new transactions (from rel. 4.6A, which is nearly 10 years old now) were created to “make life easier” for the endusers and performs all the operations performed by its classical counterpart in one screen only. All clickable elements have 3D qualities, while the input and output fields remain 2D for simplified reading.
A lot of transactions have been rewritten to use the new control framework. All Enjoy transactions are having ‘N’ character at the suffix of the transaction (ME21N, VL02N etc). These transactions “replaced” older transactions. The sap enjoy transactions typically are much more user friendly in appearance, support custom controls, ALV tree and ALV grids, docking containers, node structures, picture controls in them. But transactions ending with “N” doesn’t qualify them as eNjoy. May be “N” was used to indicate “New”, SE43 & SE43N – neither of them are eNjoy transactions.


As example described data can be found in the t-code ME21N (completely writting in OOPS ABAP). The old ME21 transaction uses the classic dynpro technology without using the control framework.
Enjoy sap controls are containers that can built dunamically using objects/classes. In general batch input is not possible for those screens. The SAP material BC412 contains all about this. It’s all about ABAP Screen programming.

Today the term “Enjoy” is not common anymore.

“SAP software works the way I do.”

P.S. MCV9 transaction:


Change BOM with future Valid From date

In case that you need to plan the change in BoM for future, it is necessary to use Change records.

Create Change record

Transaction: CC01

(press Enter)

on the next screen fill Change number desription, Valid from, Reason for change and Change no. status field:

tick check boxes as shown and press “Save”:

Change BoM

In our example (material 64103) the component 39801 will be replaced by component 39802 with Validity from 25.10.2015.


change component number here and save the BoM:

Now, if you reopen the BoM:

What Is Outline and Scheduling Agreement

Please give the difference between Purchase Order, Outline Agreement
and Scheduling Agreement.

PO is normal where you issue the PO to a vendor and expect the delivery.
The PO is termed completed when the vendor has delivered the PO quantity
or when you have preclosed the PO when the vendor has delivered partial
quantity and he has agreed not to send anymore with ref to the PO.

Outline Agreement can be of 2 types:- Contract and SA.

Contract is where you have a contract with the vendor,may be a for a
predetermined quantity or predefined value. So everytime you need the matl,
you need to make PO ref the contract asking for the delivery of the matl.
In such instance when PO is ref with contract its called contract release
orders or call off orders.

Scheduling agreement is a long term purchase agreement, where you will
keep issuing the delivery schedules whenever there is a change in requirement
or at predetermined time intervals. The delivery schedule can be on hour/daily/weekly/monthly
basis. But it will contain different zones viz. firm/tradeoff/Forecast.
Firm zone schedules are confirmed requirement and need to be taken by ordered
party. Tradeoff zone requirement is to purchase the raw materails and ordering
party is liable to pay raw material cost, in case of requirement cancellation.
Forecast zone requirement is to help the vendor to plan his requirements.

SA is also an agreement with the vendor for the supply of matl, may
be a quanity or value. The delivery dates will be maintained in ME38 ref
the SA which are called delivery schedules.So you can maintain the delivery
schedule and communicate the vendor on Forecase basis or JIT basis. And
when you need some more matl then will only create SA deliveries using
ME38. SA could be of 2 types:- without release documentation-system will
transmit the delivery info to the vendor once you save the document.

With release documentation- after creating the delivery schedules you
need to create SA release using ME84.

The main difference between contract and SA is volume of docs generated
would be higher in contract since everytime you need to make a PO ref the
contract and its time consuming, whereas SA can be integrated with MRP
such that it automatically creates delivery schedules during MRP run provided
if there is a requirement to the matl.

ABAP programming tips

  • Q: How to convert CHAR type to RAW type?
  • Q: What does mean asterisk in front of the name?
    A: EKPO and *EKPO are usually defined in TABLES statement, and both use the DDIC structure of EKPO. Classical usage is to distinguish between old and new value of the record.
    SELECT SINGLE * FROM *bkpf is equal to SELECT SINGLE * FROM bkpf into *bkpf
    the same as SELECT SINGLE * FROM bkpf is equal to SELECT SINGLE * FROM bkpf into bkpf
  • While declaring variables, always follow the naming conventions through out your code. Your variable names talks a lot about its usage.
    Make sure your variables are of the form:

    {Prefix1}{Prefix2}_{Name} where:

    L – Local
    I – Import
    E – Export
    G – Global
    T – Table Type

    V – Single Value
    S – Structure
    T – Table
    R – Type ref to Data
    O – Type ref to Object
    E – Type ref to Exception objects

    Name – name of the variable.
    lt_sel – local table
    lo_rvs – local object
    and so on.

    Before changing the parameters (type or name), make sure that you run “Where used”, make a note and change them as well.
    While working on ABAP Classes and Interfaces, Never change a super class of a framework. It could potentially bring all applications down. Double check to make sure that the code you change is in your class only.

    Ctrl + D Duplicate any line.
    Ctrl + . & Ctrl + , Comment and Un-Comment selected lines.
    Ctrl+Shift+X Deletes the whole line.
    Ctrl+Shift+V Gives All Paste options.
    To assist in locating codes, can be a bookmark, using a combination: CTRL + ALT + (0 to 9).
    To go to bookmark created, use combination CTRL + (0 to 9).


    • Please ensure that IV_UNAME (SY-UNAME) and IV_LANGUAGE (SY_UNAME) are mandatory for all modules.
    • Q: How to debug IDOCs inbound processing (most first FMs on receiver system (under ALEREMOTE non dialog user)?
      A: Simple and stupid solution is to put eternal loop in form FA5_DOCUMENT_SYNTAX_CHECK (program LEDI1FA5):

      Then the process will be available for debugging in the transaction SM50.
    • Please create lock objects on the header tables and make sure that you obtain a lock before changes and release the lock after changes.
    • Make sure that you transactions are atomic. Either commit your work after all changes are successful or Rollback in case of error. If you rollback, make sure that you have released the locks.
    • Q: How to pass dynamic varable into SELECT … WHERE IN clause?
    • During save, please make sure that entries in all the text (_T_*) tables that relate to your modules are also saved. If no data exists, treat it as an error. (As across check, you can verify the same by executing the view and making sure that the data is returned correctly)
    • The Function should be RFC Enabled. Never raise an exception. Always return errors in the ET_RETURN (Type BAPIRET2) structure.
    • Never hardcode text strings. Make sure that you use a text element. But use it with text reference.
      E.g. If you have an error during validating the email, use it as “Email ID is required”(001) instead of using text-001. This will ensure that error messages are displayed regardless of user logon language.
    • At the end of the function, Always call “get details” and return the values as export/table values. This will serve the purpose of reflecting the data as-is in the DB back to the user and will save another round trip to retrieve it again.
    • Q: How to get variable value from another running program?
    • Update audit fields created by, created date, created time only during create.
    • Please ensure that IV_UNAME (SY-UNAME) and IV_LANGUAGE (SY_UNAME) are mandatory for all modules. Extract the data for the language specified.
    • Q: Where are the packing handling units data stored during execution of transaction VL01/VL02/VL32N”? CVEKP table is always empty.
      A: The variable is (SAPLV51G)IVEKP[]

    “Changed REM profile regarding generation of postprocessing records”

    You can display backlogs from the backflush in repetitive manufacturingusing Transaction MF47/COGI. The repetitive manufacturing profile of the assembly provides for the generation of collective & individual postprocessing records.
    An inconsistency may arise between a collective record and the respective single records, that is, the quantity of the collective record is not equal to the cumulative quantity of the respective single records.



    or, JITM action BFLU:

    press the “Components” button in JITB and fill “Assembly” with the finished good numbers.

    JITM action BFLU:

    You will get the list of components:

    Carry out transacion SA38 and program ZINCON_REPROC in it and maintain the relevant components from the step above.

    You will get the list of all inconsistencies and final message “All displayed inconsistencies have been deleted”.

    Reprocess errors once again in JITB.

    Notified quantity exceeds quantity ordered XXXX.000 ST

    При обнаружении ошибки ASN в мониторе EMASN “Notified quantity exceeds quantity ordered 795.000 ST”, во-первых, не забываем, что количество здесь равно 795, а не 795000 (не 795 тысяч), во-вторых, пробуем перепровести айдок.
    Эта ошибка показывает, что в какой-то позиции отправленной поставки количество превышает соотв. материал в закупочном документе (SA / PO) (такое поведение – можно или нельзя принимать превышающие количества – настраивается в IMG).
    Выделяем IDoc и нажимаем кнопку IDoc на панели инструментов:

    Здесь дважды щелкаем в статусной части айдока на саму (не “самую”, а “саму”) первую ошибочную секцию:

    В ней видим номер проблемного закупочного документа:

    Идём в этот закупочный документ, в данном случае в транзакции ME38, и убираем лишние 12795 штук (из open qty, за вычетом cum.qty!):

    Сообщаем планнерам, чтобы сделали прогон MRP (MD01).

    В случае, если ошибка “…weight is smaller than…”, то установите правильные веса в мастер данных материала:

    и пробуйте перепровести ASN.

    P.S. “No shedules exist for sheduling agreement” – эта ошибка в EMASN говорит сама за себя – отсутствует расписание в указанном закупочном соглашении.

    Инвентаризация по шагам

    В данной инструкции описано пошаговое проведение инвентаризации.

    1. Перед созданием в системе инвентаризации необходимо определить перечень материалов, которые будут участвовать в инвентаризации, перечень рекомендуется составить в формате excel (выгрузка из MB52).
    2. Создание документа инвентаризации
      1. Для создания перечня инвентаризируемых материалов используем транзакцию Mi01, вводим её окно ввода транзакций далее ENTER.
      2. В окне создания документа инвентаризации необходимо внести данные по дате создания документа, данные по заводу, данные по складу, поставить галочку на фиксацию, на блокирование проводок на перечень материалов, указать номер и тип инвентаризации и кликнуть знак для ввода позиций материалов .
      3. В окне ввода позиций вносим номера материалов которые были подсчитаны на определенном складе и провести документ.
      4. И нажимаем затем здесь “Сохранить”:
      5. После проведения документа в низу экрана выходит информационное окно с указанием номера документа инвентаризации
    3. Ввод результата подсчета инвентаризации.
      1. Далее необходимо внести данные результата подсчета инвентаризации, для этого используют транзакцию MI04. В белых полях напротив номера материала необходимо внести данные подсчета и провести (сохранить) документ. если материал не найден, то необходимо поставить галочку подсчета нулевого запаса (в зеленой рамке). Для перехода на другую страницу используйте значки на панели управления (в красной рамке):
    4. Просмотр отклонений учета ввода данных по подсчету
      1. Для просмотра отклонений инвентаризации используют транзакцию Mi20. Вносим данные по заводу, складу и номеру документа инвентаризации формируем список.
      2. Сформированный список можно экспортировать в формат excel, нажав F9 либо выбрать в панели управления Список-> Экспортировать -> локальный файл.
    5. Списание разницы подсчета инвентаризации.
      1. После того как принято решение об окончательном списании разницы подсчета инвентаризации, используют транзакцию Mi07 – указываем номер, год и дату документа инвентаризации, далее ENTER.
      2. Далее необходимо провести документ (сохранить):

    * Для изменения списка документа инвентаризации используют транзакцию Mi02.
    * Для изменения данных подсчета инвентаризации используют транзакцию Mi05.
    * Все эти транзакции могут быть вызваны напрямую из Mi20:

    Sales and Distribution