ABAP Selection in infopackage

Hi
I want to get only these four documents:
data: l_idx like sy-tabix.
read table l_t_range with key
     fieldname = 'BILL_NUM'.
l_idx = sy-tabix.
if sy-subrc = 0.
  l_t_range-sign = 'I'.
  l_t_range-option = 'EQ'.
l_t_range-low = '600354894'.
  modify l_t_range index l_idx.
l_t_range-low = '600354900'.
  append l_t_range.
l_t_range-low = '600354902'.
  append l_t_range.
l_t_range-low = '600354904'.
  append l_t_range.
l_t_range-low = '706145825'.
  append l_t_range.
ENDIF.
p_subrc = 0.
Is this right? I have a modify l_t_range after the first document and then just append, is that right?
Regards,
Torben

HI,
yes you are right..but see this
data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = 'BILL_NUM'.
l_idx = sy-tabix.
if sy-subrc = 0.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = '600354894'.
modify l_t_range index l_idx.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = '600354900'.
append l_t_range.
clear l_t_range.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = '600354902'.
append l_t_range.
clear l_t_range.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = '600354904'.
append l_t_range.
clear l_t_range.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = '706145825'.
append l_t_range.
clear l_t_range.
ENDIF.
p_subrc = 0.
reward if useful
regards,
nazeer

