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: 

Filtering Material while sending it to third party using IDoc

0 Kudos

Hi Guys,

I have a requirement to sent material using BD21 or rather scheduling the program RBMIDOC to third part via XI. But there is a need to filter material based on MTART and WERKS. Using Program I understand it is acheivable..but when user wants to schedule the prog in backgroung using Message Type MATMAS, how to acheive the requirement....

Any thoughts or suggestions are highly appreciated

Thanks

Debasis Roy Chowdhury

9 REPLIES 9

nabheetscn
Active Contributor
0 Kudos

Check for distribution model filters in BD64. There you can put a check for both fields.

Nabheet

0 Kudos

Hi,

Thanks for your replies..but setting filter in BD64 won't actually solve the purpose ince we need to allow may be 3 -4 material types but as of the present scenario we have 56 different materia types..in future it might increase so we need to have more than 50 entries to be a part of the filter list..

Thanks

Debasis Roy Chowdhury

0 Kudos

Well.. I can suggest you a work around .. where you can effectively use filter and customization....

1. Enhance the message type MATMAS and include a new segement with a field XFIELD( Flag).

2. The new Segment should a mandatory segment- IMP.

2. Now fill this segment in BADI BADI_MATMAS_ALE_CR based on you valid material type. If it is valid then fill 'X'. else. space.

3. Go to BD95 and maintain the entries create a custome ALE Object type. Now go to BD59 and maintain the entries ther as well.

4. Now go toBD64 and create a Filter group. You can see that the custome field XFIELD is visible there. Set the filter value 'X'. That means if the material is valid then only it will send the IDoc else it will get filtered.

0 Kudos

Hey Deb, Pls. close this thread if it is answered. or else let us know if you still can't achieve it.

0 Kudos

Hi Surender,

Thanks for your suggstion...we are not allowed to extend the standard message type..rather i was looking for an exit wherein if I am able to read the SDATA and check for the Material type and the Plant information ... if found then stop the process from creating the IDoc. It should alos not consume the IDoc number as well.....

Thanks

Debasis

0 Kudos

Ok.. If you dont want to extend it.. then use an unused field in segement E1MARAM which is mandatroy..... fill the unused field in the exit and filter that in Distribution model.

Or ..

Customize the SMD FM for MATMAS ... 'MASTERIDOC_CREATE_MATMAS' create a Z and submit those IDoc which satisfies your conditions.

0 Kudos

Hi Surender,

Thanks that works

Thanks

Debasis

Former Member
0 Kudos

I hope you have set up a distribution model in BD64. In thier under message type you can create filter condition to allow those material of MTART and plant.

You can only use E1MARAM fields to filter the IDoc.

Former Member
0 Kudos

Hello,

As likely suggest in the replies, you need to schedule the BD21 program in background to automatically trigger the Idoc.

Firstly activate change pointer General BD61,

then activate change pointer for message types bd50

and BD59 you create fields that you wanna use to filter the idoc with in distribution model

Let me know, if this helps.

Regards,

Abhishek