cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to read multiple value from stvarv varibale in abap

alpavora
Explorer
0 Likes
2,251

Hello Experts,

I am working on infocube to infocube data copy and using stvarv variable time which has multiple entries.

I am new to abap and looking for sample code on how to pass multiple value from stvarv VARIABLE in DTP filter routine.

I have started with below code but it is reading only one value

data: ls_dyn_time like LINE OF l_t_range.

SELECT LOW into ls_dyn_time-low from TVARVC
WHERE name = 'stvarv variable name'.

l_t_range-fieldname = '/B28/S_********'. "TECHNICAL - TIME ID
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = ls_dyn_time-low.

*.... Range of TIME dimension members should be only stored in 'LOW'
*column of TVARVC variable
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.

ENDSELECT.

Can someone please help where to put loop so that it will read value multiple value from STVARV variable and do data copy?

Thanks

Al

Accepted Solutions (0)

Answers (5)

Answers (5)

alpavora
Explorer
0 Likes

Need to copy data to different environment for archive purpose.

Here is my code and it works for only one time period from STVARV variable. and it stops. I need to put loop so that it can read more time period in list and do data copy.

data: ls_dyn_time1 like LINE OF l_t_range.
SELECT LOW into ls_dyn_time1-low from TVARVC WHERE name = 'TVARVC VARIABLE NAME '.

l_t_range-fieldname = 'TECHNICAL ID OF TIME DIMENSION /B28/S_******'. " - TIME ID
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = ls_dyn_time1-low.

if l_idx <> 0.modify l_t_range index l_idx.else.append l_t_range.endif.
p_subrc = 0.
ENDSELECT.

former_member186338
Active Contributor
0 Likes

"Can I still use script logic with destination app if cubes are in different environment." - No, you can't. You have to use custom logic badi in this case.

But looks strange - why to use different environments instead of different models in one environment?

alpavora
Explorer
0 Likes
I forgot to mentioned that my cubes are not in same environment. Can I still use script logic with destination app if cubes are in different environment.

Thanks,

Al

former_member186338
Active Contributor
0 Likes

"I am trying to copy data between two BPC cube" - don't use DTP for this task.

To copy data between BPC cubes you can use:

1. Script logic *DESTINATION_APP operator

or

2. Custom logic badi with BPC specific methods like:

run_axis_query_symm to read

write_back to write

Search for the document: "How To… Migrate BPC 7.x BADIs to BPC 10"

alpavora
Explorer
0 Likes

Hi Vadim,

I agree it is more related to ABAP code which I need to enforce on DTP routine. I am trying to copy data between two BPC cube.

Which category I need to select so that it get answered.

Thanks,

Al