2008 Jan 28 8:07 AM
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?
2008 Jan 28 8:10 AM
2008 Jan 28 8: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...
2008 Jan 28 8:32 AM
That works and I have already awarded points to you. Now I got a new problem.
My listbox is able to retrieve the value but it appeared like this as this link showed.
http://img301.imageshack.us/img301/8139/screenrs6.png
When I put a break point at this line of code's it_itab you give me:
APPEND wa_itab TO it_itab.
I got this values as shown as this link http://img301.imageshack.us/img301/8175/screen2ju2.png
There is extra row added with a space in front of my value 1. How am I suppose to get rid of the spacing?
2008 Jan 28 9:03 AM
2008 Jan 28 11:59 AM
2008 Jan 28 12:01 PM
2008 Jan 28 12:31 PM
2008 Jan 28 12:45 PM
The output is this link http://img301.imageshack.us/img301/8139/screenrs6.png
2008 Jan 29 4:02 AM
iam not able to open ur link please paste the output instead of links.
2008 Jan 29 4:28 AM
Juzme,
Reduce your checkbox visible length to required.See the below syntax.
PARAMETERS :
p_qmart LIKE viqmel-qmart AS LISTBOX VISIBLE
LENGTH 3 ,
Don't forget to reward if useful......