Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MM

Former Member
0 Likes
750

how can we delete materials permanently from material master . in which transaction we do that ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
693

Hi,

Have a look at this,it may help u and pls reward points if it is useful.

List of SAP MM Transaction codes

All transaction are stored in table TSTC.

Transaction for MM module start with M.

IH09 - Display Material

MM01 - Create Material

MM02 - Change Material

MM03 - Display Material

MM50 - List Extendable Materials

MMBE - Stock Overview

MMI1 - Create Operating Supplies

MMN1 - Create Non-Stock Material

MMS1 - Create Service

MMU1 - Create Non-Valuated Material

ME51N - Create Purchase Requisition

ME52N - Change Purchase Requisition

ME53N - Display Purchase Requisition

ME5A - Purchase Requisitions: List Display

ME5J - Purchase Requisitions for Project

ME5K - Requisitions by Account Assignment

MELB - Purch. Transactions by Tracking No.

ME56 - Assign Source to Purch. Requisition

ME57 - Assign and Process Requisitions

ME58 - Ordering: Assigned Requisitions

ME59 - Automatic Generation of POs

ME54 - Release Purchase Requisition

ME55 - Collective Release of Purchase Reqs.

ME5F - Release Reminder: Purch. Requisition

MB21 - Create Reservation

MB22 - Change Reservation

MB23 - Display Reservation

MB24 - Reservations by Material

MB25 - Reservations by Account Assignment

MB1C - Other Goods Receipts

MB90 - Output Processing for Mat. Documents

MB21 - Create Reservation

MB22 - Change Reservation

MB23 - Display Reservation

MB24 - Reservations by Material

MB25 - Reservations by Account Assignment

MBRL - Return Delivery per Mat. Document

MB1C - Other Goods Receipts

MB90 - Output Processing for Mat. Documents

MB1B - Transfer Posting

MIBC - ABC Analysis for Cycle Counting

MI01 - Create Physical Inventory Document

MI02 - Change Physical Inventory Document

MI03 - Display Physical Inventory Document

MI31 - Batch Input: Create Phys. Inv. Doc.

MI32 - Batch Input: Block Material

MI33 - Batch Input: Freeze Book Inv.Balance

MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng

MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.

MIQ1 - Batch Input: PhInvDoc. Project Stock

MI01 - Create Physical Inventory Document

MI02 - Change Physical Inventory Document

MI03 - Display Physical Inventory Document

MI31 - Batch Input: Create Phys. Inv. Doc.

MI32 - Batch Input: Block Material

MI33 - Batch Input: Freeze Book Inv.Balance

MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng

MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.

MIQ1 - Batch Input: PhInvDoc. Project Stock

MI01 - Create Physical Inventory Document

MI02 - Change Physical Inventory Document

MI03 - Display Physical Inventory Document

MI31 - Batch Input: Create Phys. Inv. Doc.

MI32 - Batch Input: Block Material

MI33 - Batch Input: Freeze Book Inv.Balance

MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng

MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.

MIQ1 - Batch Input: PhInvDoc. Project Stock

MI21 - Print physical inventory document

MI04 - Enter Inventory Count with Document

MI05 - Change Inventory Count

MI06 - Display Inventory Count

MI09 - Enter Inventory Count w/o Document

MI34 - Batch Input: Enter Count

MI35 - Batch Input: Post Zero Stock Balance

MI38 - Batch Input: Count and Differences

MI39 - Batch Input: Document and Count

MI40 - 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 Differences

MI37 - Batch Input: Post Differences

CT01 - Create Characteristic

CT02 - Change Characteristic

CT03 - Display Characteristic

CL01 - Create Class

CL02 - Classes

CL03 - Display Class

CL04 - Delete Class

CL2B - Class Types

Regards,

Ameet

4 REPLIES 4
Read only

Former Member
0 Likes
693

Hello,

We can't do that.

There is field in MARA-LVORM this will be set when material is marked for deleteion.

You can do it programmatically.

Use this code.


REPORT ZV_MAT_CREATE .


DATA: HEADDATA TYPE BAPIMATHEAD.
DATA: CLIENTDATA TYPE BAPI_MARA.
DATA: CLIENTDATAX TYPE BAPI_MARAX.
DATA: RETURN TYPE  BAPIRET2 .
DATA: RETURNM TYPE TABLE OF BAPI_MATRETURN2 WITH HEADER LINE.
DATA: XMARA TYPE MARA.
DATA: RETURNMESSAGES LIKE BAPIRET2        OCCURS 0 WITH HEADER LINE.
DATA: MATERIALDESCRIPTION LIKE BAPI_MAKT  OCCURS 0 WITH HEADER LINE.
PARAMETERS: P_MATNR TYPE MARA-MATNR,
            P_MAKTX LIKE MAKT-MAKTX.

SELECT SINGLE * FROM MARA INTO XMARA
          WHERE MATNR = P_MATNR.

HEADDATA-MATERIAL   = P_MATNR.
HEADDATA-MATL_TYPE  = 'FERT'.
HEADDATA-IND_SECTOR = 'M'.
HEADDATA-BASIC_VIEW = 'X'.

