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

Similar Messages

  • 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

  • Can't find 0FYTLFP OLAP Variable in InfoPackage Data Selection tab on 3.5

    On BW 3.5, when generating an InfoPackage with the datasource as Purchasing Data(80PUR_C01), under Data Selection tab, for the InfoObject 0FISCPER, I selected 7 (OLAP variables)for the Type column, then click the button next to it and under the column of Details for Type to bring up a window, but when expending the OLAP Variable field list, can't find the following value in the list which shows up on BW 3.1:
    0FYTLFP     0FISCPER Cumulated to Last Fiscal Year/Period (SAP Exit)
    How to make the above value show up in the OLAP Variable list?   I thought maybe the variable 0FYTLFP needs to be installed in Business Contents, but there is no variable object type in Business Content.  It sounds like a SAP Exit, but how to make the SAP Exit value show up on BW 3.5?
    Thanks for everyone's input!

    hey Rohit,
    Besides the three variable values in the list on BW 3.5, now I find a new one in the list, called "0E_ROLE     0SR_ROLE     Role (SAP Exit)", I have no idea why this one shows up now.  Now all the four variables in the list are:
    1. 0CML12LM     0CALMONTH     Last 12 Months Excluding the Current Month
    2. 0CMONTH     0CALMONTH     Current Calendar Month
    3. 0E_ROLE     0SR_ROLE     Role (SAP Exit)
    4. 0S_RQMRC     0REQUID     Most Current Data
    0FYTLFP is still not in the list!   We can't try to create BEx query since our BW 3.5 system is just installed and we have not got to the step to ceate a query.  I try the 2nd way you suggested by pressing F6 on this variable with the typed in value 0FYTLFP, get the following msg "BEx variable 0FYTLFP could not be evaluated - No error message", that means it would not work on BEx query as well, right? 
    What could be the reason that we can't see 0FYTLFP variable in our new installed BW 3.5?  Do you think our BASIS missed installing sth?
    Thanks
    Message was edited by: Kevin Smith

  • How to debug an OLAP variant which is in Infopackage Data selection Tab

    Hi experts,
    How can I debug an OLAP variant used in the data selection tab for an infopackage? The loading is done via process chains. I am trying to debug the SAP delivered OLAP variant 0P_PPER3 of infoobject 0FISCPER3 (SAP exit). If I am not mistaken I believe the function module is RSVAREXIT_0P_PPER3. Thanks.

    Hi Mark !
    This method is always good (if you have authorization to work in SM50):
    put before your code an endless loop like this one:
    data flag type c.
    clear flag.
    do.
    if flag = ' '.
    exit.
    endif.
    enddo.
    then start your load...go to SM50 and here you will see your process looping on the same pgm...highlight the process and access into it in debug mode from the menu...
    here you can change flag in 'X', exit from the loop and continue all the process in debug !!!
    Hope it helps!
    Bye,
    Roberto
    ...and please don't forget to reward the answers...it's THE way to say thanks here !

  • 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

  • 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

  • Regarding infopackage data selection tab....

    Hi sap Gurus,
    I have an 2 acc.types r their in this  one is "Explosre" and "Income" i have to display only explosre data in data target level.how to possible?
    Thanks
    devi.

    Hi Devi,
    you can this
    1. By restricting account type as expense
    or
    2. by restricting GL no's in that series(eg: 4 series )
    hope this will help you.
    Thanks,
    Vijay.

  • 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/]

  • Routine in data selection tab

    hi friends,
    i need to write routine in data selection tab , i need like when ever i open need to show current data.
    how can i write coding.
    i have code like this, please correct my code
    L_t_RANGE_IOBJNM = '0CALDAY'.
    L_t_RANGE-FIELD NAME = 'CALDAY'.
    L_t_RANGE-SIGN = 'I'.
    L_t_RANGE-OPTION = 'EQ'.
    L_t_RANGE-LOW = sy-datum .
    I DIDNT UNDERSTAND HERE WHAT IS ACTUALLY IOBJNM  WHAT DO U MEAN BY LOW AND HIGH ACTUALLY. FIELD NAME MEANS I NEED TO MENTION LIKE/BIC/ZMNO LIKE .
    THANKING U,
    SUNEEL.

    Check below link to understand the RANGE type objects in ABAP. The OBJNAM is the object name which is used for selection in the InfoPackage. l_t_range is the internal table which contains all the selections used in the InfoPackage. So, if you need dynamic selections you have to code to populate dynamic values for the corresponding InfoObject in this Internal table. Low/High are the fields which actually contains the "From" and "to" range in selection. 
    Option -  <,>,=, <> etc.
    Sign -Include/Exclude (I/E)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm
    Regards,
    Sree

  • Change the data selection tab page in an InfoPackage

    Hi SDN Community,
    Is it possible to have an Infopackage and change the data selection tab page ? Because  I would like to know if  I can change the select-options by a parameter.
    For example: Now you can enter 01.01.1950 as the start date and 31.12.9999 as the end date,
                          I only want that the user enter the start date.
    Thanks a lot,
    best regards.
    Ana

    Yes, I tried an abap routine option and the result is not good because the user can't put the information in the low (start date) parameter.
    Thanks

  • Data Selection tab in infopackage

    Hi Gurus
    Its a very basic question but can anybody tell me what function the "data selection " Tab does in infopackage?
    I know the setting required on R3 side for that but not sure why we use the data selection.
    Can we use this data selection for master data as well?

    Hi Kris,
    Data Selection tab allows you to select: date ranges, document numbers and the like.
    In order to have filds in there, you should first select in the DataSource in the R/3 side wich field could be selected.
    If it is a Generic DataSource, you can do it running RSO2 transaction code.
    <text removed by moderator>
    Claudio
    Message was edited by: Matthew Billingham

  • How To Add InfoObject in the Data Selection Tab of InfoPackages in 2004s

    Hi Y'all!
    I would like to ask how to add an infoobject in the Data Selection Tab of the InfoPackage in 2004s.  It says its optional, this definintion of selection criteria for the infopackage.
    My apologies, I don't understand how this is done.  Surely, I would like, however, to understand how to add an infoobject in this data selection Tab of the InfoPackage in 2004s.
    Can any kind soul out there (gurus) please lend me your thoughts?
    Regards,
    Philips

    Hello Rajani!
    Thank you very mcuh for that!  I super appreciate it!  Can you prescribe how I can do this step by step please?  Where exactly in the DS can I locate this "field for selection" option in the DataSource?
    Regards!
    Philips

  • Data selection tab of infopackage

    hi all,
    how do we select data from infopackage if you do not want a certain value?
    I wrote ABAP code to select not as:
    L_t_RANGE-SIGN = 'I'.
    L_t_RANGE-option = 'NE'.
    L_t_RANGE-low = 'Y'.
    But I got errors. Sign 'I' with 'NE' is not allowed. Please advise.
    Linda

    Linda,
            <b>Exclude Option won't work in the Infopackage data selection routine.</b>
    You can use SIGN equals to I only and option values EQ, CP and BT.
    Try append all the required values. use BT as well as eq.
    If you want to permenantly exclude those to BW. you have 3 good options along with Infopackge Selection.
    1. <b>User Exit in the Source System.</b>
    2. Start Routine in the Transfer Structure.
    3. Start Routine in the Update Rules.
    all the best.
    Regards,
    Nagesh Ganisetti.
    *assign points if it helps.

  • Special Characters in InfoPackage Data Selection

    Hi Experts,
    Is it possible to include special key such as * in the data selection tab in the infoPackage? e.g. *AB
    I have created a custom DataSource to extract all work order with costs data.
    However we only need work order data with revision number that finishes with 'AB' for reporting. (if I do not apply this selection, extracted data will be too big).
    i.e.
        REVNR
        00000012AB --> to be included in extraction
        00000231AB --> to be included in extraction
        00012322AB --> to be included in extraction
        Y07WK06    --> excludes this record
        00000007AB --> to be included in extraction
    Can this be achieve by using '*AB' in the data selection screen?
    Currently, SELOPTS of custom DataSource is been set to '0'. (where can I change this SELOPTS value to something else?)
    If special key is not allowed in the data selection screen, can you suggest any alternative solution?
    Kind regards,
    Steve

    Hi steven,
       Yes you can do this one at info package level by selecting the ABAP Coding at Type (variable change for selective values) at selection tab of info package.
      Here you need write ABAP coding according to your business requirements….
      or
      You can drop unnecessary data at update routine.
    Regards,
    PRK
    Message was edited by: PRK

  • Adding a field in data selection tab of Info Package

    Hello,
    how can I add a field for selection in the data selection tab of the info-package in BW 3.5.
    Thanks,
    SD

    Hi,
    You need check Selection in RSO2 in ECC then that field is available for Selectgion in InfoPackage.
    Here I'm giving 0CUST_SALES_ATTR DataSource Example for Selection Change, so see the logic and accordingly you can change your DataSource Selections.
    See the properties of that field in RSA2 in ECC and you can also make it for selection, use the following program and see it.
    In ROOSFIELD table give the datasource 0CUST_SALES_ATTR and see , select only Active version Fields.
    For the following fields you can find FIELD = X, it indecates that it is abailable for selections, so in this way you try to do it by using following program and check.
    KUNNR
    SPART
    VKORG
    VTWEG
    REPORT ZBI_ROOSFIELD NO STANDARD PAGE HEADING .
    tables ROOSFIELD.
    Update ROOSFIELD set SELECTION = 'X' where
    OLTPSOURCE = '0CUST_SALES_ATTR' and
    FIELD = 'FAKSD '.
    Also see SAP Note : 1033847
    Re: Field Selection in Datasource 0CUST_SALES_ATTR
    Thanks
    Reddy

