Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

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

    LOOP at P_BLART.

    write :/ p_blart-low, p_blart-high.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.