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

List Box

Hi,

I have created a screen and I place a text box and change the type into List Box. I have to display data in the list box.

The user should select the data from the list box then according to that we have to popup message.

How can add data to a list box ?

and how can i get the user has selected particular record ?

regards,

satya.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jan 23, 2008 at 07:29 AM

    check out

    htmlb_samples/listboxSample.htm page

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2008 at 03:59 AM

    Hi

    Use the below code. This is available in apabdocu help.

    REPORT demo_dynpro_dropdown_listbox.

    TYPE-POOLS vrm.

    DATA: name TYPE vrm_id,

    list TYPE vrm_values,

    value LIKE LINE OF list.

    DATA: wa_spfli TYPE spfli,

    ok_code TYPE sy-ucomm,

    save_ok TYPE sy-ucomm.

    TABLES demof4help.

    name = 'DEMOF4HELP-CONNID'.

    CALL SCREEN 100.

    MODULE cancel INPUT.

    LEAVE PROGRAM.

    ENDMODULE.

    MODULE init_listbox OUTPUT.

    CLEAR demof4help-connid.

    SELECT connid cityfrom cityto deptime

    FROM spfli

    INTO CORRESPONDING FIELDS OF wa_spfli

    WHERE carrid = demof4help-carrier2.

    value-key = wa_spfli-connid.

    WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'.

    CONCATENATE value-text

    wa_spfli-cityfrom

    wa_spfli-cityto

    INTO value-text SEPARATED BY space.

    APPEND value TO list.

    ENDSELECT.

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

    id = name

    values = list.

    ENDMODULE.

    MODULE user_command_100.

    save_ok = ok_code.

    CLEAR ok_code.

    IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.

    LEAVE TO SCREEN 200.

    ELSE.

    SET SCREEN 100.

    ENDIF.

    ENDMODULE.

    MODULE user_command_200.

    save_ok = ok_code.

    CLEAR ok_code.

    IF save_ok = 'SELECTED'.

    MESSAGE i888(sabapdocu) WITH text-001 demof4help-carrier2

    demof4help-connid.

    ENDIF.

    ENDMODULE.

    Thanks

    Anand D

    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.