Maybe you are looking for

  • External display won't sleep

    I just purchased an NEC PA271 27" LCD display for my Mac Pro. It's beautiful, clear and sharp, but there's one problem: it won't sleep. When I put the computer to sleep or shut it down, the monitor doesn't go into sleep mode. The blue LED on the fron

  • Problems launching Itunes

    Having real problem since installing iTunes 10. Install worked fine but on launching nothing happens. In task manager, iTunes appears in the Process tab but not in the application tab. Have uninstalled and resinstalled but no luck. Anybody have any i

  • Safe Boot Mode Freeze and Mavericks and Core Storage

    I was having a problem booting into Safe Mode on a new iMac. It froze and restarted continuously. Eventually I was told by engineering (after the Senior Tech) that... "It's expected behavior from any disc formatted with core storage and that includes

  • Sap CRM Interactive Reporting Managers only see their own Opportunitys

    Hi Sap Community, I have set up Interactive Reporting as described in the C41 guide, "/CRMBW/CONFIG_WIZARD" shows no Errors and it works fine for normal employees but when I execute a report as a manager, i can only see Opportunitys, where the manage

  • Parsing a file with different groupings!

    I need to parse a file. The file looks like this. ABC45     CLIENT-90      MY COMPANY-0333    STOCK  VS POSITIONS      DATE ......n number of records here ABC45     CLIENT-90      MY COMPANY-0897    STOCK VS POSITIONS       DATE .....n number of reco