ABAP: Writing Infopackage Routine

Scenario:

Do you think writing ABAP codes in SAP BW is difficult? If yes think again, because i am going to explain each of the scenario's where ABAP coding will be required and explain how the coding is done. All required is simple tips and tricks.

In our Projects either in Support or Enhancement or Development we require to realise the delta feature of a datasource even if the datasource is not delta enable. We realise it with by psedo delta feature, meaning we restrict the infopackage selection so that the daily data is delta ( unique ).

In this process we may require to create routines in infopackage selection to realise the above. so lets see how to do it.

Solution:

Go to the Infopackage.
Go to selections Tab ( example here i am selecting fiscalyear/period tab )













Select the option (6).















Up on opening the screen the code looks like above.
The important point is that our required values need to be sent to l_t_range.
l_t_range is of type Structure RSSDLRANGE.















The table contains Infoobject, fieldname, sign , option, low and high fields.
In the coding we need to pass the values to l_t_range for sign, option, low ( lower limit ) and high ( higher limit ).

example on this case based on the system date i would like to automate the fiscalyear period.
sample code is...

fmonth type /BI0/OIFISCPER.
data: l_date type sy-datum.

data: l_idx like sy-tabix.
          read table l_t_range with key
               fieldname = '/BIC/HCOPAC035'.
          l_idx = sy-tabix.

l_date = sy-datum.
concatenate l_date+0(4) '0' l_date+4(2) into fmonth.

l_t_range-low = fmonth. ***** this will assign the lower limit ****
l_t_range-high = space. ***** if we want to assign the higher limit we can so that the selection will be in range***
l_t_range-OPTION = 'EQ'.**** is equal to or less than or greater than ******
l_t_range-SIGN = 'I'. ******** its include or exclude******
*....
          modify l_t_range index l_idx.
          p_subrc = 0.

By this way we can any routine to calcualte the selection and assign it to the l_t_range which is used for holding the selections.

Hope this is clear to you....Let me know if you have any doubts on this...........

5 comments:

  1. super j'anna'....

    Satish-GTL

    ReplyDelete
  2. Hi
    Nice explanation with screenshots.
    Very nice effort of starting such a blog and anxious to see more articles of this sort. I am basically a BW consultant learning ABAP these days and practising writing few codes. But i need some scenarios or practical exercise kind of thing to practise in the system to get more confidence(atleast using statements required for BW like Select, Read, Append, Loop). So Could you please share some exercises/scenarios here or to my gmail keshavpooja4atgmail.com so that I can practise writing code for those scenarios and get better hands-on and confidence to face the complex requirement.

    ReplyDelete
  3. I will upload more scenarios...i am not getting time to do so...This week you will find... couple of new updates

    ReplyDelete
  4. Could you please share more scenarios on this blog which could be helpful for all who are seeking good explanation.

    Thanks Jana

    ReplyDelete