Application Development and Automation 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: 
Read only

Code help for a cube to cube routine

Former Member
0 Likes
640

Hello friends,

I am a BW person and needed some help with writing a small code on the BI side.

This is what i have

Hello,

i need to write a code when the data is going from the Cube to another cube which says if type is in range of 5000 - 5200 its 'Service' if its in range of 6000 - 6500 then its 'Rent'.

Do i need to define each number or can i give a blanket range of 5000 to 5200 'Service' and 6000 60 6500 is 'Rent'.please assist with the routine and show me if i want to write the range then how is it possible.

Points shall be assigned.

Thanks.

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
615

Are you going to do this in a start routine? I only have limited experience with BW programming, hence my question.

Let's say you have a DATA_PACKAGE over which you are going to loop.

FIELD-SYMBOLS: <line_of_package> type DATA_PACKAGE (or structure of data_package).

LOOP AT DATA_PACKAGE ASSIGNING <line_of_package>-

IF <line_of_package>-fielda BETWEEN 5000 AND 5200.

<line_of_package>--fieldb = 'SERVICE'.

ELSEIF <line_of_package>-fieldb BETWEEN 6000 AND 6500.

<line_of_package>--fieldb = 'RENT'.

ENDLOOP.

Hope this is what you are looking for.

4 REPLIES 4
Read only

Sm1tje
Active Contributor
0 Likes
616

Are you going to do this in a start routine? I only have limited experience with BW programming, hence my question.

Let's say you have a DATA_PACKAGE over which you are going to loop.

FIELD-SYMBOLS: <line_of_package> type DATA_PACKAGE (or structure of data_package).

LOOP AT DATA_PACKAGE ASSIGNING <line_of_package>-

IF <line_of_package>-fielda BETWEEN 5000 AND 5200.

<line_of_package>--fieldb = 'SERVICE'.

ELSEIF <line_of_package>-fieldb BETWEEN 6000 AND 6500.

<line_of_package>--fieldb = 'RENT'.

ENDLOOP.

Hope this is what you are looking for.

Read only

Former Member
0 Likes
615

Thanks Micky,

Full points assigned to you.

Read only

Former Member
0 Likes
615

Hello Micky,

I have anothr question for you, can you take a look at my post in the BI forum 'RSDRI_INFOPROV_READ doesnt read data from

source at all' Link: [|], its written in the Start Routine but its not getting any data for me may be the logic,but if you can please check it for me.

Points shall be assigned

Your help will be greatly appreciated.

Thanks

Read only

Former Member
0 Likes
615

Never mind, its resolved.