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

F4 help..check my simple code...

Former Member
0 Likes
1,591

Hello masters!

attached is my coding for F4 help.Im wondering why theres no data being displayed on the pop up window.please check my coding.

data: t_inst type standard table of y_inst,

t_return TYPE standard table of ddshretval .

w_inst like line of t_inst,

w_return like line of t_return.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_inst.

DATA:l_retfield TYPE dfies-fieldname.

w_inst-code = '0'.

w_inst-name = 'C/R'.

append w_inst to t_inst.

w_inst-code = '1'.

w_inst-name = 'C/OR'.

append w_inst to t_inst.

w_inst-code = '2'.

w_inst-name = 'MAIL'.

append w_inst to t_inst.

w_inst-code = '3'.

w_inst-name = 'RET'.

append w_inst to t_inst.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = l_retfield

value_org = 'S'

window_title = text-t01

TABLES

value_tab = t_inst

return_tab = t_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

read table t_return into w_return index 1.

read table t_inst into w_inst with key code = w_return-fieldval.

write w_inst-code to p_inst.

refresh t_inst[].

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,555
*TYPES: BEGIN OF ty_inst,*
       *code_key TYPE dfies-fieldname,*
       *short_text TYPE char50,*
       *END OF ty_alert.*

*data: gt_inst type table of ty_inst,*
        *gwa_inst type ty_inst.*

*gwa_inst-code_key = '0'.*
*gwa_inst-short_text = 'C/R'.*
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = l_retfield
*dynpprog        = sy-repid*
*dynpnr          = sy-dynnr*
 *dynprofield     = 'P_INST'*
value_org = 'S'
window_title = text-t01
TABLES
value_tab = gt_inst
return_tab = t_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.

Thanks

Vijay

Reward if helpful

13 REPLIES 13
Read only

Former Member
0 Likes
1,555

What is the value of I_retfield that you are passing?

Read only

0 Likes
1,555

Actually that's my problem?what should be the right value for RETFIELD?base on my program?btw, i forgot to include my internal table

BEGIN OF y_inst,

code(1),

name(4),

END OF y_inst.

that's my internal table.

please help me How would I fix this problem?

Read only

0 Likes
1,555

retfield is the field from the internal table that you want to display in the search help dialog...and subsequently populate it on selection. try passing the name of that field and it should be fine.

Edited by: Priyank Jain on Mar 5, 2008 4:54 AM

Read only

0 Likes
1,555

hi

use this.

data : t_inst like standard table of y_inst.

by

pari.

Read only

Former Member
0 Likes
1,555

Hi salma reyes

Try this Coding ,it will work ..

data: t_inst type standard table of y_inst,

t_return TYPE standard table of ddshretval ,

w_inst like line of t_inst,

w_return like line of t_return.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_inst.

DATA:l_retfield TYPE dfies-fieldname.

w_inst-code = '0'.

w_inst-name = 'C/R'.

append w_inst to t_inst.

w_inst-code = '1'.

w_inst-name = 'C/OR'.

append w_inst to t_inst.

w_inst-code = '2'.

w_inst-name = 'MAIL'.

append w_inst to t_inst.

w_inst-code = '3'.

w_inst-name = 'RET'.

append w_inst to t_inst.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = l_retfield

value_org = 'S'

window_title = text-t01

TABLES

value_tab = t_inst

return_tab = t_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

read table t_return into w_return index 1.

read table t_inst into w_inst with key code = w_return-fieldval.

write w_inst-code to p_inst.

refresh t_inst[].

Hope the problem is solved .

Reward me points .

By

Pari

Read only

0 Likes
1,555

whats did you add on my previous program? I dont see any difference?

Read only

Former Member
0 Likes
1,556
*TYPES: BEGIN OF ty_inst,*
       *code_key TYPE dfies-fieldname,*
       *short_text TYPE char50,*
       *END OF ty_alert.*

*data: gt_inst type table of ty_inst,*
        *gwa_inst type ty_inst.*

*gwa_inst-code_key = '0'.*
*gwa_inst-short_text = 'C/R'.*
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = l_retfield
*dynpprog        = sy-repid*
*dynpnr          = sy-dynnr*
 *dynprofield     = 'P_INST'*
value_org = 'S'
window_title = text-t01
TABLES
value_tab = gt_inst
return_tab = t_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.

Thanks

Vijay

Reward if helpful

Read only

0 Likes
1,555

ok.i will try.many thanks Ill give you points as soon as it works

Read only

0 Likes
1,555

Thanks its working.my problem now is how would I change the text in the field?I mean i want the fieldnames or columnnames as CODE and NAME not fieldname and F002.

Last help.Ill give u full points.

thanks again

Read only

0 Likes
1,555

Hi

try

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'P_INST'

DYNPROFIELD = 'P_INST'

value_org = 'S'

window_title = text-t01

TABLES

value_tab = t_inst

return_tab = t_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

Rest can be kept as before...

Read only

0 Likes
1,555

Hi

If you are referrring to the name in column headers, then its difficult to change. The name comes directly from the short text maintained in the domain of that datatype. If you specifially wwant to have your own heading for the columns, you will have to create a custom domain and datatype and enter the description you want to appear while creating.

THanks

Vijay

Read only

0 Likes
1,555

1. Try creating 2 new data elements lets say ZCODE and ZNAME

and then

instead of >>

BEGIN OF y_inst,

code(1),

name(4),

END OF y_inst.

replace with >>

BEGIN OF y_inst,

code TYPE ZCODE,

name TYPE ZNAME,

END OF y_inst.

2. Replace with >>>

BEGIN OF y_inst,

code TYPE QCODE,

name TYPE HRTXT,

END OF y_inst.

Read only

Former Member
0 Likes
1,554

Hi,

Here field name you have given wrong.Give the name of the field

which is declared in internal table in Capital letters.

EX; DATA : BEGIN OFt_inst OCCURS 0,

werks LIKE t001w-werks,

END OF t_inst.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WERKS'

value_org = 'S'

window_title = text-t01

TABLES

value_tab = t_inst

return_tab = t_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.