2021年6月4日星期五

IDOC TABLE

 

EDID4: IDoc  data contents table
SRRELROLES:
IDOCREL:
SRRELROLES 

2021年5月31日星期一

Steps change batch management flag of material master

 1. change batch management flag from space to X.

 1) It should have no stock in MMBE.

 2) It should have no stock in storage loction history data (MARDH)

     In order to delete material storage location data just run report  RM07KOHDEL.

 ※Restrictions when run report RM07KOHDEL.

  1)  Never delete material history records for the current

      period (based on lookup for material in MARV table using BUKR).

  2)  Never delete material history records from the previous period

      (again based on lookup for material in MARV table using BUKR).

  3)  Never delete material history record for two periods before

      the current period based on MARV table lookup.

  4)  Never delete material history records for the last month

      of the previous year (based on MARV table lookup for material).

  5)  Never delete the last material history record for a given

      material under any circumstances.

 2. change batch management flag from  X to space.

 1) It should have no stock in MMBE.

 2) It should have no stock in storage loction history data (MARDH)

 3) It should have no batch data. (MCHA and MCHB)

   In order to delete material batch data, first run MSC2N to set delete flag = X

   then ran transaction SARA (MM74) to achive batch data.


Below is from the article of link

Enter Title Here: Do not exceed space provided - Title automatically appears in page header (sap.com)


If we want to activate/ de-activate then we need to perform below steps. 

 • Check the Status of material in MMBE ( stock overview company code/plant/storage location /batch ) ;

 ideally stock should not be present for material at any levels 

 • There should not be any open purchase order for material; we can check entries in table EKPO. 

 • There should not be any open production order. we can check entries in table AFPO.

 • There should not be any sales order. We can check entries in table VBAP.

 • There should not be any purchase requisition. we can check entries in table EBAN.  

 • There should not be any stock in transit. we can check MB5T ( display of stock in transit ) 

 • There should not be any Plant availability Stock, use MB53 to validate. 

 • There should not be any reservation for material. we can check in MB25

(reservation list ) .

 • Stock requirement should be zero we can check in MD04 (stock requirement list).

 • There should not be any open delivery we can check entries in table LIPS.


• There should not be any open warehouse Transfer Requirement. We can check entries in table LTBP and LTAP; 

• There should not be any open Warehouse transfer orders. We can check 

entries in table LTAK. 

• The Batch Corresponding to the plant has to be set for deletion indicator in MSC2N, 

if previous period stocks exist, we can make a withdrawal posting also.

After cross checking all above steps we can activate / de-activate batch management in material master. 

But in most of the cases, number of material master date is huge and 

it is not possible to follow above steps for all material.


To solve this issues SAP have provided standard programs. 

Solution 

 Now SAP provided two reports which can update or remove BATCH MANAGEMENT

 INDICATOR and BATCHES without removing the material stocks and documents. 

We need to close only open physical inventory documents. 

 The below reports update, all relevant documents based on batch activation/de-activation: 

 • RVBCONVMAT2BM - Sets the batch management requirement indicator. 

 • RVBREVMATBM - Removes the batch management requirement indicator.


Useful sap note

These programs should be applied with in preview of the following SAP notes 

 • Note 533276 - Setting the batch management requirement indicator

 • Note 533383- Deselecting the batch management requirement indicato

 

2021年5月25日星期二

Information structures in SAP

https://blogs.sap.com/2013/05/31/information-structures-in-sap/


1.  Go to IMG : Logistics General à LIS àLogistics Data Warehouse à Data basis àInformation Structures à Maintain self-defined information structures OR
Use T-Code – MC21, Enter number & description for your information structure, choose application 01, type as standard, enable planning and continue.
2. Choose characteristics from given field catalogs. Choose Sales Org, Distribution Channel, Division, Sold-to-party, Material and/or as required. Copy & Close.

Similarly, choose key figures like order quantity, confirmed quantity, gross weight, Net Weight, Volume, Billed Quantity, Open Orders Quantity etc. as required.

3. Save your information structure.

4. Go to MC24 to create updating for your information structure. Choose update group 1 (SIS: sales document, delivery, billing document) or as required.

