Skip to main content

Posts

Showing posts from 2021

[MM] Include new fields in ME1P report

At times, business requires to have new fields in the report output of transaction code ME1P which are not currently provided in the standard SAP report layout. In this situation, we have to go for enhancement. Below is the sample case to display the material description field in the report output. The material description is not provided in the standard SAP layout of ME1P. As this is not given in the standard SAP,  we have to follow the below process to display it. Add the new field in the structure  MEREP_OUTTAB_PRHIS. Then implement the BADI - ME_CHANGE_OUTTAB_CUS can be used for all enhancement of ALV reports.  Use method  IF_EX_ME_CHANGE_OUTTAB_CUS~FILL_OUTTAB to write the logic to display the desired output.

[SAP] Exit for MM release strategy at Purchase document level

 At times, business requires release strategy to be triggered for purchasing documents based on custom parameters or through internal validations. In this case, we cannot go through the standard release strategy due to custom validations or fields.  To accomplish this requirement, new logic need to be maintained in Customer exit: EXIT_SAPLEBND_002 .  Through this exit, we can perform changes to the communication structure.

SAP MM - Master data

There are two types of data in SAP : 1. Master data 2. Transaction data Master data : It is a kind of data that doesn't change regularly i.e., static in nature For example: if you require a bank account, we are required to fill some kind of application form where our personal details are given like name, email address, etc... this is called master data Transactional data : Master data is the basis for transactional data. Transactional data changes regularly. For example: based on the application bank account number is generated by the bank which will be used for performing transactions. Master Data : There are different types of master data in MM : 1. Vendor Master data 2. Material master data 3. Purchase info records 4. Source list 5. Quota arrangement 6. Service Master data... There are other master data as well like Output, conditions, etc which are used during transactional data processing Master data is created through an easy access screen and is non-transportable. It is requ...

1882260 - Error 06249 occurs when creating several Purchase Orders from one 3d party sales order

 At times, business users do purchase orders for the purchase requisitions created through sales orders. Again, after few days business users will try to use the same purchase requisitions to create new purchase orders.  In this situation, SAP throws the error message Error '06249' even though it is maintained as a warning message in system messages. This is standard SAP functionality and below is the workaround need be implemented as proposed by SAP in the note mentioned in the subject line.   The following workarounds are possible - from both MM and SD perspectives: Solution for MM side: Use the already existing PO + item. In this existing PO item, please create a new delivery schedule (tab "delivery schedule") for the new delivery date and the open units, then the system will allow you to continue. - or - Solution for SD side: Create a new schedule line in the old sales order item, or create a new item in the sales order for the re...

[SAP SD] EXIT to add custom segments in DEBMAS Idoc

 At times, businesses wish to send custom fields in the SAP to other partner systems. As these are Z fields, standard SAP doesn't push this data in partner systems. In this situation, Below are the actions to be done. 1. Enhance the IDoc type with a custom segment and add fields to it 2. Populate the values of the custom fields through exit: EXIT_SAPLVV01_001.

SAP MM Enterprise structure

Enterprise structure is the term used for organizational structure in SAP. All the company organizational elements are mapped at the enterprise structure level. Below are the important elements of organizational structure from a Material Management (MM)  perspective : Purchase Organisation Purchasing group Plant Storage Location Purchase Organisation Purchase organization is the legal entity and is responsible for all kinds of purchase activities within an organization. Ideally, Purchasing department is a company that is represented as a purchase organization Purchasing Group Buyer or group of buyers in a company purchasing department are represented as a purchasing group in SAP Plant  A manufacturing entity of a company or depo or any location that involves some kind of activity in a place can be treated as a Plant in SAP Storage location it's a subdivision of a plant where the stock will be kept. Setting up of enterprise structure is done in two parts : 1. Definition 2. Assi...

[SAP MM] Trigger release strategy even for reduction of PO value

 At times, there is a a situation where the business requires a release strategy to be triggered if there are any changes to the purchase order document value either increase or decrease of document value. In general, standard SAP does trigger a release strategy if there is an increase in document value but however, if there is any decrease in the document value system doesn't trigger release strategy. This post covers the technical changes that we have to make to trigger release strategy if there is any decrease in the document value to that of the released amount. Release strategy at purchase order level is triggered based on the function module - 'ME_REL_STRATEGIE_EKKO' so we are required to make changes in this FM to accomplish this requirement. Perform reset is used to reset the release strategy post-release of the document. IF  cekko -gnetw  GT f1 .            PERFORM reset      ...

[SD] sales orders not getting displayed in delivery due list

