Skip to Content
author's profile photo Former Member
Former Member

using listbox in report

Hi,

its possible to use in report as parameter listbox with type of internal table? I had filled table it_status_texts with datas, but the listbox is still empty.

thanks,

DATA:

BEGIN OF wa_status_texts,

gbsta_bez LIKE vbstt-gbsta_bez,

END OF wa_status_texts,

it_status_texts LIKE TABLE OF wa_status_texts with header line.

PARAMETERS:

p_status LIKE it_status_texts-gbsta_bez AS LISTBOX

VISIBLE LENGTH 20.

INITIALIZATION.

SELECT DISTINCT bezei FROM tvbst

INTO wa_status_texts-gbsta_bez

WHERE spras = sy-langu

AND tbnam = 'VBUK'.

APPEND wa_status_texts TO it_status_texts.

CLEAR wa_status_texts.

ENDSELECT.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 15, 2004 at 01:00 PM

    You need to use FM VRM_SET_VALUES to ge the dropdown with values.

    here is the code sample.

    type-pools: vrm.
    data: name type vrm_id, list type vrm_values, value like line of
    list.
    
    parameters: p_obj(2) as listbox visible length 50 obligatory
                default 'A' .
    
    at selection-screen output .
    
       clear list .
        refresh list .
        name = 'P_OBJ'.
        value-key = 'A'. value-text = 'Object A'.
        append value to list .
    
         value-key = 'B'. value-text = 'Object B'.
        append value to  list .
    
    
     call function 'VRM_SET_VALUES'
             exporting
                  id     = name
                  values = list.
    

    Hope this helps.

    Regards

    Raja

    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.