Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Trigger MM01 from Workflow

Former Member
0 Likes
496

Hello

I am having a problem with a call of MM01 from a workflow. The workflow must extend an item to another plant. From the workflow I would like MM01 to be displayed with the following parameters filled:

1) Material

2) Industry Sector

3) Material Type

4) Copy From Material

Then allow the user to use their default settings for Select Views and Organizational Levels or change these settings manually.

Here is my problem

When I use a BDC then the default values do not work for Select Views and Organizational levels and I get an OK_CODE prompt displaying on the screen. I did some research on SDN and found that CALL FUNCTION 'MATERIAL_MAINTAIN_DIALOGUE' would do what I need.

If I use CALL FUNCTION 'MATERIAL_MAINTAIN_DIALOGUE' then user cannot select their Select Views and Organizational levels settings. If I leave PSTAT blank then Material & Copy From Material are not filled.

Can anyone give me some help on accomplishing what Iu2019m trying to do?

Thanks

Gary

1 ACCEPTED SOLUTION
Read only

mvoros
Active Contributor
0 Likes
431

Hi,

I am not sure if I understand your requirement but have you tried to directly call transaction MM01 and set fields using parameter IDs. Each of your required input fields has assigned parameter ID (MAT, MTP, MTA, RMA), You can write your own FM where you will set all these fields using command SET PARAMETER ID and then just simply call transaction MM01 with additional option AND SKIP FIRST SCREEN. That's how it is implemented in business object BUS1001.

Cheers

1 REPLY 1
Read only

mvoros
Active Contributor
0 Likes
432

Hi,

I am not sure if I understand your requirement but have you tried to directly call transaction MM01 and set fields using parameter IDs. Each of your required input fields has assigned parameter ID (MAT, MTP, MTA, RMA), You can write your own FM where you will set all these fields using command SET PARAMETER ID and then just simply call transaction MM01 with additional option AND SKIP FIRST SCREEN. That's how it is implemented in business object BUS1001.

Cheers