03-19-2011 8:43 AM
Hi,
I ve a doubt in the F4 help. i created a search help which is exact copy of t530t which has mandt, massn, mntxt, massg, mgtxt
where i need to display massn, massg, mgtxt as search help for customized field zmassg. I had craeted it and it is displaying all the three fields for that field but the problem is when ever i select from the list of options the massn value is showing in that zmassg field but i ve to display the massg value in that zmassg field. I think it is displaying the 1st column value in list.
Can any one help me how to display the massg value in that zmassg instead of massn.
03-19-2011 9:08 AM
Hi Giriesh,
May be u missed some where.., Give the type of zmassg as massg.. else In the domain give value table it ll assign the search help. else in the program level use function module F4IF_INT_TABLE_VALUE_REQUEST
Thanks,
Regards.
Kiran
03-19-2011 9:50 AM
Hi Kiran,
The type of zmassg is Massg but the field is displaying the value of massn.
I had also tried using 'F4IF_INT_TABLE_VALUE_REQUEST' but the display of f4 is coming correct but the massg value is not displayed in the field p9001-zmassg, it is blank.
Have i done any mistake in this code.
I have pasted my code below:
actually i needed f4 for the field zmassg which is in IT9001.
MODULE F4_ZMASSG INPUT.
DATA : t_dynpro_value TYPE TABLE OF dynpread,
v_field_value LIKE LINE OF t_dynpro_value,
lt_fields TYPE TABLE OF dfies,
t_return_str TYPE TABLE OF ddshretval,
w_return_str TYPE ddshretval.
TYPES: BEGIN OF ty_zmassg,
massn type massn,
massg type massg,
zdesc type mgtxt,
END OF ty_zmassg.
DATA : t_massg type TABLE OF ty_zmassg,
w_massg TYPE ty_zmassg.
SELECT massn massg zdesc
from zxx_add_actions
CLIENT SPECIFIED
into table t_massg.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MASSG'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P9001-ZMASSG'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = T_MASSG
RETURN_TAB = T_RETURN_STR.
READ TABLE t_return_str INTO w_return_str WITH KEY retfield = 'P9001-ZMASSG'.
IF sy-subrc IS INITIAL.
READ TABLE T_MASSG INTO W_MASSG WITH KEY MASSG = w_return_str-fieldval.
ENDIF.
CLEAR : v_field_value,t_dynpro_value[].
v_field_value-fieldname = 'P9001-ZMASSG'.
v_field_value-fieldvalue = W_MASSG-MASSG.
APPEND v_field_value TO t_dynpro_value .
CLEAR : v_field_value.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = T_DYNPRO_VALUE.
ENDMODULE.
Edited by: Giriesh M on Mar 19, 2011 10:51 AM
Edited by: Giriesh M on Mar 19, 2011 10:54 AM
03-19-2011 10:32 AM
Hi giriesh,
In ur code... i think the dynpro field u gave is wrong.. there u have to give the field name in ur screen..
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MASSG'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P9001-ZMASSG' ----> here u have to give field name in the screen
VALUE_ORG = 'S'
TABLES
VALUE_TAB = T_MASSG
RETURN_TAB = T_RETURN_STR.
and u jus need to read the index.. try this..
READ TABLE t_return_str INTO w_return_str index sy-tabix.
parameter name or field name( what ever u gave in dynpro field above) = w_return_str-fieldval.
Thanks,
Regards,
Kiran.
03-19-2011 12:15 PM
Hi Giriesh,
Use the MATCHCODE OBJECT - addition in your parameter declaration.
so that it will overwrite your existing and display your fields as required.
Regards,
Ragunathan.R
03-23-2011 11:31 AM
I had solved this problem by making the massg field as key field in the copy of standard search help H_t530. So the key field is fitting in to field screen.
Thanks for replying to all pros.