LSMW--Create Material master data
Hi,
When I use LSMW to create material master data, I set up all step, but when I go to last step "13 Run Batch Input Session", there is error message like "Select at least one view" in moudle SAPLMGMM, screen 0070, anybody can tell me what is problem, thanks a lot.
Hi,
This is due to error while recording for MM01,
Please do a Repeat recording and ensure that once the material number, industry sector and material type is entered, on the next screen you need to select all or at least a single view to create the MMR.
Regards
Merwyn
Similar Messages
-
Runtime error while creating material master data
hello sir,
i am facing one prolem while creating MATERIAL MASTER DATA.
AFTER GIVING ALL REQUIRED INFORMATION WHEN I AM GOING TO SAVE THE DOCUMENT ITS SHOWING ABAP RUNTIME ERROR.
MESSAGE TYPE: - MDS_KEYMAP.
MESSAGE CLASS: 001.
PLEASE TELL ME WHAT TO DO?
REGARDS..SIR THANK YOU FOR YOUR REPLY.
I ALREADY DONE THAT DUMP ANALYSIS.
SO PLEASE KINDLY GIVE ME IN DETAILS ABOUT THAT SOLUTION... -
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 -
Create Material Master Data with BAPI
Hi,
I don't know using of BAPI. I want using BAPI_MATERIAL_SAVEDATA bapi for creating material master data for Basic Data1, Basic Data2, Purchasing and MRP views. Does anybody can help me ?
Thank you
Good nightHi,
Please refer to the documentation below:
BAPI_MATERIAL_SAVEDATA
Short Text
Create and Change Article Master Data
Functionality
You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.
When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.
When changing material master data, you need enter only the material number.
In the header data, you must select at least one view for which data is to be created. Depending on the view selected, you must maintain other required parameters. If you do not enter values for all of the required parameters, the method is ended with an error message.
The corresponding fields in the tables (such as CLIENTDATA) must first be supplied with data by the calling program. An indicator must also be set for each of these fields so that the data is written to the database by the method. This requires the calling program to supply the corresponding field with the indicator in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain any language-dependent texts (MAKT, MLTX), International Article Numbers (MEAN), or tax classifications (MLAN). Several data records for a material can be created in these tables.
If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:
Check Units of Measurement
Define Countries
If you want to maintain long texts (basic data texts, internal comments, purchase order texts, material memos, or sales texts) or customer-defined fields for a material, some special conditions have to be observed. They are described in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
Parameters
HEADDATA
CLIENTDATA
CLIENTDATAX
PLANTDATA
PLANTDATAX
FORECASTPARAMETERS
FORECASTPARAMETERSX
PLANNINGDATA
PLANNINGDATAX
STORAGELOCATIONDATA
STORAGELOCATIONDATAX
VALUATIONDATA
VALUATIONDATAX
WAREHOUSENUMBERDATA
WAREHOUSENUMBERDATAX
SALESDATA
SALESDATAX
STORAGETYPEDATA
STORAGETYPEDATAX
FLAG_ONLINE
FLAG_CAD_CALL
NO_DEQUEUE
NO_ROLLBACK_WORK
RETURN
MATERIALDESCRIPTION
UNITSOFMEASURE
UNITSOFMEASUREX
INTERNATIONALARTNOS
MATERIALLONGTEXT
TAXCLASSIFICATIONS
RETURNMESSAGES
PRTDATA
PRTDATAX
EXTENSIONIN
EXTENSIONINX
Exceptions
Function Group
1001UEB
Thanks,
Sandeep. -
Hi,
Anybody can help me, how to make LSMW for Material master data.
Thanks in Advance
Arjunpls follow the thread:
http://help.sap.com/saphelp_46c/helpdata/en/f6/ca0766a7a911d1950500a0c930e0da/frameset.htm
regards,
indranil -
Zprogram to create material master data using bapi
can anyone send me a zprogram which uses a
bapi to create\update material master data .
thanks ,
Amithi,
here below a code sample that will help you
FORM execution .
DATA: is_headdata TYPE bapimathead.
DATA: is_clientdata TYPE bapi_mara.
DATA: is_clientdatax TYPE bapi_marax.
DATA: is_plantdata TYPE bapi_marc.
DATA: is_plantdatax TYPE bapi_marcx.
DATA: is_valuationdata TYPE bapi_mbew.
DATA: is_valuationdatax TYPE bapi_mbewx.
DATA: it_materialdescription TYPE bapi_makt OCCURS 0 WITH HEADER LINE.
DATA : is_storagelocationdata TYPE bapi_mard,
is_storagelocationdatax TYPE bapi_mardx.
*... views
is_headdata-material = mara-matnr.
is_headdata-ind_sector = 'M'.
is_headdata-matl_type = 'ROH'.
is_headdata-basic_view = 'X'.
is_headdata-purchase_view = 'X'.
is_headdata-mrp_view = 'X'.
is_headdata-account_view = 'X'.
is_headdata-cost_view = 'X'.
is_headdata-storage_view = 'X'.
*... constants
is_clientdata-pur_valkey = '3'.
is_clientdatax-pur_valkey = 'X'.
*... Données article générales (de l'écran)
is_clientdata-base_uom = mara-meins.
is_clientdata-matl_group = mara-matkl.
is_clientdata-mfr_no = mara-mfrnr.
is_clientdata-manu_mat = mara-mfrpn.
is_clientdata-pur_status = mara-mstae.
is_clientdata-old_mat_no = mara-bismt.
is_clientdatax-base_uom = 'X'.
is_clientdatax-matl_group = 'X'.
is_clientdatax-mfr_no = 'X'.
is_clientdatax-manu_mat = 'X'.
is_clientdatax-pur_status = 'X'.
is_clientdatax-old_mat_no = 'X'.
*... Description
it_materialdescription-langu = sy-langu.
it_materialdescription-matl_desc = makt-maktx.
APPEND it_materialdescription.
is_plantdata-sm_key = '000'.
is_plantdata-dep_req_id = '2'.
is_plantdata-availcheck = '02'.
is_plantdata-auto_p_ord = 'X'.
is_plantdatax-sm_key = 'X'.
is_plantdatax-dep_req_id = 'X'.
is_plantdatax-availcheck = 'X'.
is_plantdatax-auto_p_ord = 'X'.
is_plantdata-pur_status = mara-mstae.
is_plantdatax-pur_status = 'X'.
is_plantdata-profit_ctr = '100012'.
is_plantdata-proc_type = 'F'.
is_plantdata-determ_grp = 'Z001'.
is_plantdata-deploy_horiz = '000'.
is_plantdatax-proc_type = 'X'.
is_plantdatax-determ_grp = 'X'.
is_plantdatax-deploy_horiz = 'X'.
*... Plant data
is_plantdata-plant = marc-werks.
is_plantdata-pur_group = marc-ekgrp.
is_plantdata-abc_id = marc-maabc.
is_plantdata-mrp_type = marc-dismm.
is_plantdata-plnd_delry = marc-plifz.
is_plantdata-lotsizekey = marc-disls.
is_plantdata-safety_stk = marc-eisbe.
is_plantdata-mrp_ctrler = marc-dispo.
is_plantdata-iss_st_loc = marc-lgpro.
is_plantdata-sloc_exprc = marc-lgfsb.
is_plantdata-round_prof = marc-rdprf.
is_plantdatax-plant = marc-werks.
is_plantdatax-pur_group = 'X'.
is_plantdatax-abc_id = 'X'.
is_plantdatax-mrp_type = 'X'.
is_plantdatax-plnd_delry = 'X'.
is_plantdatax-lotsizekey = 'X'.
is_plantdatax-safety_stk = 'X'.
is_plantdatax-mrp_ctrler = 'X'.
is_plantdatax-iss_st_loc = 'X'.
is_plantdatax-sloc_exprc = 'X'.
is_plantdatax-round_prof = 'X'.
*... Valuation
is_valuationdata-val_area = marc-werks.
is_valuationdatax-val_area = marc-werks.
is_valuationdata-price_ctrl = 'V'.
is_valuationdata-price_unit = '1'.
is_valuationdata-val_class = '3000'.
is_valuationdata-qty_struct = 'X'.
is_valuationdata-orig_mat = 'X'.
is_valuationdata-price_unit = mbew-peinh.
is_plantdata-lot_size = mbew-peinh.
is_valuationdatax-price_ctrl = 'X'.
is_valuationdatax-price_unit = 'X'.
is_valuationdatax-val_class = 'X'.
is_valuationdatax-qty_struct = 'X'.
is_valuationdatax-orig_mat = 'X'.
is_valuationdatax-price_unit = 'X'.
is_plantdatax-lot_size = 'X'.
Storage
IF NOT marc-lgpro IS INITIAL.
is_storagelocationdata-plant = marc-werks.
is_storagelocationdata-stge_loc = marc-lgpro.
is_storagelocationdata-stge_bin = mard-lgpbe.
is_storagelocationdatax-plant = is_storagelocationdata-plant.
is_storagelocationdatax-stge_loc = is_storagelocationdata-stge_loc.
is_storagelocationdatax-stge_bin = 'X'.
ENDIF.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = is_headdata
clientdata = is_clientdata
clientdatax = is_clientdatax
plantdata = is_plantdata
plantdatax = is_plantdatax
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
storagelocationdata = is_storagelocationdata
storagelocationdatax = is_storagelocationdatax
valuationdata = is_valuationdata
valuationdatax = is_valuationdatax
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
IMPORTING
return = return
TABLES
materialdescription = it_materialdescription
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
returnmessages = it_returnmessages
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
endform.
Regards.
David -
Problem when creating material master data
Hi,
I use MM01 to create a material master data and save it, the system appears the material created successfully. But when I use MM03 to display the material, the system appears no this material exists in the system. I use ST22 find some runtime error: "Insert into MARA values MARA" .
How can I solve this problem?
Fiona ZhangHi,
Have you executed the MARA table by material name.
Then try with MARA-ERNAM field. Enter ur user id and then execute. lets see whether it is really created or not in ur system.
If u dont find any material created by ur name then go to SO01 transaction and check ur inbox....U will find some mails like update terminated.
U can talk to ABAPer to get this resolved.
Thanks & Regards,
Shaik Hussain -
How long does it take to create material master data from PO lines?
Hi ,
I was wondering if I could use an expert's opinion on the time and effort (FTEs) that goes into cleaning 50,000 PO lines that contain item descriptions to create a clean item master and a (basic) catalog.
The idea is:
To remove duplicates, invalid, non recurring/ redudant items
To create categories and sub categories (Standard - no coding)
Is there any defined tool and process-steps, not only for SAP but in general? Do consultants do this manually (with Excel spreadsheets) or some other means.
Any references will be very useful.
Thanks and regards.could be any time from a day to some months, just depends how big the mess is and how detailed the wishlist is and how well you want become.
Most consultants will do this probably with Excel as they are used to it.
Mixed tools can speed the process up if the people are used to those tools, or slow it down if they are not and need training before they can start.
Is it really only the description which will finally be different for some thousand materials that finally need to be created?
I would start with TAANA transaction, this would give me already an aggregated view on the items, as it can be used to group and count the items by description (and other parameters such as year) so it is down in seconds to the number of variations. Means the duplicates are eliminated.
Then you identify the one-time buys from previous years and remove them from the list (the output of TAANA can be worked on with Excel inplace)
Now starts the hard work to remove the garbage. This is usually a manual work, looking for typos which made this different from the same item with the correct description. And even identifying duplicates that are totally different written "Elbow - stainless steel" and "Stainless steel elbow" and far apart from each other in your list.
For this I use Excel with the Fuzzy Lookup Add-in
Watch some videos on youtube to see how it works, it's great.
And finally you load the materials with LSMW. If you are experienced with SAP material masters then you know which fields this materials need, they all could be defined as constants and your input file could only have the description, if that is really the only difference, which I actually don't believe. There might be differences in material group, in the unit of measure and usually in the purchasing group too (probably even more fields). And exact those differences in the other fields have to be considered in the cleanup too.
So, just technically eliminating duplicates and the worst garbage and all the one-time buys and finally load uniformed NLAG materials with just different descriptions could be done in a day. But the experience tells me that this can quickly evolve to a bigger long term project with harmonizing the way how the description will be written, harmonizing units and material groups. -
Dear sir,
how to create a material data using mm01.
explain step by step procdure..Hi
Transaction Recorder (SHDB)
How to Upload Presentation Server Flat file to SAP R/3 system???
How to upload application server file to R/3 system?
Definition
Example - Call Transaction Method
<b>Transaction Recorder (SHDB)</b>
Before you work with the Batch Input methods, you should know the purpose of the tool
Transaction Recorder.
Use:
You can use the transaction recorder to record a series of transactions and their screens.
Features:
You can use the recording to create
Data transfer programs that use batch input or CALL TRANSACTION
Batch input sessions
Test data
Function modules.
Note: It doesnt record F1, F4 and Scrollbar movements
<b>Upload Flat file from Presentation Server to SAP R/3</b>
CALL FUNCTION GUI_UPLOAD'
EXPORTING
CODEPAGE = IBM'
FILENAME = P_UFILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = INT_TAB
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10 .
IF SY-SUBRC NE 0.
MESSAGE E999(FR) WITH 'ERROR IN FILE UPLOAD'.
ENDIF.
<b>Upload file from application server to SAP R/3</b>
Open the the application server file
OPEN DATASET <dsn> FOR INPUT <mode>
Read the data from application server file
READ DATASET <dsn> INTO <wa>
And then close the application server file
CLOSE DATASET <dsn>
Definition- Declaring BDC Table
DATA: BDC_TAB LIKE STANDARD TABLE OF
BDCDATA INITIAL SIZE 6
WITH HEADER LINE .
The internal table used to collect the transactions information must be declared LIKE BDCDATA.
<b>Filling BDC Table Method #1</b>
FORM FILL_BDC_TAB.
REFRESH BDC_TAB.
CLEAR BDC_TAB.
BDC_TAB-PROGRAM = SAPMF02K.
BDC_TAB-DYNPRO = 01016.
BDC_TAB-DYNBEGIN = X.
APPEND BDC_TAB.
CLEAR BDC_TAB.
BDC_TAB-FNAM = RF02K-LIFNR.
BDC_TAB-FVAL = TEST1.
APPEND BDC_TAB.
CLEAR BDC_TAB.
BDC_TAB-FNAM = RF02K-D0010.
BDC_TAB-FVAL = X.
APPEND BDC_TAB.
CLEAR BDC_TAB.
BDC_TAB-PROGRAM = SAPMF02K.
BDC_TAB-DYNPRO = 0110.
BDC_TAB-DYNBEGIN = X.
APPEND BDC_TAB.
CLEAR BDC_TAB.
BDC_TAB-FNAM = LFA1-STRAS.
BDC_TAB-FVAL = 123 Main St..
APPEND BDC_TAB.
CLEAR BDC_TAB.
BDC_TAB-FNAM = BDC_OKCODE.
BDC_TAB-FVAL = /11.
APPEND BDC_TAB.
ENDFORM.
<b>Filling BDC Table Method #2</b>
FORM FILL_BDC_TAB.
REFRESH BDC_TAB.
PERFORM POPULATE_BDC_TAB
USING:
1 SAPMF02K 0106,
RF02K-LIFNR TEST1,
RF02K-D0010 X,
1 SAPMF02K 0110,
LFA1-STRAS, 123 Main St.,
BDC_OKCODE, /11.
ENDFORM.
FORM POPULATE_BDC_TAB USING FLAG VAR1 VAR2.
CLEAR BDC_TAB.
IF FLAG = 1.
BDC_TAB-PROGRAM = VAR1.
BDC_TAB-DYNPRO = VAR2..
BDC_TAB-DYNBEGIN = X.
ELSE.
BDC_TAB-FNAM = VAR1.
BDC_TAB-FVAL = VAR2.
ENDIF.
APPEND BDC_TAB.
ENDFORM.
This two subroutine method to fill the BDC table is preferable because the POPULATE_BDC_TABLE subroutine is reusable throughout all batch input programs.
<b>Example #1 - Change Vendor (Call Transaction Method)</b>
<b>Example #1- Declaration Section</b>
REPORT Y180DM10.
DATA: BDC_TAB LIKE STANDARD TABLE OF
BDCDATA INITIAL SIZE 6 WITH HEADER LINE.
INFILE(20) VALUE /tmp/bc180_file4.
DATA: BEGIN OF INREC.
VENDNUM LIKE LFA1-LIFNR.
STREET LIKE LFA1-STRAS.
END OF INREC.
PARAMETERS: DISPMODE DEFAULT A,
UPDAMODE DEFAULT S.
START-OF-SELECTION.
OPEN DATASET INFILE
FOR INPUT IN TEXT MODE.
DO.
READ DATASET INFILE INTO INREC.
IF SY-SUBRC < > 0. EXIT. ENDIF.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION FK02
USING BDC_TAB
MODE DISPMODE
UPDATE UPDAMODE.
IF SY-SUBRC < > 0.
WRITE: /ERROR.
ENDIF.
ENDDO.
CLOSE DATASET INFILE.
<b>synchronous updating</b>
DO.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION FK02
USING BDC_TAB
MODE N
UPDATE S.
IF SY-SUBRC < > 0.
WRITE: /ERROR.
ENDIF.
ENDDO.
With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.
<b>asynchronous updating</b>
DO.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION FK02
USING BDC_TAB
MODE N
UPDATE A.
IF SY-SUBRC < > 0.
WRITE: /ERROR.
ENDIF.
ENDDO.
With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.
<b>Error Handling</b>
Write an error report.
Send the record(s) in error to an error file.
Create a batch input session with the record(s) in error.
To store error messages ( CALL TRANSACTION )
data: begin of Tab_Mess occurs 0.
include structure bdcmsgcoll.
data : end of Tab_Mess,
CALL TRANSACTION FK02 USING BDC_TAB MODE N UPDATE S
MESSAGES INTO TAB_MESS.
IF SY-SUBRC NE 0.
WRITE: / Tab_MESS-TCODE, Tab_MESS-DYNUMB, Tab_MESS-MSGTYP ,
Tab_MESS-MSGID.
ENDIF.
<b>i am giving you example for Change Vendor you practice for ur tcode</b>
For our example, we will use the Change Vendor transaction (FK02) to add a street address to an already existing vendor.
<b>Step #1</b>
Use SystemStatus menu path to determine online program name (SAPMF02K), screen number (0110)
<b>Step #2</b>
Use F1 key and Technical Info pushbutton in each screen field to be filled to determine the field name.
<b>Step #3</b>
Determine how to proceed in the transaction
(save the record by clicking on the Save pushbutton or pressing the F11 key).
<b>BDC Table Contents</b>
After researching the transaction we can determine the contents of the BDC table.
PROGRAM DYNPRO DYNBEGIN FNAM FVAL
SAMPF02K 0106 X
RF02K-LIFNR TEST1
RF02K-D0110 X
SAMPF02K 0110 X
LFA1-STRAS 123 Main St.
BDC_OKCODE /11
<b>Batch Input Methods</b>
CALL TRANSACTION USING
STATEMENT
Call transaction - for data transfer
Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
Syntax:
CALL TRANSACTION <tcode>
USING <bdc_tab>
MODE <mode>
UPDATE <update>
A Display all
E Display errors only
N No display
S Synchronous
A Asynchronous
L Local update
<b>The process flow of CALL TRANSACTION</b>
A program that uses CALL TRANSACTION USING to process legacy data should execute thefollowing steps:
Prepare a BDCDATA structure for the transaction that you wish to run.
Prepare a internal table to store error messages Tab_Mess like structure of BDCMSGCOLL.
With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
CALL TRANSACTION MM01' USING BDCDATA MODE 'A' UPDATE 'S'. MESSAGES INTO TAB_MESS.
IF SY-SUBRC <> 0.
<Error_handling>.
ENDIF.
<b>Overview of Batch Input Session</b>
The first batch input method is to create a batch input session. It is the processing of this batch input session that updates the database, not the execution of the batch input program. i am giving you example for Change Vendor you practice for ur tcode
For our example, we will use the Change Vendor transaction (FK02) to add a street address to an already existing vendor.
<b>Step #1</b>
Use SystemStatus menu path to determine online program name (SAPMF02K), screen number (0110)
<b>Step #2</b>
Use F1 key and Technical Info pushbutton in each screen field to be filled to determine the field name.
<b>Step #3</b>
Determine how to proceed in the transaction
(save the record by clicking on the Save pushbutton or pressing the F11 key).
<b>BDC Table Contents</b>
After researching the transaction we can determine the contents of the BDC table.
PROGRAM DYNPRO DYNBEGIN FNAM FVAL
SAMPF02K 0106 X
RF02K-LIFNR TEST1
RF02K-D0110 X
SAMPF02K 0110 X
LFA1-STRAS 123 Main St.
BDC_OKCODE /11
<b>Batch Input Methods</b>
CALL TRANSACTION USING
STATEMENT
Call transaction - for data transfer
Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
Syntax:
CALL TRANSACTION <tcode>
USING <bdc_tab>
MODE <mode>
UPDATE <update>
A Display all
E Display errors only
N No display
S Synchronous
A Asynchronous
L Local update
<b>The process flow of CALL TRANSACTION</b>
A program that uses CALL TRANSACTION USING to process legacy data should execute thefollowing steps:
Prepare a BDCDATA structure for the transaction that you wish to run.
Prepare a internal table to store error messages Tab_Mess like structure of BDCMSGCOLL.
With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
CALL TRANSACTION MM01' USING BDCDATA MODE 'A' UPDATE 'S'. MESSAGES INTO TAB_MESS.
IF SY-SUBRC <> 0.
<Error_handling>.
ENDIF.
<b>Overview of Batch Input Session</b>
The first batch input method is to create a batch input session. It is the processing of this batch input session that updates the database, not the execution of the batch input program.
<b>Reward if usefull</b> -
Create a material master data.
Hello,
this code doesn't create a material master data.
Does it make sense to put additional views?
Thank you in advance.
DATA: w_bapimathead TYPE bapimathead.
DATA: i_bapi_makt TYPE TABLE OF bapi_makt,
w_bapi_makt TYPE bapi_makt.
w_bapimathead-basic_view = 'X'.
w_bapimathead-material = 'AAABBBCCCDDD'.
CLEAR w_bapi_makt.
w_bapi_makt-langu = 'EN'.
w_bapi_makt-matl_desc = 'Screwdriver'.
APPEND w_bapi_makt TO i_bapi_makt.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = w_bapimathead
TABLES
materialdescription = i_bapi_makt.
write:/.Ilhan,
We already take the time to reply to YOU here :
create material master data
Erwan -
What Function Module can be used to create vendor master data in SAP R/3?
Hello -
I've been trying to find a standard SAP delivered BAPI that can be used to create vendor master records in ECC 6.0. Up to this point I have not been able to do so. With SAP MDM solutions and SRM solutions it seems logical that SAP would deliver a standard BAPI that can be used to create vendor master records in the ERP/R3 environment (similar to the BAPI_MATERIAL_SAVEREPLICA for creating material master data records).
I have been able to find BAPI_VENDOR_CREATE but this only calls the online transaction and does not offer much additional functionality beyond what transaction code XK02 already offers.
The next best alternative appears to be IDOC_INPUT_CREDITOR but our preference would be to not use IDOCs for the project we are working on.
Can anyone offer any insight or personal experience on how vendor master records have been successfully interfaced with SAP R/3? Did you have to use IDOCs or create a custom RFC call? Thanks for the help!
Rich Wortmann
<< Personal information removed >>
Edited by: Rob Burbank on May 14, 2009 10:43 AMQuite a gap in the BAPI arsenal. I think the options are IDoc, which you don't want, good old program RFBIKR00 (requires flat file for input, can be used via LSMW) or DIY (very complex).
Thomas -
Create Material Master Record with Text
Hi, I am looking to create material Master Data via ABAP. I currently have some code that creates the Master Data Characteristic value I want, but I need the text as well. Can someone tell me what I need to do to add the text for the Master Data Characteristic value?
Here's what I have using CL_RSDMD_UPDATE_MASTER_DATA=>UPDATE_ATTRIBUTES_STATIC
TYPE-POOLS: RS, RSSM.
DATA: T_ZFREETEXT LIKE STANDARD TABLE OF ZFREETEXT.
DATA: T_INFO TYPE RSSM_S_MINFO.
DATA: RETURN_STATUS TYPE RSARR_T_IDOCSTATE.
DATA: RETURN_SUBRC LIKE SY-SUBRC.
DATA: MSG TYPE RS_T_MSG.
DATA: L_R_ACTIVATE_MASTER_DATA TYPE REF TO CL_RSDMD_ACTIVATE_MASTER_DATA.
INSERT ZFREETEXT INTO TABLE T_ZFREETEXT.
CALL METHOD CL_RSDMD_UPDATE_MASTER_DATA=>UPDATE_ATTRIBUTES_STATIC
EXPORTING
I_IOBJNM = '0MATERIAL' " Technical name of InfoObject
I_CHAVL_ENQUEUE = RS_C_FALSE
I_T_DATA = T_ZFREETEXT
I_S_MINFO = T_INFO
I_MONITORING = RS_C_FALSE
CHANGING
C_T_IDOCSTATE = RETURN_STATUS.
IF SY-SUBRC <> 0.
RETURN_SUBRC = 'Error happened'.
ELSE.
RETURN_MSG = 'Process Completed Successfully'.
CREATE OBJECT L_R_ACTIVATE_MASTER_DATA
EXPORTING
I_IOBJNM = '0MATERIAL'
I_P_Q_HAVE_TO_EXIST = RS_C_FALSE.
IF SY-SUBRC = 0.
L_R_ACTIVATE_MASTER_DATA->ACTIVATE(
IMPORTING
E_SUBRC = RETURN_SUBRC
CHANGING
C_T_MSG = MSG ).
ENDIF.
ENDIF.Dear Kenneth,
do you need to add master data during load of transaction data in planning scenario? If yes, you can do this with a planning function of type exit in the INIT function module.
I think you've to use the table ETO_CHAS (table for char. combinations) and all kind of char. combinations has to be transfered.
data:
l_s_chas type /1SEM/_YS_CHAS_"YOURCLIENT"YOURPLANNINGAREA",
l_r_co_area type range of /bi0/oico_area,
l_s_costcenter type /bi0/pcostcenter.
field-symbols:
<f_coar> type /bi0/oico_area,
<f_cctr> type /bi0/oicostcenter.
select * from /bi0/pcostcenter into l_s_costcenter
where co_area IN l_r_co_area
and objvers = 'A'.
<f_coar> = l_s_costcenter-co_area.
<f_cctr> = l_s_costcenter-costcenter.
INSERT l_s_chas INTO TABLE eto_chas.
endselect.
Regards, Clemens -
MDM Material Master data creation using Guided Procedures
Well, i searched a lot on the forums but didnt get any thing.
My requirement is to use MDM Java APIs for creating material master data using Guided Procedures. However, i got one nice document "[How to create master data centrally using guided procedure|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/92811997-0d01-0010-9584-f7d535177831]". This doc discuss about business partner creation and also have a link to downloadable file. But now when i click on this download link, it says download expired !
Can anyone please post a valid link to these deployable files?
Or anyone could post some usefull materail or links on the above mentioned requirement?
Kindly reply, any help will be highly appreciated.
Regards,
Ameya
Edited by: Ameya Pimpalgaonkar on Sep 27, 2008 11:29 AMWow, that was indeed a quick reply i have ever got on SDN. Thanks for the excellent link jitesh. However, where will i get the deployable files that it selects in the Import GP/CAF contents step of the demo? those are the webdynpro components files. One is SCA and other is SDA. Where will i get them?
Kindly post the link to those files if u have them or else send it across.
Regards,
Ameya
Edited by: Ameya Pimpalgaonkar on Sep 27, 2008 11:53 AM -
Copy Material Master data - cannot copy "Proportion/Prod.Unit" view
Hello,
When I try to create material master data using the "Copy from..." option, data from the "Proportion/Prod.Unit" view is not copied to the new material. We are using SAP for Mill products.
Any clues?
Regards,
JoaoHello Joao,
There are two things, which have to be done :
The first thing of course is, that for the field MARA-KZWSM the field
"Propose Field Content from the Reference" must be set in transaction
OMSR.
The second is, that the user have to enter this screen, because if he
don't display this screen, then it is technically not possible to
copy the reference values.
(To copy this data from the reference material you have to go to the
subscreen SAPLMWSM 8030 and press enter).
Regards,
Mauro -
Material master data BAPI and LSMW log
I have three questions want to ask :
1. I will use all the view to create material master. I want to know if there is one BAPI to create it.?
2. If I use LSMW to create it, in LSMW i use the BAPI method to create it. But I should to know the detail log information When I finished the LSMW. How can I get the log information ,because I should send the log information to other system. I must get the log, then I can send out the log information to other system.
3. I want to know if i can run lsmw in report. if there one FM to do this ? User don't want to step by step to run this , they want to run only once time so they can create the master data.
Thanks in Advance .
susanHi Ming,
Use the BAPIs:
BAPI_RETAILMATERIAL_CREATE.
BAPI_MATERIAL_SAVEDATA
refer the sample code
https://forums.sdn.sap.com/click.jspa?searchID=13348102&messageID=3459824
Regards,
Chandra Sekhar
Maybe you are looking for
-
How broken is it, what caused it and how can I get it fixed?
When I turned my iMac on it said "Safe Boot", what is that? The background was changed to the original image, it won't connect to the Internet via the airport (says "no airport card installed" which I've never come across ever), iTunes appears to hav
-
I uploaded content to the cloud without any problems or issues. (GREAT NEWS!) However the content appears as a gray box and does not open or do anything when you click on it. Can you help me? It looks like it uploaded completely but I am not sure how
-
LCD TV 40G300U -Always reverts back to 'Normal' when tv is turned off/on
Always defaults to 'Natural' after power cycle. Any ideas? Thanks Solved! Go to Solution.
-
Jdev freeze while waiting for "something"
Hi All, I have problem in my jdeveloper. everytime when i open my jsp file (contains ADF component) and it is freeze and when i look at the thread information, it is waiting for my internal db connection. If i try to comment out, it is fine but when
-
Howto install SAP NW Windows Server with Linux Oracle 11g?
Hi !!! In this moment i want to install a SAP Netweaver PI, but the client already has a linux database server with oracle. I read the MasterGuide but i cannot find the section or similar situation. Scenario WK8-PI 192.168.1.100 Admin y passwd Linux-