Call function with select options problem

Hi there dear SDN community members.
I have got an strange ABAP problem wich function call.
Code1
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign   = 'I' .                                    
ls_selec-option = 'EQ' .
ls_selec-low    = '0000000000000000000000000000000000017714' .
APPEND ls_selec TO lt_selec .
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign   = 'I' .
ls_selec-option = 'EQ' .
ls_selec-low    = '0000000000000000000000000000000010079409' .
APPEND ls_selec TO lt_selec .
CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
  EXPORTING
    iv_bas_plobid  = 'Z_DP_POS'
    it_selection   = lt_selec
    it_group_by    = lt_group
  IMPORTING
    et_plob_values = lt_plobs .
Function returns data in lt_plobs itab only for the last product which was appended to the selection table lt_selec.
Whilst
Code2
CLEAR ls_selec .
ls_selec-iobjnm = '9AMATNR' .
ls_selec-sign   = 'I' .
ls_selec-option = 'BT' .
ls_selec-low    = '0000000000000000000000000000000000017714' .
ls_selec-high   = '0000000000000000000000000000000010079409' .
APPEND ls_selec TO lt_selec .
Returns data in lt_plobs for all products included in selection tab lt_selec.
What am I doing wrong in case of Code1? Why function does not return data for both products included in selection tab lt_selec?
Will be thankful for help. Regards. P.

I am very sorry to take your time unnecessarily.
The problem was caused by data inconsistency in our sandbox system I was developing in.
Be understanding, please.
Kind regards. P.
Ps. 
Vinod Nair
The 'Loop' solution has slowed the performance down very much.

