InfoPackage-Request Selection Through Routine (To Delete)

Hello,
I have come across a situation where I don't want to delete a request from an infocube. 
Our current process always deletes requests that have the "Same or More Comprehensive" Selections (using the standard options).  However we have one request that we do not want to delete.
In the area of the infopackage that you can specify the details for "Deleting Request from InfoCube after update",  I would like to use the "Request Selection Through Routine" option available under "Exceptions" to implement a routine.
I believe i could then code a way to exclude the particular request from the deletion process.
The problem is that i cannot find any resources with examples or code samples to help me figure out how to code this.
Any help would be great!
Thanks,
Nick

Hello Nick,
You receive a table l_t_request_to_delete with all the requests in the cube you are able to delete. Now you simply need to delete your request number from the table, e.g.
DELETE l_t_request_to_delete WHERE sid = '12345'.
Best regards
Dirk
P.S.: You could also do the same by deleting all the requests except the one you want to keep, compress the cube and then continue data loading.

Similar Messages

  • Infopackage multiple selection through user custom screen

    HI ,
    Hi,
    I would like to know if the below selections are possible to be incorporated in the Infopackage selections  by writing a ABAP routine.
    we have plan to create a custom screen,whenever the user enter the value for 0VERSION it should get reflected in the infopackge.
    the value patterns are as follows:
    if the user enter the values like c01 c03 and c05 it should run and also if the user enter the value of range we can say co1 to co5(c01,c02,c03,c04,c05) it should also run.
    for instance:
    0VERSION:c01,co3 and co5 (some time they will ask us to set the value of 0version like this)
    0VERSION:co1 to co5(another set of value)
    we have plan to create a custom screen.whereever tehy want ot run teh info packge they can enter teh 0version value they want and run it.
    Please help us to get this resolved.
    Regards,
    Sakthivel S
    Type de plan d'entretien (ZTPWARPL)      

    hi,
    Create a infoobject ZLOAD with attributes OPT, ZVERLOW, ZVERHIGH and 0OBJVERS. Now let's take your scenario. You will have to maintain the below entries in infoobject master data.
    ZLOAD     OPT     ZVERLOW     ZVERHIGH      0OBJVERS
    Z1             EQ       C01                                             A
    Z2             EQ       C03                                             A
    Z3             EQ       C05                                             A
    Z4             BT        C01                    C05                  A
    Now this master data can be deleted and refilled using master data maintenance or using your own custom screen.
    In infopackage selection tab, write routine for 0VERSION and fill the values from the master data of ZLOAD infoobject.

  • Several single value selection in InfoPackage Data selection using Routine

    Hi,
    I am trying to extract data from a table(containing Ticket data) in R/3 using Generic extractor with table. As the table is not supporting the delta functionality i have to do daily full load for more than 5 lak records.
    I dont want all the tickets from R/3, i just need the tickets which are open. Unfortunately there is no field in R/3 table which indicates Ticket status. But in BW i have a DSO where i can get the tickets along with their status.
    Now what i want to do is:
    in the Infopackage i want to give the dataselection for ticket, whose status is open which will be calculated in ABAP code by lookup to the DSO. Is this possible?
    I know that in ABAP routine for Data selection we can give single values and range values. but here i just want to give several single values. That means if suppose i have 4 tickets T1,T2,T3,T4 in the DSO and if T1 and T4 are open tickets, then i have to get the data from R/3 just for T1 and T4.
    in the above case if we use range then the low and high values in the range will be T1 and T4 respectively and the data pulled from R/3 will be from T1 - T4 ie all T1,T2,T3 & T4. but i need just T1 and T4.
    Please share your ideas. also please send the code as i am not an ABAPer.
    If Several single value selection is not possible at least send the code for the range values.
    Thanks,
    Cnu.

    you can write a code like this in the ABAP routine in data selection in front of ticket characteristic
    types: Begin of s_ticket,
         ticket type <type of ticket characterisitcs>,
          End of s_ticket.
    data: l_idx like sy-tabix,
          wa_ticket type s_ticket,
          it_ticket type standard table of s_ticket,
          l_s_range type rsrdrange.
    You can declare
    read table l_t_range with key
         fieldname = '<your field name for ticket>'.
    l_s_range-infoobject = '<infoobject name>'.
    l_s_range-fieldname = '<field name of ticket cahracteristics>'.
    l_s_range-sign = 'I'.
    l_s_range-option = 'EQ'.
    select * from <ODS active table> into table it_ticket where status = <value for open status>.
    if sy-subrc = 0.
         loop at it_ticket into wa-ticket.
              l_s_range-low = wa_ticket-ticket.
              append l_s_range to l_t_range.
         endloop.
    end if.
    p_subrc = 0.
    you need to modify it as per your requirements, i hope this might help you.

  • Routine in Infopackage data selection doesnt give appropriate results...

    Hi Gurus,
    I need to pull data into PSA (BW 3.5) based on a certain selections in the Infopackage. Selection is based on specific values of Infoobject 0PLANT , however, as these values are multiple and do not fall in a specific range I have written a routine to derive these values.
    The routine  does the following steps :
    - creates an internal table from /bio/mplant and deletes the plant values that I do not wish to consider in the extraction.
    - delete data from l_t_range for fieldname = 'PLANT'
    - Appends data from the internal table to l_t_range.
    However, when I execute the infopackage, the extraction is done for ALL the 0PLANT values i.e it includes the data for 0PLANT value which have been delete from the internal table.
    My routine is :
    $$ end of global - insert your declaration only before this line   -
        InfoObject      = 0PLANT
        Fieldname       = PLANT
        data type       = CHAR
        length          = 000004
        convexit        =
    form compute_PLANT
      tables   l_t_range      structure rssdlrange
      using    p_infopackage  type rslogdpid
               p_fieldname    type rsfnm
      changing p_subrc        like sy-subrc.
          Insert source code to current selection field
    $$ begin of routine - insert your code only below this line        -
    TYPES ls_range like l_t_range.
    data: l_idx like sy-tabix.
    DATA: lt_plant like /bi0/mplant OCCURS 0 with header line.
              SELECT PLANT from /bi0/mplant into lt_Plant WHERE objvers = 'A
              ENDSELECT.
              delete lt_plant WHERE plant = 'W206'.
              delete lt_plant WHERE plant = 'WF11'.
              delete lt_plant WHERE plant = 'W945'.
              DELETE lt_plant WHERE plant = 'W530'.
              read table l_t_range with key
                   fieldname = 'PLANT'.
              l_idx = sy-tabix.
              DELETE l_t_range where fieldname = 'PLANT'.
              Loop at lt_plant.
                    l_t_range-sign = 'I' .
                    l_t_range-low = lt_plant-plant.
                    l_t_range-OPTION = 'EQ'.
                    append l_t_range.
              endloop.
              modify l_t_range index l_idx.
              p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    endform.
    Any bugs in the routines ?

    try this one:
    Loop at lt_plant.
    if lt_plant-plant ne 'WF11' or lt_plant-plant ne 'W945' or lt_plant-plant ne 'W530'.
    l_t_range-sign = 'I' .
    l_t_range-low = lt_plant-plant.
    l_t_range-OPTION = 'EQ'.
    append l_t_range.
    endif.
    endloop.
    or
    don't use a table with header ( use a standard table and use a work area to access the table ) and do an other select like this:
    SELECT PLANT from /bi0/mplant
    into corresponding fields of table lt_Plant
    WHERE objvers = 'A
    and plant ne 'WF11'
    and plant ne 'W945'
    and plant ne 'W530'.
    I hope it helps...
    Kind regard.
    Tobias
    Edited by: Tobias Kreuser on Aug 23, 2010 11:34 AM

  • Delete Request using a Routine in the Scheduler

    Hi all,
    I have an infocube. Data are loaded into this cube on a <b>weekly basis</b> according to the following requirements.
    Example:
    Let's assume <b>we are in April</b>and <b>April has 4 weeks</b>:
    <b>Week 1 of April</b> - Data for week 1 are loaded
    <b>Week 2 of April</b> - Data for week 1 and 2 are loaded
    (request for week 1 is deleted)
    <b>Week 3 of April</b> - Data for week 1, 2 and 3 are loaded
    (request for week 2 is deleted which were the data for week 1 and 2)
    On the <b>2nd day of the following Month (in our example this would be May 2nd) Data for week 1, 2, 3, and 4 of April are loaded.</b>(request for week 3 is deleted which were the data for week 1, 2 and 3).
    <b>These April data</b> (loaded on the second day of the following month) <b>should stay in the cube then and not be deleted any more.</b>
    The procedure for the following Months (i.e. for May etc) should be the same.
    This means
    <b>Week 1 of May</b> - Data for week 1 are loaded
    <b>Week 2 of May</b> - Data for week 1 and 2 are loaded
    (request for week 1 is deleted)
    etc.
    On the <b>2nd day of the following Month (in our example this would be June 2nd) Data for week 1, 2, 3, and 4 of May are loaded.</b>(request for week 3 is deleted which were the data for week 1, 2 and 3).
    <b>These May data</b> (loaded on the second day of the following month) <b>should stay in the cube then and not be deleted any more.</b>
    CAN ANYBODY HELP ME WITH THIS REQUIREMENT AND TELL ME HOW I CAN DO THAT?
    CAN I DO THAT USING A ROUTINE IN THE SCHEDULER ON TAB DATA TARGETS TO DELETE THE REQUEST BASED ON THE LOGIC DESCRIBED ABOVE? DOES ANYONE HAVE  SAMPLE CODE FOR THAT?

    hi Christian,
    from service.sap.com/bi
    hope this helps.
    User Exit after Data loading
    (a)     Delete old request
    REPORT Z_RSSM_START_SECOND_PROCESS_1 .
    TABLES: RSREQDONE,   " Request-Data
            RSSELDONE,   " Selection for current Request
            RSICCONT.    " Request posted to which InfoCube
    DATA: L_T_SELDONE LIKE RSSELDONE OCCURS 0 WITH HEADER LINE.
    DATA: L_T_ICUBE LIKE RSICCONT OCCURS 0 WITH HEADER LINE.
    DATA: L_LOGSYS LIKE RSSELDONE-LOGSYS.
    DATA: L_SOURCE LIKE RSSELDONE-SOURCE.
    DATA: L_SELDATE LIKE RSSELDONE-SELDATE.
    DATA: L_SELTIME LIKE RSSELDONE-SELTIME.
    DATA: BEGIN OF L_T_RNR_DEL OCCURS 0,
            ICUBE LIKE RSICCONT-ICUBE,
            RNR   LIKE RSSELDONE-RNR,
          END OF L_T_RNR_DEL.
    PARAMETER I_RNR LIKE RSREQDONE-RNR.
    SELECT SINGLE * FROM RSSELDONE WHERE
           RNR = I_RNR.
    IF SY-SUBRC <> 0. "new rquest does not exist, wrong rnr !!!
      EXIT.
    ENDIF.
    SELECT * FROM RSICCONT INTO TABLE L_T_ICUBE WHERE
           RNR = I_RNR.
    IF SY-SUBRC <> 0.     "New request is not posted to any IC
      EXIT.               "nothing will be deleted
    ENDIF.
    L_SOURCE  = RSSELDONE-SOURCE.
    L_LOGSYS  = RSSELDONE-LOGSYS.
    L_SELDATE = RSSELDONE-SELDATE.
    L_SELTIME = RSSELDONE-SELTIME.
    SELECT * FROM RSSELDONE INTO TABLE L_T_SELDONE WHERE
           SOURCE  = L_SOURCE AND
           LOGSYS  = L_LOGSYS.
    DELETE L_T_SELDONE WHERE
           RNR = I_RNR.            "new request will be deleted
    DELETE L_T_SELDONE WHERE     "delete younger requests
             SELDATE > L_SELDATE OR
           ( SELTIME > L_SELTIME AND
             SELDATE = L_SELDATE ).
    *Sort
    SORT L_T_SELDONE BY SELDATE DESCENDING SELTIME DESCENDING.
    REFRESH L_T_RNR_DEL.
    LOOP AT L_T_SELDONE.   " Requests to be deleted
      LOOP AT L_T_ICUBE.   " Request existing in InfoCubes
        SELECT SINGLE * FROM RSICCONT WHERE
               ICUBE = L_T_ICUBE-ICUBE AND
               RNR   = L_T_SELDONE-RNR.            "check if posted to IC's
        IF SY-SUBRC = 0.
          L_T_RNR_DEL-ICUBE = L_T_ICUBE-ICUBE.
          L_T_RNR_DEL-RNR   = L_T_SELDONE-RNR.
          APPEND L_T_RNR_DEL.
        ENDIF.
      ENDLOOP.
      IF NOT L_T_RNR_DEL[] IS INITIAL. " something found for rnr
        EXIT.
      ENDIF.
    ENDLOOP.
    LOOP AT L_T_RNR_DEL.
      CALL FUNCTION 'RSSM_DELETE_REQUEST'
           EXPORTING
                REQUEST                    = L_T_RNR_DEL-RNR
                INFOCUBE                   = L_T_RNR_DEL-ICUBE
           EXCEPTIONS
                REQUEST_NOT_IN_CUBE        = 1
                INFOCUBE_NOT_FOUND         = 2
                REQUEST_ALREADY_AGGREGATED = 3
                REQUEST_ALREADY_COMDENSED  = 4
                OTHERS                     = 5.
      IF SY-SUBRC <> 0.
    open for error-handling
      ENDIF.
    ENDLOOP.

  • How to know infopackage request ID in transformation routine ?

    Hi All,
    I'm looking for the ABAP code to know the infopackage request ID in transformation start or end routine
    I can see this ID when I clic on "manage" on a PSA (looks like for instance REQU_D706H24SFFUIGNKMQMPPAIJLM)
    I need it in transformation routine
    Thanks for your help
    Sebastien Lepeltier

    Sorry Sat but again with the code :
    field-symbols: <l_requnr> type any.
    data: l_requnr_fieldnm type string value 'l_requnr'.
    assign (l_requnr_fieldnm) to <l_requnr>.
    I have this error message in debug mode : Field symbol <L_REQUNR> is not yet assigned
    Thanks Joe for the answer but in
    IMPORTING
    request TYPE rsrequest
    datapackid TYPE rsdatapid
    request and datapackid are filled with information of the current DTP not infopackage source
    Sebastien

  • Routine in infopackage for selection

    I am writing an ABAP routine in an infopackage to select data upto a certain year. I want to load data for all the years upto 7 years ago. However, if I leave the l_t_range-low blank, the infopackage throws an error when I run it saying invalid date range. What's the right way to assign the low value?
    l_year = sy-datum(4) - 4.
    l_t_range-sign    = 'I'.
    l_t_range-option  = 'BT'.
    l_t_range-low     = ''.
    l_t_range-high = l_year.
    modify l_t_range index l_idx.

    Hi Uday
    Add l_t_range-low = sy-datum(4). Also i see that in l_year you have defined it as sy-datum(4) - 4. So you are only picking latest 4 years. Please change it to 7 if you want the latest 7 yrs.
    Regards,

  • How to debug a ABAP Routine which is in Infopackage Data selection Tab

    Hi ,
       Please let me know How to debug a ABAP Routine which is in Infopackage Data selection Tab.

    Hi,
    You can try to create infinite loop:
    DATA: STOP.
    WHILE STOP IS INITIAL. ENDWHILE.
    Start InfoPackage and then go to SM50 and swich on debugging for your process. Then in debugger you can change value of STOP variable to skip the loop.
    Krzys

  • ABAP Routine in InfoPackage for selection

    Hello,
    I have 2 InfoPackages for loading from ODS1 to ODS2. InfoPackage 1 is restricted via ABAP Routine to load only certain customer numbers.
    InfoPackage 2 is supposed to load all other customer numbers - therefore the ABAP Routine makes ranges that exclude the customer numbers selected in InfoPackage 1.
    Now I face the fact that the selection of InfoPackage 2 is much to small in numbers. Problem is, the ranges only work when entered manually - but via ABAP entry these ranges don`t work. I can`t understand why this problem happens. Do you have an idea?
    Example (first number is from, 2nd number is to)
    InfoPackage 1:       customer numbers     
    5| 5
    100|100
    999|999
    InfoPackage 2: customer numbers
    0|4
    4|99
    101|998
    1000|99999
    But selection of InfoPackage 2 does not work propberly...
                                                                                    Thanks for your help,
    Angelika

    Hi,
    no, that was just a typing mistake. Sorry.
    The problem is, that in Monitoring I can see the selection and it looks good.
    But when I check the number of datasets selected it is far to small. Therefore I don`t believe the selection works.
    I tried manually to put all the ranges selected by ABAP Routine in InfoPackage 2 in another InfoPackage 3 - the selection is identically to InfoPackage 2 (but not made via ABAP, but manually) and in Monitoring the selection looks absolutly alike.
    But the manuall InfoPackage 3 selects far more records than InfoPackage 2.
    I can`t understand the problem. Can you? Can you give me advice?
    Thanks,
    Angelika

  • Routine in Infopackage Data selection Tab

    HI,
    I am having one InfoObject (marital staus) in InfoPackage Data selection Tab.
    Now I want to write a ABAP routine for that infoObject in Infopackage to select only those records of  marital status = ‘SINGLE’.
        I am new to ABAP . please let me know what code should I write in this routine.

    Hi Kris,
    You would do it like this:
    data: l_idx like sy-tabix.
              read table l_t_range with key
                   fieldname = 'MARITAL_STATUS'.
              l_idx = sy-tabix.
              move: 'I'      to l_t_range-sign,
                    'EQ'     to l_t_range-option,
                    'SINGLE' to l_t_range-low.
              modify l_t_range index l_idx.
    Thanks,
    Joseph

  • Cannot select through transparency in .png

    Hi,
    I'm new to Edge Animate, coming from a Flash background.
    While working on a simple (rough) image gallery to try out Edge. I noticed an issue of not being able to select through the  transparency of a png image.
    My gallery has the buttons under the knockouts of the Nav Bar frames. I noticed the png was the issue after I checked all the code and tested the gallery with the Nav Bar temporally deleted and the buttons worked.
    My work around will be to Photoshop the button images to fit over the Nav Bar openings.
    Just wanted to bring up this issue because I'm not sure if it's a bug or normal for Edge.
    Best regards,
    Darren
    UPDATE:
    Buttons have to be top level items within EDGE.

    Hi Darren,
    You're not doing anything wrong - PNGs by nature don't allow you to click through the transparent spots. The whole image is considered an element. This isn't a limitation of Animate, it's just how HTML works.
    There is one thing you can try to have the cursor ignore the entire image. Enter this in your compositionReady event for the stage:
    sym.$("pictureName").css("pointer-events","none");
    ...and change pictureName to the name of your element as it appears in the elements panel.
    Caveat emptor, this technique doesn't work in IE.
    Sarah

  • While deleting an album, I hit select all, instead of deleting just that album the entire genre was deleted. I was able to get back all the purchased songs , but none of the cds that were in my collection. Any way to get those songs back?

    While deleting an album, I hit select all, instead of deleting just that album the entire genre was deleted. I was able to get back all the purchased songs , but none of the cds that were in my collection. Any way to get those songs back?

    Assume you were in itunes?  Also assuming windows?  Two paths I can think of.....
    1) Normally anything deleted from itunes goes to recycle bin.  If you did not pick remove from computer probably still in itunes music directory.  Just add back.  Note to speed things up you can use add directory.
    2) Use restore previous version of music directory.  To be safe I'd back up current directory, do a restore, then swap back original directory and use restored directory off line.
    I do not know of nice solution, I like to hack my way through.

  • How to select a record and delete using sereen painter in alv

    Hi experts i have displayed a table in selection sereen
    in alv by using table control(sereen painter).
    My request is to display the database table records
    when i press F8.
    I also have two buttons one is 'DELETE'
    and another one is 'INSERT'.
    My request is i have to select a particular record in
    the output and if i press the 'delete' button means
    then the selected record should be deleted in that table
    and also in database table.
    Like if i insert a new record means then the record
    should be inserted in that table and database table...
    Kindly plz send the coding immediately............

    Hi,
    create a module in ur  PROCESS AFTER INPUT fro eg
    MODULE select.
    select * from db into table itab.
    module delete.
    db-field = wa-field(this is the field u r going to delete in ur  table control and in database table).
    append wa to itab.
    delete <db table> from itab.
    module insert.
    db-field = wa-field(this is the field u r going to insert in ur table control and database table )
    append wa to itab.
    insert <db table> from itab.
    regards,
    dhaya..

  • Infopackage-Data Selection Tab Values Get Populated Automatically.

    Hi All,
    In infopackage dataselection tab currently we are entering manually values for 0version info object and process has to be done for 4 differenct infopackagewe are getting a ticket for doing this process for every month.So 0version values would not be unique values ,all the values are different,for instancec10,c99,c11.
    user community felt that this one is a time consuming take they want to customize it and they want to enter the value on their own thorug some custom sap screen.
    we cannot give access to the user for the infopackage selection and all .we have figured out like we have to create a custom t code and give acces to the user for that t code alone.
    If the user enter the 0version value in the front end of it should get reflected in  infopackage dataselection tab.
    It would be really grateful if u have shared ur thought on the same.
    Regards,
    Sakthivel S

    Hi,
    You could use the TVARVC table instead of creating a Z-control table, and allow the users to enter the data into TVARVC via the tcode you are creating.
    So for instance the table entries could be as follows.
    NAME
    SIGN
    OPT
    LOW
    HIGH
    IP_1
    I
    EQ
    V1
    IP_2
    I
    BT
    V3
    V4
    IP_3
    I
    EQ
    V9
    Now, in the first InfoPackage, write the ABAP routine to read the data from TVARVC where the NAME = IP_1. Based on the results the InfoPackage restrictions will be populated by the routine. 
    In the second InfoPackage you read based on NAME = IP_2. And so on. Rest of the routine code is same as in the first InfoPackage.
    This way you can be assured that the different IPAKs will not have overlapping criteria as long as the table entries are correctly maintained.
    Regards,
    Suhas

  • Infopackage Data Selection Problem

    Hi All,
    When i load master data from source system, in Infopackage data selection tab i give some criteria (e.g Customer number = 1000) But in infopackage the data load with all customer.(Not only 1000)
    How can i solve this problem??

    Hello Ozan,  
    Please check the datasource in RSA3 and make sure that its working for the same selection.
    Is there any routine in your infopackage and what is your source system?
    [Thanks|http://chandranonline.blogspot.com/]
    [Chandran|http://chandranonline.blogspot.com/]

Maybe you are looking for