2009 Apr 13 2:23 PM
Hi guys,
I have created report:
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
lista TYPE vrm_values,
value LIKE LINE OF lista.
PARAMETERS: SVRHA(10) AS LISTBOX VISIBLE LENGTH 30.
AT SELECTION-SCREEN OUTPUT.
name = 'SVR'.
value-key = '1'.
value-text = 'Text 1'.
APPEND value TO lista.
value-key = '2'.
value-text = 'Text 2''.
APPEND value TO lista.
...3,4,5,6,7,8
value-key = '9'.
value-text = 'Text 9'.
APPEND value TO lista.
value-key = '10'.
value-text = 'Text 10'.
APPEND value TO lista.
value-key = '11'.
value-text = 'Text 11'.
APPEND value TO lista.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = name
values = lista.
START-OF-SELECTION.
IF........
WRITE: / 'Parameter:', SVR.
1. In display list on screen 'Text 10' and 'Text 11' come after 'Text 1', how can I put it in order after
'Text 9' ?
2. How I write conditions in start of selection, using value key or value text ?
Thanks,
Nihad
Edited by: nihad omerbegovic on Apr 13, 2009 3:28 PM
2009 Apr 13 2:37 PM
1) Use a leading zero for values that are 1-9.
value-key = '01'.
value-text = 'Text 1'.
APPEND value TO lista.
value-key = '02'.
value-text = 'Text 2''.
APPEND value TO lista.
...03,04,05,06,07,08
value-key = '09'.
value-text = 'Text 9'.
APPEND value TO lista.2) the NAME field should hold the value of the parameter called SVRHA.
name = 'SVRHA'.so when you want to write the value, just write out the SVRHA field.
Write:/ SVRHA.This will hold the key value of the selected item in the listbox.
Regards,
Rich Heilman
Hi guys,
I have created report:
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
lista TYPE vrm_values,
value LIKE LINE OF lista.
PARAMETERS: SVRHA(10) AS LISTBOX VISIBLE LENGTH 30.
AT SELECTION-SCREEN OUTPUT.
name = 'SVR'.
value-key = '1'.
value-text = 'Text 1'.
APPEND value TO lista.
value-key = '2'.
value-text = 'Text 2''.
APPEND value TO lista.
...3,4,5,6,7,8
value-key = '9'.
value-text = 'Text 9'.
APPEND value TO lista.
value-key = '10'.
value-text = 'Text 10'.
APPEND value TO lista.
value-key = '11'.
value-text = 'Text 11'.
APPEND value TO lista.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = name
values = lista.
START-OF-SELECTION.
IF........
WRITE: / 'Parameter:', SVR.
1. In display list on screen 'Text 10' and 'Text 11' come after 'Text 1', how can I put it in order after
'Text 9' ?
2. How I write conditions in start of selection, using value key or value text ?
Thanks,
Nihad
Edited by: nihad omerbegovic on Apr 13, 2009 3:28 PM
2009 Apr 13 2:37 PM
1) Use a leading zero for values that are 1-9.
value-key = '01'.
value-text = 'Text 1'.
APPEND value TO lista.
value-key = '02'.
value-text = 'Text 2''.
APPEND value TO lista.
...03,04,05,06,07,08
value-key = '09'.
value-text = 'Text 9'.
APPEND value TO lista.2) the NAME field should hold the value of the parameter called SVRHA.
name = 'SVRHA'.so when you want to write the value, just write out the SVRHA field.
Write:/ SVRHA.This will hold the key value of the selected item in the listbox.
Regards,
Rich Heilman
2009 Apr 13 2:46 PM
Ok , I missed while typing it shoud be SVRHA not SVR, thanks. What about conditions? Is this ok for example:
data: begin of itab occurs 0,
field type c,
.........
end of itab.
IF SVRHA = '01'.
itab-field = 'Text 1'.
endif.
IF SVRHA = '02'.
itab-field = 'Text 2'.
endif.
etc.
Nihad
2009 Apr 13 2:52 PM
2009 Apr 13 2:52 PM
Hi Nihad,
Yes, You can simply check with SVRHA. It will hold the value whichever you selected in the screen.
And also, normally the sequence is defined by KEY value itself. When I try the same thing which you gave in the screen, I could see all the values in proper sequence.
Best Regards
Sitharamaraju
2009 Apr 23 11:28 AM
Hi guys, I have very strange situation. When I run transaction my listbox have these values:
01 Proba
02 Test
03 Izvodi
04 Kreni
when I enter any other field on screen and press enter I got these values in listbox:
01 Proba
01 Proba
02 Test
02 Test
03 Izvodi
03 Izvodi
04 Kreni
04 Kreni
if I press enter again I got new line of values in listbox and it looks like this:
01 Proba
01 Proba
01 Proba
02 Test
02 Test
02 Test
03 Izvodi
03 Izvodi
03 Izvodi
04 Kreni
04 Kreni
04 Kreni
Each press on enter adds new line in my listbox, What should I do, why is this happening?
Nihad
2009 Apr 23 11:36 AM
you need to refresh/clear the internal table before you populate the table. Because you are not using any clear it is adding the duplicates.
2009 Apr 23 11:40 AM
Hello Nihad,
A bit of magic will do )
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = lista.
REFRESH lista. "Ad this lineTry to figure out why this helped )
BR,
Suhas
2009 Apr 23 11:47 AM
I have done this with help of previous post, it's magic really
Thanks.
Nihad
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |