Default values in MM01
Hello experts ,
I want to default a value in MM01 transaction for the field Volume Unit (ERVOE ) based on a particular material type
Can any one tell me how can I do this ?? Is it possible to do with any exits/BADI/Customization ...!!
I tried with couple of BADIs but all are populating the data in the field at the time of saving , but I want it by default in the specified field.
Please suggest .
Hi John,
my name is Dieter?!
We have create the BADI via SE19
Implementation Name: ZBADI_MATERIAL_REF
Definition Name: BADI_MATERIAL_REF
Interface
Interface name: IF_EX_MATERIAL_REFERENCE
Name of implementing class : ZCL_IM_BADI_MATERIAL_REF
Method is CREATE_MATERIAL
in the CLASS ZCL_IM_BADI_MATERIAL_REF we have the Method
IF_EX_MATERIAL_REFERENCE~CREATE_MATERIAL which contails
the code.
The BADI is created under 4.6C and works also in ECC6.
Which release do you have?
Compare your creation with my values.
Regards, Dieter
Similar Messages
-
Set default value to a field in MM01
Hi Friends ,
Can anyone tell me that how can set a default value to field "Rounding Value" in tab "MRP1" when i go to transaction "MM01" . I tried to search user exit/Badi for the same but i didn't get OR can say not able to find.
PLEASE HELP ME.
THANKS IN ADVANCE.
KishorIn config, there is something called a rounding profile which I think will help you achieve what you want. Here is the path to the config task.
Implementation Guide for R/3 Customizing (IMG)
-->Logistics - General
-->Quantity Optimizing and Allowed Logistics Units of Measure
-->Maintain Rounding Profile
Here is the documentation related to that task.
<i>Maintain Rounding Profile
In this step you define rounding profiles for adjusting units of measure to match delivery or transport units.
Rounding profiles can be maintained on a general or plant-specific basis. General maintenance is recommended as this requires you to enter less data.
A distinction is made between static and dynamic rounding profiles.
A static rounding profile comprises the following:
Threshold value
Rounding value
The threshold value is the value from which the system rounds up to the next delivery quantity.
The rounding value is the value to which the system rounds up as soon as the threshold value has been reached.
Several combinations of threshold and rounding values can be defined for rounding profiles.
No logistics units of measure are taken into account with static rounding profiles. This means that the system rounds up statically to the rounding values entered in the profile and not to "full pallets", for example.
Dynamic rounding profiles comprise the following:
Rounding method
Rounding rule
Indicator to show that units of measure are to be condisered only if they are allowed for the vendor or recipient.
The rounding method controls how the system rounds off:
No rounding
Rounding to a multiple of the order or sales unit
Rounding to order or sales unit, and to logistics units
No rounding
You have to define an additional rounding rule if you want your profile to round off to whole logistics units. This rounding rule is the key used for grouping logistics units of measure. The group contains all the units to which the system can round off when using the profile.
You can also have the system include only those logistics units that are allowed for the vendor or recipient. Allowed units of measure are defined in unit of measure groups that can be used at material-vendor level or at material-plant level.
Example
a) Static rounding profile
A material has a base unit of measure of 1 piece. Purchases are made in cases (1 case = 5 pieces) or pallets (1 pallets = 8 cases or 40 pieces).
You maintain the static rounding profile as follows:
From To Rounded to
01 05 05
06 10 10
11 15 15
16 20 20
21 25 25
26 30 30
31 31 35
32 40 40
41 45 45
46 50 50
66 70 70
71 71 75
72 80 80
81 85 85
b) Dynamic rounding profile
To procure materials in lower price bands, you define rounding rules containing all pallets and cases that the relevant vendors can deliver. You enter a percentage for every pallet and case category that indicates the level to which a quantity is to be rounded up to the next unit of measure.
Rounding rule 01
Unit of measure Round up as of
Euro pallet 70% full
Pallet category 2 80% full
Case for euro pallet 65% full
Case category 2 75% full
You maintain a dynamic rounding profile using the rounding method "round to whole logistics units" and assign the profile rounding rule 01.
A material has a base unit of measure of 1 piece. Purchases are made in cases (1 case = 5 pieces) or pallets (1 pallet = 8 cases or 40 pieces). The system then rounds an order quantity of 68 pieces (= 40 + 28) to 2 Euro Pallets (= 80 pieces) because the second pallet is already 70% full.</i>
Hope this helps,
Srinivas -
User exits for mm01 to assign default value
experts,
when i have used exit MGA00002 and the corresponding function module EXIT_SAPLMG02_001 to assign the default values of mbrsh and mtart to the material number created during the course of the transaction mm01 i have written the following code in the INCLUDE ZXMG0U03
matnr+3 = matnr.
matnr+0(1) = mbrsh.
matnr+1(2) = mtart.
concatenate matnr0(1) matnr1(2) matnr+3 into matnr.
but default value is not getting assigned.
with regards.you just want to concatenate the mat type and indus sect to ur material num.
if it is then do this
go for MGA00001
in that u use
data: field1(18) type c,
concatenate the three fields using wmara like
wmara-matnr wmara-mbrsh wmara-mtart
into ur field field1
now write
cmara-matnr = field1.
if useful rewars
regards
Prakash Varun -
Default value for period indicator in MM01
Hello Gurus,
I have created a transaction for maintaining default value for period indicator in MM01 transaction. User has to maintain the period indicator for Material Type(MTART) and Plant(WERKS) before creating a material master. If it is not maintained, then error message will be generated saying that 'Maintain Period indicator for the Plant and Material Type'.
I have created an implementation for that in 'Y_BADI_MATERIAL_REF'. For Material type 'FERT' it is working fine.
But when i try to create a material of type 'RAW1' , im getting a error that 'Mandatory field Profit center is missing' which is already entered in the material master and is not in the part of forecast view i have created.
During my second testing, i got a different error MRP group 'Y0Y3' is not valid, though i entered it using F4 help.
When i commented my piece of code in the implementation, error disappeared..
Im very new to MM, please help me out gurus..
Thanks in advance.Thanks for your reply.
I know that it can be made as optional entry in OMS9 transaction. But when i deactivated my BADI, that error disappeared.
Is there any relation between the period indicator and profit centre ?
And also while creating a material, when i select the MRP group from the dropdown list(F4), whatever the group i select, im getting an error 'MRP group does not exists'. But when i deactivated my BADI, it disappeared.
Im really confused why am I getting such errors because of this BADI.
Please help me out... -
Set default value for price unit when creating material master data
HI: Every
could you tell me how to use user-exit or else ways to set default value(such as 1000) for field "Price unit" (MBEW-PEINH) when creating material master data(MM01)?
I have try to use Exit:EXIT_SAPLMGMU_001. However, this way cannot respones it.
thanks
HenryHi: Ihave find out a solution
Use BADI: BADI_MATERIAL_REF
SPROlogistics general enhancement supplement or change default data (industry)
And then creating a Implementation Name
Double click method: CREATE_MATERIAL
And then write code as below:
method IF_EX_MATERIAL_REFERENCE~CREATE_MATERIAL.
c_mbew-peinh = '1000' .
endmethod.
However, SAP still store '1000' in database evenif we change the default value such as 100 when we use TCode MM01.
in additional, we still use MM02 to change the default value such as '100'
can anybody tell me how to do?
thanks
Henry -
Initialize some fields in material master with default values
Hi,
I would like to initialize some fields in material master MM01 with default values.
for exemple in the view MRP1 there is a field MRP type I would like to initialize PD in the field as default value.
but when I go to the technical information there is no parameter id that I can use in SU3.
Do you know how I can the initialize the field those don't have parameter ID?
thank
DedeDear Glenn,
This is possible in SAP for this use T code MMD1 and create MRP profile and assign this MRP profile while creating material using MM01 in the organisation level put this created MRP profile. The values you maintained in this profile get copied to the material by default.
To maintain MRP profile go to MMD1->give your profile name...........> click on selection screen push button--->give here profile description--->select what MRP field which u want to make fixed one/default. if make fixed later you can not change--
>click on data screen 1 push button and maintain your value and save
sree -
Hello Guru's, How to setup default value to a field
Hello Guru's,,
will anyone guide me the procedure how to setup a default value to a field in mm01 SAP STD Transaction.
example: material description ' xxxxxxx ' , it should be constant for all materials.
full points for the answer
PVHi,
Pls look into it
These are the way to set the default values.
Step 1 :
CONSTANTS : P_MAKTX TYPE MAKT-MAKTX VALUE 'DESCRIPTION'.
STEP 2:
SET PARAMETER ID 'MAT' FIELD 'DESC'.
CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.
If it is useful reward points. -
Default Value is not getting displayed in SUN ONE Ldap
Hello,
I have created an attribute in slapd.user_at.conf and it is associated in slapd.user_oc.conf.
The attribute default value is given through SUN ONE Console. But, In our application the default value is not getting displayed.
We need the default value to run our applicatin. Can anyone help me for this issue
Regards,
K. Senthil KumarHi anandkumar,
I belive this issue can be resolved by changing the Query proprties for the perticular field.
Kindly check the Field proerties in query designer and ensure that Text is enabled ather than Key.
__Field property check up:__Go to query designer->click onn the field-> Right hand side in properties click on display tab-> select Text in drop down menu of Display as tab.
FURTHER CHECK UP: check the master data avaiulability for the perticular info object, if masterdata is not available, do the text data for txt data availability in report level.
Hope this helps you!!
Best Regards,
Maruthi -
How to load a default value in to a column when using sql loader
Im trying to load from a flat file using sql loader.
for 1 column i need to update using a default value
how to go about this?Hi!
try this code --
LOAD DATA
INFILE 'sample.dat'
REPLACE
INTO TABLE emp
empno POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
ename POSITION(06:15) CHAR,
job POSITION(17:25) CHAR,
mgr POSITION(27:30) INTEGER EXTERNAL NULLIF mgr=BLANKS,
sal POSITION(32:39) DECIMAL EXTERNAL NULLIF sal=BLANKS,
comm POSITION(41:48) DECIMAL EXTERNAL DEFAULTIF comm = 100,
deptno POSITION(50:51) INTEGER EXTERNAL NULLIF deptno=BLANKS,
hiredate POSITION(52:62) CONSTANT SYSDATE
)-hope this will solve ur purpose.
Regards.
Satyaki De. -
Assigning a default value to a field
Hello Everyone,
Could you please tell me how to assign a default value to a field in a transparent table, so that while creating an entry even if we don't enter the value, a default value will be assigned.
Thanks,
Anbu.Like this
DATA: BEGIN OF itab OCCURS 0,
field1 TYPE c VALUE 'X'
field2 TYPE c,
END OF itab.
append itab.
append itab.
You will have by default X set in both rows for field1.
Regards
Marcin
PS: Ooops I just noticed you meant transparent table but I wrote about internal one. As long as you maintain that table using maintenance view you can use event 05 - When Creating a New Entry and set fixed value for a field there. So whenever you create new entry it will receive that value.
Edited by: Marcin Pciak on Jun 23, 2010 8:57 AM -
SQLLDR - how to set a default value for an empty string
I'm using SQLLDR to load data from a flat file on Oracle 10g 10.2.0.4 EE, Linux RHEL 4 update 6. Seems like my question is simple, but darned if I can't find the solution.
My source file (comma delimited extracted form a different RDBMS) has some (not all) rows where the output for a string is "", and not NULL. How do I check for empty string and add a default value in the control file? The target column is non-nullable
Here's my current control file - however, the column attributeName where sometimes the source record is "" does not get evaluated as NULL.
load data
infile 'mydata.del'
badfile 'mydata.bad'
discardfile 'mydata.dsc'
into table mydata
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(l_metadata,
company,
className,
attributeName "decode(:vc_attributeName,null, 'none')",
attributeDefault)
{code}
When I tried decode with "", I received the following error:
{code}SQL*Loader-350: Syntax error at line 11.
Expecting "," or ")", found ", 'none')".
attributeName "decode(:vc_attributeName,"", 'none')", {code}
This does not work either:
{code}
load data
infile 'mydata.del'
badfile 'mydata.bad'
discardfile 'mydata.dsc'
into table mydata
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
(l_metadata,
company,
className,
attributeName NULLIF attributeName = BLANKS ,"decode(:vc_attributeName,null, 'none')",
attributeDefault) I get the following in the log:
Table COMPANYMETADATA, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
L_METADATA FIRST * , O(") CHARACTER
COMPANY NEXT * , O(") CHARACTER
CLASSNAME NEXT * , O(") CHARACTER
ATTRIBUTENAME NEXT * , O(") CHARACTER
NULL if ATTRIBUTENAME = BLANKS
SQL string for column : "decode(:attributeName,null, 'none')"
ATTRIBUTEDEFAULT NEXT * , O(") CHARACTER
Record 1: Rejected - Error on table COMPANYMETADATA, column ATTRIBUTENAME.
ORA-01400: cannot insert NULL into ("SRV5"."COMPANYMETADATA"."ATTRIBUTENAME")
{code}
Any help is appreciated -
Edited by: kpw on Feb 9, 2009 11:10 AMHello,
I just loaded following data successfully in my_data table using the same control file I posted. Yes it will evaluate "" as null and replace with none, remember in control file you have this option, "optionally enclosed by '"'.
#my_data.dat
"myname1", "attribname1"
"myname2", "attribname2"
"myname3", "attribname3"
"myname4", ""
#my_data.ctl
load data
into table my_data
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
my_name char(30),
vc_attributeName "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
{code}
Here is the output log file
{code}
Control File: my_data.ctl
Data File: mydata.dat
Bad File: mydata.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table MY_DATA, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
MY_NAME FIRST 30 , O(") CHARACTER
VC_ATTRIBUTENAME NEXT * , O(") CHARACTER
SQL string for column : "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
Table MY_DATA:
4 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 18560 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 4
Total logical records rejected: 0
Total logical records discarded: 0
Run began on Mon Feb 09 18:17:35 2009
Run ended on Mon Feb 09 18:17:36 2009
Elapsed time was: 00:00:00.98
CPU time was: 00:00:00.10
{code}
Hope this helps clearing your dobuts
Regards -
Multiple Default Values in a Multi-Select LOV Parameter?
Hi,
I have a report in BI Publisher standalone version 10.1.3.4. The report has a list of values called org_lov. This lov is attached to a multi-selection p_org_code parameter from which it is desirable to also have multiple default values.
For example, if org_lov has the following values:
100
101
102
103
104
105
106
I would like to have 3 default values and have 100, 101,105 as the defaults if the user doesn't specifically select anything from the LOV. So far my testing has only allowed a single default value.
Here are my settings:
Data type = string
Multiple Selection = checked
Can select All = checked (all values passed)
On the Default Value field, I have tried the following:
1. 100, 101,105
2. [100, 101,105]
3. '100', '101','105'
4. (100, 101,105)
5. ['100', '101','105']
6. ('100', '101','105')
I don't need these default values highlighted in the LOV, I just need it passed correctly to the query (a data template).
Thank you in advance for any input.Hi,
Sorry for the delayed reply. I tried what you suggested but the problem is that by having the "Multiple Selection" property of the parameter unchecked, the result is that it allows the user to only have a single value passed. The user wants the option to select multiple values AND also have the multiple default values.
Thanks anyway. -
Default value of BeX customer Exit variable not Displayed in WeBI??
Hello Experts,
We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
and we are on SAP BW 7.1 and BOXI 3.1 SP4.
Regards,
Vipul
Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PMHi,
See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
WebI will prompt when executed, but the default values calculated by the user exit - do not appear.
Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
Cause
This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
Characteristic variable > processing type > Customer Exit is "Supported, without user entry"
--> This should be understood as meaning "User will not be shown a prompt"
regards,
H -
Why the default value is not the Oracle recommended?
Why the default value is not the Oracle recommended?
In Oracle 10g, the default alocated unit of Oracle ASM is 1MB. But the Oracle ducumentation states that "To ensure a higher probability of one
logical I/O resulting in no more than one physical I/O, the minimum stripe depth should be at least twice the Oracle block size". ---See Performance Tuniing Guide (10g10.2 Page8-3.
It's inconsistent. What is right way?>
Why the default value is not the Oracle recommended?
In Oracle 10g, the default alocated unit of Oracle ASM is 1MB. But the Oracle ducumentation states that "To ensure a higher probability of one
logical I/O resulting in no more than one physical I/O, the minimum stripe depth should be at least twice the Oracle block size". ---See Performance Tuniing Guide (10g10.2 Page8-3.
It's inconsistent. What is right way?
The default database blocksize of 10g is 8k.
>
8 * 128 = 1024
128 >= 2
At least twice the size does not mean exactly the doubled size.
There is no contradiction between the documentation and your observation in this case.
Kind regards
Uwe
http://uhesse.wordpress.com -
Default Value in a DFF is not getting populated in Self Service Page
I had an issue in Self Service Page.
In the SS page there is hidden mandatory field in DFF segment,which should get populated with a default select statement.
But this field is not getting populated with the default values.
But this is working fine in Forms , i.e the default value is populated in forms.
Why the default value is not populated in Self Service Pages?
For Eg: If there is a DFF "SAMPLE_DFF" which has some context with segment
Context Code : GB_CODE
Segment : "Enter the Group"
and this segment is made required and defaulted with a select stmt (select stmt returns 'XXXXX')
In forms if am not entering any value, then its defaulted to 'XXXXX'.
But in Self Service this is not happening.
Can anybody help me out...Actually, I have narrowed down the problem. It is not quite the same.
DFF is Receivables, Address Information (Release 12). We have 2 attributes defined and we want the default value of the 2nd to be dependent on what the user selects in the 1st.
So the default value of the 2nd is defined as a SQL Statement, select :$FLEX$.INDUSTRY_CODE from dual (where INDUSTRY_CODE is the value set name from the 1st).
We know the syntax is correct because if we actually hardcode a default value in the 1st attribute (select 'BLAH' from dual), then we do see that the default value for the 2nd attribute fills in with BLAH as well. However, we do not want that. We want the user to choose a value for the 1st attribute from the LOV, and then have the 2nd attribute default to that same value. This is the part that does not seem to work in OAF, but definitely used to work in Forms.
Any thoughts?
Thanks much!
Maybe you are looking for
-
HT3965 How do i make a new device account for my iphone? It has synced to my ipod account
I purchased an Iphone 5 today. I plugged it into my computer and i opened itunes. Itunes asked if i wanted to created a new device account or if i wanted to connect to another device account. By accident, I clicked on my ipod device account and now m
-
I open my favorite forums website. When I open a thread in a new tab the window starts at the bottom. I have to scroll up to see the top of the thread.
-
Exception while running webutil demo
Hi, I am facing problem with a webutil unit. when I use client_tool_env.getvar function client_tool_env.getvar('NLS_LANG',:builtins.tool_env) +(under BUILTIT->NLSLANG (button) of webutil DEMO)+ I get this exception in the Java console and the webutil
-
How can I sort channels by a custom property?
Hello. I have written a script that creates a series of formatted charts in View. The data comes from TDMS files with several groups of channels with some custom properties assigned to the channels. I would like to sort the channels within each gro
-
Subform text flows off the page
My subform text in preview doesn't page break. It flows right off the page. And I do have "Allow Page Breaks within Content" checked inside the Object tab. What's wrong?