‎2005 Apr 13 7:52 AM
Hi All,
I have developed Material Master Create Workflow. Its working fine.
Now, My organization wants following scenario.
1). Current Scenario Once material entered (Not all the views) into sap
system by default its active. Now, requirement like after entering all the
views final mail should go to appropriate person for activation material.
Before that material should be deactivated. I mean it should not be
Used in any PO or SO before activation. Is it possible anyway? We have
Restricted views according to users and user enters information directly
Into SAP system.
2). I want to develop report for this. Report information like how many
Materials have been created by workflow, Status of material, cycle time
For creation (wait / working / total). In which table this data are available
Or any standard FMs are there? I have checked S032 table but there is
No data.
Earliest response will be appreciated.
Regards,
Parag
‎2005 Apr 13 5:15 PM
Hello parag,
This actually a functional issue, the material should be in status(MARA-MSTAE& MARC-MMSTA) '51' I think status '53' is release.
But this should be taken care through customising,
the last person completing the data in the material should change the status of the material to release. Orelse this could also be achieved through User exit.
Regards,
Samir.
‎2005 Apr 13 9:18 AM
Hi Parag,
For point (1) I have a suggestion. Material status' can be used to prevent a technically complete material from being used in sales and materials management activities.
To prevent sales activities, use the field MARA-MSTAV (accessible from the sales data 1 screen) which can be used to block sales across all sales areas, and to prevent materials management activities, use the field MARA-MSTAE (accessible from the basic data 1 screen).
You may need to configure specific status codes (different activities can be configured to be prevented according to the status code) to suit your purposes, but this should do the job nicely.
Point (2), all I can suggest is to look at some of the standard workflow reports to see which tables they access. Haven't ever really had to dig that deep in this area.
Cheers,
Brad
‎2005 Apr 13 10:46 AM
hi brad,
Thanks for immediate reply. In material master create workflow, different users create different views.
e.g. basic data 1 and 2 are created by user1, Sales Org. Data 1 and 2 are created by user2, mrp1,2,3,4 are created by user3 and so on. so, how can i put this material in deactivate stage until last person has created his/her views. Hope you understood my point.
Regards,
Parag
‎2005 Apr 13 2:27 PM
Hi Parag,
There are a few ways that this can be done:
(1). Make it a procedural thing. Make it a rule for users that when they create a material that they need to assign the appropriate status. The last user in the workflow step must change the status to allow the material to be useable.
Postives: No work for you
Negatives: Probably not going to be done consistantly
(2). Make it a procedural thing and reinforce it using a userexit. As for (1), but add some check logic into the userexit EXIT_SAPLMGMU_001 to ensure that a material cannot be saved without the correct status.
Positives: Little work for you, materials always correct
Negatives: Can be annoying for users
(3). Set the values automatically upon material save using the userexit EXIT_SAPLMGMU_001.
Positives: Nothing for users to do, materials always correct
Negatives: Bit more complex logic in userexit
(4). For the first step in the workflow, make it a program step with no user intervention and create the material using BAPI_MATERIAL_SAVEDATA. Create the material with the status's already set, and then pass to the first user for basic data 1, etc. For the last step in the workflow, make it a program step and call the BAPI again to remove the status.
Postives: You get to do some cool stuff in workflow, material is always correct
Negatives: Complex, More work than userexit approach
I would go for option 3, personally, but you will need to code some careful logic to ensure that status' are set and removed at appropriate stages in the material creation.
Hope that makes sense, and sets you on the right path forward.
Cheers,
Brad
‎2005 Apr 13 5:15 PM
Hello parag,
This actually a functional issue, the material should be in status(MARA-MSTAE& MARC-MMSTA) '51' I think status '53' is release.
But this should be taken care through customising,
the last person completing the data in the material should change the status of the material to release. Orelse this could also be achieved through User exit.
Regards,
Samir.
‎2005 Apr 15 5:41 AM
Hi Samir,
Could you please explain that how we can do this thing using userexit.
Regards,
Parag
‎2005 Apr 15 1:55 PM
Parag,
You can set values in MARA using the userexit:
EXIT_SAPLMGMU_001 .
The two fields you want to change are MARA-MSTAE and MARA-MSTAV.
Cheers,
Brad
‎2005 Apr 25 6:05 AM
Hello for All !!!
You believe possibly that the control of the WF that Parag needs, could realize with the fields <b>VPSTA</b> (Maintenance status of completes material) or with <b>PSTAT</b> (Maintenance status).
Best regards,
Ivan
‎2005 Apr 26 6:56 PM
Hi,
first of all I'd like to say thank you for the excellent hints, that were given by Brad on Apr 13th. I am just changing my Material Master Creation Workflow from solution (1) (the users have to put in the flag in MARA-MSTAE / V) to way (4) (using BAPI_MATERIAL_SAVEDATA).
Now there is another request by the users: At the end of the workflow when the status are put away, all the 10 users who did any input within the workflow want to get a mail, announcing that now bookings can be made with this material. I have very few ideas how to get a list of the users and to set it into the adress of the mail. Can anybody help me ?
regards
Wolfrad
‎2005 Apr 26 7:53 PM
Hi Wolfrad,
I'm happy to have helped (please feel free to acknowledge that help with some points!!!).
As for your latest question, I would think that you could just add another workflow step. You could then set the workflow recipient as all the people who were workflow recipients in the previous steps (I assume that the people are "fixed" and only change infrequently). You would probably need to set up an organisational structure to achieve this.
The only potential problem with this approach is that I'm not sure whether you can issue a workflow which is still visible to all users even after one has processed it (I don't have SAP accessable at the moment to verify). Something tells me you can do this.
If this approach is not suitable, then you could simply send a SAPOffice message to each user informing them that the material is ready to use. You would need to set up a group in SAPOffice and then send the SAPOffice message to the group (maybe as an express so that they will know to look in their inboxes). I think that the SAPOffice function modules begin with SO_???? and I think also there are some classes that handle this also (again, I don't have SAP access at the moment so I can't double check).
I hope that addresses your problem.
Cheers,
Brad
‎2005 Apr 26 8:03 PM
BTW - I notice that your users are following the standard paradigm of "Yeah, thats great, and I know that I just asked for one screen, but can you convert that into a full ERP system for me? By next week?"
‎2005 Apr 27 6:28 PM
Hi Brad,
thanks again for that hints. I really need the users who did the workitems of the workflow. For this i used the coding of RSWIW3SL, collected the receivers in a table and called the function SO_OBJECT_SEND. It works !
regards
Wolfrad
‎2005 Apr 27 7:51 PM
Good news Wolfrad,
Please close off this thread so that people know that you have an answer.
Also, please feel free to acknowledge those who have helped you by awarding some points (not very subtle, I know)
Brad
‎2005 May 09 3:10 PM
Hi Brad,
Can you please let me knwo what exactly a workflow consultant will be doing
regards
‎2006 Mar 02 4:27 PM
Hi Wolfrad,
could you please contact me (klick name for email address)
Greetings from the past
Wilhelm J.
‎2005 May 09 3:08 PM
Hi Parag,
I'm new to workflow, if possible can you please give me a brief view of the material workflow.
regards