5. Create update rules. Double-click on key figures and specify event, update type, source table source field. Choose table and date field for period determination or click on suggest rules. Copy.
Click on rules for characteristics to create update rules of characteristics for each key figure. Specify source tables and fields for each characteristic. Copy.

6. After creating rules for all your key figures, go to Environment in the menu bar and choose activate updating. Double-click your info structure to select                parameters as shown below. Set period split as required and asynchronous updating. Save.

7. Use T-Code LBW0 to connect your info-structure to SAP BW. Input your info-structure, choose set-up LIS environment and execute.
-Next Choose generate data source and execute.
-For Delta updating in LIS choose generate updating and execute.

8. Display your info-structure in MC23. Go to Environment in menu bar and choose update definitions. Status of info-structure is Active.

mcvr:  update diagnosis for sales order
mcvv:  update diagnosis  for Billing
mcvt:   update diagnosis for delivery 
mcvw:  update diagnosis for material

2021年5月23日星期日

2020年11月21日星期六

价格差异

 标准价格(S)

采购订单价值和标准价格产生的价格差异计入:材料成本差异。

生产成本和完工产品的标准价格产生的差异计入:生产成本差异。


移动平均法:原材料,包材,辅材,低值易耗品 产成品(商贸企业)

半成品:自主制造 标准价格

            外部采购 移动平均

标准成本法:产成品

2020年9月30日星期三

Output Type for Billing


1. Assign output Determination Procedures to Billing Type


2. Maintenance Output Determination Procedure



3. Maintain output Types







4. Maintain access sequence






5. Create output condition records
Billing:         VV31/VV32/VV33  
Sales Order: VV11/VV12/V13  
Delivery:      VV21/VV22/VV23





Output condition Records was saved in Table BXXX(3 digit numbers). see step 6.

6. Maintain condition tables 




Output condition table are B008, B011, B018.

7.Nace 

8. Diagnosis






Output of Billing was saved in table NAST.

2020年8月13日星期四

Create SAP UI5 Fiori App

 1. Tr-CD:SEGW SAP Gateway service

 2. 再定義(redefine)

 3. /IWFND/MAINT_SERVICE  (/o/IWFND/MAINT_SERVICE)

   Add Service:Alias 


Test:
GetEntitySet: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet            [GET]
GetEntity: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet('00001')   [GET]
Create: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet                    [POST]
Update: /sap/opu/odata/sap/ZADRC_SRV/ZADRCSet('00001')      [PUT]
DELETE:/sap/opu/odata/sap/ZADRC_SRV/ZADRCSet('00001')      [DELETE]

GET KEY:(Get from Parameter IT_KEY_TAB)
 DATALS_KEY_TAB TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,
       LV_KEY TYPE ZTBLTEST-ZEMPID.

    READ TABLE IT_KEY_TAB INTO LS_KEY_TAB WITH KEY NAME =  'Zempid'.
    LV_KEY LS_KEY_TAB-VALUE.


GET ALL FIELDS:(Get from Parameter IO_DATA_PROVIDER  )
DATA:  LS_INPUT TYPE ZCL_ZTESTPRJ_MPC=>TS_ZTEST.
IO_DATA_PROVIDER->READ_ENTRY_DATAIMPORTING ES_DATA LS_INPUT ).


4.SAP Fiori Lauchpad Tr-code:/UI2/FLP

SEPM_DG

5. Front
Controller.js----->Get OData Service
onInit: function() {
  var oModel = new  sap.ui.model.odata.ODataModel(
             "proxy/http/netweaver:8000/sap/opu/odata/sap/ZXXX_SVR");
   this.getView().setModel(oModel);
}

Submit
onSave:function() {
  oData.request({
     requestUri:  "proxy/http/netweaver:8000/sap/opu/odata/sap/ZXXX_SVR",
     requestUri: "GET",
     headers:{
        "X-Requested-Width": "XMLHttpRequest",
        "Content-Type": "application/atom+xml",
        "DataServiceVersion": "2.0",
        "X-CSRF-Token": "Fetch"
     }
  },
  function (data,response ){
  }

)

}





Customer Characteristic

  Characteristic Descriptions are stored in the table - CABNT - Language - SPRAS - Characteristic description - ATBEZ Characteristic Values ...