2007 Jul 26 9:26 AM
HI EXPERTS,
I AM USING VRM FM TO PASS VALUES INTO LISTBOX IN SCREENS.FIRST TIME IT IS WORKING PROPERLY WHEN I USE IT FOR THE SECOND TIME IT IS SHOWING THE PREVIOUS DATAS ENTRIES ALSO .HOW TO DELETE THE DUPLICATE ENTRIES OF IT .
THIS IS MY CODE.
when 'ENTER'.
select POSNR ARKTX from LIPS into corresponding fields of table i_pstyp WHERE VBELN EQ VBELN.
LOOP AT I_PSTYP .
W_DDLIST-KEY = I_PSTYP-POSNR.
W_DDLIST-TEXT = I_PSTYP-POSNR.
APPEND W_DDLIST TO POSNR1.
CLEAR W_DDLIST.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'POSNR'
VALUES = POSNR1.
IN THIS IF I SELECT NEXT VBELN WITHOUT EXITING FROM THE SCREEN THE PREVIOUS VBELN'S LINE ITEMS ALSO ARE DISPLAYING .WHAT SHALL I DO .
MANI
Hi,
Try this.....
use REFRESH posnr1 after fm.Using this stmt the previous body contents will be deleted.So for the next time new contents gets displayed.
regards,
lakshmi
2007 Jul 26 9:29 AM
when 'ENTER'.
select POSNR ARKTX from LIPS
into corresponding fields of table i_pstyp
WHERE VBELN EQ VBELN.
LOOP AT I_PSTYP .
W_DDLIST-KEY = I_PSTYP-POSNR.
W_DDLIST-TEXT = I_PSTYP-POSNR.
APPEND W_DDLIST TO POSNR1.
CLEAR W_DDLIST.
ENDLOOP. " Endloop here. the FM should not be called inside the loop
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'POSNR' " hope you are using the fieldname correctly
VALUES = POSNR1.
CLEAR : POSNR1. " this will stop repeating the values in your drop down list
Regards
Gopi
2007 Jul 26 9:33 AM
<b>refresh POSNR1.</b>
LOOP AT I_PSTYP .
W_DDLIST-KEY = I_PSTYP-POSNR.
W_DDLIST-TEXT = I_PSTYP-POSNR.
APPEND W_DDLIST TO POSNR1.
CLEAR W_DDLIST.
endloop.
regards
shiba dutta
2007 Jul 26 9:35 AM
Hi ...
This is bcoz the Values in the internal Table are retained.
So you have to remove the entries before calling the function module
Like:
REFRESH POSNR1.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'POSNR'
TABLES
VALUES = POSNR1.
<b>Reward if Helpful.</b>
2007 Jul 26 9:36 AM
Hi,
Try this.....
use REFRESH posnr1 after fm.Using this stmt the previous body contents will be deleted.So for the next time new contents gets displayed.
regards,
lakshmi
2007 Jul 26 9:37 AM
Hi..
I m sorry.
You have to Use the REFRESH before the LOOP where you are APPENDing the values. Not before calling the FM.
Plz correct.
Regards.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |