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

on value request

Former Member
0 Likes
987

Hi,

I have a module pool with field Vehicle, which needs an f4 help.

I have a table which populates itab_details, which contains vehicle name, model , make and some other fields.

On f4 help in my module pool i need the whole of itab_details to be displayed, and whatever line is selected i want to return ONLY the name field back to the module pool screen.

Is this possible? I have been experimenting with F4IF_INT_TABLE_VALUE_REQUEST but have not met with any success.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
960

the function module that you are using is correct one.

Paste the code excerpt and you are not passing the correct parameters..

Cheers,

KD

8 REPLIES 8
Read only

Former Member
0 Likes
961

the function module that you are using is correct one.

Paste the code excerpt and you are not passing the correct parameters..

Cheers,

KD

Read only

0 Likes
960

Hi KD,

was trying this as a report. If it works here i guess it should in module pool also right?


DATA : BEGIN OF ITAB OCCURS 0,
UNAME LIKE USR01-BNAME,
test(6) type c,
END OF ITAB.

data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
data : RETURN_wa LIKE DDSHRETVAL .

*---------------------------
PARAMETERS : vehicle(12) TYPE C.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR vehicle.

ITAB-UNAME = 'U01'. itab-test = 'car'.APPEND ITAB.
ITAB-UNAME = 'U02'. itab-test = 'bus'.APPEND ITAB.
ITAB-UNAME = 'U03'. itab-test = 'cycle'.APPEND ITAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ITAB-UNAME'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'vehicle'
VALUE_ORG = 'S'
tables
value_tab = ITAB
RETURN_TAB = return_tab

Read only

0 Likes
960

Make changes as follows



DATA : BEGIN OF ITAB OCCURS 0,
UNAME LIKE USR01-BNAME,
test(6) type c,
END OF ITAB.
 
data : RETURN_TAB LIKE DDSHRETVAL occurs 0 .
data : RETURN_wa LIKE DDSHRETVAL .
 
*---------------------------
PARAMETERS : vehicle(12) TYPE C.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR vehicle.
 
ITAB-UNAME = 'U01'. itab-test = 'car'.APPEND ITAB.
ITAB-UNAME = 'U02'. itab-test = 'bus'.APPEND ITAB.
ITAB-UNAME = 'U03'. itab-test = 'cycle'.APPEND ITAB.
 
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'UNAME'  -----> Change
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'VEHICLE'  ----> Change
VALUE_ORG = 'S'
tables
value_tab = ITAB
RETURN_TAB = return_tab

Cheers,

KD

Edited by: Krutiman Das on Nov 4, 2008 2:57 PM

Read only

0 Likes
960

Thanks KD, i tried the same. the problem is still there! On f4 popup i want my whole itab internal table displayed, currently it displays only the UNAME field.

Read only

0 Likes
960

Hi Frnd,

for module pool programing ,whn you need any f4 help ....you need to call the event

Process on value-request explicitly .

so you should code like this....

process on value request .

field fieldanme (the filed in which you want f4 help ) module modulename.

( now double click on moduleanme .)

modulename ...

now call the function 'f4if_int_table_value_request' .

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = passs the field which you want in return

  • PVALKEY = ' '

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

  • VALUE_ORG = 'S' (pass here S or try some rnd)

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = itab (your internal table)

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

  • EXCEPTIONS

  • PARAMETER_ERROR = 1

  • NO_VALUES_FOUND = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

and pass you internal table and return value ...

endmodulename.

Thanks and regards.

Priyank dixit

Read only

0 Likes
960

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ITAB-UNAME'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'vehicle'

VALUE_ORG = 'S'

tables

value_tab = ITAB

RETURN_TAB = return_tab

retfield - only name of the field (uppercase)

dynrprog, dynpnr - never pass directly your system variable (sy-XXX) here, use separate data objects where you first assign your sy- variables and them pass them to the function, but in this example you can skipp these parameters, they are sometimes error-prone

dynprofield - always in uppercase

return_tab - remove this unless you want the result goes to this table, if not it will be returned on the screen

Read only

0 Likes
960

Hi Suker,

the internal table that you build should refer to data elements(like matnr..etc) rather than the pre defined data types(Char,Numc..etc.)

Since you have using data elements from the dictionary for UNAME, its appearing in F4.Do the same for the other fields as well

Cheers,

KD

Edited by: Krutiman Das on Nov 4, 2008 3:33 PM

Edited by: Krutiman Das on Nov 4, 2008 3:34 PM

Read only

0 Likes
960

Thanks KD.