cancel
Showing results for 
Search instead for 
Did you mean: 

how to use selection routine in the info package data selection.

Former Member
0 Kudos

Hi All,

in the info package under data seelction page, every field that is used to selection data can use the ABAP routine to restrict data selection when you upload data.

I want to use the method to exclude one MRP controller for data selection, but it does not work.

the code as follow:

program conversion_routine.

  • Type pools used by conversion program

type-pools: rsarc, rsarr, rssm.

tables: rssdlrange.

  • Global code used by conversion rules

$$ begin of global - insert your declaration only below this line -

  • TABLES: ...

  • DATA: ...

$$ end of global - insert your declaration only before this line -

  • -------------------------------------------------------------------

  • InfoObject = YATCLTKT

  • Fieldname = /BIC/YATCLTKT

  • data type = CHAR

  • length = 000007

  • convexit = ALPHA

  • -------------------------------------------------------------------

form compute_/BIC/YATCLTKT

tables l_t_range structure rssdlrange

changing p_subrc like sy-subrc.

  • Insert source code to current selection field

$$ begin of routine - insert your code only below this line -

data: l_idx like sy-tabix.

read table l_t_range with key

fieldname = '/BIC/YATCLTKT'.

l_idx = sy-tabix.

move 'E' to l_t_range -sign.

move 'EQ' to l_t_range-option.

move 'xto' to l_t_range -low.

*....

modify l_t_range index l_idx.

p_subrc = 0.

$$ end of routine - insert your code only before this line -

endform.

when I execute this info page, the system prompt the following information:

For sel. field ''/BIC/YATCLTKT'', no selection with SIGN = 'E'; OPTION 'EQ' allowed

and no data upload.

has anyboday ever used this method for data seelction?

please help!

thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Expert,

Thank you for your reply!

sorry I did not express my Idea clearly.

in one cube Like CUBE3, we store different data for different usage like, at 5:00 PM, I will extract data fromplanning area and this time I only extract all material forecast except mrp controller XTO and use these data upload to other system.

then at 3:00 PM, I will extract data from same planning area and use the same update rule and transfer structure but this time I will extract all material data.

so for the start routine , it can not be used.

please help!

Former Member
0 Kudos

sorry if this sounds dumb...

but do you have MRP controller as a characterisitic in your POS? (or is this something you have already told)

If you have it there (you can populate it from the inbound side ) ... you should be able to restrict it in the infopackage--> data selections on the outbound structure

you can use a different infopackage for change in restrictions and schedule it for a different time

just ignore it if its not relevant..

Former Member
0 Kudos

Hai,

I guess your second suggestion is what he is now doing I guess. The only solution to your problem looks like you have to maintain two different infopacks for each of your loads. It looks like you cannot use exclusion or not equal to in InfoPackage. But there are other options at the same place. Try using OLAP variable. You are currently using type 6. use type 7(OLAP variable). You can define a OLAP variable in BEx and write user exit code in function module EXIT_SAPLRRS0_001. If you are not sure about this, take the help of your BW colleague.

Hope this helps.

Former Member
0 Kudos

Hi,

thank you for your answer!

these two options can not meet my requirements, because

1. I extract data from DP planning area

2. only one info source and update rule and the data target is also the same one.

3. the same cube to store different data for different and I can not create another cube to store data, because based on this cube there are so many customer program.

this is why I want to use the selection routine in the data extraction.

if I do not use the sign E, does anyone have another method to meet my requirement?

thank you in advance!

Former Member
0 Kudos

Hello Xioliu,

Here are some other options:

1) Implement BADI /SAPAPO/SDP_EXTRACT and use method CHANGE_OUTPUT to delete the data that you want to delete. Note that this BADI gets executed for the DataSources of DP planning areas.

2) In your Update Rules, create a StartRoutine and delete unneeded rows using an ABAP routine.

Hope this helps you.

Former Member
0 Kudos

Hai,

It doesnot matter where you extract it from. Ypou can still write a start routine excluding the MRP cotroller. The data is just filtered before entering into the cube. That should work. Try that.

Former Member
0 Kudos

Hi,

For some reason, BW doesnot allow "E" in the routine.

You have 2 options:

1. I would say just load data as uaual without the routine and when you get it in the start routine, include a routine excluding the MRP controller value(xto).

2. Use a user exit on ECC side in the function module EXIT_SAPLRSAP_001 and exclude the value.

I would recommend the first option. Try posting this in BW forum. You may et betetr replies there.