‎2007 Jan 30 12:07 PM
Hi,
i need one search help for two distint cases. If i use field-symbols for the export fields, the dynprofield say distint type(dump).
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = <fs_campo>
dynpprog = sy-repid
dynpnr = sy-dynnr
<b> dynprofield = <fs_ctayuda></b>
value_org = 'S'
callback_program = sy-repid
callback_form = 'F4CALLBACK'
TABLES
value_tab = t_ayuda
return_tab = ret_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Is that option posible???
Thanks.
‎2007 Jan 30 12:20 PM
In this case use the function in a form and pass the first field and second field in different performs.
LIKE
PERFORM F4function_call USING 'ATNAM' 'IT_MAINT2-ATNAM'.
PERFORM F4function_call USING 'ATNAM' 'IT_MAINT2-ATNAM1'.
The second one is the 'screen filed name' you have to change the screen field name only.
In this way it will take the same search help for both the fields
form F4function_call using value(p_0319)
value(p_0320).
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = p_0319
PVALKEY = ' '
DYNPPROG = progname
DYNPNR = dynnum
DYNPROFIELD = p_0320
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = it_value2.
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.
endform. " F4function_call
By Yuvaram
‎2007 Jan 30 12:08 PM
Hi jose,
1. If there are only two fields/parameters on screen,
on which u need search help,
2. then its better we can hardcode the field name itself.
regards,
amit m.
‎2007 Jan 30 12:10 PM
Hi,
dynprofiled should be name of your screen field. This cannot be a field symbol. I think you should be able to pass any CHAR type variable to this parameter.
Take your field name into a char_type field.
DATA: char_type type string.
if cond1.
char_type = field1.
else.
char_type = field2.
endif.
pass char_type to dynprofield.
Regards,
Sesh
Message was edited by:
Seshatalpasai Madala
‎2007 Jan 30 12:13 PM
Hi,
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
<b>DYNPROFIELD = 'P_MATNR'</b> " This should be in Capital letters
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Regards
Sudheer
‎2007 Jan 30 12:14 PM
The problem is two fields of dynpro have the same help search. The field-symbols are assing to constants.
ASSIGN c_torigen TO <fs_ctayuda>.
Thanks.
‎2007 Jan 30 12:20 PM
In this case use the function in a form and pass the first field and second field in different performs.
LIKE
PERFORM F4function_call USING 'ATNAM' 'IT_MAINT2-ATNAM'.
PERFORM F4function_call USING 'ATNAM' 'IT_MAINT2-ATNAM1'.
The second one is the 'screen filed name' you have to change the screen field name only.
In this way it will take the same search help for both the fields
form F4function_call using value(p_0319)
value(p_0320).
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = p_0319
PVALKEY = ' '
DYNPPROG = progname
DYNPNR = dynnum
DYNPROFIELD = p_0320
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = it_value2.
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.
endform. " F4function_call
By Yuvaram
‎2007 Jan 30 12:30 PM
In the above code you can pass the field symbol value to the form through value.
Yuvaram