T-code explained

A T-code is a transaction code used whenever executing particular task . Each function in SAP ERP has an SAP transaction code associated with it .[1]

Use

A transaction code is used to access functions or running programs (including executing ABAP code)[2] in the SAP application more rapidly. By entering a t-code instead of using the menu, navigation and execution are combined into a single step, much like shortcuts in the Windows OS. SAP transaction codes can be entered into the Transaction code field to navigate the user directly to the screen or program task bypassing the SAP menu.

Example

Users can create a new session and start a new transaction in one step by entering /o followed by the transaction code e.g. /oFB60.[3]

Example Transaction codes

MM01 creation of Material Master

XK01(BP) Creation of Vendor Master

XD01(BP) creation of Customer Master

FB60 Accounts Payable Invoice Entry

FB65 Accounts Payable Credit Note Entry

FK10N Display Accounts Payable Balances

The transaction for MM module starts with M. IH09 - Display MaterialMM01 - Create MaterialMM02 - Change MaterialMM03 - Display MaterialMM50 - List Extendable MaterialsMMBE - Stock OverviewMMI1 - Create Operating SuppliesMMN1 - Create Non-Stock Material MMS1 - Create ServiceMMU1 - Create Non-Valuated Material ME51N - Create Purchase RequisitionME52N - Change Purchase RequisitionME53N - Display Purchase RequisitionME5A - Purchase Requisitions: List DisplayME5J - Purchase Requisitions for ProjectME5K - Requisitions by Account AssignmentMELB - Purch. Transactions by Tracking No. ME56 - Assign Source to Purch. RequisitionME57 - Assign and Process RequisitionsME58 - Ordering: Assigned RequisitionsME59 - Automatic Generation of POs ME54 - Release Purchase RequisitionME55 - Collective Release of Purchase Reqs.ME5F - Release Reminder: Purch. Requisition MB21 - Create ReservationMB22 - Change ReservationMB23 - Display ReservationMB24 - Reservations by MaterialMB25 - Reservations by Account Assignment MB1C - Other Goods ReceiptsMB90 - Output Processing for Mat. Documents MB21 - Create ReservationMB22 - Change ReservationMB23 - Display ReservationMB24 - Reservations by MaterialMB25 - Reservations by Account Assignment MBRL - Return Delivery per Mat. Document MB1C - Other Goods ReceiptsMB90 - Output Processing for Mat. Documents MB1B - Transfer Posting MIBC - ABC Analysis for Cycle Counting MI01 - Create Physical Inventory DocumentMI02 - Change Physical Inventory DocumentMI03 - Display Physical Inventory DocumentMI31 - Batch Input: Create Phys. Inv. Doc.MI32 - Batch Input: Block MaterialMI33 - Batch Input: Freeze Book Inv.BalanceMICN - Btch Inpt:Ph.Inv.Docs.for Cycle CtngMIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.MIQ1 - Batch Input: PhInvDoc. Project Stock MI01 - Create Physical Inventory DocumentMI02 - Change Physical Inventory DocumentMI03 - Display Physical Inventory DocumentMI31 - Batch Input: Create Phys. Inv. Doc.MI32 - Batch Input: Block MaterialMI33 - Batch Input: Freeze Book Inv.BalanceMICN - Btch Inpt:Ph.Inv.Docs.for Cycle CtngMIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.MIQ1 - Batch Input: PhInvDoc. Project Stock MI01 - Create Physical Inventory DocumentMI02 - Change Physical Inventory DocumentMI03 - Display Physical Inventory DocumentMI31 - Batch Input: Create Phys. Inv. Doc.MI32 - Batch Input: Block MaterialMI33 - Batch Input: Freeze Book Inv.BalanceMICN - Btch Inpt:Ph.Inv.Docs.for Cycle CtngMIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.MIQ1 - Batch Input: PhInvDoc. Project Stock MI21 - Print physical inventory document MI04 - Enter Inventory Count with DocumentMI05 - Change Inventory CountMI06 - Display Inventory CountMI09 - Enter Inventory Count w/o DocumentMI34 - Batch Input: Enter CountMI35 - Batch Input: Post Zero Stock BalanceMI38 - Batch Input: Count and DifferencesMI39 - Batch Input: Document and CountMI40 - Batch Input: Doc., Count and Diff. MI08 - Create List of Differences with Doc.MI10 - Create List of Differences w/o Doc.MI20 - Print List of Differences MI11 - Physical Inventory Document Recount MI07 - Process List of DifferencesMI37 - Batch Input: Post Differences

