Regarding MM02
Hi,
I want to assign characteristic values for a material in 'MM02'.
I tried using BAPI_MATERIAL_SAVEDATA but i am not able to find the necessary fields.Is there another BAPI?
Hi Vishal,
To change the classification of any object you should use BAPI_OBJCL_CHANGE.
Regards,
John.
Similar Messages
-
MM02 Select View option releated
I would like to confirm my understanding regarding MM02 Select View popup screen where we get list of views like Basic data1, MRP 1, etc.
Is this views are only controlled in OMS2 and OMT3E for one particular material type?
Is there anyway where we can restrict these number of views to any specific user, if this can be done how these can be restricted?
Thank you very much
Regards,
ArvindHi,
1) control though spro
You can control the view through Logistics general--> Material master >Configuring material master> User setting.
Here you can select the User name & then select the view selection--> list of screen.
you can select the which you want control
2) better control form authorization object
restrict by authorization object:
M_MATE_STA ( for particular view authorization )
M_MATE_MAR with ( for particular material type authorization) -
HI,
I want to select basic data through select views tab in mm02 tcode . any body send me the logic to select the basic dataview in mm02Hi,
try this short example:
TABLES: MARA.
Definition der BDC-Tabelle
DATA: BEGIN OF BDCDATA OCCURS 500.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA: CTU_PARAMS_0 LIKE CTU_PARAMS.
DATA: IMARA TYPE TABLE OF MARA WITH HEADER LINE.
DATA: CURSORFIELD(20).
START-OF-SELECTION.
SELECT * FROM MARA INTO TABLE IMARA UP TO 30 ROWS.
LOOP AT IMARA.
WRITE: / IMARA-MATNR, IMARA-MATKL.
HIDE: IMARA-MATNR, IMARA-MATKL.
ENDLOOP.
END-OF-SELECTION.
AT LINE-SELECTION.
GET CURSOR FIELD CURSORFIELD.
CASE CURSORFIELD.
WHEN: 'IMARA-MATNR'.
PERFORM MM02 USING IMARA-MATNR.
WHEN: 'IMARA-MATKL'. WRITE: / CURSORFIELD, IMARA-MATKL.
ENDCASE.
FORM MM02 USING MATNR.
MOVE 'E ' TO CTU_PARAMS_0.
WRITE MATNR TO MATNR.
REFRESH BDCDATA.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0060'.
PERFORM BDC_FIELD USING 'RMMG1-MATNR' MATNR.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPLMGMM' '0070'.
PERFORM BDC_FIELD USING 'MSICHTAUSW-KZSEL(01)' 'X'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTR'.
CALL TRANSACTION 'MM02' USING BDCDATA OPTIONS FROM CTU_PARAMS_0.
ENDFORM. "MM02
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM. "BDC_FIELD
Regards, Dieter -
Need Help Regarding Material Characteristics Validation in MM02
Hello Experts ,
Here I am stuck with one requirement . I need to validate the combination of characteristics entered in MM02 transaction.
For this reason I have Implemented method MODIFY_INPUT of BADI CACL_VALUE_CHANGE . But this method captured characteristics one by one, not all at once. but as per my requirement I need all the characteristics at once to verify the combination.
How can I check and validate all the characteristics before the material is saved ?
Your help would be appreciated.Hi
Check the material master records of the materials M1 and M2 for the conversion ratios maintained between the base UOM and the case. Guess, the 0.3 case of the material M1 might be having units that are equal to one case of material 2.
The standard functionality is not related to the quantities. It is only to substitute the materials.
Thanks,
Ravi -
REgarding view selection in mm02 while using bdc
hi,
i m using function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views in single parameter 'selection'.
plz help me.
thnx in advance.We had to make a BDC recently for multiple views. For most of them we used BAPI_MATERIAL_SAVEDATA, but there are some views which are not available (Accounting 2 for example).
For others there are some other BAPIs, as BAPI_MATINSPCTRL_SAVEREPLICA for Quality Management, or BAPI_OBJCL_CHANGE fo Classification.
Anyway, for those views that need to be filled using BDC, the better way we have seen is to select at the beginning of BDC the Basic Data 1 view (which is always at the top of the list and is not dependent of the views that are available for a particular material) and then navigate between views with the following OK_CODEs:
Basic data 1 = SP01
Basic data 2 = SP02
External Objects = SP03
Classification = SP04
Sales: Sales Org. Data 1 = SP05
Sales: Sales Org. Data 2 = SP06
Sales: General/Plant Data = SP07
Foreign Trade: Export Data = SP08
Sales and Distribution Text = SP09
Purchasing = SP10
Foreign Trade: Import Data = SP11
Purchase order text = SP12
MRP 1 = SP13
MRP 2 = SP14
MRP 3 = SP15
MRP 4 = SP16
Forecast = SP17
Work scheduling = SP18
Production resources and tools = SP19
General Plant Data / Storage 1 = SP20
General Plant Data / Storage 2 = SP21
Warehouse Management 1 = SP22
Warehouse Management 2 = SP23
Quality Management = SP24
Accounting 1 = SP25
Accounting 2 = SP26
Cost Estimate 1 = SP27
Costing 2 = SP28
Plant stock = SP29
Storage location stock = SP30 -
REgarding view selection mm02 in bdc
hi,
i m usung function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views in single parameter 'selection'.
plz help me.
thnx in advance.
nullWe had to make a BDC recently for multiple views. For most of them we used BAPI_MATERIAL_SAVEDATA, but there are some views which are not available (Accounting 2 for example).
For others there are some other BAPIs, as BAPI_MATINSPCTRL_SAVEREPLICA for Quality Management, or BAPI_OBJCL_CHANGE fo Classification.
Anyway, for those views that need to be filled using BDC, the better way we have seen is to select at the beginning of BDC the Basic Data 1 view (which is always at the top of the list and is not dependent of the views that are available for a particular material) and then navigate between views with the following OK_CODEs:
Basic data 1 = SP01
Basic data 2 = SP02
External Objects = SP03
Classification = SP04
Sales: Sales Org. Data 1 = SP05
Sales: Sales Org. Data 2 = SP06
Sales: General/Plant Data = SP07
Foreign Trade: Export Data = SP08
Sales and Distribution Text = SP09
Purchasing = SP10
Foreign Trade: Import Data = SP11
Purchase order text = SP12
MRP 1 = SP13
MRP 2 = SP14
MRP 3 = SP15
MRP 4 = SP16
Forecast = SP17
Work scheduling = SP18
Production resources and tools = SP19
General Plant Data / Storage 1 = SP20
General Plant Data / Storage 2 = SP21
Warehouse Management 1 = SP22
Warehouse Management 2 = SP23
Quality Management = SP24
Accounting 1 = SP25
Accounting 2 = SP26
Cost Estimate 1 = SP27
Costing 2 = SP28
Plant stock = SP29
Storage location stock = SP30 -
Small Doubt Regarding SY-MANDT
Hi All,
SELECT changenr FROM cdhdr CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
WHERE mandant = syst-mandt
AND objectclas = 'MATERIAL'
AND objectid = wa_matl-matnr
AND tcode = 'MM02'.
I have written the select stament as shown above.
In this i have a doubt like adding a field sy-mandt in the where condition will increase the Efficiency of program or not.
regards,
raghu.Hi..
No doubt the efficency would be affected but from business point of view there will many things that need to be checked as in:
If you are viewing data from CDHDR and CDPOS which is client specific then you are not viewing complete data.
These tables give us and document changes made to a particular object in SAP but if anything is cross client like company code(lets assume) then changes to it wont be visible in all the clients..
so there can be some key information you can miss out while working on some of the objects.
else in this case its good to make query cross client.
regards
vishal -
How to get the values inputted by the user in Classification view of MM02
Hello,
Does anyone know how to get the inputted values in Classification view of MM02/MM01? I tried to use CLAF_CLASSIFICATION_OF_OBJECTS but this gets the values that is currently saved in the tables and not the values that the user recently inputted in the screen.
Regards,
Alfredhi
try this...
How to Display the Batch Characteristics in BOM? -
Upload Purchase order text using BDC while updating Material Master MM02
Hi All,
Please help me out with sample code upload PO Txt ( long text...which is more than 72 chars)using MM02. Its very urgent
I am not able to pass data into following fields seen in recording,
RSTXT-TXLINE(02),
RSTXT-TXLINE(03),
RSTXT-TXLINE(04),
RSTXT-TXLINE(05), as we can see only RSTXT-TXLINE field in the RSTXT structure......
how to split the long text into 72 chrs each and pass into data into the RSTXT-TXLINE(02), RSTXT-TXLINE(03), RSTXT-TXLINE(04)....correspondingly........
Thanks in advance.....
Reagards,
Prasad KR.Hi
see the sample program
REPORT zmm_longtext
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab1 OCCURS 0,
matnr LIKE mara-matnr, " Material
text1 LIKE tline-tdline, " Long Text
text2 LIKE tline-tdline, " Long Text
text3 LIKE tline-tdline, " Long Text
text4 LIKE tline-tdline, " Long Text
text5 LIKE tline-tdline, " Long Text
text6 LIKE tline-tdline, " Long Text
text7 LIKE tline-tdline, " Long Text
text8 LIKE tline-tdline, " Long Text
text9 LIKE tline-tdline, " Long Text
text10 LIKE tline-tdline, " Long Text
text11 LIKE tline-tdline, " Long Text
text12 LIKE tline-tdline, " Long Text
text13 LIKE tline-tdline, " Long Text
text14 LIKE tline-tdline, " Long Text
text15 LIKE tline-tdline, " Long Text
text16 LIKE tline-tdline, " Long Text
text17 LIKE tline-tdline, " Long Text
text18 LIKE tline-tdline, " Long Text
text19 LIKE tline-tdline, " Long Text
text20 LIKE tline-tdline, " Long Text
text21 LIKE tline-tdline, " Long Text
text22 LIKE tline-tdline, " Long Text
text23 LIKE tline-tdline, " Long Text
text24 LIKE tline-tdline, " Long Text
text25 LIKE tline-tdline, " Long Text
END OF itab1.
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr, " Material
text LIKE tline-tdline, " Long Text
END OF itab.
To create Long Text lines for CREATE_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for CREATE_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras, " Language
gv_matnr TYPE matnr.
Constants
CONSTANTS:
Object ID for Long Text of Material Basic Data 1
c_best TYPE thead-tdid VALUE 'GRUN',
c_material TYPE thead-tdobject VALUE 'MATERIAL'. " Object
Parameters
PARAMETERS p_file LIKE rlgrap-filename.
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start Of Selection
START-OF-SELECTION.
*To Upload Flat file
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
SORT itab1 BY matnr.
LOOP AT itab1.
CLEAR gv_matnr.
SELECT SINGLE matnr INTO gv_matnr
FROM mara WHERE bismt = itab1-matnr.
IF itab1-text25 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text25.
APPEND itab.
ENDIF.
IF itab1-text24 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text24.
APPEND itab.
ENDIF.
IF itab1-text23 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text23.
APPEND itab.
ENDIF.
IF itab1-text22 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text22.
APPEND itab.
ENDIF.
IF itab1-text21 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text21.
APPEND itab.
ENDIF.
IF itab1-text20 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text20.
APPEND itab.
ENDIF.
IF itab1-text19 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text19.
APPEND itab.
ENDIF.
IF itab1-text18 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text18.
APPEND itab.
ENDIF.
IF itab1-text17 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text17.
APPEND itab.
ENDIF.
IF itab1-text16 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text16.
APPEND itab.
ENDIF.
IF itab1-text15 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text15.
APPEND itab.
ENDIF.
IF itab1-text14 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text14.
APPEND itab.
ENDIF.
IF itab1-text13 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text13.
APPEND itab.
ENDIF.
IF itab1-text12 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text12.
APPEND itab.
ENDIF.
IF itab1-text11 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text11.
APPEND itab.
ENDIF.
IF itab1-text10 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text10.
APPEND itab.
ENDIF.
IF itab1-text9 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text9.
APPEND itab.
ENDIF.
IF itab1-text8 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text8.
APPEND itab.
ENDIF.
IF itab1-text7 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text7.
APPEND itab.
ENDIF.
IF itab1-text6 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text6.
APPEND itab.
ENDIF.
IF itab1-text5 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text5.
APPEND itab.
ENDIF.
IF itab1-text4 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text4.
APPEND itab.
ENDIF.
IF itab1-text3 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text3.
APPEND itab.
ENDIF.
IF itab1-text2 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text2.
APPEND itab.
ENDIF.
IF itab1-text1 NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text1.
APPEND itab.
ENDIF.
CLEAR itab.
ENDLOOP.
DELETE itab WHERE matnr EQ ' '.
Upload the Texts
SORT itab BY matnr.
LOOP AT itab.
dt_lines-tdformat = 'ST'.
dt_lines-tdline = itab-text.
APPEND dt_lines.
dl_lan = sy-langu.
dl_name = itab-matnr.
Call the Function Module to Create Text
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = c_best
flanguage = dl_lan
fname = dl_name
fobject = c_material
save_direct = 'X'
fformat = '*'
TABLES
flines = dt_lines
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Long Text Creation failed for Material'(001),
itab-matnr.
ELSE.
WRITE:/ 'Long Text Created Successfully for Material'(002),
itab-matnr.
ENDIF.
AT END OF matnr.
REFRESH dt_lines.
ENDAT.
ENDLOOP.
Reward points for useful Answers
Regards
Anji -
Display mode for Material Description in MM02 for Partucular User/UsrGroup
Dear friends,
I required to set: Display mode for Material Description in MM02. (Configured thruu2019 Maintain field selection to data screen)
For Particular User / User group, it should be Change mode. How to achive this. Please advice.
Thanks and regards,
RAMANHi,
I don't think you can realize it, because in SAP system there are 6 influncing factors:
Material Type
Plant
Industry sector
Transaction
Procurement indicator
SAP Delivery
Field selection is controlled by field references. You can assign field references to the influencing factors material type, plant, and industry sector in Customizing. SAP maintains the assignment of the field reference to the transaction codes, to the procurement types, and for the SAP delivery. You cannot change this assignment of these field references in Customizing.
So from my point of view, you can't use the factors of material type, plant and industry sector to distinguish different users' authorization.
Good day
Tao -
Block material description in MM02|
Hi,
Is there any settings to block users permissions for modify material master description in MM02?
Thanks
Jorge GHi,
Transaction variant will be a good option for you. Go to SHD0 transaction and create a new transaction variant for MM02. Maintain the material description field as "output only" and save the variant.
Please note that you have to maintain the variant with material description as output only for all the material master views.
You can assign the variant to all required users, who doesnt want to change the material description, then create a variant group and assign accordingly.
Refer the doc: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a070bfbb-d34a-2d10-b092-ecbe0b0d4a4c?quicklink=index&…
Regards,
AKPT -
Change material description in MM02
Hi,
System is allowing to change the material description in MM02 from any views.
Requirement is once the material code save, system should allow to change the description of product to user who have authorisation for Basic data 1 and 2 not other views.
Like I am giving Accounting view authorisation to one person, he should not able to change the product description.
Is it possibel and how?
Thanks,
Samir BhattHi,
Description is part of MARA table. If you give full authorization for General data fields to the persons that maintain basic 1 & 2 and does not give this authorization to the persons that are not allowed to change the description, you will achieve what you want. This will allow the financial people to see the general data fields but they will not be able to change them.
Regards,
MdZ -
How to insert sales text (MM02) into a single record of a Ztable.
Hi,
I'm extracting data from different data base tables and populating a Ztable which has Matnr as primary key and sales text as a field.
I have already used READ_TEXT to display the text and it is displayed in multiple records which in turn leads to duplication of Material numbers.
Now I want to avoid duplication of records (Matnr) as this being a primary record, and display the sales text of a particular material number into one single record.
Can anyone tell me how to insert sales text (MM02) transaction into one single record.
Thanks,
Govindsorry i am not enough clear about your requirement...
as i can understand i am explaining to you.
suppose your itab contains repaeating matnr.
matnr
1
1
2
2
2
3
3
like this.
data : text(200),
matnr like mara-matnr.
loop at itab.
call READ_TEXT fnmodule.
loop at tline.
concatenate text tline-tdline into text.
endloop.
matnr = itab-matnr.
at end of matnr.
itab1-matnr = matnr.
itab1-text = text.
append itab1.
clear text.
endat.
endloop.
NB change the code as per your requirement
regards
shiba dutta -
F4 help for field old material No in MM02 tcode
Hi Gurus,
I want to add F4 help to Old material No Field in MM02 Tcode.
I searched all possible Exits but couldnt find any one which triggers in the PBO.
Please give me suggestions.
Regards,
MilindHi,
In program SAPLMGD1 look for screen 2001. You can look for from here.
The other way you can create a program and put the field old mat. number here and match this field with your search help. Than with tcode OMT3B you can put this program to materal master basic data / general data 1 tab.
I hope this will help you.
Regards,
techmaster -
Set cursor in a specific view of transaction MM01/MM02
Hi,
We have to check a condition in the user-exit EXIT_SAPLMGMU_001, for transaction MM01/MM02, and if the condition fails the client wants to set the cursor in a specific field from a specific view. Is it possible? I tried to use the sentence SET CURSOR referenced to a remote program but it doesn't work.
Does anybody knows how to solve this problem?
Thanks in advance
Regards
MaribelHi
I hope, you have read the documetation attached with this Standard Enhancement - MGA00001.
EXIT_SAPLMGMU_001
Where Is the Customer Exit - EXIT_SAPLMGMU_001 called?
The customer exit is in function module MATERIAL_UPDATE_ALL. The
function module checks the data for errors (logical relationships,
foreign keys, fixed domain values, and so on) when the material master
is updated.
Use
o New fields
You can make checks possible for new fields of your own. These
checks must be identical to the checks that you carry out for your
new fields in online maintenance.
o Existing fields
For existing fields, you can extend and intensify the checks.
You can also change data for descriptions and general material data
(MARA). For example, the descriptions can be generated from attributes
of the material.
Limitations
You cannot bypass existing checks.
Interface to Application
The respective data of the current logical transaction is contained in
the structures, for example, in structure WMARA for MARA. Nonrelevant
structures are transferred with their initial values.
General material data that can be changed (CMARA) has the structure
MARU. This MARA view contains fewer internal fields than MARA itself. If
WMARA is filled, CMARA is also filled when accessed.
The customer exit contains the exception APPLICATION_ERROR for your
self-defined error situations.
Using the language element MESSAGE .. RAISING APPLICATION_ERROR, you can
terminate the current (logical) transaction and display your message in
the log.
Also, I guess, have you put some code in the Includes available with the EXITS and then activated the Project in CMOD.
<b>Reward points</b>
Regards
Maybe you are looking for
-
Audiobooks no longer play in itunes 10.5
Downloaded itunes 10.5 and installed. Now my audiobooks will not play, the progress bar moves, but no audio. I have de-autherized and re-autherized audible. Even books that are not from audible won't play. Other media: songs, podcasts, video, plays
-
Hi. There is a 3 column div layout on a page. I have one to float left 10% wide, one to centre 80% wide and one to float right 10% wide. This seems to be fine. I want to put a vertically repeating background in the left and right divs. I have done th
-
SQL agent scheduling for SSIS package
I have a package with a souce and destination connection using login as 'sa'. I created a scheduling task to call this package for running. However the sql agent service is running as domain user . It required to be running as domain user as per requ
-
Ipod touch stopped working on my docks
I got the new update a few days again and today when try to play my music throw the tv and the docks, it does not work. i have reset at and still nothing. so one help me
-
How do i reset a locked ipod touch, how do i reset a locked ipod touch
PLEASE HELP ME?!?!?!?!!?!?1