ME21N Create a purchase order - Automate_Studio - Latest

Automate Studio with Studio Administrator User Guide

Product type
Software
Portfolio
Integrate
Product family
Automate
Product
Automate > Automate Studio
Version
Latest
Language
English
Product name
Automate Studio
Title
Automate Studio with Studio Administrator User Guide
Copyright
2024
First publish date
2018
Last updated
2024-10-09
Published on
2024-10-09T15:01:19.732936

ME21N step by step: Creating a purchase order

This document describes how you can use Automate Transaction to create a purchase order in the SAP Business Suite from data in Microsoft Excel using the SAP transaction ME21N.

Steps

Record

  1. Start Automate Studio from the desktop shortcut or from the Windows Start menu.
  2. Click New.

    file new

  3. Click Transaction, and then click Create from Recording.

    click transaction create from recording

  4. Choose the SAP system that you want to use, enter the appropriate user data, and then click Log On to SAP.

    log on to sap

    If you do not see the SAP system that you want, click Advanced SAP Logon, click Add System, provide the system information, and click OK.

  5. In the Transaction code box, type ME21N.

    type me21n in transaction code box

  6. Leave the recording mode as Standard. If you do not see Standard, click Change and then click Batch Input Mode.

    Note: For most transactions, the default mode is Standard, and the Automate Function Module (WFM) selects the optimum mode for the t-code that is being recorded. If the WFM is not installed, Batch Mode will work for ME21N, and Non-Batch Input Mode Without Controls will work for most transactions. Non-Batch modes are necessary for downloading information from SAP transactions, or for Finance or HR transactions in which there are Dynamic Actions executing or user parameter values being used; otherwise, if you do not have access to Non-Batch modes, you can try recording in Batch Mode. The difference between Without SAP Controls and With SAP Controls is just a matter of what tools are on the transaction screens. For more information, see the Recording modes topic (Connect mode or Foundation mode).

  7. Click Start Recording

    start recording button

    The ME21N transaction starts.

    Note: The screens might appear slightly different in the recording mode because we are using a background mode. The screens might also vary according to the way that your SAP system has been configured.

  8. Enter the Vendor and Document Date, and then press Enter.

    create purchase order

  9. Enter the header data.

    org data

    Important: The next step might be different from the manual entry process.

  10. Press Enter to continue.
  11. Enter the required fields for a line item.

    org data

    If necessary, you can enter data into the Item Details section for the selected item, and it will be recorded by Transaction.

    In this example, however, we will enter data only in the Items grid.

  12. Press Enter.

    Pressing Enter activates the Filter icon on the toolbar below the Item section.

    filter icon

  13. Click the Filter icon to clear the item grid so that data can be entered in the first row of the grid. This builds a repeatable process for running the Transaction script recording.

    Clicking the Filter icon opens the Define filter criteria box.

    define filter criteria

  14. Select the Item column from the Column Set, and then click the left-pointing triangle.

    This moves the Item column to the Filter criteria selection.

    define filter criteria

    Note: The next step might differ between SAP versions.

  15. To provide Filter criteria, click the Filter icon in the Define filter criteria box.

    If the box does not contain a filter icon, click the green checkmark to provide filter criteria.

  16. In the Determine values for filter criteria box, enter a value in the item field that will always result in no matches.

    For example, it is highly unlikely (and technically impossible) to have more than 999 items in a purchase order. Entering a value of 99999 into this field ensures that the Items grid section is emptied between records and items can be entered into the first row of the grid. This is key to recording and running an ME21N Transaction script.

    determine values

  17. Click the green checkmark to continue.

    Notice that the Items grid section is now empty. We can continue to enter another item into this grid section, so that a pattern will be created in the Transaction Mapper screen.

    enter another item in grid

  18. In the first row of the Items section, enter data in the required fields for the next Purchase Order item.
  19. Press Enter.

    Again, the data will disappear from the grid because the filter is active.

  20. Click Save to save the Purchase Order. This also ends the recording.

After Studio finishes compiling the script, it will take you to the Map tab.

Map

It is now time to create the mapping for this transaction. Mapping a script is just a matter of connecting SAP fields to fields in your data file. Transaction provides a Mapper to facilitate this process.

Auto Mapping will map the entire script to an Excel spreadsheet in the order that they appear in the Mapper. Because of the complexity of this transaction, we will map the fields manually instead.

The screenshot below shows the Basic View tab of the Mapper.

In each row of the Mapper, you will see:

  • Mapper row number: This is just a reference number.
  • Enable flag: only enabled Mapper rows will be executed by Transaction.
  • Field Description: The label associated with the SAP technical field name.
  • Field Name: The SAP technical field name.
  • Field Type & Length: For example, String or Decimal, and the padding options.
  • Mapping direction: Fixed Value, Excel to SAP, SAP to Excel (or, if mapping to Access: Access to SAP, SAP to Access).
  • Value: Values assigned to the SAP field; either fixed values or mapped locations in the associated data source.

Note: The Properties pane is also displayed, but it is not shown below.