Once a sales order is created and pending for delivery then the system will update in delivery due list table VEPVG, which the system uses to fetch and process pending deliveries.   There will be some situations where the delivery due list table is not updated even though the sales order is not blocked and pending for delivery this will result in missing the sales orders for delivery creation. This issue will occur due to the incorrect way of handling user exits when X* and Y* tables are manipulated before save of the sales documents.   In this situation, program 'RVV05IVB' is used to reorganize delivery due list entries and fix the inconsistency   SNOTE: 128947 - Correction of SD document indexes with RVV05IVB   Report RVV05IVB is available in your system for reorganizing or correcting incorrect SD document indexes. The report can correct the following index tables: Table    Contents          ...

Logic to fetch characteristics values for a material

Characteristics values for an object cannot be extracted from the database table directly. Hence we are required to follow the below steps to fetch the data : First, pass the material into table KSSK and fetch object number Pass the object number into the KLAH table to fetch the class Pass the class into a functional module: 'CLAF_CLASSIFICATION_OF_OBJECTS' to fetch the characteristics and characteristics values.

[SD] Useful functional modules in delivery

FM: WS_LM_QUANTITY_ADD is used for checking the weight and volume of an outbound delivery to calculate the delivery weight, we have to keep the FM in the loop. FM: BAPI_OUTB_DELIVERY_CREATE_STO is used to create outbound delivery for a purchase document in the stock transfer process ensure to use COMMIT FM post calling the BAPI to create an entry in the database Table VBSS - to get group number based on the sales document    FM: WS_PICK_WAV_UPDATE_PREPARE' is used for the wave picking  FM:  RV_SHIPMENT_VIEW is used for viewing shipment FM: 'SD_DELIVERY_ASSIGN_TO_SHIPMENT' is used for the assignment of delivery to shipment FM:  SD_SHIPMENTS_SAVE is used for creating the shipment FM: BAPI_SHIPMENT_CHANGE is used for changing the shipment FM:  CS_BOM_EXPL_KND_V1 is used to fetch sales order BOM items

[Change Documents] Change log for output condition records

Output condition records are crucial for business in the case of interfaces. Any changes to it will have an impact on the receiver system not receiving the data. Standard SAP hasn't given any feature to capture records directly but however, SAP has given a provision to do so. Below is the process to be recommended by SAP through SNOTE: 2967998 - No changelog available for OUTPUT condition records Check the indicator for "Log Data Changes" for table NACH in SE11. (-> click button for Technical settings) This can be set. You can develop your own query or Abap to read out the changes made in an output condition record. Use this information as a source: If you create/change an output condition in MN04/MN05, an entry is written into the table B02* (e.g. B026) and into table NACH. The two tables are linked with B026-KNUMH=NACH-KNUMH. Read table CDHDR where OBJECTCLAS = COND_OC and OBJECTID = NACH-KNUMH = B026-KNUMH OBJECTID is stored in this format: 0000000001BEF026NEU where...

[SD] Delivery output triggering after packing status is complete

Standard SAP provides routine to maintain at output procedure level to trigger output type when post goods issue is completed.  But however, SAP hasn't given any routine to trigger output when packing status is incomplete. To enable this functionality, we have to create a new custom routine in the 9* series with the below logic and assign it to the respective output type in the output determination procedure. IF  KOMKBV2-PKSTK = 'C' AND ( KOMKBV2-KOSTK EQ 'C' ).     SY-SUBRC = 0.   ELSE.     SY-SUBRC = 4.   ENDIF.

Storage location determination through EXIT at delivery level

Ideally Storage Location is determined through standard SAP functionality maintained at delivery type level based on the below criteria : Shipping point + Plant + Storage Condition (MALA) Plant + Situation + Storage Condition (RETA) but however, if business requires to deviate from standard SAP criteria then we have to leverage the below exit to accomplish the requirement : V02V0002  EXIT_SAPLV02V_002

[PS] Commonly used reports and T.codes

 RKANBU01 - Transfer Purchase Requisition and Purchase Order Commitments RKACOR04 - Adjustment Betw. Line Items and Totals Records (Act.Cost + Commitment) CJEN - Reconstruct Project info database CJBN -  Re-construct availability check for projects S_ALR_87013558 - Budget - Actual - Commitment report

[SD] Customer Proof of Delivery (POD) SAP Notes - Automatic Confirmation

Automatic POD Concept For customer proof-of-delivery (POD) confirmations for an outbound delivery, you can define a time window in which the confirmation from the customer must occur. This time window is specified in units of days and stored in the field 'POD timeframe' of the customer master data for the sales area (KNVV-PODTG). If the current date and time in the local time zone (!) of the user running the transaction lies before the end of the time window, the transaction / program does NOT process the delivery, because the confirmation of the customer could still happen.   Logic for POD date calculation The end of the time window in which the POD is expected from the customer is calculated as the delivery date (LIKP-LFDAT) plus the POD timeframe as a net duration. Net duration means that only the working hours according to the factory calendar of the delivery (LIKP-KNFAK) are used for this scheduling. The factory calendar of the delivery is usually determined from the calen...