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

Listbox does not populate what I want

I am trying to retrieve my program_ID that are distinct and here are the codes:

-


TYPE-POOLS : vrm.

DATA:wa_itab TYPE vrm_value,

it_itab TYPE vrm_values.

select distinct PROGRAM_ID into wa_itab from ZPROGRAM_TABLE.

endselect.

APPEND wa_itab TO it_itab.

START-OF-SELECTION.

CALL SCREEN 1000.

MODULE STATUS_1000 OUTPUT.

SET PF-STATUS 'SCREEN_1000'.

SET TITLEBAR 'TITLE_1000'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = 'ZDROPDOWNLIST'

VALUES = it_itab.

ENDMODULE. "STATUS_1000 OUTPUT

-


It populated what is in the column called PROGRAM_ID. However, it only retrieve the latest ID and not the other's ID.

For eg, I have these values at my PROGRAM_ID value.

1

1

1

1

1

2

2

2

As mentioned, I have tried using distinct for my SQL statement and it only retrieve the integer 2. What am I suppose to do to retrieve integer 1 too?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 28, 2008 at 08:10 AM

    Sorry..Wrong Post.

    Edited by: VISHNU on Jan 28, 2008 1:42 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 08:18 AM

    Juzme,

    See the below code you have to apppend in between select and endselect statement.

    select distinct PROGRAM_ID into wa_itab from

    ZPROGRAM_TABLE.

    APPEND wa_itab TO it_itab.

    endselect.

    Now it will work.

    Don't forget to reward if useful...

    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.