cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with IDoc filtering in the distribution model

Former Member
0 Kudos

Hello Experts,

We are using a distribution model in which we have set filters as like the following

Filter Group 1

Plant : XYZ

Sales Org: SAP1

As far as the documentation says this Condition should work with AND logic between Plant and Sales Org

(i.e ~ Plant XYZ and SO SAP1 ) but the IDoc gets created even if any one of the condition is met(looks like working in OR logic).

How to achieve the AND filtering between the different objects.

Would appreciate your kind help.

Thanks in advance.

RGds,

Vasanth.

Accepted Solutions (1)

Accepted Solutions (1)

turmoll
Active Contributor
0 Kudos

Hi,

Yes, you are right, the logic between objects in one filter group is "AND". The logic between two filter groups is "OR".

Are you sure that your message type is configured only in one model view and the IDocs is not generated for different partner profile?

Regards,

Jakub

Former Member
0 Kudos

Hello Jakub,

Yes the message type has been configured in more than one Model view . Does this impact my filter logic anyways ?

Could you please be so kind and explain this to me ?

RGds,

Vasanth.

Edited by: Vasantha Kumar Balasubramani on Mar 19, 2008 5:06 PM

Edited by: Vasantha Kumar Balasubramani on Mar 19, 2008 5:07 PM

turmoll
Active Contributor
0 Kudos

Hi,

No, It does not but It is possible that you have IDoc generated for the second distribution model.

Just check in the generated IDoc, the receiver logical system and then you will be sure that it is a problem with a filtering.

Regards,

Jakub

former_member184619
Active Contributor
0 Kudos

Hi Kumar,

Yes the message type has been configured in more than one Model view . Does this impact my filter logic anyways ?

NO, Each filter group is evaluated independently of other filter groups.

for the and logic:

