cancel
Showing results for 
Search instead for 
Did you mean: 

start routine to load highest Pos-Level Nr. for every Business Partner

Former Member
0 Kudos
45

Hi

I have the following issue where I need to load the data record with the highest position-level for every Business Partner from a DSO to an Info-Cube.

The records in the DSO are as follows...

BP-Nr...............Pos-Level

1001......................1

1001......................2

1001......................3

1001......................4

1002......................1

1002......................2

I need to load only the following records in the Info-Cube

BP-Nr...............Pos-Level

1001......................4

1002......................2

Could you pls help me with the ABAP coding.

Many thanks,

SD

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use start routine

Crete internal table.

Type:Begin of Internal table,

         ZBP-Nr  type BP-Nr,

            ZPos-Level  type Pos-Level

             end of internal table.

select BP-Nr

             Pos-Level

             from source table into internal table

             where ZBP-Nr = source_packge- BP-Nr.

  sort internal table with key ZPos-Level.

loop at source_package into WA.

if source_package - BP-Nr = internal table -Pos-Level.

if index=1.

continue

else delete source_package.

endif.

endloop

append WA to source_package

Regards

Sudhir Kumar.