Start practice

SAP command field

System basics ·

The command field is the small input box at the top left of every SAP screen. You type a transaction code there to open a task, and a few short prefixes let you jump between screens, open a second window or log off. Knowing four of them saves minutes every day.

Syntax

In the system
CODE        open the code from the main menu, for example MIGO
/nCODE      end the current transaction and open CODE in the same window
/oCODE      open CODE in a new window (a new session) and keep this one
/n          end the current transaction and go back to the main menu
/nend       log off, with a confirmation question
/nex        log off at once, without a question
  • /n means new: the current screen closes. Anything you typed and did not save is lost.
  • /o means open another session. You can usually keep up to six sessions at once, depending on system settings.
  • Upper or lower case does not matter: /nme23n works the same as /nME23N.

Examples

Three moments from a normal day in accounts payable.

You are onYou wantYou typeWhy
Main menuEnter an invoiceMIROFrom the main menu the code alone works
Display Purchase Order 4500018734The invoice screen, the order can close/nMIRO/n ends the order display and opens MIRO
Enter Incoming Invoice, half filledCheck the order without losing the invoice/oME23N/o opens a second session; the invoice stays open

Question: You saved an invoice and want to go back to the main menu. What do you type? Answer: /n on its own. It ends the transaction and returns to the main menu.

Question: It is the end of the day and you have two sessions open with nothing unsaved. You want to log off safely. Answer: /nend. It asks for confirmation and closes all sessions. /nex would close them without asking, which is risky if something is still open.

Variants

Two sessions for comparing documents. Invoice verification is easier with two windows: the invoice in MIRO in one, the purchase order history in ME23N in the other. Use /o for the second.

Switching sessions. Each session is its own window. You switch between them like between any two windows on your computer.

Favorites instead of typing. Codes you use daily can sit in Favorites at the top of the main menu. The command field is still faster once the codes are in your fingers.

Input history. The command field remembers recent codes. Click the small arrow next to it, or start typing, to pick one from the list.

The full list of everyday codes is in the sap transaction codes guide.

Common errors

Function code cannot be selected

You typed a code without /n while another transaction was open. Add /n in front, or go back to the main menu with /n first.

Data will be lost

You used /n on a screen with unsaved entries. The system warns you first in many screens, but not all. Save, or use /o so the current work stays open.

Maximum number of sessions reached

You already have the most sessions the system allows. Close one you do not need, then try /o again.

Nothing happens after typing

The command field may be collapsed on your screen. Click the small arrow at the left of the toolbar to show it, then type the code and press Enter.

Practice

The navigation level puts you on a real screen, like Display Purchase Order or the main menu, and asks you to get somewhere else. You type the entry yourself, and the check tells you if you used the right prefix. It also covers the sap document flow, so you know which screen to open when you hold a document number.

Start step by step: Navigation and transaction codes

Free, in your browser, no sign up. Opens the level “Navigation and transaction codes”.

FAQ

What is the difference between /n and /o in SAP?

/n closes the current transaction and opens the new one in the same window. /o opens the new one in a separate session and keeps the current screen open.

How do I log off SAP from the command field?

Type /nend and confirm. /nex also logs off, but at once and without a question, so unsaved work in any session is lost.

Why does SAP say function code cannot be selected?

You typed a transaction code inside another transaction without the /n prefix. Type /n before the code, for example /nFB03.

How many SAP sessions can I open?

Usually up to six, but your company can set a different limit. Each /o opens one more.

Can I type a transaction code in lower case?

Yes. The command field is not case sensitive, so me21n, /nme21n and ME21N all work the same way. Most people type lower case because it is faster.

What happens to unsaved data when I use /n?

It is lost. Some screens ask before they close, many do not. Save first, or use /o to open the next task in a new session while the current one stays open.

Is there a way to find a code if I only know the task name?

Search the main menu, or ask a colleague. Once you know a code, add it to Favorites so you do not need to search again. In practice, most people work with fewer than twenty codes a day.

For learning only. Nothing here is legal, financial, tax or investment advice. Tolerances, policies and rates in the examples belong to a made up company; your employer’s settings decide what applies at work.