Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Module Pool - POV

Former Member
0 Likes
1,294

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,253

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,253

GT_LAND will not be filled by the system. You have to fill it before calling the F4 function module.

Read only

0 Likes
1,253

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

Read only

0 Likes
1,253

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.

Read only

Former Member
0 Likes
1,254

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

Read only

0 Likes
1,253

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

Read only

0 Likes
1,253

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 ).

Read only

0 Likes
1,253

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

Read only

0 Likes
1,253

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

Read only

0 Likes
1,253

tHANK YOU sINHA . KEEP IT UP .

PTS AWARDED .

Read only

Former Member
0 Likes
1,253

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.

Read only

Former Member
0 Likes
1,253

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