clientdata-del_flag =  'X'.
clientdatax-del_flag = 'X'.
* Daten für die Sicht GRUNDDATEN 1
MATERIALDESCRIPTION-LANGU = SY-LANGU.
MATERIALDESCRIPTION-MATL_DESC = P_MAKTX.
APPEND MATERIALDESCRIPTION.
*---------------------------------------------------------------------*
* Mandantenspezifische Materialdaten
*---------------------------------------------------------------------*
CLIENTDATA-BASE_UOM  = 'ST'.
CLIENTDATAX-BASE_UOM = 'X'.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
     EXPORTING
          HEADDATA            = HEADDATA
          CLIENTDATA          = CLIENTDATA
          CLIENTDATAX         = CLIENTDATAX
     IMPORTING
          RETURN              = RETURN
     TABLES
          RETURNMESSAGES      = RETURNM.
*          MATERIALDESCRIPTION = MATERIALDESCRIPTION.

CHECK SY-SUBRC  = 0.
COMMIT WORK AND WAIT.

Vasanth

Read only

Former Member
0 Likes
693

Hi,

The reason why we cannot <b>cannot Delete </b> the Material is because they might have dependencies on them such as PO's, PR's. If you delete the Material then they will not have any reference left and so the next time you open the PO having reference to that material it might give un-expected errors.

The only thing that can be done is mark it for deletion as rightly said by the person above.

You can alsi use T.Code : MM06 or MM16.

Hope this gives some insights

Regards

Nishant

Read only

Former Member
0 Likes
694

Hi,

Have a look at this,it may help u and pls reward points if it is useful.

List of SAP MM Transaction codes

All transaction are stored in table TSTC.

Transaction for MM module start with M.

IH09 - Display Material

MM01 - Create Material

MM02 - Change Material

MM03 - Display Material

MM50 - List Extendable Materials

MMBE - Stock Overview

MMI1 - Create Operating Supplies

MMN1 - Create Non-Stock Material

MMS1 - Create Service

MMU1 - Create Non-Valuated Material

ME51N - Create Purchase Requisition

ME52N - Change Purchase Requisition

ME53N - Display Purchase Requisition

ME5A - Purchase Requisitions: List Display

ME5J - Purchase Requisitions for Project

ME5K - Requisitions by Account Assignment

MELB - Purch. Transactions by Tracking No.

ME56 - Assign Source to Purch. Requisition

ME57 - Assign and Process Requisitions

ME58 - Ordering: Assigned Requisitions

ME59 - Automatic Generation of POs

ME54 - Release Purchase Requisition

ME55 - Collective Release of Purchase Reqs.

ME5F - Release Reminder: Purch. Requisition

MB21 - Create Reservation

MB22 - Change Reservation

MB23 - Display Reservation

MB24 - Reservations by Material

MB25 - Reservations by Account Assignment

MB1C - Other Goods Receipts

MB90 - Output Processing for Mat. Documents

MB21 - Create Reservation

MB22 - Change Reservation

MB23 - Display Reservation

MB24 - Reservations by Material

MB25 - Reservations by Account Assignment

MBRL - Return Delivery per Mat. Document

MB1C - Other Goods Receipts

MB90 - Output Processing for Mat. Documents

MB1B - Transfer Posting

MIBC - ABC Analysis for Cycle Counting

MI01 - Create Physical Inventory Document

MI02 - Change Physical Inventory Document

MI03 - Display Physical Inventory Document

MI31 - Batch Input: Create Phys. Inv. Doc.

MI32 - Batch Input: Block Material

MI33 - Batch Input: Freeze Book Inv.Balance

MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng

MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.

MIQ1 - Batch Input: PhInvDoc. Project Stock

MI01 - Create Physical Inventory Document

MI02 - Change Physical Inventory Document

MI03 - Display Physical Inventory Document

MI31 - Batch Input: Create Phys. Inv. Doc.

MI32 - Batch Input: Block Material

MI33 - Batch Input: Freeze Book Inv.Balance

MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng

MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.

MIQ1 - Batch Input: PhInvDoc. Project Stock

MI01 - Create Physical Inventory Document

MI02 - Change Physical Inventory Document

MI03 - Display Physical Inventory Document

MI31 - Batch Input: Create Phys. Inv. Doc.

MI32 - Batch Input: Block Material

MI33 - Batch Input: Freeze Book Inv.Balance

MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng

MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.

MIQ1 - Batch Input: PhInvDoc. Project Stock

MI21 - Print physical inventory document

MI04 - Enter Inventory Count with Document

MI05 - Change Inventory Count

MI06 - Display Inventory Count

MI09 - Enter Inventory Count w/o Document

MI34 - Batch Input: Enter Count

MI35 - Batch Input: Post Zero Stock Balance

MI38 - Batch Input: Count and Differences

MI39 - Batch Input: Document and Count

MI40 - 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 Differences

MI37 - Batch Input: Post Differences

CT01 - Create Characteristic

CT02 - Change Characteristic

CT03 - Display Characteristic

CL01 - Create Class

CL02 - Classes

CL03 - Display Class

CL04 - Delete Class

CL2B - Class Types

Regards,

Ameet

Read only

Former Member
0 Likes
693

answered