cancel
Showing results for 
Search instead for 
Did you mean: 

BPL: Filtering depending tables

former_member182566
Active Contributor
0 Kudos

Hello forum,

The operation guide shows an example of selection criteria for materials, filtering by the start table (MARA-MATNR) and at the same time by a dependent table (MARC-WERKS).

This works well, but the filter applied to MARC is not applied to MARA. That is, even if we choose only one plant, all records from MARA are copied, even if no entry in MARC for that material/plant is found.

I had a similar problem with VBAK / VBAP. Say we have the following sales order items:

Sales order 1000 / 01, WERKS = P001

Sales order 1000 / 02, WERKS = P002

Sales order 2000 / 01, WERKS = P002

If I filter by VBAP-WERKS = P001, then only one record from VBAP is considered (1000/01) but both entries in VBAK are copied (1000 and 2000). This means we have now in the receiver system a sales order (2000) with no items. Functionally this does not make much sense: the goal would be copy all sales orders with at least one item for P001.

What we had to do was to make a query to get the relevant sales order numbers first, and then create a selection set with those numbers.

Is this the way to do it, or is there any other way to work around this?

Thanks in advance,

Rui Dantas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Rui,

the selection on dependent tables was introduced to be able to restrict the datamodel in a flexible way to prevent recursions, or to allow a more precise definition of the datamodel (e.g. for tables that contain data of completely different business objects like AUFK).

If you are using it your way you will have to live with the inconsistencies, or you have to evaluate your initial selection criteria before you pass it over BPL, by doing a selecting in VBAP and MARC and filtering out the records that are not matching your selection criteria.

This can be done manually, or you can code a function module as selection exit and attach it to your starting table (in this case you may need expert consulting, because this requires some settings on TDMS table level and also ABAP knowledge).

I hope it helps - we always apreciate suggestions for improvements.

Best Regards,

Nico

former_member182566
Active Contributor
0 Kudos

>

>or you can code a function module as selection exit and attach it to your starting table (in this case you may need expert consulting, because this requires some settings on TDMS table level and also ABAP knowledge).

> Nico

Hi Nico,

Thanks for your answer. I'll try that selection exit thing. ABAP is no problem, but the table level settings are always tricky. Is there any documentation available on this?

Thanks,

Rui Dantas

Former Member
0 Kudos

I have sent you a mail regarding this.

Best Regards,

Nico

Former Member
0 Kudos

Nico:

Could you also send me a copy of the said document?

Thanks a lot!

Former Member
0 Kudos

Helen,

please have a look at the brand new BPL Designer Guide:

https://websmp105.sap-ag.de/~form/sapnet?_SCENARIO=01100035870000000202&_SHORTKEY=002007974700000899...

Regards,

Nico

Former Member
0 Kudos

Nico:

Thanks a lot!

Have a nice weekend!

Answers (0)