Question:
Hi all,
I want to write a ABAP routine in InfoPackage for Selection Criteria in which the value should be taken from another ABAP program. Please give me your valuable suggestions.
Thanks in Advance,
Ram
Answer:
Here's the code, i use in the infopackage to manipulate the date. This will dynamically load the previous 7 days data. I think, you can call the other ABAP program here and manipulate the value.
data: l_idx like sy-tabix.
data: today like sy-datum,
last_week like sy-datum.
today = sy-datum.
last_week = sy-datum - 7.
read table l_t_range with key
fieldname = 'LST_MDFD_DT'.
l_t_range-sign = 'I'.
l_t_range-option = 'BT'.
l_t_range-low = last_week.
l_t_range-high = today.
l_idx = sy-tabix.
modify l_t_range index l_idx.
p_subrc = 0.
Good luck!
Answer:
Thanks a lot. I did it the way you suggested. It is working perfectly. Thanks again.
Answer:
We also have a requirement to load last month's data into a separate infocube.
I would like to know where exactly should I put this code.
Start Routine???
Thanx,
Ally
Answer:
You need to write the code in the InfoPackage Data Selections.based on the selection criteria to corresponding entries for date will pick the values.
Ram
Answer:
We also have a requirement to load last month's data into a separate infocube.
I would like to know where exactly should I put this code.
Start Routine???
Thanx,
Ally
how about a separate InfoPackage? don't see why you need code for that...
Answer:
We want to code this so that the last one month is determined dynamically instead of changing the date selection every day.
Koolmuffin (Ram),
I am still unclear about where to put the code. On InfoPackage Data Selection tab, I can not find any place to put code. Could you please elaborate? My apoogies if I sound dense.
Thanks,
Alisha
Answer:
You mentioned entering ABAP inside a infopackage.
Where do you enter the code?
In the data selection tab you only have to and from for the fields you have marked as select in the extractors etc.
Im sure Im missing something here but
would appreciate a bit more info.
Answer:
Alisha,
In the data selection tab you have to and from for the fields you have marked as select in the extractors etc. The next field is type. there if you select type ABAP routine(6) you will have the option to write ABAP code in the editor. I guess this will clear your doubt.
Ram