Posts

SAP ABAP - Standard Internal Table (Index Table) With Example

Submitted By: Shilpa Gunjan (L&T Infotech) - Standard tables have linear index. - Standard table is accessed either via an index or a key. And always remember the key of a standard table is always non-unique. If no key is specified, the standard table takes a default key which is a combination of all the character like fields. - Records can be accessed through both Index and Conditions. READ TABLE it_itab INTO wa_itab INDEX ind_no. OR READ TABLE it_itab INTO wa_itab WITH KEY condition. Here the it_itab can be sorted. Accessing and searching time for the record depends on the number of records because searching is either linear or binary (when we explicitly use BINARY SEARCH keyword in READ statement). - If a standard table is accessed using a key, then the response time is in linear relationship to the number of table entries. For example, if there are 10 rows in a table and I want to process the 7th row, then the search is row by row in this case. He...

Purchase To Pay Or (Procure-to-Pay (PTP) Flow - SAP MM Module - Page III.

... Previous Page (Page II). 6) INVOICE VERIFICATION (MIRO) – (Tables – BKPF, BSEG): After the vendor delivered the material/service, it will send the invoice to the person responsible in the company. Invoice is a formal document issued by a vendor to the company to request the payment for the material or service that the vendor has already provide to the company according to the terms of payment agreed in the PO. Invoice verification is simply a method of capturing the details from the vendor’s invoice. If the details of the invoice match the expected details specified by any related purchase order (PO) and goods receipt (GR), the invoice can be made available for processing of payment. Unmatched invoices are excluded from the payment run and need to be investigated and released before payments can be made. Possible consequences of this include a loss of cash discounts, having purchase orders rejected by the vendor, and even losing the vendor account. Important step...

Purchase To Pay Or (Procure-to-Pay (PTP) Flow - SAP MM Module - Page II.

... Previous Page (Page I).                                                                           ...  Next Page (Page III). 3) VENDOR SELECTION & COMPARISON OF QUOTATIONS: After receiving quotations from different vendors, the buyer can select or choose the vendor after comparing all the quotations received. 4) PURCHASE ORDER PROCESSING (ME21N to Vendor): Once the buyer has selected the vendor which will provide the material/service needed in PR, the buyer creates a Purchase Order (PO) based on the PR and the reference document (that can be an outline agreement, an info record, or a quotation). Purchase orders (PO) are documents of authorization that are issued by a buyer and extended to a seller. The main function of the purchase order or PO is to specify the terms of pur...

SAP Purchase To Pay Flow (P2P) In Simple words For ABAPer's.

MM PROCESS FLOW: Requirements (SD, PP, PM...) ---> Purchase Requisition ---> Purchase Order (Sent to vendor) ---> Goods Receipt (Receiving Material from Vendor) ---> Invoice Verification (Invoice from vendor) ---> Vendor Payment. BUSINESS FLOW: 1) The requirements flow from different SAP modules to MM-Purchasing via MRP run (Material Requirements Planning), this creates Purchase Requisitions. 2) Based on the purchase requisition and information from purchasing info records the vendor is decided and a Purchase Order is created. 3) The Purchase order is sent to vendor and the vendor ships the material. 4) Goods Receipt is created in the SAP system for receiving the materials from Vendor. 5) Vendor sends an invoice for the Purchase order and it is entered into the SAP system using Invoice Verification. PURCHASE TO PAY FLOW: The purchasing process is initially started when there is a requirement of material/service from a user. If the material/serv...

SAP MM Table Links & Flows - Flow Between Business Organization & Vendor.

MM flow is processing between business organization and Vendor: 1) Purchase Requisition - (T-code: ME51) ( Tables: EBAN & EBKN) 2) Source List – (T-code: ME41) 3) Request for Quotation (RFQ) – (T-code: ME41N (To Vendor)) 4) Purchase Order – (T-code: ME21N (To Vendor) ) ( Tables: EKKO & EKPO) 5) Goods Receipt – (T-code: MIGO) ( Tables: MKPF, MSEG) 6) Invoice Verification – (T-code: MIRO) (Tables: BKPF, BSEG) 7) Vendor Payment – (T-code: FB60 (FI - Account Payable) ) Tables in MM (Material Management) Module: MARA  - Material General. MARC  - Material Plant Data. MAKT  - Material Description. MARD  - Material Storage Location Data. MAST  - Material BOM Link. MBEW  - Material Valuation. MKPF  - Material Document Header. MSEG  - Material Document Line Item. MVKE  - Material Sales Data. T023  - Material Group. T024  - Purchase Organisation. EBAN  - Purchase Requ...

SAP MM - Purchase To Pay (P2P) Cycle - In Simple Words.

