Skip to Content
author's profile photo
Former Member

select-options

pls refer to the code below:

SELECT-OPTIONS: p_blart FOR bkpf-blart OBLIGATORY NO INTERVALS.

in the above code i can enter values of p_blart in multiple selections.

and now how should i write the values which i selected in multiple

selections .

how should i do it.

not i can code like this write: p-blart-low.

by which i get the lower range value.

but i do not need that. I want to write the values which i entered

in multiple selection screen.

how to di it.

deepak

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    author's profile photo
    Former Member
    Oct 06, 2005 at 11:35 AM

    LOOP at P_BLART.

    write :/ p_blart-low, p_blart-high.

    ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 06, 2005 at 11:51 AM

    Hi,

    better select table T003 - this is clearly:

    SELECT        * FROM  t003
           WHERE  blart  in p_blart.
    
    write : / t003-blart.
    
    ENDSELECT.

    Andreas

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 11:37 AM

    if u want to write the inputs given in the select-optoins then u should loop the select-options .

    loop at p_blart.

    write : p_blart.

    endloop.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 12:09 PM

    There ar etwo ways to do that -

    1.

    Loop at p_blart.

    write:/ p_blart-low, p_blart-high.

    endloop.

    This gives you only those selection that you entered in the selection screen for p_blart like if you give 'AA' in low value and give range of 'BB' to 'HH' by clicking on extension button, the above code will give you following output -

    AA

    BB HH

    2.

    data: begin of itab occurs 0,

    blart like t003-blart,

    end of itab.

    select blart into table itab

    from t003

    where blart in p_blart.

    if sy-subrc = 0.

    loop at itab.

    write:/ itab-blart.

    endloop.

    endif.

    for the same above entries taken in point 1 i.e. 'AA' and range of 'BB' to 'HH', here you will get all those values as well which are in between 'BB' to 'HH'.

    Message was edited by: Rajeev Nigam

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 06, 2005 at 12:21 PM

    Hi,

    Check with this code.

    AT SELECTION-SCREEN.

    check: not sy-ucomm = '%001'.

    LOOP AT P_BLART.

    IF P_BLART-SIGN NE 'I' OR P_BLART-OPTION NE 'EQ'.

    message e000 with text-e02.

    ENDIF.

    ENDLOOP.

    if P_BLART eq space.

    message e000 with text-e01.

    stop.

    endif.

    Here you can give your values in Ranges and Single selection.

    loop at p_blart.

    Select single * from ...............where BLART = P_blart-low.

    endloop.

    Thanks.

    Message was edited by: Deepak333 k

    Add comment
    10|10000 characters needed characters exceeded