‎2005 Oct 03 3:51 AM
hi ,
I want to display a given set of nationalities(25/250) in the combobox of my module pool screen.
I hav used POV as follows .
..........
process on value-request.
field P0002-NATIO module onvalue_land1.
......
MODULE onvalue_land1 INPUT.
data : GT_LAND TYPE T005T OCCURS 10 WITH HEADER LINE .
DATA GT_RETURN like DDSHRETVAL occurs 0 with header line.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'NATI0'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P0002-NATIO'
value_org = 'C'
tables
value_tab = GT_LAND
return_tab = gt_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
.......................
While running my Combo box is blank .
Wht could be the problem ?
Any help would be much apperciated .
Regrds,
J
‎2005 Oct 03 4:25 AM
Hi P079223,
Try this .
MODULE onvalue_land1 INPUT.
DATA : VALUE_TAB TYPE VRM_VALUES .
DATA WA LIKE LINE OF VALUE_TAB.
" First write the code to select values in int table
"GT_LAND
LOOP AT GT_LAND.
CLEAR WA.
MOVE Gt_LAND-LAND1 TO WA-KEY.
APPEAND WA TO VALUE_TAB.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'P0002-NATIO'
VALUES = VALUE-TAB.
ENDMODULE.
( Also the list box on field P002-NATIO should be enabled in screen painter in SE51 . In the Text I/O Templates the dropdown cloumn should be set to "L" ).
Cheers
‎2005 Oct 03 3:56 AM
GT_LAND will not be filled by the system. You have to fill it before calling the F4 function module.
‎2005 Oct 03 4:04 AM
Srinivas,
Yes , I hav tried that also ,
But the result is the same .
-
select * from T005T into GT_LAND where spras = 'EN' and
land1 = 'IN' and land1 = 'AU' .
endselect .
--after this only i called the fn mod ..
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
but the result is the same.
--my concern is whthere i hav to pass any params ?
Thanks
J
‎2005 Oct 03 4:09 AM
P079223,
There is not Append statement between the select and endselect, so there is no way that the values are appended to the table. So, you will have to insert APPEND statement.
Alternatively, if GT_LAND is of the same structure of T005T, you can use
select * from T005T into TABLE GT_LAND where spras = 'EN' and land1 = 'IN' and land1 = 'AU' .
The difference is the TABLE key word.
Regards,
Ravi
Note : Please reward points if this helps you.
‎2005 Oct 03 4:25 AM
Hi P079223,
Try this .
MODULE onvalue_land1 INPUT.
DATA : VALUE_TAB TYPE VRM_VALUES .
DATA WA LIKE LINE OF VALUE_TAB.
" First write the code to select values in int table
"GT_LAND
LOOP AT GT_LAND.
CLEAR WA.
MOVE Gt_LAND-LAND1 TO WA-KEY.
APPEAND WA TO VALUE_TAB.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'P0002-NATIO'
VALUES = VALUE-TAB.
ENDMODULE.
( Also the list box on field P002-NATIO should be enabled in screen painter in SE51 . In the Text I/O Templates the dropdown cloumn should be set to "L" ).
Cheers
‎2005 Oct 03 9:35 AM
Yes now am able to display the given fields in my List box . i hav used 'VRM_SET_VALUES' .
Now , While saving ....it's not converted to it's key automatically .
ex .. If i save the nationality "Swiss" it takes the two char SW and it's saving . But the actual key is "CH".
Am getting the following error status.
"entry - SW - doesn't exist in your check entry "
How to find the check entry .I hav used ,
SELECT * FROM T005T INTO TABLE I005T_LONG
WHERE SPRAS = SY-LANGU
AND ( LAND1 = 'IN' OR LAND1 = 'SW' )
Surly i will reward points to u all .
help plz .
Regrds ,
J
Message was edited by: P079223
‎2005 Oct 03 10:28 AM
So you want the text and not the three caharcter key.
Just use
LOOP AT GT_LAND.
CLEAR WA.
MOVE Gt_LAND-NATIO TO WA-KEY.
APPEAND WA TO VALUE_TAB.
ENDLOOP.
( Whatever you populate in KEY will be copied in screen field )
Else you can just read from internal table GT_PLANT in your porgram into another field.
Cheers.
( Dont forget to reward if answers helped ).
‎2005 Oct 03 10:54 AM
hey am able to see the description in the list Box ...
But while saving it's giving the above error .
(it takes the first 2 chars ....)
if i remove the Textfield ..it' telling "S doesn't exist"
thanks
Message was edited by: P079223
‎2005 Oct 03 11:33 AM
What is your screen field ?? If its P0002-NATIO , it will take only 3 characters . If you want the full text then you define you screen field of type T005T-NATIO ( 40 chars). Check in SE11 both fields. You will find your answer.
Cheers
‎2005 Oct 03 12:26 PM
tHANK YOU sINHA . KEEP IT UP .
PTS AWARDED .
‎2005 Oct 03 8:05 AM
hi,
there retfield u have defined as 'NATI0' ( NATI ZERO). replace it with 'NATIO'(O for Oxford ).
after the function module according to ur requirement write the following code.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE .
READ TABLE gt-return INDEX 1.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'NATI0'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P0002-NATIO'
value_org = 'C'
tables
value_tab = GT_LAND
return_tab = gt_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
I hope this will work.
If ur problem is solved rewards points and close the thread.
‎2005 Oct 03 1:47 PM
Hi,
Try to use this function module.
POPUP_WITH_TABLE_DISPLAY
for processw on vlaue help.
In PAI specify
PROCESS ON VALUE-REQUEST.
FIELD DBTAb-FIELD MODULE HELP-FOR-FIELD NAME.
where DBTAB is the database table name .
IF you find the answer suitable please reward me with the points.
Regards,
Irfan Hussain