cancel
Showing results for 
Search instead for 
Did you mean: 

Infopackage ABAP routine based on attribute of Master data

Former Member
0 Kudos

Can someone help me with the ABAP for the following scenario

1. Infopackage routine

2. ABAP would need to carry out a lookup on a Master data table and will load based on the value of an attribute of the table

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

shanthi_bhaskar
Active Contributor
0 Kudos

Niten,

you can put the logic for lookup but identifying which record to be part of the logic is not possible.

for instance select /bio/materail from /bio/pmaterial into ITAB.

this means it will bring what ever records are there in the material but it is difficult identify which record to be passed for the L_T_RANGE table. please provide exact requirement

Former Member
0 Kudos

Thanks for this.

Details are as follows:

1. Loading from DSO to cube

2. DSO contains a field Sales Org

3. Sales Org contains attribute Region

4. I want to create a set of info packages based on Region i.e. load data for all Sales Org from Europe is package 1, load from Asia package 2 etc

5. All is loaded to the same cube

shanthi_bhaskar
Active Contributor
0 Kudos

DATA: ZSALES_ORG LIKE /BIO/IOSALES_ORG.


In First IP
Select /BIO/SALES_ORG FROM /BIO/SALES_ORG-/BIO/REGION INTO ZSALES_ORG
                                                                   WHERE /BIO/REGION = 'EUROPE'.
l_t_range-low = ZSALES_ORG.
l_t_range-sign = 'I'.
l_t_range-opt = 'EQ'.
modify l_t_range with sy-tabix.
endselect.

In Second IP
Select /BIO/SALES_ORG FROM /BIO/SALES_ORG-/BIO/REGION INTO ZSALES_ORG
WHERE /BIO/REGION = 'ASIA'.
l_t_range-low = ZSALES_ORG.
l_t_range-sign = 'I'.
l_t_range-opt = 'EQ'.
modify l_t_range with sy-tabix.
endselect.

The code may not be exact to the syntax.

Edited by: shanthi bhaskar on Mar 20, 2009 5:41 PM

Edited by: shanthi bhaskar on Mar 20, 2009 5:50 PM

Former Member
0 Kudos

Hi Nitin,

The above requirement looks possiable.

In the infopackage routine, loop the master data table of salesorg (P table), to get all the salesorg corresponding to a perticular region.

Then arrange them in ascending order, assign the first value to l_t_range-low & last value to l_t_range-high

Create different InfoPackages for didderent regions. Before going ahead, please check that one sales org only belong to a perticular region.

Regards,

Pankaj

Former Member
0 Kudos

Nitin,

Check: [How to ... Write Infopackage selection Routine |http://sapbwneelam.blogspot.com/2007/09/how-to-write-infopackage-selection_5355.html] for sample coding & steps.

Srini

Former Member
0 Kudos

Thanks very much to you all, will give this ago and keep the message open for the moment in case I encounter any logic issues ;-0

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Could you please eleborate your requirement, will able to help better.

1. Infopackage routine - Is the below lookup you need to carry using the routine?

2. ABAP would need to carry out a lookup on a Master data table and will load based on the value of an attribute of the table

Basically InfoPackage routines are based for dataselection. In the InfoPackage, for example you need to load data for only one Cost Center, which is a attribute for any other characteristic. You could try and read the Master data P table of the infoObject and fetch the attribute. But I am not sure if it would work correctly in your case, as in the selection screen you will have the characteristic and not its attribute.

Please let me know if you need any more help.

Regards,

Pankaj

former_member184494
Active Contributor
0 Kudos

An infopackage routine is used to FILTER ALL the records coming in... I dont think you can put your code here - you can :

Have a start routine i the transfer rule / transformation and delete unwanted records there instead...

The infopackage routine is like a gobal filter which is something like restricting a Infcube using LISTCUBE - you cannot access the data coming in using an infopackage routine...

Edited by: Arun Varadarajan on Mar 20, 2009 4:52 PM