Field selection on material master by plant
Dear friends ,
Does anyone knows if I can configure material master field selection by PLANT ? which steps should we perform ?
best regards,
Ale
Hi,
Proceed as below;
1. OMS9 - Here copy a new Field Reference key (Give Code of your Plant) from "0001" and do field selection as per your requirement.
2. Then go to OMSA, here maintain Plant with Maintenance Status "KDEVALBPQSZXCFG" and assign the Field Reference key created in Step 1.
Now for this plant, field selection will work as per the above field selection method.
Similar Messages
-
Error Field selection in material master for Tax
While creating material master MM01 in Sales orgn tab when I am trying to save HST tax for Canada, it is disappearing. Although I have classified customer tax & material tax in IMG-Sales & distribution as 1 & 0 both.
In MM I can see HST either 0 or 1 when pressing F4
I tried Log General/Material Master/Field Selection/Maintain Filed selection for data screen
I tried 0001 group but when opened it gives various numbers for optional/required/supressed/display entry
Which number is used for TAX? I could not identified.
Can any one tell me what is transaction code for field selection group for material master for making Tax Required Field?
Thanks for help.Hello,
Tax problem is resolved by me only.
In Tax classification IMG/Sales & Dist/Taxes/Define Tax determination Rule
HST number was 4 I made as number 1 followed by CTX1 as 2 CTX2 as 3.....so on
So it picked up HST now as this was number one. Now in MM Tax is mandatory as I put 1 & in pricing it picked up. -
Add z field in material master at plant level
I wanna to assign a new field in material master at plant level..
What settings should be done to do this?
Positive response will be highly appreciated.
Regardshi,
You can define the field directly via assigning the field to field selection group...This could also be done at industry sector, plant level as well....
Check the path :
SPRO >> Logistics general >> MM >> Field selection >> Assign fields to field selection group...
SPRO >> Logistics general >> MM >> Field selection >> Assign field at plant
SPRO >> Logistics general >> MM >> Field selection >> Assign fields at industry sector level...
For this assign the field to the respective table and then provide it at OMSR...
Assign field selection group to it...
Then in OMS9 give the priority for hide/display/req/optional to field...
If you want this to be added in the new screen, then you have to make the settings under "configure the material master"...
Hope it helps..
Regards
Priyanka.P -
Plant specific fields in the material master for product move
Hi, SAP gurus,
My scenario is we are moving a existing product in US plant to Brazil plant. What are the fields in the material master that are specific to a plant that will change. For ex MRP controller will change from plant to plant. Like that can anybody please provide me a list of fields that i need to be looking at?
Thank you
AnushaHi Anusha,
First of all, list down all your materials those you want to extend to new plant.
a) Secondly, pay attention to those fields you will find "filled" in those materials at plant level.
b) MARC comes handy for you to analyse which fields are at plant level.
Intersection of fields with values between a and b are the ones you need to work out.
Good luck,
Regards -
Adding a Z field in the material master at the plant level
Hi,
I want to add a new text field in the material master.
The data maintained inthis field should be easliy retrievable using some STD SAP Report or using Abap query ( SQ01/SQ02)
Please advise how do i do it.
Regards,Hi,
I want to add a new text field in the material master.
The data maintained inthis field should be easliy retrievable using some STD SAP Report or using Abap query ( SQ01/SQ02)
Please advise how do i do it.
Regards, -
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.
-
Tax classification field of the material master - Mandatory
At the "Sales: sales org. 1" view of the material, there exist the tax classification field of the material master. How can I make this field mandatory?
Hi
Go to T-code OMSR
Select Field name MARA - TAKLV and click on the arroow sysmbol on the right against that line.
For Field Ref MM01 - select the radio button "Reqrd Entry".
Hope this answers your question
Regards
Madhu -
T.code for extend material master to plant
Hi
Is there any t.code (other than mm01) to extend the material master to plants?
regards
sesidharHi
RAj
THANK U so much fro ur information ,,and i want extend to storagelocation...i think it is not possible in MM50 T.code
in mm50 stor.loc option is not there
regards
sesidhar -
Field selection for Service Master
Hi
is it possible to differentiate the field settings based on the service category, i want to make few fields optional.
Thanks
AnkitHello Ankit ,
Please go into Transaction SPRO -> SAP Reference IMG -> Materials Management -> External Services Management ->
Service Master -> Field Display for Service Master -> Define Field Selection for Service Master ( Individual Maintenance ).
Click on the "Influencing" button. This is where you should be able to make the changes to each field for all of your Service Categories.
I hope this information has been helpful.
Best Regards,
Frank -
Making of fields mandatory in Material Master
Dear Gurus
I am working on ECC 5.0
I wanted to make mandatory fields for material master in some of the views ..
How to do that activity , can anyone give the clear cut idea about this how to do
Thanx in advance
Rgds
SuryaHi,
1. First go to OMS2 > Here for material type, get the "Field reference Key"
2. Then go to OMS9 > Here in search help of Field sel. group, search for relevant field and select it.
3. Now click on "Position" button and enter the Field reference Key got in Step1 and select it by pressing enter button. Now select "Reqd Entry" Radio button
Also use OMSR to find the Field Selection key assigned to the Group
You have to find the Field name of the material master field by pressing F1 and then F9 and get the field name then go for field selection -
Field required in material master
I want to use one field in material master with the some description and it should have Yes or No flag.
How to create this new field in material master.
ThxHi Vaibhav,
Please follow the following steps.
--> Goto Transaction OMT3B.
--> Select either 01 or 21 screen sequence and hit on the Data screens folder on the left.
--> Select the Screen 09 for Sales: Sales Org Data 1 and hit on the Subscreens folder on the left.
---> The next screen will display in order the list of Subscreens for this screen.
---> Before proceeding further, you need to copy the subscreen that you want to change (i.e the
subscreen where you want to enter the new field). You can identify the subscreen where you want
this field by clicking on the View Subscreen button on the right for each of the subscreens.
Create a new function group and copy the subscreen that you want to change. Make the necessary
modifications and add the relevant logic in the PAI for the data transfer.
---> Change the name of the program from SAPLMGD1 to the custom program only for the subscreen
that you modified. Also change the subscreen number just in case the new screen number is
differrent from the originial one. You can again test the subscreen for desired results by clicking
on the View Subscreen tab for the new screen you created.
---> Save, Exit and Test.
Hope this helps. Good Luck.
Regards,
Vamsee -
Change description of MVKE-PRAT7 field in SD material master
Dear,
Unfortunately I have issues with a translation of field PRAT7, but only in German Language.
I've did the translation via TCode CMOD - Goto-Text enhancements-Keywords-Change.
In our development and test system, the translation is shown correct. But if I check the material master in productive system, it still shows the old description in the German language. The English description is correct?
Do you have any ideas what the reason could be?
Thanks in advance.Couple of OSS notes you can refer for resolution;
1994468 - Generic labels for Product Attribute fields in Material Master
302116 - CMOD: Keyword change on screens
Regards, -
Mass deletion of material master at plant level
Hi,
Is there any way to flag materials nearly 500 Nos for deletion at plant level.
Regards,
Vengathi,
Use mass transaction for putting the delete indicator for the material master...this is to be done from MM17 tcode...
and later they all could archived...Archive it from MM71 and can display this from MM72..
Regards
Priyanka.P -
Query regarding fields in the material master
Hi Gurus,
We have a requirement where client wants to know the relevance of u201CBasic data textu201D and u201Cinspection textu201D tabs in material master (these appear when we click on additional data tab in material master) and also if we maintain text in these fields for a material where it will be reflected? for e.g where/in what transactions can we see these text appearing.
Please let me know the relevance of these two fields and where these can be reflected. It would be nice if you can also tell me the tables and fields for these two.
Regards,
Krishna MohanHello
This text are maintained in tables STXH and STXL.
For fetch this texts use FM READ_TEXT with parameters:
ID = 'GRUN' - for Basic data text
ID = 'PRUE' - for inspection text
and for both texts
LANGUAGE = sy-langu
NAME = material number (with leading zeros)
OBJECT = 'MATERIAL'
Maybe you are looking for
-
Client opening in production/Quality systems
Hi Gurus, I need your inputs on my thoughts regarding client opening in production or quality systems. Am a BASIS administrator and sometime we get requests from functional teams to open a production or quality client to do some direct changes which
-
AP not joining WLC via l3 network DTLS problem
Dear All, i have a problem which is annoying me so bad! I have the scenario you can see in the attached file. The problem i have is that during the CAPWAP registration the public AP contact as I expect (option 43 dhcp) via the public interface 1.1.1.
-
Hi Is there a way to access help files locally? Everytime I need to access the help files I get connected to thie internet and I have to wade through the site to find what I'm looking for. Sometimes I need to access help files whilst working where t
-
Create document numbers of POs at the time of creating
Hi gurus, has anybody experience with creating the document numbers of purchase orders when the POs are creating?? I can change the purchase order number when the PO is saving or booking but at the time of creating? I tried the extensions: M06B0003 N
-
Setting ID of VO through a service layer method
I have a VO based on EO which has mandatory ID field. Now i want to set this ID from a method in my service layer while creating new row of VO. How i can do this because when i presses submit button on my view, it gives me validation error that ID is