Material type to plant assignment
Hi all,
where in SPRO, we can assign material type to plant??
Regards,
Aisha Ishrat
ICI Pakistan Ltd.
Hi,
We assign Material type to Valuation area which is either Company code or Plant.
This will be assigned in Quantity & Value updation for that Particular Material type.
Path is
SPRO-Logistics genMaterial masterBasic settings-Material types--Define attributes for Material types.
Here select the Material type and then select the quantity & Value updating.
You will find all the valuation area there select your valuation area(Plant) and select the check box which means the quantity & Value will be updated with respect to this material type whenever you do any goods movement or any changes to the material which is created based on that material type
rgds
Chidanand
Similar Messages
-
Material type and account assignment group relation
Hi,
Getting an error while creating material master save. Account assignment Zx can't be with Material Type Zxxxx.
Please advise where is the link maintained between material account assignment group and material type.
My material is Z service material.
As I no for plant,industry, material type valuation class quanity update tick required but that is for stockable materials which is not the case above.
ThanksHI,
You can make the field Account Assignment Group of Material Master as inactive.
But it depends up on Plant, Industry Sector Type and Material Type.
You can do this in IMG --> Logistic General --> Material Master --> Field Selection
Or
use SHD0.. give T-code MM01. and you can deactivate the field.
Hope this helps you.
TC
BR
AKS -
Shall v maintain price control for material type with plant specific ?
Hai Guru,
In OMS2, we change HALB price control [valuation] as V or S. whether shall v maintain this for plant specific.?
Kindly guide
With Regards
SwethaHi
if you do not make the indicator Price control manadatory active then you can have different price indicator for each plant. However thsi indicator is never done plant specific. If you wish to have plant specific then you may have to have a new material type and again you need to control the MM01 creation for that particular plant by means of Authorisation control which is littel involved also but can be done.
Regards -
Change of Material Type in Plants
Dear Guru's,
Good Day.
I've two plant Codes Plant A and Plant B with one company code.
Plant A Procures a Material(ABC) from an Vendor. Material type for ABC is maintained as ROH(Raw material).
Plant B produces Material(ABC) inhouse and does STO to Plant A.
I've extended the Material (ABC) from Plant A to Plant B.
Now, I need to Change the material Type for ABC in Plant B as Finished Goods(FERT), which is not Possible by transaction MMAM.
I need to Change the Valuation Class and Price control for mateiral ABC in plant B.
With Regards,
SiddharthHi There
Steps in Split valuation
1. Define the valuation category Globally
2. Define the Valuation types Globally
3. which valuation types belong to which valuation category
4. Define the Vlauation category/Valauation type locally- Per Plant
Ref the below links for Split valuation config
http://www.sap-basis-abap.com/mm/step-by-step-procedure-of-configuring-split-valuation.htm
http://www.sap-img.com/mm025.htm
Thanks
Senthil -
Purchase Requisition / Order: Account Assignment Category for material type
Hi,
When creating a PR or PO for one specific material I would like the system to propose a specific account assignment Category for this material. It shouldn't allow the user to change this account assignment category.
Is it possible? How should I proceed?
Thanks in advance.
Luis.I dont think there is any standard procedure for doing this.
My idea would be to use a user exit say EXIT_SAPLMEREQ_010 for PR and a similar exit for PO and code a Error message check for Material type and account assignment combination.
For ex : EXIT_SAPLMEREQ_010 is a exit which is called during check in a PR . SO when the user enters a combination of Material type and Acc assignment u can check for the requirements. -
Hi All,
I have created new material type as ZINS ( Insurance spares ).
Now,I have to change ZSPR ( Spares) material to ZINS material type.
In system there are no liabilities for this material.But ,I am getting following error while executing T-code :-MMAM.
Error :- " Change Material Type
The material type cannot be changed.
The reasons for this are:
QM inspection data exists for the material. In this inspection data,
it is defined that a plan is required for the inspection. However,
inspection plans are not allowed for the new material type.
Plant
1100
6001
Task lists already exist for specific TL types for the material
The new material type does not allow assignment of task lists for these TL types "
I want to know is there any settings required while creating new material type in quality module,as this error seems to be related to Quality module.
Please help,as this is very much urgent.
Thanks.
With Best Regards,
RajeshHi Vivek and Murali,
Thanks for your answers.
In my question ,I mentioned that,
In system there are no liabilities for this material.I want to know is there any settings required while creating new material type in quality module,as this error seems to be related to Quality module.
I got answer,while creating new material type it was not assigned to in quality module.I need to assign the task list type Q to the new Material type.
I have done configuartion as follows, ( Path: SPRO -> Quality management -> Quality Planning -> Inspection planning -> Assign Task List Type to Material types).
Once again thanks for your help and support.
Regards,
Rajesh -
Material type - maintainance by qty and value
Dear All Guru,
Yesterday I had copied the plant from the plant belong to same company and maintained the same val Gr Code.
But i found that I am not able to make GR posting and the error was Plant and material type is not matching and then over SDN i got the soln to maintain qty and value for matl type and it resolved the problem.
but can anybody tell me that why this can happen ?
b'coz still if the val/qty ticks are not maintained why system is showing the material type and plant combination error...though it can consider this as UNBW material and can still post the GR
also can you suggest the right method for coping the plant so i won't face problem like this or any check methods after coping new plant
Regards,
VimleshHi,
For Preparation of New Plant, following steps to be adopted.
1. Excute the India Specific Localize Sample Organizational Units using SPRO> Enterprise Structure> Localize Sample Organizational Units.
In this IMG activity, you localize the sample organizational units by applying the appropriate country template like India to them.
2. Then, in the next IMG activities (under Enterprise Structure Definition and Assignment), you copy these localized organizational units to create units of your own.
Caution:
Only execute this IMG activity if you have not changed any Customizing settings in SAP R/3.
Do not execute this IMG activity in your production client, as it will overwrite the settings for any organizational units named 0001. Run it only in your production preparation client from where you will transport to Prodution Client.
Note: Unless you adopt this procedure to create the new plant, till then you will encounter the same Error which you are facing.so these are the guide line for create of new/Additional country specific Organizational Units.
hope it helps...
manoj singh -
Dear All,
The material type usage given in the forum as
" can control which user department can enter the datas"
Which fields are to be filled during maintaince if Material Master
What exactly this , where we use, is any IMG need to be done
Regards,
SureshHello ,
Material Master : Products and services are combined in the SAP R/3 System under the term material. All information necessary for the management of a material and its stocks, as well as its use, is maintained in the material master record. This includes, for example, data on purchasing, on sales and on storage, Accounting, etc.
Material Type groups Materials with similar attributes.This allows to manage materials with similar
attributes in a uniform manner as per the companyu2019s requirement
Material Type controls:
Number Assignment (Internal or External). It also controls the Number Range IntervalWhether to have Internal (In house manufacturing) and/or External Procurement
Which types of Views (Purchasing, MRP, Sales, Accounting, etc) need to be displayed
Which Screen appears and in what sequence
The Fields in Material (optional, required, display or suppressed)
Along with Plant it controls:
Whether changes in quantity are updated in
Material Master
Whether changes in value are updated in the
stock accounts in Financial Accounting
So based on material type different user department can maintain the data.
E.g for ROH material purchasing ivew is mandatory so purchasing department can maitain thier dat.
Same way for FERT, sales view is important which is related to sales department. If material is warehouse maanged then stores department will maintain warehouse views.
Regards.
Shailesh -
Field selection for Material Type
Hi,
When we create the material type we are assigning a field ref. in Define Material attributes screen, and when we are creating the industry sector there also we are assigning a field screen reference.
No when we creat a materail with MM01, and if Field ref. is different in Industry sector and material type then which system will follow when we create the material it will be ref. to field selection in Material type or industry sector.
regards,,
zafarZafar,
When you talkout Material type is basically controls the properties of a Material like important control fucntions and attributes.
That is inturn, like Field selection, Special material type, Type of Procurement, Stock (Qty &Value) updation, User departments and Price control. But,
where as Field selection is control key which consits of some setoff fields which are subjected to a perticular Industry sector like, Plant &Construction, Mechanical Industry, Pharmacuetical Industry, Chemical Industry, etc. In this case field selection is different from Industry to Industry, but in some cases field selection is common for the similar kind of Industries or Industry sectors.
And the Field selection is subjected to the Material type as well, that means each material type can have their own Field selection (it is named with a field selection key 3 char sap code for field selection).
Comming to the Creation of Material master record : using MM01 ( create material -general)
here, you need to select the material type and industry sector --> then you need to choose the relevent user departments and subsequently plant, sloc.etc.
Note: when you are creating the material in the above fasion, you need to enter the relevent data which is w.r.to the user departments which you have choosen, and those inturn reflect from this control data ( attributes and important control functions as I said is the definition of Material type).
And this is how a material is created, wether it can be a Raw material, Semi finished Product or Finished Product, etc.
Note: There is an option to create your own Material Types, but SAP suggests to use standard Material type when you create material master record, unless otherwise a special requirement comes from your client is from Specific Industry sector or if running a special kind of business which is not yet dragged into the SAP R/3 system.
Hope this will clarifies your query.
With Regards,
Srin -
IDOC: Material master (Extend Plants)
I used LSMW IDOC option to migrate material master data (MATMAS):
- Basic views
- Description
- Costing
- Plant Stock
I want to extend the plant view (Plant Stock). What change do I do to original LSMW to extend plant?
How do I specify that I am extending?
Is it that function code at the beginning of IDOC?You can do this by writing a program:
REPORT zdmmm_mm_multiplant NO STANDARD PAGE HEADING
MESSAGE-ID zdmmm
LINE-SIZE 255.
TABLE DECLARATION *
TABLES: mara, "General Material Data
mard, "Storage location data
mdma, "MRP data for material
marc. "Plant Data for Material
include zdmmmr_dev00160_mm_multi_top.
include zdmmmr_dev00160_mm_multi_f00.
AT SELECTION-SCREEN *
AT SELECTION-SCREEN.
IF NOT s_matnr[] IS INITIAL.
*Subroutine to perform the Material Number validation
PERFORM sub_validate_matnr.
ELSEIF p_ersda IS INITIAL.
MESSAGE e003 .
ENDIF.
IF NOT s_werks[] IS INITIAL.
Subroutine to perform the plant validation
PERFORM sub_validate_plant.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
*To retrive all possible material numbers that have to be
*extended.
PERFORM sub_get_mara.
*To retrieve all possible plants to which the material needs
*to be extended.
IF s_werks IS INITIAL.
PERFORM sub_get_werks.
ENDIF.
*For retrieving Procurement status data from T134.
PERFORM sub_get_pstat.
*To determine the plants to which the Materials have
*already been extended.
PERFORM sub_get_marc.
*To determine all Storage Locations for individual Plants.
PERFORM sub_get_t001l.
*To retrieve company code
PERFORM sub_get_t001k.
*To determine the storage locations and plants to which the Material
*has already extended.
PERFORM sub_get_mard.
*To determine the MRP Areas to which the materials need to be extended.
PERFORM sub_get_mdlv.
*To determine the MRP Areas to which the materials already been extended.
PERFORM sub_get_mdma.
*To retrieve the MRP Area related data from customized table.
PERFORM sub_get_zdmmm_mrp_area.
*TO retrieve the Scalabilty info
PERFORM sub_get_scalability.
*For extending Material to Plant, all possible Storage Location and corresponding MRP Area .
PERFORM sub_mat_extn.
*For creating success and error log.
PERFORM sub_create_log.
*Text elements
001 Material/Plant Selection
002 No data found for given Selection.
003 Reference material is not maintained
004 Material is already extended to the plant
006 Material extended for MRP Area
007 Successfully extended
008 Already extended
009 Not a seviceable storage location,cannot be extended to MRP Area
*Selection texts
P_ERSDA Date
S_MATNR Material Number
S_WERKS Extend to Plant
*Messages
Message class: ZDMMM
*000 & & & &
*001 The material no. does not exist
*002 The plant does not exists.
*003 Enter either material no. or Creation date
*& Include ZDMMMR_MM_MULTI_TOP *
Types
*Type declaration to hold material no.
TYPES: BEGIN OF ty_matnr,
matnr TYPE matnr, "Material Number
mtart TYPE mtart, "Material Type
ersda TYPE ersda, "Creation date
mbrsh TYPE mbrsh, "Industry Sector
vkorg TYPE vkorg, "Sales Organization
vtweg TYPE vtweg, "Distribution Channel
mtartz TYPE zmtart, "Material Type (Customized)
END OF ty_matnr.
*Type declaration to hold plant.
TYPES: BEGIN OF ty_plant,
werks TYPE werks_d, "Plant
bwkey TYPE bwkey, "Valuation area
END OF ty_plant.
*Type declaration to hold data from marc.
TYPES: BEGIN OF ty_marc,
matnr TYPE matnr, "Material Number
werks TYPE werks_d, "Plant
bwkey TYPE bwkey,
END OF ty_marc.
*Type declaration to hold data from mard.
TYPES: BEGIN OF ty_mard,
matnr TYPE matnr, "Material Number
werks TYPE werks_d, "Plant
lgort TYPE lgort_d, "Storage Location
mtart TYPE mtart, "Material Type
END OF ty_mard.
*Type declaration to hold data from t001l.
TYPES: BEGIN OF ty_sloc,
werks TYPE werks_d, "Plant
lgort TYPE lgort_d, "Storage Location
END OF ty_sloc.
*Type declaration to hold data from mdlv.
TYPES: BEGIN OF ty_mdlv,
berid TYPE berid, "MRP Area
werzg TYPE werks_d, "Plant
ortzg TYPE lgort_d, "Storage Location
END OF ty_mdlv.
*Type declaration to hold data from custom table ZDMMM_MRP_AREA.
TYPES: BEGIN OF ty_refmdma,
zmtart TYPE zdmmm_mrp_area-zmtart, "Material Type (Customized)
zwerks TYPE zdmmm_mrp_area-zwerks, "Plant
zberid TYPE zdmmm_mrp_area-zberid, "MRP Area
zdismm TYPE zdmmm_mrp_area-zdismm, "MRP Type
zeisbe TYPE zdmmm_mrp_area-zeisbe, "Safety Stock
zdisls TYPE zdmmm_mrp_area-zdisls, "Lot Size
zdispo TYPE zdmmm_mrp_area-zdispo, "MRP Controller
zfxhor TYPE zdmmm_mrp_area-zfxhor, "Plant Delivery Time (In days)
END OF ty_refmdma.
*Type declaration to hold data for success log.
TYPES: BEGIN OF ty_succ,
mat(18) TYPE c, "Material
plant(8) TYPE c, "Plant
sloc(15) TYPE c, "Storage Location
comm(150) TYPE c, "Comments
END OF ty_succ.
*Type declaration to hold data for error log.
TYPES: BEGIN OF ty_error,
mat(18) TYPE c, "Material
plant(8) TYPE c, "Plant
sloc(15) TYPE c, "Storage Location
comm(150) TYPE c, "Comments
END OF ty_error.
*Type declaration for holding data from mvke
TYPES: BEGIN OF ty_mvke,
matnr TYPE matnr, "Material Number
vkorg TYPE vkorg, "Sales Org
vtweg TYPE vtweg, "Distribution Channel
END OF ty_mvke.
*Type declaration for holding data from qmat
TYPES: BEGIN OF ty_qmat,
matnr type matnr,
werks type werks_d,
art TYPE qmat-art,
ppl TYPE qmat-ppl,
spezueber TYPE qmat-spezueber,
conf TYPE qmat-conf,
tls TYPE qmat-tls,
app TYPE qmat-app,
mer TYPE qmat-mer,
insmk TYPE qmat-insmk,
ave TYPE qmat-ave,
stichprver TYPE qmat-stichprver,
dynregel TYPE qmat-dynregel,
sproz TYPE qmat-sproz,
hpz TYPE qmat-hpz,
dyn TYPE qmat-dyn,
mpb TYPE qmat-mpb,
mst TYPE qmat-mst,
ein TYPE qmat-ein,
mpdau TYPE qmat-mpdau,
chg TYPE qmat-chg,
qkzverf TYPE qmat-qkzverf,
qpmat TYPE qmat-qpmat,
kzprfkost TYPE qmat-kzprfkost,
aufnr_co TYPE qmat-aufnr_co,
aktiv TYPE qmat-aktiv,
apa TYPE qmat-apa,
afr TYPE qmat-afr,
mma TYPE qmat-mma,
feh TYPE qmat-feh,
prfrq TYPE qmat-prfrq,
nkmpr TYPE qmat-nkmpr,
END OF ty_qmat.
*Type declaration for MARA and MARC data for reference material
TYPES: BEGIN OF ty_ref_data,
matnr TYPE matnr, "Material Number
ladgr TYPE ladgr, "Loading Group
bklas TYPE bklas, "Valuation class
peinh TYPE peinh, "Price unit
losgr TYPE losgr, "Costing Lot Size
hkmat TYPE hkmat, "Material Origin
herkl TYPE herkl, "Country Of Origin
dismm TYPE dismm, "MRP Type
dispo TYPE dispo, "MRP Controller
fxhor TYPE fxhor, "Planned delivery time (In days)
disls TYPE disls, "Lot size
fhori TYPE fhori, "Scheduling Margin Key for Floats
magrv TYPE magrv,
vhart TYPE vhart,
ergew TYPE ergew,
ervol TYPE ervol,
fuelg TYPE fuelg,
stfak TYPE stfak,
gewto TYPE gewto,
volto TYPE volto,
prctr TYPE prctr,
kzgvh TYPE kzgvh,
stawn TYPE stawn,
mtver TYPE mtver,
casnr TYPE casnr,
gpnum TYPE gpnum,
steuc TYPE steuc,
herkr TYPE herkr,
mownr TYPE mownr,
mogru TYPE mogru,
prenc TYPE prenc,
preno TYPE preno,
prend TYPE prend,
itark TYPE itark,
bstme TYPE bstme,
vabme TYPE vabme,
nrfhg TYPE nrfhg,
mfrgr TYPE mfrgr,
ekwsl TYPE ekwsl,
webaz TYPE webaz,
insmk TYPE insmk,
kzkri TYPE kzkri,
usequ TYPE usequ,
kordb TYPE kordb,
mprof TYPE mprof,
ekgrp TYPE ekgrp,
disgr TYPE disgr,
maabc TYPE maabc,
minbe TYPE minbe,
lfrhy TYPE lfrhy,
bstmi TYPE bstmi,
bstma TYPE bstma,
bstfe TYPE bstfe,
mabst TYPE mabst,
losfx TYPE losfx,
lagpr TYPE lagpr,
ausss TYPE ausss,
takzt TYPE takzt,
rdprf TYPE rdprf,
bstrf TYPE bstrf,
megru TYPE megru,
sobsl TYPE sobsl,
kzech TYPE kzech,
lgpro TYPE lgpro,
vspvb TYPE vspvb,
rgekz TYPE rgekz,
lgfsb TYPE lgfsb,
fabkz TYPE fabkz,
eprio TYPE eprio,
schgt TYPE schgt,
plifz TYPE plifz,
mrppp TYPE mrppp,
eisbe TYPE eisbe,
lgrad TYPE lgrad,
eislo TYPE eislo,
rwpro TYPE rwpro,
shflg TYPE shflg,
shzet TYPE shzet,
shpro TYPE shpro,
periv TYPE periv,
auftl TYPE auftl,
strgr TYPE strgr,
vrmod TYPE vrmod,
vint2 TYPE vint2,
umref TYPE umref,
prgrp TYPE prgrp,
vint1 TYPE vint1,
miskz TYPE miskz,
prwrk TYPE prwrk,
mtvfp TYPE mtvfp,
wzeit TYPE wzeit,
kzpsp TYPE kzpsp,
stdpd TYPE stdpd,
perkz TYPE perkz,
altsl TYPE altsl,
kausf TYPE kausf,
sbdkz TYPE sbdkz,
kzbed TYPE kzbed,
ahdis TYPE ahdis,
kzaus TYPE kzaus,
ausdt TYPE ausdt,
nfmat TYPE nfmat,
sauft TYPE sauft,
sfepr TYPE sfepr,
mdach TYPE mdach,
dplfs TYPE dplfs,
dplpu TYPE dplpu,
dplho TYPE dplho,
tempb TYPE tempb,
raube TYPE raube,
behvo TYPE behvo,
stoff TYPE stoff,
abcin TYPE abcin,
ccfix TYPE ccfix,
wesch TYPE wesch,
etiar TYPE etiar,
etifo TYPE etifo,
xgchp TYPE xgchp,
maxlz TYPE maxlz,
lzeih TYPE lzeih,
mhdrz TYPE mhdrz,
mhdhb TYPE mhdhb,
iprkz TYPE dattp,
rdmhd TYPE rdmhd,
mhdlp TYPE mhdlp,
brgew TYPE brgew,
ntgew TYPE ntgew,
volum TYPE volum,
voleh TYPE voleh,
groes TYPE groes,
xmcng TYPE xmcng,
loggr TYPE loggr,
sernp TYPE serail,
serlv TYPE serlv,
fprfm TYPE fprfm,
ausme TYPE ausme,
qmata TYPE qmatauth,
kzdkz TYPE kzdkz,
prfrq TYPE prfrq,
rbnrm TYPE rbnr,
qmpur TYPE qmpur,
ssqss TYPE ssqss,
qzgtp TYPE qzgtyp,
qssys TYPE qssys,
bwtty TYPE bwtty,
eklas TYPE eklas,
qklas TYPE qklas,
verpr TYPE verpr,
stprs TYPE stprs,
zkprs TYPE dzkprs,
zkdat TYPE dzkdat,
bwprs TYPE bwprs,
bwprh TYPE bwprh,
bwps1 TYPE bwps1,
bwph1 TYPE bwph1,
vjbws TYPE vjbws,
vjbwh TYPE vjbwh,
abwkz TYPE abwkz,
bwpei TYPE bwpei,
xlifo TYPE xlifo,
mypol TYPE mypool,
ncost TYPE ck_no_costing,
ekalr TYPE ck_ekalrel,
hrkft TYPE hrkft,
kosgr TYPE ck_kosgr,
awsls TYPE awsls,
mmsta TYPE mmsta,
mmstd TYPE mmstd,
stlal TYPE stlal,
stlan TYPE stlan,
plnnr TYPE plnnr,
aplal TYPE plnal,
plnty TYPE plnty,
sobsk TYPE ck_sobsl,
zplpr TYPE dzplpr,
zplp1 TYPE dzplp1,
zpld1 TYPE dzpld1,
zplp2 TYPE dzplp2,
zpld2 TYPE dzpld2,
zplp3 TYPE dzplp3,
zpld3 TYPE dzpld3,
lvolg TYPE lvolg,
diskz TYPE diskz,
lsobs TYPE lsobs,
lminb TYPE lminb,
lbstf TYPE lbstf,
lgpbe TYPE lgpbe,
END OF ty_ref_data.
*Type declaration for holding data from mdma
TYPES: BEGIN OF ty_mdma,
matnr TYPE mdma-matnr, "Material Number
berid TYPE mdma-berid, "MRP Area
werks TYPE mdma-werks, "Plant
END OF ty_mdma.
*Type declaration for holding Company code data
TYPES: BEGIN OF ty_bukrs,
bwkey TYPE bwkey, "Valuation Area
bukrs TYPE bukrs, "Company code
END OF ty_bukrs.
*Type declaration for holding T001w Data
TYPES: BEGIN OF ty_t001w,
werks TYPE werks_d, "Plant
bwkey TYPE bwkey, "Valuation Area
END OF ty_t001w.
*Type declaration for holding T134 Data
TYPES: BEGIN OF ty_t134,
mtart TYPE mtart, " Material type
pstat TYPE pstat, "Condensed status display
END OF ty_t134.
Type declaration for Holding TWLAD data
TYPES: BEGIN OF ty_twlad,
werks TYPE werks_d,
lgort TYPE lgort_d,
adrnr TYPE adrnr,
END OF ty_twlad.
*Type declaration for holding ADRC data
TYPES: BEGIN OF ty_adrc,
adrnr TYPE adrnr, "Address number
sort2 TYPE ad_sort2, "Search Term
END OF ty_adrc.
TYPES: BEGIN OF ty_dev00160,
pkey TYPE zkey, "parameter key
item TYPE zitem, "Item No
value TYPE zvalue,
END OF ty_dev00160.
Constants
CONSTANTS: c_header(1) TYPE c VALUE 'H', "Header
c_true(1) TYPE c VALUE 'X', "value = x
c_v(1) TYPE c VALUE 'V', "Sales View
c_e(1) TYPE c VALUE 'E', "Purchasing View
c_d(1) TYPE c VALUE 'D', "MRP View
c_p(1) TYPE c VALUE 'P', "Forecasting View
c_a(1) TYPE c VALUE 'A', "Work Scheduling view
c_l(1) TYPE c VALUE 'L', "Storage View
c_q(1) TYPE c VALUE 'Q', "Quality View
c_b(1) TYPE c VALUE 'B', "Accounting
c_g(1) TYPE c VALUE 'G', "Costing View
c_f(1) TYPE c VALUE 'F', "PRT View
c_k(1) TYPE c VALUE 'K'. "Basic View
Internal tables
*Internal table to hold material no and material type
DATA: i_matnr TYPE STANDARD TABLE OF ty_matnr INITIAL SIZE 0.
*Internal table to hold plant
DATA: i_plant TYPE STANDARD TABLE OF ty_plant INITIAL SIZE 0.
*Internal table to hold marc data
DATA: i_marc TYPE STANDARD TABLE OF ty_marc INITIAL SIZE 0.
*Internal table to hold marc data
DATA: i_tmarc TYPE STANDARD TABLE OF ty_marc INITIAL SIZE 0.
*Internal table to hold mard data
DATA: i_mard TYPE STANDARD TABLE OF ty_mard INITIAL SIZE 0.
*Internal table to hold t001l data
DATA: i_sloc TYPE STANDARD TABLE OF ty_sloc INITIAL SIZE 0.
*Internal table to hold MRP Area
DATA: i_mdlv TYPE STANDARD TABLE OF ty_mdlv INITIAL SIZE 0.
*Internal table to hold already extended MRP Area
DATA: i_mdma TYPE STANDARD TABLE OF ty_mdma INITIAL SIZE 0.
*Internal table to hold MRP Area data from customized table
DATA: i_refmdma TYPE STANDARD TABLE OF ty_refmdma INITIAL SIZE 0.
*Internal table to hold success messages
DATA: i_succ TYPE STANDARD TABLE OF ty_succ INITIAL SIZE 0.
*Internal table to hold error messages
DATA: i_error TYPE STANDARD TABLE OF ty_error INITIAL SIZE 0.
*Internal table to hold mvke data
DATA: i_mvke TYPE STANDARD TABLE OF ty_mvke INITIAL SIZE 0.
*Internal table for company code data
DATA: i_bukrs TYPE STANDARD TABLE OF ty_bukrs INITIAL SIZE 0.
*Internal table for T001W data
DATA: i_t001w TYPE STANDARD TABLE OF ty_t001w INITIAL SIZE 0.
*Internal table for T134 data
DATA: i_t134 TYPE STANDARD TABLE OF ty_t134 INITIAL SIZE 0.
*Internal table for TWLAD data
DATA: i_twlad TYPE STANDARD TABLE OF ty_twlad INITIAL SIZE 0.
*Internal table for ADRC data
DATA: i_adrc TYPE STANDARD TABLE OF ty_adrc INITIAL SIZE 0.
*Internal table for dev00160 data
DATA: i_dev00160 TYPE STANDARD TABLE OF ty_dev00160 INITIAL SIZE 0.
*Internal table for qmat data
DATA: i_qmat TYPE STANDARD TABLE OF ty_qmat INITIAL SIZE 0.
Work areas
*Work Area for Internal table i_mara
DATA: wa_matnr TYPE ty_matnr.
*Work Area for Internal table i_werks
DATA: wa_plant TYPE ty_plant.
*Work Area for Internal table i_marc
DATA: wa_marc TYPE ty_marc.
*Work Area for Internal table i_t001l
DATA: wa_sloc TYPE ty_sloc.
*Work Area for Internal table i_mdlv
DATA: wa_mdlv TYPE ty_mdlv.
*Work Area for Internal table i_bukrs
DATA: wa_bukrs TYPE ty_bukrs.
*Work Area for Internal table i_refmdma.
DATA: wa_refmdma TYPE ty_refmdma.
*Work Area for Internal table i_succ
DATA: wa_succ TYPE ty_succ.
*Work Area for Internal table i_error
DATA: wa_error TYPE ty_error.
*Work Area for Internal table i_selfields
DATA: wa_selfields TYPE sdibe_massfields.
*Work Area for Internal table i_mvke
DATA: wa_mvke TYPE ty_mvke.
*Work Area for Internal table i_ref_data
DATA: wa_ref_data TYPE ty_ref_data.
*Work Area for internal table I_t001w
DATA: wa_t001w TYPE ty_t001w.
*Work Area for internal table I_t001w
DATA: wa_twlad TYPE ty_twlad.
*Work Area for internal table I_t134
DATA: wa_t134 TYPE ty_t134.
WOrk Area for ADRC Table
DATA: wa_adrc TYPE ty_adrc.
WOrk Area for MARD Table
DATA: wa_mard TYPE ty_mard.
*Work Area for Internal table i_mvke
DATA: wa_dev00160 TYPE ty_dev00160.
*Work Area for Internal table i_mvke
DATA: wa_qmat TYPE ty_qmat.
SELECTION SCREEN *
SELECTION-SCREEN : BEGIN OF BLOCK b_001
WITH FRAME
TITLE text-001 . "Start of selection-screen
SELECT-OPTIONS: s_matnr FOR mara-matnr. "Material Number
PARAMETERS : p_ersda LIKE mara-ersda. "Creation Data
SELECT-OPTIONS: s_werks FOR marc-werks NO INTERVALS. "Plant
SELECTION-SCREEN : END OF BLOCK b_001 . "End of Selection-screen
*& Include ZDMMMR_MM_MULTI_F00 *
*& Form sub_validate_matnr
Subroutine for validating material number
FORM sub_validate_matnr .
SELECT matnr "Material Number
mtart "Material Type
ersda "Creation date
mbrsh "Industry Sector
FROM mara "Table for General Material Data
INTO TABLE i_matnr
WHERE matnr IN s_matnr.
*If no material is found an error message is given
IF sy-subrc <> 0.
MESSAGE e001.
ENDIF.
ENDFORM. " sub_validate_matnr
*& Form sub_validate_plant
Subroutine to validate Plant
FORM sub_validate_plant .
SELECT werks "Plant
bwkey "Valuation area
FROM t001w "Table for Plants/Branches
INTO TABLE i_plant
WHERE werks IN s_werks.
*If no plant is found an error message is given
IF sy-subrc NE 0.
MESSAGE e002.
ENDIF.
ENDFORM. " sub_validate_plant
*& Form sub_get_mara
*Determine all the materials that need to be extended to new plants,
*storage locations and MRP areas
FORM sub_get_mara .
IF NOT s_matnr[] IS INITIAL.
SORT i_matnr BY matnr.
IF p_ersda IS NOT INITIAL.
DELETE i_matnr WHERE ersda NE p_ersda.
ENDIF.
ELSE.
*If only Creation Date is given
SELECT matnr "Material No.
mtart "Material Type
ersda "Creation date
mbrsh "Industry Sector
FROM mara "Table for General Material Data
INTO TABLE i_matnr
WHERE ersda EQ p_ersda.
IF sy-subrc EQ 0.
SORT i_matnr BY matnr.
ELSE.
MESSAGE i000 WITH 'No data found for given Selection.'(002).
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
Subroutine to get data from mvke.
PERFORM sub_get_mvke.
LOOP AT i_matnr INTO wa_matnr.
CLEAR wa_mvke.
READ TABLE i_mvke INTO wa_mvke WITH KEY matnr = wa_matnr-matnr
BINARY SEARCH.
IF sy-subrc EQ 0.
wa_matnr-vkorg = wa_mvke-vkorg.
wa_matnr-vtweg = wa_mvke-vtweg.
ENDIF.
IF wa_matnr-mtart = 'AD01'.
wa_matnr-mtartz = 'AD01'.
ELSE.
wa_matnr-mtartz = 'NAD01'.
ENDIF.
MODIFY i_matnr FROM wa_matnr TRANSPORTING vkorg vtweg mtartz.
ENDLOOP.
ENDFORM. " sub_get_mara
*& Form sub_get_werks
*Determine all the plants to which the Materials need to be extended
FORM sub_get_werks .
SELECT werks "Plant
bwkey "Valuation Area
FROM t001w "Check table for Plants/Branches
INTO TABLE i_plant.
IF sy-subrc EQ 0.
SORT i_plant BY werks.
ENDIF.
ENDFORM. " sub_get_werks
*& Form sub_get_marc
*Determine the status of the materials with respect to which plants
*they have already been extended to
FORM sub_get_marc .
CHECK i_matnr[] IS NOT INITIAL.
SELECT m~matnr "Material Number
m~werks "Plant
t~bwkey
INTO TABLE i_marc
FROM marc AS m "Table for Plant Data for Material
INNER JOIN t001w AS t
ON mwerks = twerks
FOR ALL ENTRIES IN i_matnr
WHERE matnr EQ i_matnr-matnr.
IF sy-subrc EQ 0.
*Append the plants that have been extended to
to the list of plants to which they have to be extended
only when no plants are given in the selection screen
IF s_werks IS INITIAL.
LOOP AT i_marc INTO wa_marc.
wa_plant-werks = wa_marc-werks.
wa_plant-bwkey = wa_marc-bwkey.
APPEND wa_plant TO i_plant.
CLEAR wa_plant.
ENDLOOP.
SORT i_plant BY werks bwkey.
DELETE ADJACENT DUPLICATES FROM i_plant
COMPARING werks bwkey.
ENDIF.
SORT i_marc BY matnr werks.
*Retrieve the Valutaion Area for the plants to which the material
*has already been extended.
SELECT werks "Plant
bwkey "Valuation area
INTO TABLE i_t001w
FROM t001w "Table for Plants/Branches
FOR ALL ENTRIES IN i_marc
WHERE werks = i_marc-werks.
*If selection succeed.
IF sy-subrc EQ 0.
Sort by Plant
SORT i_t001w BY werks.
ENDIF.
ENDIF.
*Copy the content of MARC into a temporary internal table
i_tmarc[] = i_marc[].
DELETE ADJACENT DUPLICATES FROM i_tmarc
COMPARING matnr.
*Retrieving Inspection type - material parameters (QMAT)
*data
SELECT matnr "Material Number
werks "Plant
art "Inspection Type
ppl "Inspection with Task List
spezueber "Inspect with Material Specification
conf "Inspection Specifications from
" Configuration
tls "Inspection Specifications from Batch
" Determination
app "Automatic Specification Assignment
mer "nspect by Characteristics
insmk "Post to Inspection Stock
ave "Automatic Usage Decision Planned
stichprver "Sampling Procedure
dynregel "Dynamic Modification Rule
sproz "Inspection Percentage
hpz "100% Inspection
dyn "Skips Allowed
mpb "Enter the Sample Manually
mst "Trigger Sample Calculation Manually
ein "Serial Number Management Possible
mpdau "Average Inspection Duration
chg "Control of Inspection Lot Creation (Lot
"Summary)
qkzverf "Procedure for Calculating Quality Score
qpmat "Allowed Share of Scrap (Percent) in
"Inspection Lot
kzprfkost "Record Appraisal Costs in Individual QM
"Order
aufnr_co "Order Number for Recording Appraisal
"Costs
aktiv "Inspection Type - Material Combination is
"Active
apa "Preferred Inspection Type
afr "Inspection for Handling Unit
mma "Field Not Used as of 3.0 Field
"Reserved for SAP
feh "Field Not Used as of 3.0 Field
"Reserved for SAP
prfrq "Field Not Used as of 3.0 Field
"Reserved for SAP
nkmpr "Field Not Used as of 3.0 Field
"Reserved for SAP
INTO TABLE i_qmat
FROM qmat "Table of "Inspection type - material
"parameters"
FOR ALL ENTRIES IN i_tmarc
WHERE matnr = i_tmarc-matnr "Material no. of temporary internal
"table
AND werks = i_tmarc-werks. "Plant of temporary internal table
*If selection succeed
IF sy-subrc EQ 0.
SORT i_qmat BY matnr.
ENDIF.
ENDFORM. " sub_get_marc
*& Form sub_get_mard
Determine the storage locations for the Plants i_plant.
FORM sub_get_mard .
CHECK i_marc[] IS NOT INITIAL.
SELECT matnr "Material Number
werks "Plant
lgort "Storage Location
FROM mard "Table for Storage Location Data for Material
INTO TABLE i_mard
FOR ALL ENTRIES IN i_marc
WHERE matnr EQ i_marc-matnr
AND werks EQ i_marc-werks.
*If selection succeed
IF sy-subrc EQ 0.
*Sort internal table by Material no , Plant and Storage Location
SORT i_mard BY matnr werks lgort .
ENDIF.
ENDFORM. " sub_get_mard
*& Form sub_get_t001l
Determine the storage locations for the Plants i_plant.
FORM sub_get_t001l .
CHECK i_plant[] IS NOT INITIAL.
SELECT werks "Plant
lgort "Storage Location
FROM t001l "Check table for Storage Location
INTO TABLE i_sloc
FOR ALL ENTRIES IN i_plant
WHERE werks EQ i_plant-werks.
*If selection succeed
IF sy-subrc EQ 0.
*Sort by Plant and Storage Location
SORT i_sloc BY werks lgort.
For all the storage location get the Storage Location Address
*Number
SELECT werks "Plant
lgort "Storage Location
adrnr "Address Number
FROM twlad "Table of 'Determination of Address from Plant and
"Storage Location'
INTO TABLE i_twlad
FOR ALL ENTRIES IN i_sloc
WHERE werks = i_sloc-werks
AND lgort = i_sloc-lgort.
*If selection succeed
IF sy-subrc EQ 0.
*Sort by Plant, Storage Location and Address number
SORT i_twlad BY werks lgort adrnr.
For all address numbers retrieved get the search term
SELECT addrnumber "Address number
sort2 "Search Term 2
INTO TABLE i_adrc
FROM adrc "Table of 'Addresses (Business Address
"Services)'
FOR ALL ENTRIES IN i_twlad
WHERE addrnumber = i_twlad-adrnr.
IF sy-subrc EQ 0.
SORT i_adrc BY adrnr.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " sub_get_t001l
*& Form sub_get_mdlv
Determine the MRP Areas to which the materials need to be extended.
FORM sub_get_mdlv .
CHECK i_sloc[] IS NOT INITIAL.
SELECT berid "MRP Area
werzg "Plant
ortzg "Receiving Storage Location
FROM mdlv "Table for Customizing MRP Area
INTO TABLE i_mdlv
FOR ALL ENTRIES IN i_sloc
WHERE werzg EQ i_sloc-werks
AND ortzg EQ i_sloc-lgort.
*If selection succeed.
IF sy-subrc EQ 0.
*Sort by Plant and Storage Location
SORT i_mard BY werks lgort.
ENDIF.
ENDFORM. " sub_get_mdlv
*& Form sub_get_zdmmm_mrp_area
Determine required fields w.r.t Plant and MRP Area from customized
*table
FORM sub_get_zdmmm_mrp_area .
CHECK i_mdlv[] IS NOT INITIAL.
*Retrieving MRP data from Customized table
SELECT zmtart "Material Type
zwerks "Plant
zberid "MRP Area
zdismm "MRP Type
zeisbe "Safety Stock
zdisls "Lot Size
zdispo "Mrp Controller
zfxhor "Planned Delivery Time (In Days)
FROM zdmmm_mrp_area "Customized table for MRP Area wrt
"plant and mat type.
INTO TABLE i_refmdma
FOR ALL ENTRIES IN i_mdlv
WHERE zberid = i_mdlv-berid
AND zwerks = i_mdlv-werzg.
*If selection succeed
IF sy-subrc <> 0.
*Sort by MRP Area and Plant
SORT i_refmdma BY zberid zwerks.
ENDIF.
ENDFORM. " sub_get_zdmmm_mrp_area
*& Form sub_mat_extn
For extending Material to Plant, all possible Storage Location and
corresponding MRP Area .
FORM sub_mat_extn .
*Local variable declaration
DATA: l_index TYPE sytabix. "For storing sy-tabix
DATA: l_counter TYPE i VALUE 0. "For formatting Error log.
DATA: l_sloc_extend TYPE c. "Flag for Extending the material
DATA: wa_dpop LIKE dpop. "For sending as a exporting
"parameter
DATA: wa_mdma LIKE mdma. "For sending as a exporting
"parameter
DATA: l_stat TYPE c. "For checking the Storage Location
"is Seviceable or not.
DATA: wa_bapireturn1 TYPE bapiret1. "Return Work area of
"'MD_MRP_LEVEL_CREATE_DATA'
*No material is selected.
CHECK i_matnr[] IS NOT INITIAL.
SORT i_plant BY werks.
SORT i_marc BY matnr werks.
SORT i_mard BY matnr werks lgort.
*For extending the material to Plant Storage Location and possible MRP
*Area
LOOP AT i_matnr INTO wa_matnr.
CLEAR wa_marc.
Checking whether Reference Material Exists or not
READ TABLE i_marc INTO wa_marc WITH KEY matnr = wa_matnr-matnr
BINARY SEARCH.
If no reference material exists..populate data for error log.
IF sy-subrc NE 0.
CLEAR wa_error.
PERFORM material_convert USING wa_matnr-matnr
CHANGING wa_error-mat.
wa_error-comm = 'Reference material is not maintained'(003).
APPEND wa_error TO i_error.
CLEAR wa_error.
CONTINUE.
ENDIF.
For retrieving the reference data
PERFORM sub_retrieve_refdata.
LOOP AT i_plant INTO wa_plant.
READ TABLE i_marc INTO wa_marc WITH KEY matnr = wa_matnr-matnr
werks = wa_plant-werks
BINARY SEARCH.
IF sy-subrc EQ 0.
-
Hi,
While creating new material types what things should be taken in to consideration?
If i want to create it by using copy function which ref. material type we should select and why?.e.g. ZSCRAP- Scrap MaterialDear Ashutosh ,
Grouping of Material that have same basic properties can be assigned to one material type.
While creating new material types following points to be considered as material type controls following things,
1) Material is intended for certain purpose ( For ex consumption)
2) Whether material Number to be assigned internally or externally
3) Number range intervals
4) Screen sequence & which screens to be appeared
5)Which user data can be entered
6) Which procurement type ( Internal or external)
7) Inventory management i.e. value & qty update required..
You can also change material type for a material under following conditions.
1) Old & new material type must be assigned to same account category,
OR
2) No. open PO ,stocks or reservations
I hope this will clarify your doubts,If found useful please reward points
Vivek Maitra -
Material Type not assosiated with Materials
Hi ,
I have a report in BW, where there are 4 Materials that are being displayed for which there are "no assosiated" Material Types and this information is coming from R/3 where these Materials have been assigned to a Material type .
These Materials and Material types are being entered through the respective variables when runing the report. When i click on the Materail variable to enter the values i dont see the 4 Materials( the one stated above) listed here. When i select material type as "not assigned" the report displays these 4 Materials in the report.
I also checked the master data in 0MATERIAL and i dont these 4 materials.
Please help me in solving this
Regards
ArjunI would like to clarify u one thing here.
1) Material Type is an Attribute of Material.
2) The values to these are entered through Variables while executing the report.
3) When I select the value for material type as "Not assigned" , only then these 4 material values get displayed.
4) From Point 3 above , it means that the data is loaded into BW.
5) I dont see these 4 Material values in all the following cases:
a) When i try to enter the Material values through the variable screen while running the report.
b) When i check the material values in the master data 0material. -
Material Type - with Account linking
Dear All,
In my present client they have materials like Spares,General Stores,Consumables and in SAP i sugeested client thet we Mix all in to one as Miscellaneous Items.Is it ok and But my question is when we are using consumable material it has to go some consumption account at the time of PO
And how to link all together with one account category reference.
suggest me any one
Thanks,
TiruHi,
You assign one ACR for the three mat. types
and you assign seperate valuation class to materials of each material type
you can assign diff GL accounts based on Mat type and Valuation class combination
ACR VAL class Mat type material gl account
0001 3000 mt1 m1 300001
0001 3000 mt1 m2 300002
0001 4000 mt2 m3 400001
0001 4000 mt2 m4 400002
Hope this will solve ur issue
Regards, -
Production confirmation in packing Material Type
Hi Experts
we have a requirement from our client during in process production, There are some bags whose units will be in Pcs, which are produced by consuming Fabric & later will be consumed in Final Product.
So can we do production in Packing material Type-VERP,as our costing dept requires Final Consumption to be booked against Packing material GL.
First we have to produce the same & consume it.
Please provide solution.
Regards
Sandeep PatilHi Sandeep,
Create Packing material under material type VERP.
Assign this material in the BOM of FERT material.
Maintain a Valuation Class for this material type and Maintain the G/L account.
Thanks and regards
Murugesan -
Control the authorization base on material type level
Dear Experts,
We want to control some users only can create or modify the material base on material type level .
For instance , user A only can modify the 'ROH' type material , he can not maintain any 'FERT' type material .
I set the authorization object 'M_MATE_MAR' in the user A's profile , but it doesn't work .....
System : SAP4.7 x 200
DB : oracle9i
Has someone can tell me it is possibile to control the maintain authorization base on material type level ?
Or give me some suggestions.....
Many thanks
Best Regards,
Carlos ZhangHi
Yes this works & the authorisation object found by you is also correct.
For the object - M_MATE_MAR
Maintain the activity 01,02,03
Maintain the authorisation group - each material type can be assigned to an authorisation group. In OMS2 , you can assign the authorisation groups to the material type.
For E.g if the material type is ROH- enter the authorisation group as ROH.
Ensure that the user does not have this object, As If this object is present in any other role with authorisation group as * then the * will overirde any value.
Thanks & Regards
Kishore
Edited by: Kishore Kumar Chiluka on Jun 13, 2008 11:18 AM
Maybe you are looking for
-
Unable to generate XML's for BLOB datatypes from Concurrent program
Hi All, I've a requirement to print images on rtf layout. Images are uploaded by end user through attahments men there are getting stored in fnd_lobs tables. for printing blob images we need to convert them into CLOB and generate XML's. I've done the
-
How do i add a custom ringtone to iphone 4s
how do i add a custom ringtone to an iPhone 4s? thx
-
i have a 3rd generation ipod, and a new macbook. ive tried installing the cd, but it says i need a networking update for mac os x, which i am not sure what it is and if it will actually help. is there another way to install my ipod besides the cd? or
-
F110 is not printing any checks
Hi Gurus FBZ5 and F-58 are printing checks but F110 is not. I am assuming when the first two Tcodes are printing, the config is done good enough. I am just not sure what is stopping F110 from printing. When I check 'Own Jobs' the F110 job is listed
-
Replacing the primary site server, SCCM 2012 R2
Hi, Setup is currently SCCM 2012 R2 with the primary site server on Windows 2008 R2 on a Hyper-V VM with a separate physical SQL server on 2008 R2 (Windows and SQL). I'm not making any changes to the SQL server at this stage. I want to completely rep