How to Create material master workflow
Hi All,
Can anybody tell me how to create material master workflow?
i need to customize the workitem for creating data in different views in MM01 transaction with restriction to particular user.
Regards,
Priti
Hi,
This link is to display a material.My requirement is to create a workflow which will allow a responsible person to enter data for specific department data e.g Purchase,Accounting etc.Initially anyone can create data using basic data1 and basic data2 views.After this my workflow will be triggered and it will go to next person who is responsible to enter Purchase data and then Accounting data.
Plz help me to create different views with respect to person.
Thanks in advance.
Similar Messages
-
Create Material master workflow
Hi I need to create a workflow that firstly creates a material with the basic data views (in the background) using passed in data, and the next step will then trigger some tasks to create material views. But I can't find a business object to do this. I have found BUS1001 but the create method is now obsolete, and I am not sure how I am meant to populate the attributes of BUS1001006?
I am not sure how I am meant to populate the attributes of BUS1001006
No worries, you are on the right path. The BOR which you found is the right one , now what you have to do is in order to pass the values when the material is created , you need to first give the START EVENTS in the workflow basic data and actiavte the binding. And before this you need to create a container element in the workflow I hope it is MATNR , for more information regarding the parameters check the event parameters of the BOR BUS1001006 and the event CREATED then you can get a idea on what all the elements that are required to create in the WF, after declaring the container elements in the workflow. the simple thig you have to do is BINDING.
Now create a material, by default the parameters are passed to the workflow that you designed. -
Re : Material Master Workflow
Hi Friends,
I'm in the process of creating Material Master Workflow (i.e) Basic data will be created by one person (initiator) and the workflow gets started and various views will be created by different people.
Usine BUS1001006 methods Getmissedviews and createviews i'm sending workitems to the respective persons for creating views. The method CreateView is an asynchronous task hence the terminating event is required.
The problem i'm facing is even if one view is created , the workitems in other's inbox is removed.
Can any one help me onthis regard.....
Regards,
VijayHai Vijayasekar
Check the following
Check the below PDF file on Workflow:
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
There is a good book from SAP Press that I would
recommend as a starting point.It's called Practical Workflow for SAP and it is by Alan Rickayzen.
http://www.sap-press.com/product.cfm?account=&product=H950
I am giving you links for Workflow....
/people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
http://help.sap.com/saphelp_erp2005/helpdata/en/fb/135962457311d189440000e829fbbd/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://www.sapgenie.com/workflow/index.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
Go through the following:
1) Goto Tcode PFTC : Standard Task > Create Button>Workflow Templete
For Create Container
Element : ZBUS1001006
Name : ANy Name
Description
Data Type & Properties
Data Type:
select Object Type : BOR Object Type for BUS1001006
Properties:
Parameter Settingd : check all Import, Export & Mandatory Checkboxes
Basic Data :
Abbr : Create_View
Name : Some Name
Work Item Text : Create View Material & -
Click on DELE Button & Select Material From The List
Object Catagory : BOR Object Type
Object Type : BUS1001006
Method : View
Triggering Events
Obj Catagory Object Type Event
BOR Object BUS1001006 View
activate it
Enter on BUS1001006 Object Type you will get Quadratel<> Button after that
double click on Quadratel<> button you get green button
after that the system will generate the task No.
check in the Event linkage Tcode : SWETYPV
if you find an entry with your Workflow and linkage active
goto Tcode : SWEC click on New Entries
Change Doc Obje Obj Cat Obj Type Event on create
Material BOJ Obje BUS1001006 View Option Button(Checked)
save this
goto Tcode : SWEC
Change Doc Object : Material
Obj Catagoty : BOR Type
Obj Type : BUS1001006
Event : View
Check with On Create Button
Goto SWETYPV
Obj Catagoty : BOR Type
Obj Type : BUS1001006
Event : View
Receiver Type : Some Work Flow No: WS80000431 like this
Click on Work flow Builder
Regards
Sreeni -
How to create material using BAPI Methods?
hi,
how to create material master dat using BAPI?
could u guide me
i will be waiting for reply.
REGARDS
ESWAR.Hi eswar,
Try this code to create gods mmovement...
DATA: GOODSMVT_HEADER LIKE BAPI2017_GM_HEAD_01,
" Material Document Header Data
GOODSMVT_CODE LIKE BAPI2017_GM_CODE,
" Assign code to transaction for BAPI goods movement
MATERIALDOCUMENT LIKE BAPI2017_GM_HEAD_RET-MAT_DOC,
" Number of Material Document
GOODSMVT_ITEM LIKE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER
LINE,
" Create Material Document Item
RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE
" Return table for messages
*Fill values in header
GOODSMVT_HEADER-PSTNG_DATE = '20030825'.
GOODSMVT_HEADER-DOC_DATE = '20030802'.
*Fill GOODSMVT_CODE
GOODSMVT_CODE-GM_CODE = '05' .
*Fill Item Table
GOODSMVT_ITEM-MATERIAL = '100-100'.
GOODSMVT_ITEM-PLANT = '1000'.
GOODSMVT_ITEM-STGE_LOC = '0001'.
GOODSMVT_ITEM-MOVE_TYPE = '501'.
GOODSMVT_ITEM-ENTRY_QNT = '50'.
GOODSMVT_ITEM-ITEM_TEXT = 'Test Sanket'.
*GOODSMVT_ITEM-COSTCENTER = '1000'.
APPEND GOODSMVT_ITEM.
*Create Good's movement
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GOODSMVT_HEADER
GOODSMVT_CODE = GOODSMVT_CODE
IMPORTING
MATERIALDOCUMENT = MATERIALDOCUMENT
TABLES
GOODSMVT_ITEM = GOODSMVT_ITEM
RETURN = RETURN.
*Commit BAPI
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
*Display Goods movement number
FORMAT COLOR 6 INVERSE ON.
READ TABLE RETURN WITH KEY TYPE = 'E'.
IF SY-SUBRC = 0.
WRITE: /,'ERROR! Goods movement not created'.
ELSE.
WRITE: /,'Goods movent number',MATERIALDOCUMENT COLOR 5,
'posted for material',GOODSMVT_ITEM-MATERIAL.
ENDIF.
FORMAT COLOR OFF INVERSE OFF.
try this on report program and create a goods movement.
Sanket. -
Create Material Master using workflow (urgent)
Hello all,
We have an urgent client requirement to create material master using workflow.
Different views for the material master will be created by the relevant departments.
ex: Accouting 1, 2 will go to accounts deptt.
I have studied the workflow tutorial (20 units) on <b>SAP help</b> for leave of absence and have some understanding of objects, methods, bindings etc
I am however finding it very difficult to define the steps to create a workflow for material master. Are there any standard steps already defined that i can use.
Any help/inputs will be greatly appreciated.
Regards
S. DatarHi,
You need to speak to a workflow consultant.
You can get workflow to do many things (including creating a material master) but it takes a lot of coding and design.
For those of you who think that workflow is just used for the standard SAP workflow tasks, you have to realise that workflow is far more powerful and far more useful than many people think.
It is always referred to as "Event triggered messaging" but it is more accurate to call it "Event triggered events".
Within workflow you can chain together many different transactions and or ABAPS and so you can get it to do virtually anything you want (as long as you know how).
In this case you need the workflow to trigger an ABAP or BTCI session etc. that works through the MM01 transaction. It is relatively easy to get it to do this, but I am not technical enough to be able to help with the steps involved (sorry)
Steve B -
Material Master workflow - how to use a BAPI?
Hi,
I need some help with a material master workflow.
My requirement is to automate some changes to the material master as steps in the workflow, they are:
Set the Cross plant material status
Set the material deletion flag
I see that the BAPI SAVEDATA is available as a method of BOR BUS1001006. I have created a task with this method but I cannot work out how to automate the changes to the material in the workflow using it?
Has anyone used this BAPI method in a workflow before, how do I automate the changes to the material using it? or is there another way to make changes to the material as a background step in my workflow?
Many thanks,
NeilAll,
thanks ever so much for all your input... I have fixed the problem and it was obscure!
Firstly my binding was wrong... I should not have bound the clientdata and the clientdatax
since the settings I was trying to default (material status an del flag) from the master task were actually being overwritten with this binding. bit of a schoolboy error that one.
Secondly I created 1 brand new task and reused 1 old task for the purposes of setting the material status and the deletion flag respectively.
I managed to get the first one working this morning by removing the binding, the second one still errored with the message about source and target structures being different... which got me thinking, so I created a brand new task for setting the deletion flag and ... it worked!
So why? ... then I realised.
We just upgraded to EHP7 and this workflow existed prior to EHP7. I copied the workflow and edited it for my new business requirements. Reading some of the release notes it turns out the structures have changed and there were conversion routines for fixing them.
All sorted now! -
How to create material group in material master.
hi guru's
can anybody explain me how to create a new material group in material master.
i wantto add a material group while creating material master MM01..
thanks
sap-mmHi,
In this step you create material groups.
You also have the option of using the same transaction to carry out the following activities:
Creating superior hierarchy levels
Assigning the superior hierarchy levels to a material group hierarchy
Assigning the base material group to the material group hierarchy
Assigning characteristics profiles below material group level
Requirements
Your R/3 System is configured as an SAP Retail System.
Activities
1. Create superior hierarchy levels
You create hierarchy levels using transaction WG01 (creating
material groups) via menu options MG environment --> Hierarchy
level --> Create
2. Assign the superior hierarchy levels to a material group hierarchy
You assign hierarchy levels to a hierarchy using transaction WG01
(creating material groups) via menu options MG environment -->
Hierarchy level --> Maint. MG hierarchy
3. Create material groups (base material groups) and then maintain the
pre-defined materials (reference material/material group material)
4. Assign the base material group to the material group hierarchy
You assign the material group to the hierarchy using transaction
WG01 (creating material groups)
5. Assign characteristics profiles below material group level
You assign characteristics profiles using transaction WG01
(creating material groups)
Further notes
When creating material groups and then maintaining the pre-defined materials (reference material/material group material) you should be aware of the following.
As these materials can be created automatically using a minimum of data, you should follow this procedure with a check and possibly further maintenance, especially of plant-specific data. The material group reference material should be defined in as much detail as possible so as to keep the workload to a minimum when you have to create more materials for this material group.
All hierarchy allocations involving a material group (base material group) and a higher or lower hierarchy level can be carried out on the initial screen (there is no need to switch to the detail screen). All further hierarchy allocations can be defined top-down when you maintain material group hierarchies.
Only the material groups are transported automatically!
Reward if useful.
Chandru -
Material Master workflow views
I have a material master workflow which determines the views of material number. Configuration is there for several warehouses and getting warehouse view extension for all warehouses. My question is how do I avoid workflow for certain warehouses? Please note I don't want to remove/change configuration, it is needed in near future.
Thank you,
NagarajanHi,
My question is how do I avoid workflow for certain warehouses?
Please note I don't want to remove/change configuration, it is needed in near future.
So I hope you are trying to start the workflow by making use of events, if this is true then there will be an entry maintained in the txn SWE2.I think the best way to handle is to make use of the Check Function module, This is beacuse I am not sure whether you would be able to get the warehouse information in a BOR Business object,
So try to create a check function module and map this function module against the entry in the SWE2 txn. There you would be having the flexibility write your own validations, and later in future if you want to either include or exclude the validation you can do it easily...
The main purpose of the check function module is to do this kind of validations and validate the event.... IF you feel that the workflow should not receive the event then raise a exception in the check function module this makes sure that the workflow wont trigger for that specific warehouses.
Regards
Pavan -
ISR For Approve Create Material Master
I have requirement apply ISR for Control Create Master.Example User1 input information about purchasing group and send to User2. And then User2 input information about Plant and send to next user for approve.If already send to last user and submit,ISR will be create material master.
But i don't know could be apply ISR for this case, Because i find for Costing and Banking.
Please help me. Thank you very muchHi,
You need to speak to a workflow consultant.
You can get workflow to do many things (including creating a material master) but it takes a lot of coding and design.
For those of you who think that workflow is just used for the standard SAP workflow tasks, you have to realise that workflow is far more powerful and far more useful than many people think.
It is always referred to as "Event triggered messaging" but it is more accurate to call it "Event triggered events".
Within workflow you can chain together many different transactions and or ABAPS and so you can get it to do virtually anything you want (as long as you know how).
In this case you need the workflow to trigger an ABAP or BTCI session etc. that works through the MM01 transaction. It is relatively easy to get it to do this, but I am not technical enough to be able to help with the steps involved (sorry)
Steve B -
Is it possible to Create Material Master without Profit Center ?
Hai,
1) Is it possible to Create Material Master without Profit Center ?
2) How SAP System Validate Profit Center in material master. ? is it material Type wise ?
3) Whether PO Order Creation,GRN & MIRO Possible for those material Master without Profit Center.?
Kindly Explain me clearly..
Thanks & Regards,
SwethaHi,
Profit center is at the plant level.
You can create material master even with out a profit center.This field will be there in the costing view and and general sales/plant data.
while creation of the materila master if do not select these views system will not ask for that.Normally it is pertaining to the costing analysis.
A profit center manager is held accountable for both revenues, and costs (expenses), and therefore, profits. What this means in terms of managerial responsibilities is that the manager has to drive the sales revenue generating activities which leads to cash inflows and at the same time control the cost (cash outflows) causing activities. This makes the profit center management more challenging than cost centre management. Profit center management is equivalent to running an independent business because a profit center business unit or department is treated as a distinct entity enabling revenues and expenses to be determined and its profitability to be measured.
Business organizations may be organized in terms of profit centers where the profit center's revenues and expenses are held separate from the main company's in order to determine their profitability. Usually different profit centers are separated for accounting purposes so that the management can follow how much profit each center makes and compare their relative efficiency and profit. Examples of typical profit centers are a store, a sales organization and a consulting organization whose profitability can be measured.
For more info,please refer
http://help.sap.com/erp2005_ehp_04/helpdata/EN/cc/36428094f311d2b47a006094b9b0a5/frameset.htm,
Regards, -
How to upload material master using BAPI
I have a flat file with 3 fields MATNR,MAKTX,MEINS and I want to create material master with 2 views basic data1 & basic data2 with three fields using BAPI
Can anyone tell me how to do this only using three fields and 2 views
and also i want to know what is the exact difference between session call transaction BAPI and LSWM methods.
Thank you,
Pradeep Reddy M.Hi Pradeep Reddy Miriyala,
This a example you can use, the views are related with each table only have to adapt to your case.
Best regards
Jaime Cordeiro
*& Report ZMM01_BAPI_01 *
REPORT ZMM01_BAPI_01 .
STRUCTURE DECLARATIONS *
TABLES: BAPIMATHEAD, "Headerdata
BAPI_MARA, "Clientdata
BAPI_MARAX, "Clientdatax
BAPI_MVKE, "SalesData
BAPI_MVKEX, "SalesDatax
BAPI_MARC, "Plantdata
BAPI_MARCX, "Plantdatax
BAPI_MBEW, "ValuationData
BAPI_MBEWX, "ValuationData
BAPI_MLGN, "Storage
BAPI_MLGNX, "StorageX
BAPI_MAKT, "Material description
BAPI_MARM,
BAPI_MARMX,
bapi_mean,
BAPI_MLAN,
BAPIRET2. "Return messages
DATA: BEGIN OF LSMW_MATERIAL_MASTER,
> Initial Data
matnr(18),
mtart(4),
WERKS(4),
VKORG(4),
VTWEG(2),
LGNUM(3),"retirar
> Basic Data 1
MAKTX(40),
MEINS(3),
MATKL(9),
BISMT(18),
SPART(2),
PRDHA(18),
BRGEW(17),
NTGEW(17),
GEWEI(3),
VOLUM(13),
VOLEH(3),
EAN11(18),
NUMTP(2),
> Sales 1
DWERK(4),
TAXKM(1),
> Sales 2
KTGRM(2),
PRODH(18),
MTPOS(4),
> Sales: General/Plant
MTVFP(2),
TRAGR(4),
LADGR(4),
PRCTR(10),
> Purchasing
Novas entradas
EKGRP(3),
KAUTB(1),
XCHPF1(1),
EKWSL(4),
WEBAZ(3),
INSMK1(1),
KORDB(1),
> Foreign Trade
STAWN(17),
MTVER(4),
HERKL(3),
HERKR(3),
> Purchase Order Text View
Identificar Campos
TextoEN(100),
TextoPT(100),
TextoPL(100),
TextoES(100),
> MRP1
DISGR(4),
DISMM(2),
DISPO(3),
DISLS(2),
BSTMI(18),
BSTRF(13),
> MRP2
BESKZ(1),
RGEKZ(1),
LGPRO(4),
LGFSB(4),
EPRIO(4),
WEBAZ1(3),
PLIFZ(3),
FHORI(3),
> MRP3
PERKZ(1),
STRGR(2),
VRMOD(1),
VINT1(3),
VINT2(3),
> MRP4
ALTSL(1),
FEVOR(3),
> Work Sch
INSMK(1),
XCHPF(1),
UEETO(3),
> Plant Storage 1
MHDRZ(4),
MHDHB(4),
> Plant Storage 2
PRCTR1(10),
EPRIO1(4),
> WM 1 S01 comum a todos
LTKZA_S01(3),
LTKZE_S01(3),
LGBKZ_S01(3),
> WM 1 SHV
LTKZA_SHV(3),
LTKZE_SHV(3),
LGBKZ_SHV(3),
> WM 1 SQW
LTKZA_SQW(3),
LTKZE_SQW(3),
LGBKZ_SQW(3),
> WM 2
LHMG1(13),
LHME1(3),
LETY1(3),
LHMG2(13),
LHME2(3),
LETY2(3),
LHMG3(13),
LHME3(3),
LETY3(3),
> Accounting 1
BKLAS(4),
VPRSV(1),
VERPR(23),
PEINH(5),
END OF LSMW_MATERIAL_MASTER.
DATA:V_FILE TYPE STRING.
DATA:VolumUnitConv(3).
DATA:UnitConv(3).
INTERNAL TABLE DECLARATIONS *
*to store the input data
DATA:
BEGIN OF it_matmaster OCCURS 0.
INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
DATA:
END OF it_matmaster.
*for material description
DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
INCLUDE STRUCTURE BAPI_MAKT .
DATA:END OF IT_MATERIALDESC.
*FOR gross wt
data: begin of it_uom occurs 0.
include structure BAPI_MARM.
data:end of it_uom.
DATA: BEGIN OF IT_UOMX OCCURS 0.
INCLUDE STRUCTURE BAPI_MARMX.
DATA:END OF IT_UOMX.
data:begin of it_mean occurs 0.
include structure bapi_mean.
data:end of it_mean.
DATA: BEGIN OF it_MLAN OCCURS 0.
include STRUCTURE BAPI_MLAN.
DATA: END OF it_MLAN.
DATA:BEGIN OF IT_MLTX OCCURS 0.
INCLUDE STRUCTURE BAPI_MLTX.
DATA:END OF IT_MLTX.
*to return messages
DATA:BEGIN OF IT_RETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA:END OF IT_RETURN.
DATA : imat TYPE TABLE OF bapimatinr WITH HEADER LINE.
DATA: text LIKE bapi_mltx OCCURS 0 WITH HEADER LINE.
DATA: matnrAct(18),oldMart(4).
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1 .
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
TO UPLOAD THE DATA *
START-OF-SELECTION.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = IT_MATMASTER
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
check sy-subrc eq 0.
DATA POPULATIONS *
LOOP AT IT_MATMASTER.
IF IT_MATMASTER-MATNR EQ '' .
oldMart = IT_MATMASTER-Mtart.
CALL FUNCTION 'MATERIAL_NUMBER_GET_NEXT'
EXPORTING
MATERIALART = IT_MATMASTER-Mtart
IMPORTING
MATERIALNR = matnrAct
RETURNCODE =
EXCEPTIONS
NO_INTERNAL_INTERVAL = 1
TYPE_NOT_FOUND = 2
OTHERS = 3
if sy-subrc = 0.
BAPIMATHEAD-MATERIAL = matnrAct.
endif.
ELSE.
BAPIMATHEAD-MATERIAL = it_matmaster-matnr.
ENDIF.
Preenchimento dos dados do ecrã inicial
BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
BAPIMATHEAD-IND_SECTOR = 'M'.
BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
"declaration of views
BAPIMATHEAD-BASIC_VIEW = 'X'.
BAPIMATHEAD-MRP_VIEW = 'X'.
BAPIMATHEAD-STORAGE_VIEW = 'X'.
BAPIMATHEAD-WAREHOUSE_VIEW = 'X'.
BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
If IT_MATMASTER-Mtart EQ '31'.
BAPIMATHEAD-SALES_VIEW = 'X'.
BAPIMATHEAD-WORK_SCHED_VIEW = 'X'.
ENDIF.
If IT_MATMASTER-Mtart EQ '51'.
BAPIMATHEAD-SALES_VIEW = 'X'.
BAPIMATHEAD-WORK_SCHED_VIEW = 'X'.
ENDIF.
If IT_MATMASTER-Mtart EQ '65'.
BAPIMATHEAD-PURCHASE_VIEW = 'X'.
ENDIF.
Preenchimento de dados relativos a MARA
BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
BAPI_MARA-DIVISION = IT_MATMASTER-SPART.
BAPI_MARA-PROD_HIER = IT_MATMASTER-PRDHA.
BAPI_MARA-NET_WEIGHT = IT_MATMASTER-ntgew.
BAPI_MARA-UNIT_OF_WT = IT_MATMASTER-GEWEI.
BAPI_MARA-TRANS_GRP = IT_MATMASTER-tragr.
> Novas Entradas
IF IT_MATMASTER-Mtart EQ '65'.
BAPI_MARA-BATCH_MGMT = IT_MATMASTER-XCHPF1.
BAPI_MARA-PUR_VALKEY = IT_MATMASTER-EKWSL.
BAPI_MARAX-PUR_VALKEY = 'X'.
ELSE.
BAPI_MARA-BATCH_MGMT = IT_MATMASTER-XCHPF.
ENDIF.
> Novas Entradas
BAPI_MARA-MINREMLIFE = IT_MATMASTER-MHDRZ.
BAPI_MARA-SHELF_LIFE = IT_MATMASTER-MHDHB.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-OLD_MAT_NO = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-DIVISION = 'X'.
BAPI_MARAX-PROD_HIER = 'X'.
BAPI_MARAX-NET_WEIGHT = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-TRANS_GRP = 'X'.
BAPI_MARAX-BATCH_MGMT = 'X'.
BAPI_MARAX-MINREMLIFE = 'X'.
BAPI_MARAX-SHELF_LIFE = 'X'.
Preencimento de dados Relativos a MKVE
BAPI_MVKE-DELYG_PLNT = IT_MATMASTER-DWERK.
BAPI_MVKE-SALES_ORG = IT_MATMASTER-VKORG.
BAPI_MVKE-DISTR_CHAN = IT_MATMASTER-VTWEG.
BAPI_MVKE-PROD_HIER = IT_MATMASTER-PRODH.
BAPI_MVKE-ITEM_CAT = IT_MATMASTER-MTPOS.
BAPI_MVKE-ACCT_ASSGT = IT_MATMASTER-KTGRM.
BAPI_MVKEX-SALES_ORG = IT_MATMASTER-VKORG.
BAPI_MVKEX-DISTR_CHAN = IT_MATMASTER-VTWEG.
BAPI_MVKEX-PROD_HIER = 'X'.
BAPI_MVKEX-ITEM_CAT = 'X'.
BAPI_MVKEX-DELYG_PLNT = 'X'.
BAPI_MVKEX-ACCT_ASSGT = 'X'.
Preencimento de dados Relativos a MARC
BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
BAPI_MARC-AVAILCHECK = IT_MATMASTER-MTVFP.
BAPI_MARC-LOADINGGRP = IT_MATMASTER-LADGR.
BAPI_MARC-PROFIT_CTR = IT_MATMASTER-PRCTR.
IF NOT IT_MATMASTER-Mtart EQ '51'.
BAPI_MARC-COMM_CODE = IT_MATMASTER-STAWN.
BAPI_MARC-COUNTRYORI = IT_MATMASTER-HERKL.
BAPI_MARC-REGIONORIG = IT_MATMASTER-HERKR.
BAPI_MARCX-COMM_CODE = 'X'.
BAPI_MARCX-COUNTRYORI = 'X'.
BAPI_MARCX-REGIONORIG = 'X'.
ENDIF.
BAPI_MARC-MRP_GROUP = IT_MATMASTER-DISGR.
BAPI_MARC-MRP_TYPE = IT_MATMASTER-DISMM.
BAPI_MARC-MRP_CTRLER = IT_MATMASTER-DISPO.
BAPI_MARC-LOTSIZEKEY = IT_MATMASTER-DISLS.
BAPI_MARC-MINLOTSIZE = IT_MATMASTER-BSTMI.
BAPI_MARC-ROUND_VAL = IT_MATMASTER-BSTRF.
BAPI_MARC-PROC_TYPE = IT_MATMASTER-BESKZ.
BAPI_MARC-BACKFLUSH = IT_MATMASTER-RGEKZ .
BAPI_MARC-ISS_ST_LOC = IT_MATMASTER-LGPRO.
BAPI_MARC-DETERM_GRP = IT_MATMASTER-EPRIO.
BAPI_MARC-SM_KEY = IT_MATMASTER-FHORI.
BAPI_MARC-PERIOD_IND = IT_MATMASTER-PERKZ.
BAPI_MARC-PLAN_STRGP = IT_MATMASTER-STRGR.
BAPI_MARC-CONSUMMODE = IT_MATMASTER-VRMOD.
BAPI_MARC-BWD_CONS = IT_MATMASTER-VINT1.
BAPI_MARC-FWD_CONS = IT_MATMASTER-VINT2.
BAPI_MARC-ALT_BOM_ID = IT_MATMASTER-ALTSL.
BAPI_MARC-PRODUCTION_SCHEDULER = IT_MATMASTER-FEVOR.
IF NOT IT_MATMASTER-Mtart EQ '65'.
BAPI_MARC-IND_POST_TO_INSP_STOCK = IT_MATMASTER-INSMK.
BAPI_MARC-OVER_TOL = IT_MATMASTER-UEETO.
BAPI_MARCX-IND_POST_TO_INSP_STOCK = 'X'.
BAPI_MARCX-OVER_TOL = 'X'.
ENDIF.
> Novas Entradas
IF IT_MATMASTER-Mtart EQ '65'.
BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP .
BAPI_MARC-AUTO_P_ORD = IT_MATMASTER-KAUTB .
BAPI_MARC-GR_PR_TIME = IT_MATMASTER-WEBAZ .
BAPI_MARC-IND_POST_TO_INSP_STOCK = IT_MATMASTER-INSMK1 .
BAPI_MARC-SOURCELIST = IT_MATMASTER-KORDB .
BAPI_MARC-EXPIMPGRP = IT_MATMASTER-MTVER .
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-AUTO_P_ORD = 'X'.
BAPI_MARCX-GR_PR_TIME = 'X'.
BAPI_MARCX-IND_POST_TO_INSP_STOCK = 'X'.
BAPI_MARCX-SOURCELIST = 'X'.
BAPI_MARCX-EXPIMPGRP = 'X'.
ENDIF.
> Novas Entradas
BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
BAPI_MARCX-AVAILCHECK = 'X'.
BAPI_MARCX-LOADINGGRP = 'X'.
BAPI_MARCX-PROFIT_CTR = 'X'.
BAPI_MARCX-MRP_GROUP = 'X'.
BAPI_MARCX-MRP_TYPE = 'X'.
BAPI_MARCX-MRP_CTRLER = 'X'.
BAPI_MARCX-LOTSIZEKEY = 'X'.
BAPI_MARCX-MINLOTSIZE = 'X'.
BAPI_MARCX-ROUND_VAL = 'X'.
BAPI_MARCX-PROC_TYPE = 'X'.
BAPI_MARCX-BACKFLUSH = 'X'.
BAPI_MARCX-ISS_ST_LOC = 'X'.
BAPI_MARCX-DETERM_GRP = 'X'.
BAPI_MARCX-SM_KEY = 'X'.
BAPI_MARCX-PERIOD_IND = 'X'.
BAPI_MARCX-PLAN_STRGP = 'X'.
BAPI_MARCX-CONSUMMODE = 'X'.
BAPI_MARCX-BWD_CONS = 'X'.
BAPI_MARCX-FWD_CONS = 'X'.
BAPI_MARCX-ALT_BOM_ID = 'X'.
BAPI_MARCX-PRODUCTION_SCHEDULER = 'X'.
Preencimento de dados Relativos a MLGN
BAPI_MLGN-WHSE_NO = 'S01'.
BAPI_MLGN-WITHDRAWAL = IT_MATMASTER-LTKZA_S01.
BAPI_MLGN-PLACEMENT = IT_MATMASTER-LTKZE_S01.
BAPI_MLGN-STGESECTOR = IT_MATMASTER-LGBKZ_S01.
BAPI_MLGN-L_EQUIP_1 = IT_MATMASTER-LHMG1.
BAPI_MLGN-L_EQUIP_2 = IT_MATMASTER-LHMG2.
BAPI_MLGN-L_EQUIP_3 = IT_MATMASTER-LHMG3.
BAPI_MLGN-LEQ_UNIT_1 = IT_MATMASTER-LHME1.
BAPI_MLGN-LEQ_UNIT_2 = IT_MATMASTER-LHME2.
BAPI_MLGN-LEQ_UNIT_3 = IT_MATMASTER-LHME3.
BAPI_MLGN-UNITTYPE_1 = IT_MATMASTER-LETY1.
BAPI_MLGN-UNITTYPE_2 = IT_MATMASTER-LETY2.
BAPI_MLGN-UNITTYPE_3 = IT_MATMASTER-LETY3.
BAPI_MLGNX-WHSE_NO = 'S01'.
BAPI_MLGNX-WITHDRAWAL = 'X'.
BAPI_MLGNX-PLACEMENT = 'X'.
BAPI_MLGNX-STGESECTOR = 'X'.
BAPI_MLGNX-L_EQUIP_1 = 'X'.
BAPI_MLGNX-L_EQUIP_2 = 'X'.
BAPI_MLGNX-L_EQUIP_3 = 'X'.
BAPI_MLGNX-LEQ_UNIT_1 = 'X'.
BAPI_MLGNX-LEQ_UNIT_2 = 'X'.
BAPI_MLGNX-LEQ_UNIT_3 = 'X'.
BAPI_MLGNX-UNITTYPE_1 = 'X'.
BAPI_MLGNX-UNITTYPE_2 = 'X'.
BAPI_MLGNX-UNITTYPE_3 = 'X'.
Preencimento de dados Relativos a MBEW
BAPI_MBEW,
BAPI_MBEWX,
BAPI_MBEW-VAL_CLASS = IT_MATMASTER-BKLAS.
BAPI_MBEW-PRICE_CTRL = IT_MATMASTER-VPRSV.
BAPI_MBEW-STD_PRICE = IT_MATMASTER-VERPR.
BAPI_MBEW-PRICE_UNIT = IT_MATMASTER-PEINH.
BAPI_MBEW-VAL_AREA = 'CLPS'."IT_MATMASTER-BWKEY.
BAPI_MBEWX-VAL_AREA = 'CLPS'."IT_MATMASTER-BWKEY.
BAPI_MBEWX-VAL_CLASS = 'X'.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
---------------------------------------------------> Material Descrition
IT_MATERIALDESC-LANGU = sy-langu. "'EN'.
IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
APPEND IT_materialdesc.
Gross Weight, Volume and EAN
*Volume é preciso uma rotina de conversão
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = IT_MATMASTER-VOLEH
LANGUAGE = SY-LANGU
IMPORTING
OUTPUT = VolumUnitConv
EXCEPTIONS
UNIT_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
EXPORTING
INPUT = IT_MATMASTER-MEINS
LANGUAGE = SY-LANGU
IMPORTING
OUTPUT = UnitConv
EXCEPTIONS
UNIT_NOT_FOUND = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IT_UOM-GROSS_WT = IT_MATMASTER-BRGEW.
IT_UOM-ALT_UNIT = UnitConv.
IT_UOM-ALT_UNIT_ISO = IT_MATMASTER-GEWEI.
IT_UOM-UNIT_OF_WT = IT_MATMASTER-GEWEI.
IT_UOM-EAN_UPC = IT_MATMASTER-EAN11.
IT_UOM-EAN_CAT = IT_MATMASTER-NUMTP.
IT_UOM-VOLUME = IT_MATMASTER-VOLUM.
IT_UOM-VOLUMEUNIT = VolumUnitConv.
IT_UOM-VOLUMEUNIT_ISO = IT_MATMASTER-VOLEH.
APPEND IT_UOM.
IT_UOMX-ALT_UNIT = IT_MATMASTER-MEINS.
IT_UOMX-ALT_UNIT_ISO = IT_MATMASTER-GEWEI.
IT_UOMX-GROSS_WT = 'X'.
IT_UOMX-UNIT_OF_WT = 'X'.
IT_UOMX-EAN_UPC = 'X'.
IT_UOMX-EAN_CAT = 'X'.
*Volume
IT_UOMX-VOLUME = 'X'.
IT_UOMX-VOLUMEUNIT = 'X'.
IT_UOMX-VOLUMEUNIT_ISO = 'X'.
APPEND IT_UOMX.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = BAPIMATHEAD
CLIENTDATA = BAPI_MARA
CLIENTDATAX = BAPI_MARAx
PLANTDATA = BAPI_MARc
PLANTDATAX = BAPI_MARcx
VALUATIONDATA = BAPI_MBEW
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA = BAPI_MLGN
WAREHOUSENUMBERDATAX = BAPI_MLGNX
SALESDATA = BAPI_MVKE
SALESDATAX = BAPI_MVKEX
IMPORTING
RETURN = IT_RETURN
TABLES
MATERIALDESCRIPTION = IT_MATERIALDESC
UNITSOFMEASURE = IT_UOM
UNITSOFMEASUREX = IT_UOMX
MATERIALLONGTEXT = text
TAXCLASSIFICATIONS = it_MLAN.
if it_return-type eq 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
endif.
WAIT UP TO 10 SECONDS.
WRITE : / IT_RETURN-MESSAGE.
CLEAR: IT_MATERIALDESC[],
IT_UOM[],
IT_UOMX[],
it_MLAN[],
IT_RETURN,
text,
BAPIMATHEAD,
BAPI_MARA,
BAPI_MARAx,
BAPI_MARc,
BAPI_MARcx,
BAPI_MBEW,
BAPI_MBEWX,
BAPI_MLGN,
BAPI_MLGNX,
BAPI_MVKE,
BAPI_MVKEX
ENDLOOP. -
10 digit code need to be created while creating material master
Hi, Please advise how to create a 10 digit code automatically when we create material master in SAP? Please note that this code is required as one of the basic data view fields, not as material code. Is there any enhancements available for the same.
Dear
Try to use Product Hierarchy field MARA-PRDHA in the Material Master for this purpose
Regards
JH -
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 -
What is Material master workflow
Hi gurus ,
Can anybody explain what is Material master workflow & Function Module ?what is its use?
Dev
Edited by: dev .. on Oct 15, 2008 8:21 AMDear,
You can find much info about workflows at: http://www.erpgenie.com/workflow/index.htm
http://help.sap.com/saphelp_46c/helpdata/EN/04/926f8546f311d189470000e829fbbd/frameset.htm
Workflow is a tool for automating the business process so that the process itself flows smoothly, without bottlenecks and without dead ends. Critical parts of the process can be streamlined with deadline monitoring and contingency options. Participants are informed of milestones in the process. The process definition itself is powerful enough to allow business re-engineering with re-training and to eliminate the impact of workforce changes on the basic business process.
SAP Business Workflow is the R/3 tool for handling the process automation within R/3 or between R/3 systems and other systems involved in the business process. It is flexible enough to handle ad hoc processes such as the circulation of an electronic document. It is robust enough to handle mission critical process in the production system such as the creation of a material master.
The different R/3 applications supply standard workflows for the commonly occurring processes. Once these workflow templates are activated, they are ready for immediate use. A complete set of workflow tools, including the workflow editor and workflow generation wizard, are provided to enhance these standard workflows or create new workflows. These tools are complemented with transactions for monitoring, tracking and the statistical analysis of the processes.
Because the business process often does not step at the R/3 boundary, various interfaces and third party tools are available for extending the process across systems.
Function module
Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
The Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
http://help.sap.com/saphelp_nw70/helpdata/EN/9f/db988735c111d1829f0000e829fbfe/content.htm
Regards,
Syed Hussain. -
How to get Material Master Moving average price into Purchase Order
Hi,
How to get Material master moving average price into purchase order instead of Purchase Info record.
Thanks,
SridharHi,
I cannot understand whether it is necessary .
How about as following step?
1. create Purcahse requisition
Price come form moving average price in material master.
2. Create Purchase order reference Purchase requisition
There is a setting from the unit price of P/R onto the unit price of P/O.
Regards,
Gaito
Maybe you are looking for
-
Cannot get home sharing to work with my new apple TV. Have the latest version of ITunes and the apple TV is connected to my wi-fi network. The instruction page says to go to the Advanced menu option of ITunes and choose Home Sharing. This option d
-
How to do reconciliation of accounts in SAP B1?
Dear Experts, I want to know how to do reconciliation in SAP B1? like,Bank accounts & Stock (Inventory) reconciliation?? Thank you. Thanks & regards, Santosh.
-
How do I import sound from digital recorder?
Thank you for helping!
-
actually i want to migerate data from oracle on unix platform to oracle on windows platform. does export and import will help me in this. i want to know that wheather the oracle maintains its own file format or it is platform dependent.If it maintain
-
hi out there I have defined a vPC between 2 sets of nexus boxes: nx51 ----vpc11--><--------vpc21--------nx53 II II vpc10 peerlink vpc20 peerlink II II nx52-----vpc11--><---------vpc21------nx54 vpc10 & vpc20 is running lacp but vpc11 & 21 are not - I