Similar Messages

  • Call function with select arguments

    Hi Gurus,
    I have problem to call function inside select statements as follow:
    select a.ID_ELE2, a.ID_ELE3, a.DT_FIS_YR, c.NU_FIS_PER, c.dt,
    (case
    when c.ld is null then
    GET_LD_CHECK (a.DT_FIS_YR,c.NU_FIS_PER, a.ID_ELE3, a.ID_ELE2) -- 1
    -- GET_LD_CHECK ('2009',7, '8010', '7493') --- 2
    else
    c.ld
    end ) description
    from ACCOUNT a, TRANSACTION c
    where a.DT_FIS_YR ='2009'
    and a.ID_ELE3 <> '0000'
    and c.TY_SRC not in ('CL', 'CN')
    and a.DT_FIS_YR = c.nu_fis_yr
    and a.AK = c.AK_FGCHAR
    and trim(a.ID_ELE3) ='8010'
    and c.NU_FIS_PER <> 14
    order by 1,4,5,6
    the 1 doesn't output result but the 2 it does! How can pass the select result to the function?
    Thanks in advance for your help.
    Ben

    The statement / function call seems to be ok. So there are not much chances left for your call to return different (=non) values.
    1) It could be that you have different values in the column then during your test call.
    2) Maybe your function raises an error and that error is supressed in some ugly WHEN OTHERS EXCEPTION => Solution: Get rid of the error handler.
    3) datatype conversion. For example if a.dt_fis_yr is a number value, then you should test with number values and not with strings. GET_LD_CHECK (2009,7, '8010', '7493'). Same logic goes for the other paramters, make sure the datatype is correct and matches the function parameter.

  • Strange problem with select options, problem in my code or standard bug?

    I have a selection screen with no intervals.
    In my select option When i give a range for example
    BT(Between) 1 to 3 and then if i  remove 3 (s-high) value and press enter the BT changes to EQ automatically which is correct.
    Suppose i select BT as my operator and just give 1 in S-low and keep S-high as blank.
    It behaves wiered and the data selected is not correct.  BT now should have changed to EQ but it doesnt happen.
    Same case occurs with NB ie not in between.
    Can experts please give there advice on this behaviour of selection screen

    wht u can do is.....
    u can keep these two input fields as two diff attributes....
    consider it as A , B
    then on various possibilities....fire select queries...
    for eg:
    if A & B not initial.
    then select data between A and B
    if A is not initial B is initial
    then select data = A
    and all possiblities to can think

  • Mulitple selection with select option on subscreen

    Hi colleagues,
       I've the following issue:
    I'm programming a dynpro this dynpro contains two subscreens. The lower subscreen will contain another dynpro defined as subscreen with an ALV to display results.
    The top subscreen (0150) area will be filled with a generated subscreen with the command
      SELECTION-SCREEN BEGIN OF SCREEN 0150 AS SUBSCREEN.
    with select options I define my selection area like:
    SELECT-OPTIONS: sa_6 FOR gs_rp_attrib_sel-sonr.
       If I call my transaction starting up the dynpro containing the two subscreens the result looks quit how I expect it. BUT then I try to start up the multiply selection Pop-UP for the selection field by pressing the button just right behind the HIGH input field, nothing happens. The multiply selection pop-up basicly does not show up.
       Any clues what I need to add that it will show up?
       Does the mulitply selection not work with
    SELECTION-SCREEN BEGIN OF SCREEN 0150 <b>AS SUBSCREEN</b>???
    (If I do a simple test program with a selection screen not being a subscreen, the multiply select popup comes up.)

    Hi,
    A subscreen cannot call another screen.
    I guess this is the reason why u are facing this problem.
    Thanks,
    Rashmi.

  • Innput field with Select option on custom screen

    Hi,
    I need to create an Input field with Select Option(No interval) button on Custom dialog screen .
    Is there any idea how can I create it on screen ?
    Thanks
    Sachin

    create a normal inputfield and place an icon next to it. then in the pai on click of that button use the following code.
    data: wf_tab_field like rstabfield occurs 0 with header line ,
          wf_exl_opt like rsoptions .
    refresh: wf_tab_field  .
        move: 'KOSTL' to wf_tab_field-fieldname ,
              'CSKS' to wf_tab_field-tablename .
        append wf_tab_field .
        clear wf_tab_field .
        move: 'X' to wf_exl_opt-bt ,
              'X' to wf_exl_opt-cp ,
              'X' to wf_exl_opt-ge ,
              'X' to wf_exl_opt-gt ,
              'X' to wf_exl_opt-le ,
              'X' to wf_exl_opt-lt ,
              'X' to wf_exl_opt-nb ,
              'X' to wf_exl_opt-np .
    call function 'COMPLEX_SELECTIONS_DIALOG'
         exporting
           title                   = 'Select Cost Centers'
           text                    = 'Cost Center'
    *         SIGNED                  = 'X'
    *         LOWER_CASE              = ' '
    *         NO_INTERVAL_CHECK       = ' '
    *         JUST_DISPLAY            = ' '
    *         JUST_INCL               = ' '
            excluded_options        = wf_exl_opt
    *         DESCRIPTION             =
            help_field              = 'CSKS-KOSTL'
    *          SEARCH_HELP             = 'KOST'
            tab_and_field           = wf_tab_field
          tables
            range                   = r_kostl
         exceptions
           no_range_tab            = 1
           cancelled               = 2
           internal_error          = 3
           invalid_fieldname       = 4
           others                  = 5
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        if not r_kostl[] is initial .
          read table r_kostl index 1 .
          if sy-subrc eq 0 .
            move: r_kostl-low to wf_t_kostl .
          endif .
        endif .
    wf_t_kostl  is the screen field name.
    Raja

  • Issue with Select Options

    Dear Experts,
    I used component wdr_select_options to achieve select options functionality, But it displaying only one field as per my requirement user expecting both low & high fields.
    Can you guide for 5 select options whether i have use t times the component at my component level.
    And also could please guide me how to use select options at code level.
    Thanks & Regards,
    Siva Mandapudi.
    Edited by: SIVAMANDAPUDI on Jul 18, 2011 6:39 PM

    Hi Saravan,
    Please find below details.
    The exception is:
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
    caught in
    procedure "ONACTIONSEARCH_SUPPLIER" "(METHOD)", nor was it propagated by a
    RAISING clause.
    code:
    DATA FOR WORKING WITH SELECT OPTIONS
      data: rt_SUPPLIERNO type ref to data.
      data: rt_SUPPLIERNAME type ref to data.
    field-symbols: <fs_SUPPLIERNO> type table,
                    <fs_SUPPLIERNAME> type table.
      TYPES: BEGIN OF T_SUPPLIERNO,
             SIGN(1),
             OPTION(2),
             LOW TYPE /SAPAPO/LOC,
             HIGH TYPE /SAPAPO/LOC,
            END OF T_SUPPLIERNO.
      TYPES: BEGIN OF T_SUPPLIERNAME,
             SIGN(1),
             OPTION(2),
             LOW TYPE /SAPAPO/LOC_DESCR40,
             HIGH TYPE /SAPAPO/LOC_DESCR40,
            END OF T_SUPPLIERNAME.
      DATA: WA_SUPPLIERNO TYPE T_SUPPLIERNO, IT_SUPPLIERNO TYPE TABLE OF T_SUPPLIERNO,
            WA_SUPPLIERNAME TYPE T_SUPPLIERNAME, IT_SUPPLIERNAME TYPE TABLE OF T_SUPPLIERNAME.
    Retrieve the data from the select option
      rt_SUPPLIERNO = wd_this->m_handler->get_range_table_of_sel_field(
                               i_id = 'ID_SNO' ).
    dump raising when get_range_table_of_sel_field is called.
    Thanks a lot.
    Regards
    Siva Mandapudi.

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • Multiple records with select option

    i have to use select option in selection screen, which wl take the multiple values but that select option wont act as a range, the select option is a session name  from sm35, the table from where data is retrieved is APQI, i have used  a parameter before using select option ,like:
    selection-screen begin of line.
    parameters: P_grpid like apqi-groupid.
    select-options: s_grpid like apqi-groupid.
    selection-screen end of line.
    AT-SELECTION SCREEN ON VALUE REQUEST FOR p-GRPID. " previous situation
    {the code starts
    FM F4 selection is called}
    AT-SELECTION SCREEN ON VALUE REQUEST FOR S_GRPID-low. " CURRENT situation
    FM F4 selection is called}
    now when i give data in slection screen for s_grpid-low then it works as a parametr, but it doesnt take multiple values at s_grpid when i have alos mentioned the same for s_grpid-high.
    Please tell me how to achive multiple records with select option, or u can also send a sample code if you have..
    Thanks
    Swarnali

    Hello Swarnali,
    You need to fill internal table of select-option once you got into the event AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    so sudo code will be:
    AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    Select data from table.
       so_carr-LOW = value
       append so_carr.
    You can also use NO INTERVAL to suppress the so_carr-HIGH value on selection screen.
    Thanks,
    Augustin.

  • Skip first screen of BD87 using call transaction with BDC_DATA option

    hello all,
    i am using call transaction with BDC_DATA option and i want to skip first screen, so can anyone please tell me how can i skip first screen of BD87 and get second screen that is output screen?
    regards.

    Hi
    Build a BDCDATA with following code..
                                                          T     BD87                                                                               
    RBDMON00     1100     X                                                                               
    BDC_CURSOR     SX_DOCNU-LOW
                                                                BDC_OKCODE     =CRET
                                                                SX_DOCNU-LOW                                                                               
    SX_CRETI-LOW     00:00:00
                                                                SX_CRETI-HIGH     00:00:00
                                                                SX_UPDDA-LOW     05.02.2010
                                                                SX_UPDDA-HIGH     05.02.2010
                                                                SX_UPDTI-LOW     00:00:00
                                                                SX_UPDTI-HIGH     00:00:00
    RBDMON00     0100     X                                                                               
    BDC_OKCODE     =BACK
    RBDMON00     1100     X                                                                               
    BDC_OKCODE     /ECBAC
                                                                BDC_CURSOR     SX_DOCNU-LOW

  • How to declare and work with select-option in screen painter?

    hello there,
    can anybody plz suggest me ,how to declare and work with select-option in screen painter?
    neon

    Hi Blue,
    Please check these threads which will help you a lot..
    module pool programming " to add selection-option on screen"
    Re: Select option in Dialog program screen
    Re: SELECT-OPTIONS in Screen
    Good luck
    Narin

  • Is possible in a dialog screen attach a field functional like select-option

    hi,
       Is it possible - in a dialog screen - to attach a field that has functionality like Select-options fields?
    And if so - how?
    and information about complex_selections_dialog

    Hi,
    Look at the below links
    module pool programming " to add selection-option on screen"
    module pool programming " to add selection-option on screen"
    Regards
    Sudheer

  • Working with select option in WD4A

    can any one provide me some document or video file to work with select options in webdynro for abap?

    Hi,
    Find the following URLs
    PDF - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/21706b4b-0901-0010-7d93-c93b6394bc1d
    Video Clip - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/1a3c52e7-0b01-0010-ed81-f31d4868c5d6
    Login to SDN to play the video clip.
    Reward accordingly.
    Regards
    ChandraK

  • Subscreen with Select-Options called from At Selection Screen event

    Dear friends,
    I'm trying to call a subscreen that contains a select-options, from an 'at selection screen' event, in a report program, but without sucess.
    Here's go what I'm doing:
    I declared a selection-screen as subscreen in my main program, and I'm calling it from a module-pool subscreen area, to make the module-pool select-options magic.
    In my main report program, I have a customized status GUI with a new toolbar button and I'm handling it at the 'at selection screen' event.
    What I need to do is to call the subscreen that contains the select-options when this new customized button get pressed, but when It happens, the select-option selections pop-up doesn't appear.
    If I call the subscreen from the 'start-of-selection' event, it goes fine, just don't work from the 'at selection screen'.
    Any ideas on how can I do it?
    Thank you,
    Heber

    i think you should try something like this:
    at selection screen.
    if condition handled ....
      show_popup = 'X'.
    endif.
    at selection screen output.
    if show_popup EQ 'X.
    call subscreen
    endif.

  • Problem with select option in module pool

    Hello friends,
                           I have successfully created a select option in my module using sub-screen. My problem is the EXTENSION buttom in the select option. When i click on the EXTENSION button a proper pop-up appears but when i input some values or cancel this pop-up then the program gives the following dump.
    Error
    The attribute screen type with the values 'Normal Screen' and
    'Subscreen' determines the use of the screen. If a normal screen is used
    as subscreen or vice versa, an error occurs.
    The screen "ZRPMSEA" 0002 has, in this respect, an inappropriate screen type.
    Kindly Help

    HI,
    Go to the Screen Attributes and select the appropriate Radio Button
    1) Normal Screen " Whichever is required (in Which type of Screen you Want)
    2) Subscreen  " Check for the Correct type and Check the Radio Button Accordingly
    3) Modal Scree
    Cheerz
    Ram

  • Facing Problem with Select-options input data......help me?

    I have a select-options on my selection screen. In the database table i have different four values for this. ex EEX01, EEX02, EEX03 and EEX04.
    their overall names are DE, HE, IT, TR respectively.
    Now the requirement is user will enter this data like DE to TR , i am now confused how do convert these value to the values that i have in table. Because i have to use this for extracting the data from database table.
    thanks in advance.

    hi,
    what is the table name for the case.
    and jsut list what are the fields .. we'll try to map the same and see if it works..
    if for the field there is a check table attached then conversion routine will take care of that .
    just check on the field of the domain  in the dbtable
    like matn1 for dataelement matnr and domain matnr in mara table.
    regards,
    vijay

Maybe you are looking for