Similar Messages

  • Make ABAP selection for InfoPackage

    I am making a ABAP routine for a field on my info package. The field contains a date.
    The constraint that I want to make is as follows:
    select max( /BIC/FCVERDATE ) from /BIC/AAPO_O1000 into FCVERDATE.
    But I am not sure how to make the constraint in the code:
    data: l_idx like sy-tabix.
    DATA: FCVERDATE LIKE /BIC/....
              read table l_t_range with key
                   fieldname = '/BIC/FCVERDATE'.
              l_idx = sy-tabix.
              modify l_t_range index l_idx.
              p_subrc = 0.
    Thanks in advance,
    regards,
    Torben

    Solved
    DATA: FCVERDATE LIKE /BIC/....
    select max( /BIC/FCVERDATE ) from /BIC/AAPO_O1000 into FCVERDATE.
    read table l_t_range with key
    fieldname = '/BIC/FCVERDATE'.
    l_idx = sy-tabix.
    l_t_range-option = 'BT'.
    l_t_range-low = FCVERDATE.
    l_t_range-high = FCVERDATE.
    modify l_t_range index l_idx.
    p_subrc = 0.
    I properly could have use 'EQ' instead of 'BT'.
    Regards,
    Torben

  • ABAP selection in InfoPackages

    I have to select financial data from an ODS via the following logic:
    CASE MONTH.
       WHEN 1.
           PERIOD1 = 13.
       WHEN 2.
           PERIOD1 = 14.
       WHEN 3.
          PERIOD1 = 15.
    ENDCASE.
    PERIOD2 = MONTH.
    The year has 16 periods and the ODS contains more than one year of data. In the InfoPackage I only want to extract data for the months PERIOD1 and PERIOD2. For example, when MONTH = 1, I only want to extract the periods 13 and 1, but not 14, 15 and 16.
    How can I restrict the selection criteria in the InfoPackage so that I only extract the two mentioned periods and not the data in between? I know that I can change the selection criteria in the InfoPackage using the following variables, but I cannot figure out the correct approach:
    L_T_RANGE-OPTION
    L_T_RANGE-SIGN
    L_T_RANGE-LOW
    L_T_RANGE-HIGH
    Thanks in advance,
    James

    Hi,
    here is an example for the select option of =FISCPER where prediod/year is build from current date:
    $$ begin of routine - insert your code only below this line        -
      data: l_idx like sy-tabix.
      read table l_t_range with key
           fieldname = 'FISCPER'.
      l_idx = sy-tabix.
      l_t_range-sign = 'I'.
      l_t_range-option = 'EQ'.
    *.... Format =   YYYY      0            MM
      concatenate sy-datum(4) '0' sy-datum+4(2) into l_t_range-low.
      modify l_t_range index l_idx.
      p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    /manfred

  • 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

  • ABAP routine at Infopackage selection options

    Dear all,
    I need to write ABAP Routine at InfoPackage Selection Options.
    Requirement is to bring only the versions (contains 2 characters) starting with 'C'.
    Ex. I need versions CR, CP...
    Code template is the following:
    data: l_idx like sy-tabix.
    read table l_t_range with key
         fieldname = 'VERSB'.
    l_idx = sy-tabix.
    modify l_t_range index l_idx.
    p_subrc = 0.
    Can anybody help me to resolve this?
    Regards

    Hi,
    here is an example:
      DATA: string(40) TYPE c.
      CONCATENATE 'C' '%' INTO string.
      SELECT *
      FROM /bi0/hwbs_elemt
      INTO TABLE lt_hwbs_elemt
      WHERE nodename LIKE string.
    Best regards,
    Frank

  • ABAP routine in infopackage that runs function in ECC

    Hi All
    I need to have dynamic filter in the info package
    I have program in ECC that brings me the value that I need to filter in my info packege
    I want to use  ABAP routine in infopackage that runs function in ECC and brings the value that was received from the ECC function
    Is that possible?
    Thanks

    Hi All
    my CTO found the following option
    function module that is "remote-enabled module "
    then you call CALL FUNCTION 'Y_FM_IDOC_CATSDB' DESTINATION 'SAP4.7E'
    you need to define it in SM59
    code example
    data: BEGIN OF IT_SOBSL OCCURS 0,
          SOBSL(2),
          END OF IT_SOBSL.
    DATA: ls_range type STANDARD TABLE OF rssdlrange WITH HEADER LINE.
    SELECT /BIC/ZSPEPROCI FROM /BIC/SZSPEPROCI INTO TABLE IT_SOBSL
                          WHERE /BIC/ZSPEPROCI NOT BETWEEN 'AA' AND 'ZZ'
                          AND /bic/zspeproci ne '' .
    BREAK-POINT.
    LOOP AT IT_SOBSL.
    ls_range-IOBJNM = 'SOBSL'.
    ls_range-LOW = IT_SOBSL-SOBSL.
    ls_range-SIGN = 'I'.
    ls_range-OPTION = 'EQ'.
    APPEND ls_range .
    ENDLOOP.
    loop at ls_range.
      append ls_range to l_t_range.
    endloop.

  • Debug ABAP code in InfoPackage

    Hi friends,
    How i can debug a ABAP code from a variable selection in Infopackage?
    Thanks,
    EA

    I guess you would have figured it out - but for the use of people who might chance upon this post while searching ...
    to debug the ABAP code in an Infopackage - you need to run it in dialog mode ( Start Data Load Immediately ) and not in background. This is because background processes cannot be debugged.

  • Selections in Infopackage

    Hi All,
    I need to put selections in infopackage for "Material no." for multiple single values. (2700 materials)
    please suggest a way to do this kind of selection.
    Many thanks
    Tanu

    Hi Tanu ,
    1.You can dynamically put filters via OLAP var or ABAP routine .
    2.If values are in sequence (range ) then you can set the range in l_t_range-low  and l_t_range-high viA ABAP Routine .
    3.Better solution will be create around 27 infopackage with 100 selection in each and try to give range .
    4.OLAP var is a lso a good idea to set dynamic filter and easy if you are not very comfortable with ABAP.
    5.Can you please tell me what kind of filter values you want to put .So that accordingly filter can be decided for efficiency.
    6.One more possible solution is if material no values you don't want are less then put filter to exclude them .It will be easier .
    Let me know if you ned some help with this .
    Regards,
    Jaya Tiwari

  • Selection at infopackage level

    HI Everybody,
    Is it possible to have selection at infopackage level.
    Regards,
    BPNR.

    Hi ,
    yes .it is possible to have selection at infopackage level.
    at infopackage level you can have three options for selection criteria.
    type-5--- free temporal selection (for as many fields as you like)
    type-6 ---ABAP routine
    type-7---OLAP Variables.
    Regards
    upen

  • Routine for multiple selection in infopackage???

    hello guys
    I thought of creating one routine for Multiple selections aT Infopackage level....in Selections screen in infopackage,I found one option 'Use Conversion routine' with a check box and it is inactive.....Is it here I need to write my routine inorder to get multiple selection for a infoobject....or is it somehwhere else?How to activate thisoption?
    Thanks,
    Regards,
    S

    Hi,
    Conversion routines are used in the BI system so that the characteristic values (key) of an InfoObject can be displayed or used in a different format to how they are stored in the database. They can also be stored in the database in a different format to how they are in their original form, and supposedly different values can be consolidated into one.
    This will be there at info object level.
    Eg : ALPHA: Fills purely numeric fields from the left with zeroes (0).
    For multiple selections at info package , in data selection tab under type , u need to select 6 and write the code to select the value.When info package runs it takes the value from routine dynamically and extracts the data based on selection.
    Eg: There is a field FISCAL PERIOD For data selection, if u write the code to select current fiscal period. then whenever info package runs it extracts the data for current fiscal period from data source to PSA.
    Thanks,
    Joseph.

  • OnSelect event for a Drop down UI Element in Webdynpro ABAP Select Options

    Hi Experts
    We have built our UI based on the webdynpro ABAP Select Options. We have a requirement that, when we change the value of a drop down box in the UI, I need to hide some fields. Can anybody help me out in handling of OnSelect event of a drop down box built using webdynpro ABAP Select Options. We are on SAP Netweaver 7.0 EHP1.
    Rrgards,
    Srikanth.
    Edited by: Srikanth Kancherla on Apr 29, 2010 10:43 PM

    Hi Srikanth,
    as you seem to be already aware, the component is dynamically built.
    so you would have to enhance the code that builds the element and insert a reference to a new action (enhancement) that could handle the onSelect event.
    What is it about this that you particularly want help with?
    Cheers,
    Chris

  • RE:HR-ABAP selection screen problem.

    hi,
    hi friends iam facing one problem regarding hr ABAP  selection screen ,in my program iam using PNP LDB for bonus details report
    i have using selection screen declaration present  for single selection.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.        
    SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
                    S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
                    S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
                    S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
                    S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.   
    SELECTION-SCREEN END OF BLOCK B3.
    based on this selection iam fetching the information from infotypes using  macros.
    now my requirement is iam fetch the information for multiple  selections means like payroll areas z1,z2 and z3 payroll informations
    should be  fetching once.  pls any body knows solution please give me reply.
    thanks & regards,
    mgrao.

    You should be using a selection view (HR Report Category in the programs attributes) to filter results from the LDB.
    Why is this in the objects forum?

  • Upload from clipboard option in webdynpro abap selection screen

    Hello Gurus,
    We have a requirement in select-options in webdynpro.i have implimented select-options successfully using
    WDR_SELECT_OPTIONS used component.now i need to impliment 'upload from clipboard' option when ever i click on advance options arrow mark. this option we can get in normal abp from selection screen.in selection screen against select-option field we have multiple options arrow mark.when ever we click this arrow mark we can able to see the upload from clipboard button at lowe level.exact same option how can we impliment in webdynpro abap selection screen.
    Could anyone please suggest solutions?
    if possible could you send me the sample code or relevent links for the same.
    Thanks in Advance for your replies.
    Regards,
    babu

    Hi,
    Which server version are you working on...Is it ECC6 or nwetweaver 7..
    I guess that option is avaialbel in Netweaver 7.0..Need to check there is an option for Clipboard in select-options..
    Regards,
    Lekha.

  • How to add factory calender in ABAP Selection Screen?

    Hi,
    Anyone can guide me, how to add the factory or Holiday calender in ABAP Selection screen?
    Thanks in advance.
    VJ.

    Use the below code and it should work.
    AT SELECTION-SCREEN on VALUE-REQUEST FOR p_date. "p_date is your selection screen field.
       CALL FUNCTION 'F4_DATE'
        EXPORTING
          DATE_FOR_FIRST_MONTH               = SY-DATUM
          DISPLAY                                           = ' '
          FACTORY_CALENDAR_ID                = 'US'
          HOLIDAY_CALENDAR_ID                = 'US'
        IMPORTING
          SELECT_DATE                        = p_date
    The thing to note above is DISPLAY should NOT be 'X'.

  • Web Dynpro ABAP - Select Option and ALV Component Usage

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage  
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get a dump on select-option definition.
    Note
    The following error text was processed in the system ECD : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server ITAWSECCS01D_ECD_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I went in debug and the piece of code dumping is:
    lt_range_table =
    wd_this->m_handler->create_range_table( i_typename = 'S_PROJ' ).
    Is there someone who can help me?
    Thanks in advance,
    Stefano.

    Hi,
    I'm new in ABAP Web Dynpro and i was trying to follow the SDN tutorial
    Web Dynpro ABAP - Select Option and ALV Component Usage
    In this video, we create a new Web Dynpro ABAP component that uses both Select Options and ALV. Developers can learn the basic mechanisms for working with both of these reusable components.
    Following the link: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637
    I implemented and generated the web dynpro with success but when i execute a test i get
    an error as
    Note
    The following error text was processed in the system EI6 : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server EC6IDES_EI6_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    I have created a table zmy_table and trying to make USERID field as a select-options.I've written the code as shown below .
    data: itab type standard table of zmy_table,
    wa type zmy_table.
    data:
    node_employee type ref to if_wd_context_node,
    elem_employee type ref to if_wd_context_element,
    stru_employee type wd_this->element_employee ,
    item_userid like stru_employee-userid.
    navigate from <CONTEXT> to <EMPLOYEE> via lead selection
    node_employee = wd_context->get_child_node( name = wd_this->wdctx_employee ).
    @TODO handle not set lead selection
    if ( node_employee is initial ).
    endif.
    get element via lead selection
    elem_employee = node_employee->get_element( ).
    @TODO handle not set lead selection
    if ( elem_employee is initial ).
    endif.
    alternative access via index
    Elem_Employee = Node_Employee->get_Element( Index = 1 ).
    @TODO handle non existant child
    if ( Elem_Employee is initial ).
    endif.
    get single attribute
    elem_employee->get_attribute(
    exporting
    name = `USERID`
    importing
    value = item_userid ).
    select *
    from zmy_table
    into table itab
    where userid = item_userid.
    node_employee = wd_context->get_child_node( 'EMPLOYEE' ).
    node_employee->bind_elements( itab ).
    Is there someone who can help me and can tell am i doing wrong?
    Thanks in advance,
    Dheeraj

Maybe you are looking for