"SAP MM (Materials Management) is a module of the SAP Enterprise Resource Planning (ERP) package that is used for Procurement Handling and Inventory Management." 1) MM (Material Management) optimizes all purchasing processes, helps in accurate inventory and warehouse management and so on. 2) The module has two important master data – Material and Vendor. 3) Broadly, the various levels that can be defined for a SAP MM implementation are: Client, Company Code, Plant, Storage Location and Purchase Organization. 4) MM Module is the largest and most complex in all of SAP modules. It can be divided into five major components. These are: Materials Management. Plant Maintenance. Quality Management. Production Planning and control. Project Management System. Each is divided into number of subcomponents. 5) SAP Material Management covers all tasks within the supply chain, including consumption-based planning, planning, vendor evaluation and invoice verifi...

Sample Program On AT SELECTION-SCREEN ON HELP REQUEST FOR field- 1.

Image
REPORT ztest. PARAMETERS: field1 TYPE ztest_struct-zfield1, field2 TYPE ztest_struct-zfield2. AT SELECTION-SCREEN ON HELP-REQUEST FOR field1. CALL FUNCTION ' HELP_OBJECT_SHOW_FOR_FIELD ' EXPORTING doklangu = sy-langu doktitle = text-001 called_for_tab = 'ZTEST_STRUCT' called_for_field = 'ZFIELD1'. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. AT SELECTION-SCREEN ON HELP-REQUEST FOR field2. CALL FUNCTION ' HELP_OBJECT_SHOW_FOR_FIELD ' EXPORTING doklangu = sy-langu doktitle = text-001 called_for_tab = 'ZTEST_STRUCT' called_for_field = 'ZFIELD2'. IF sy-subrc <> 0.    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. For This Program a structure was created: OUTPUT: On pressing "F1" button on field1 , ...

Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 2.

Image
REPORT ztest. PARAMETERS : p_file TYPE rlgrap-filename. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file. CALL FUNCTION 'KD_GET_FILENAME_ON_F4' CHANGING file_name = p_file EXCEPTIONS mask_too_long = 1 OTHERS = 2. IF sy-subrc <> 0. ENDIF. OUTPUT: On pressing F4 on the field, ALSO READ: - ABAP EVENTS During Runtime Of A Report Program. - INITIALIZATION Event - Introduction With A Sample Code. - AT SELECTION-SCREEN Event - Introduction With A Sample Code. - AT SELECTION-SCREEN OUTPUT Event - Introduction With A Sample Code. - AT SELECTION-SCREEN ON VALUE REQUEST- Introduction With A Sample Code. - AT SELECTION-SCREEN ON HELP REQUEST- Introduction With A Sample Code. - AT SELECTION-SCREEN ON - Introduction With A Sample Code. - Sample Program On AT SELECTION-SCREEN OUTPUT - 1. - Sample Program On AT SELECTION-SCREEN OUTPUT - 2. - Sample Program On AT SELECTION-SCREEN OUTPUT - 3. - Sample Program On AT SELECTION...

Sample Program On AT SELECTION-SCREEN ON VALUE REQUEST FOR field - 1.

Image
REPORT ztest. PARAMETERS: p_ebeln TYPE ekpo-ebeln. TYPES: BEGIN OF x_ekpo, END OF x_ekpo. DATA: it_ekpo TYPE STANDARD TABLE OF x_ekpo, wa_ekpo TYPE x_ekpo, it_return TYPE STANDARD TABLE OF ddshretval, wa_return LIKE LINE OF it_return. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ebeln. SELECT * UP TO 2 ROWS FROM ekpo INTO CORRESPONDING FIELDS OF TABLE it_ekpo. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'EBELN' window_title = 'EKPO Records' value_org = 'S' TABLES value_tab = it_ekpo return_tab = it_return EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3. READ TABLE it_return INTO wa_return INDEX 1.     p_ebeln = wa_return-fieldval. OUTPUT: ALSO READ: - ABAP EVENTS During Runtime Of A Report Program. - INITIALIZATION Event - Introduction With A Sample Code. - AT SELECTION-SCREEN Event - Introduction With A Sample Code. - AT SELECTION-S...

Sample Program On AT SELECTION-SCREEN OUTPUT - 4.

Image
PROGRAM ztest. TYPE-POOLS : vrm. DATA: p_temp TYPE vrm_id, it_value TYPE vrm_values, wa_value TYPE vrm_value. PARAMETERS: p_cond(10) AS LISTBOX VISIBLE LENGTH 15 . AT SELECTION-SCREEN OUTPUT. p_temp = 'P_COND'. wa_value-key = '1'. wa_value-text = 'YES'. APPEND wa_value TO it_value. wa_value-key = '2'. wa_value-text = 'NO'. APPEND wa_value TO it_value. wa_value-key = '3'. wa_value-text = 'NOT SURE'. APPEND wa_value TO it_value. CALL FUNCTION 'VRM_SET_VALUES' EXPORTING id = p_temp values = it_value EXCEPTIONS id_illegal_name = 1 OTHERS = 2. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. OUTPUT: ALSO READ: - ABAP EVENTS During Runtime Of A Report Program. - INITIALIZATION Event - Introduction With A Sample Code. - AT SELECTION-SCREEN Event - Introduction With A Samp...