See also

References

Here's an example of a transaction code written in ABAP, which is a programming language used in SAP systems:``àbapDATA: lv_sender_account TYPE string, lv_recipient_account TYPE string, lv_amount TYPE p DECIMALS 2.

lv_sender_account = '123456'.lv_recipient_account = '789012'.lv_amount = 100.00.

START-OF-SELECTION. PERFORM transfer_funds.

FORM transfer_funds. DATA: lv_success TYPE abap_bool.

DATA: lt_account TYPE TABLE OF account, ls_sender TYPE account, ls_recipient TYPE account.

SELECT * FROM account INTO TABLE lt_account WHERE account_number = lv_sender_account OR account_number = lv_recipient_account.

READ TABLE lt_account WITH KEY account_number = lv_sender_account INTO ls_sender. READ TABLE lt_account WITH KEY account_number = lv_recipient_account INTO ls_recipient.

IF ls_sender IS INITIAL OR ls_recipient IS INITIAL. WRITE: 'Invalid account number(s)'. EXIT. ENDIF.

PERFORM deduct_amount USING: ls_sender-account_number, lv_amount CHANGING ls_sender-balance. PERFORM add_amount USING: ls_recipient-account_number, lv_amount CHANGING ls_recipient-balance.

UPDATE account FROM TABLE lt_account.

IF sy-subrc = 0. lv_success = abap_true. ENDIF.

IF lv_success = abap_true. COMMIT WORK. WRITE: 'Transaction successful!'. ELSE. ROLLBACK WORK. WRITE: 'Transaction failed!'. ENDIF.ENDFORM.

FORM deduct_amount USING p_account_number TYPE string p_amount TYPE p DECIMALS 2 CHANGING p_balance TYPE p DECIMALS 2. LOOP AT lt_account ASSIGNING FIELD-SYMBOL() WHERE account_number = p_account_number. -balance = -balance - p_amount. ENDLOOP.ENDFORM.

FORM add_amount USING p_account_number TYPE string p_amount TYPE p DECIMALS 2 CHANGING p_balance TYPE p DECIMALS 2. LOOP AT lt_account ASSIGNING FIELD-SYMBOL() WHERE account_number = p_account_number. -balance = -balance + p_amount. ENDLOOP.ENDFORM.

```To run a transaction code (Tcode) in an SAP system, follow these steps:

Log in to the SAP system using your user credentials. On the SAP Easy Access screen or the SAP Menu screen, locate the command field at the top of the screen. It is usually denoted by a magnifying glass icon or labeled as "Command" or "Tcode." Enter the desired Tcode into the command field. Tcodes are typically four characters long and consist of alphanumeric characters (e.g., "ME21N" or "FB50"). Press Enter or click the green checkmark icon next to the command field. The SAP system will navigate to the transaction screen associated with the entered Tcode. This screen allows you to perform the specific task or process related to that Tcode. Fill in the required fields, select appropriate options, and provide necessary data as per the transaction's requirements. Once you have entered all the necessary information, click the save button (usually represented by a floppy disk icon) or choose an appropriate option to execute the transaction. The SAP system will process the transaction based on the entered data and display the relevant output or confirmation message.

Notes and References

  1. Web site: Full List of Transaction codes in S4/HANA - docsfortec.com . 2024-05-14 . docsfortec.com . 2024-05-14 . https://web.archive.org/web/20240514092834/https://docsfortec.com/sap/S4/transactions . live .
  2. Book: IEEE. Intelligent Engineering Systems (INES), 2011 15th. 439–443. 978-1-4244-8954-1. 10.1109/INES.2011.5954788. 2011. Orosz. Tamas. 2011 15th IEEE International Conference on Intelligent Engineering Systems . Analysis of SAP Development tools and methods . 15070897 .
  3. Web site: Practical SAP Training . 25 May 2023 . https://web.archive.org/web/20130930082616/http://practicalsap.com/ . September 30, 2013 . en . unfit.