Application Development 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: 

Workflow issue: Sales Area input in Transaction MM06.

Former Member
0 Kudos

Hello There.

I am unable to pass the sales area parameters - Sales Organization "VKORG" and Distribution channel "VTWEG" required to pass along with material number to set the flag for deleting the material while triggering my business object method in workflow.

This is how I performed,

1. I created a subtype of Standard business object "BUS10001006" say "ZDAVE_BOBJ".

2. I also redefined my method "Delete" which originally called BAPI_MATERIAL_DELETE, now using my custom BAPI "ZDAVE_MATERIAL_DELETE".

3. As necessary "Delegated" them.

4. My BAPI contains a BDC for setting the flag as delete.

5. I used this business object to trigger my redefined event in workflow.

6. As the workflow encounters my business object it asks for material number and it works fine.

The Flag is set for deletion of material.

But, as Sales Areas - there may be many sales document numbers for a single material or even Vice versa.

My business object handles only for a particular sales organization and distribution channel.

I require to enable input for the other two fields as well as with material number.

Even in standard business object the key field is MATNR, so it by default or as mandatory asks for it.

But, It is not the right way to add those other two fields as key fields.

I suppose that my requirement is clear.

How can I construct my efforts to get the things working the better way.

Good Luck & Regards.

Harsh Dave

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Dave,

Why don't you define sales organization and distribution channel as key fields in your business object? So that it will prompt to enter these 2 fields also.

with best regards

K. Mohan Reddy

5 REPLIES 5

Former Member
0 Kudos

Hello Dave,

Why don't you define sales organization and distribution channel as key fields in your business object? So that it will prompt to enter these 2 fields also.

with best regards

K. Mohan Reddy

0 Kudos

Hello Mohan.

Very fast response.

See, I could have done that.

But, It is required to do at the method level or at the workflow level.

Do you have any suggestions on that.

Thanks.

0 Kudos

Hello.

Can somebody suggest me a solution .

Good Luck & Regards.

Harsh Dave

0 Kudos

Hello Dave,

I think that's the only way to make those two fields are required.

with best regards

K. Mohan Reddy

0 Kudos

Well, thanks for replying back.

Actually, I got the solution which goes this way.

1. I need to create two elements in the workflow container's which are "Sales Org" and "Distribution Channel".

2. I too have them in my method of the business object.

3. I need to bind them together in the "Task" to "Method".

4. As well as make them bind in the "Task" to "Workflow".

5. I can make these fields as mandatory as well by enabling the "Mandatory" option in the workflow element.

6. After executing the workflow it will ask for "Sales Org" and "Distribution channel".

  • But, a new query has come up which I need to clear.

I have redefined my the method "Existence Check" for material and will notify me by mail when the Return parameter returns Message of type "E" - Error that is when the material entered in incorrect.

I want to run the event trace "SWELS" and to which transaction I should run for to check the existence of material.

This will show whether my "Redefined" method has triggered.

Kindly, comment on this.