Just make sure for that you are using only one filter group. ( example : plant and sales org. filters should be under the same filter group.

as the document suggest :

Within a filter group the filter object types (for example, material type and plant) are linked by an 'AND' operator. On the other hand, if there are several filter object types in one filter group (for example, Plant 0001 and 0002), they are linked by an 'OR'.

Regards,

Sachin

Former Member
0 Kudos

Hi Jakub/Sachin,

Jakub ~ Yes I checked the generated IDocs(classified pertaining to my Model)for my model alone and that's where we are facing this problem

Sachin ~ I am using 2 different filter objects with different names so that should not be problem.it should work only as AND but unfortunately not.

~ Do we need to apply some SAP Notes to avoid this problem ?

But why the filter should behave in OR fashion ? I do not understand.

RGds,

Vasanth.

turmoll
Active Contributor
0 Kudos

> Jakub ~ Yes I checked the generated IDocs(classified pertaining to my Model)for my model alone and that's where we are facing this problem

So that's the filtering problem.

I would check in which segments are the "filtering objects" located (BD59) and whether it is a mandatory segment. If it is a mandatory segment - IDoc should not be created. If it is an optional segment - this segment and its subsegmets will be filtered out - but IDoc will be created.

> ~ Do we need to apply some SAP Notes to avoid this problem ?

> But why the filter should behave in OR fashion ? I do not understand.

I believe that Sachin meant that the logic is:

Filter Group1 OR Filter Group 2 OR ... Filter Group N

Filter Group 1 Object 1 AND Filter Group 1 Object 1 ... AND Filter Group 1 Object M

Filter Group 1 Object 1 Value 1 OR Filter Group 1 Object 1 Value 2 OR ... Filter Group 1 Object 1 Value L

regards,

Jakub

Former Member
0 Kudos

Hi,

In my case both Plant(E1MARCM) and Sales Org (E2MVKEM) both of them are optional segments.

But how come it would make the filter condition to behave in OR...

Say if the sales view(MVKE) of the material is alone changed

we are getting the problem as IDocs are being created for that Sales Org but those Materials are in not in the specified Plant(FIlter) ? which means the Condition of both the SO and Plant is not working together ?

Any inputs ?

Thanks in advance.

RGds,

Vasanth.

turmoll
Active Contributor
0 Kudos

> In my case both Plant(E1MARCM) and Sales Org (E2MVKEM) both of them are optional segments.

Does the generated Idoc have a segments: E1MARCM and E2MVKEM removed for a corresponding Filter Object values? If it is so, then filtering works fine since fields in your segments are not mandatory.

In order to implement a Filter Objects logic to create/ not create IDocs you must filter by a field in a mandatory segment.

BTW: Is it MATMAS message type? or ...?

Regards,

Jakub

Former Member
0 Kudos

Hi,

Thanks for the reply.

>>Does the generated Idoc have a segments: E1MARCM and E2MVKEM removed for a corresponding Filter Object values? If it is so, then filtering works fine since fields in your segments are not mandatory.

>>In order to implement a Filter Objects logic to create/ not create IDocs you must filter by a field in a mandatory segment.

~ Since both of my plant / Sales Org are not in the mandatory Segment how would i go about setting them as filter with AND condition ? Any idea ?

>> Is it MATMAS message type? or ...?

Yes you are right It is MATMAS05 IDoc and we want to set filter as Plant & Sales Org for the IDoc generation.

Thanks in advance.

RGds,

Vasanth.

Edited by: Vasantha Kumar Balasubramani on Mar 19, 2008 10:45 PM

turmoll
Active Contributor
0 Kudos

> ~ Since both of my plant / Sales Org are not in the mandatory Segment how would i go about setting them as filter with AND condition ? Any idea ?

Maybe as a "rough" solution you might consider to create a new mandatory Z segment with these two fields, filling them in some outbound customer function exit (e.g: EXIT_SAPLMV01_002) and configure the filter object (BD59) and distribution model (BD64). That should work but I believe that if you ask some functional consultant he will provide you much "better/standard" solution.

Regards,

Jakub

former_member184619
Active Contributor
0 Kudos

Hi Kumar,

Sachin ~ I am using 2 different filter objects with different names so that should not be problem.it should work only as AND but unfortunately not.

As the documentation suggest:

Combining Filters

Individual filters can be linked with logical operators. Filter groups are used for this purpose. An 'OR' operator links filters in different filter groups.

if u want to use AND operator then both filters should be under one filter group as I understand.

Regards,

Sachin

turmoll
Active Contributor
0 Kudos

> Individual filters can be linked with logical operators. Filter groups are used for this purpose. An 'OR' operator links filters in different filter groups.

>

> if u want to use AND operator then both filters should be under one filter group as I understand.

You understand correctly but:

> In order to implement a Filter Objects logic to create/ not create IDocs you must filter by a field in a mandatory segment.

These fields are not in mandatory segment.

Regards,

Jakub

Former Member
0 Kudos

Hi,

Thanks for the suggestion.Let me try out and update you.

Can i consider using BAPI instaed of message type for filtering ..would that be an nice idea...I read somewhere you can use only BAPI filtering for Synch Scenarios ? Any idea ?

Sachin ~ I hope you got the problem now.I have both of filter objects inside 1 Filter group.

Thanks in advance.

Note: I assume your solution for message type will work.....and where did you get that documentation(the Second one which you have given your last post -regd Mandatory Segment?)

RGds,

Vasanth.

Edited by: Vasantha Kumar Balasubramani on Mar 20, 2008 3:55 PM

turmoll
Active Contributor
0 Kudos

> Can i consider using BAPI instaed of message type for filtering ..would that be an nice idea...I read somewhere you can use only BAPI filtering for Synch Scenarios ? Any idea ?

But do you know if a relevant BAPI exists? Not sure ...

> Note: I assume your solution for message type will work.....and where did you get that documentation(the Second one which you have given your last post -regd Mandatory Segment?)

Training: BIT300 - Integration Technology ALE

Regards,

Jakub

Answers (0)