‎2008 Mar 05 9:37 AM
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[].
‎2008 Mar 05 9:47 AM
*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
‎2008 Mar 05 9:40 AM
‎2008 Mar 05 9:45 AM
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?
‎2008 Mar 05 9:52 AM
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
‎2008 Mar 05 9:53 AM
hi
use this.
data : t_inst like standard table of y_inst.
by
pari.
‎2008 Mar 05 9:45 AM
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
‎2008 Mar 05 9:48 AM
whats did you add on my previous program? I dont see any difference?
‎2008 Mar 05 9:47 AM
*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
‎2008 Mar 05 9:50 AM
ok.i will try.many thanks Ill give you points as soon as it works
‎2008 Mar 05 9:57 AM
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
‎2008 Mar 05 9:57 AM
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...
‎2008 Mar 05 10:03 AM
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
‎2008 Mar 05 10:04 AM
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.
‎2008 Mar 05 9:54 AM
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.