‎2008 Nov 28 10:15 AM
Moderator message: in future please use a meaningful subject for your questions
Dear All,
I need to add search help to this code
tables : t247.
DATA: BEGIN OF wa,
spras TYPE t247-spras,
mnr TYPE t247-mnr,
ktx TYPE t247-ktx,
ltx TYPE t247-ltx,
END OF wa,
it like table of wa.
select-options s_mon for wa-mnr.
select spras mnr ktx ltx into table it from t247 where spras EQ 'EN' and mnr in s_mon.
loop at it into wa.
write : / wa-ktx,
wa-ltx.
endloop.
can some one explain with example...
Thanks,
Thiru. R
Edited by: Matt on Nov 28, 2008 4:21 PM
‎2008 Nov 28 10:18 AM
Hi
Where you want to have the search help
if you are looking to have search help for the month
in the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR
you can use FM F4IF_INT_TABLE_VALUE_REQUEST
try this out
regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Nov 28, 2008 11:19 AM
‎2008 Nov 28 10:18 AM
Hi
Where you want to have the search help
if you are looking to have search help for the month
in the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR
you can use FM F4IF_INT_TABLE_VALUE_REQUEST
try this out
regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Nov 28, 2008 11:19 AM
‎2008 Nov 28 10:19 AM
hi,
you can create an internal table and populate it with data...
pass this table to FM given below ::
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_SPMON-LOW.
SELECT spmon FROM s001
INTO TABLE gi_tab.
*WHERE OTYPE = 'D'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'SPMON'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = gi_tab
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.
‎2008 Nov 28 10:19 AM
Hi Thiru,
To which field do you want to add search help.
Thanks,
Sai
‎2008 Nov 28 10:23 AM
Hi,
Refer the below program....
REPORT YTEST_P1.
PARAMETERS: p_variant type varid-variant.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_variant.
TYPES: BEGIN OF ty_VARID,
VARIANT TYPE VARID-variant,
END OF ty_VARID.
DATA: IT_VARID TYPE TABLE OF ty_VARID.
CONSTANTS: lc_VARIANT TYPE dfies-fieldname VALUE 'VARIANT',
lc_PROG TYPE sy-repid
VALUE 'YTEST_P1',
lc_P_VARIANT TYPE help_info-dynprofld VALUE 'P_VARIANT',
lc_s TYPE ddbool_d VALUE 'S'.
SELECT variant
fROM varid
INTO TABLE it_varid
WHERE REPORT = 'YTEST_P1'.
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = lc_VARIANT
dynpprog = lc_PROG
dynpnr = sy-dynnr
dynprofield = lc_P_VARIANT
value_org = lc_s
TABLES
value_tab = It_VARID
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
REFRESH IT_VARID[].
ENDIF.
ENDIF.
Hope this will help you..
Regards,
Ravi Kiran
‎2008 Nov 28 12:04 PM
Dear All,
i need search help with mnr fieldname can any one do the code for same...
Regards,
Thiru. R
‎2008 Nov 28 12:09 PM
Hi
Create a domain of type num2 AND change the type of your MNR to this new type and in the new(Z) domain maintain the Fixed values
you can copy the domain FCMNR to ZFCMNR and maintain the fixed values here
this will give you the F4 Help automatically
if you dont require month name in other languages
Regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Nov 28, 2008 1:10 PM
‎2008 Nov 28 12:17 PM
hi
hope this solves ur problem
parameters: TAB_ID type int4.
At selection-screen on value-request for TAB_ID .
DATA : BEGIN OF INT_TAB_ID OCCURS 0,
TAB_ID TYPE int4,
END OF INT_TAB_ID.
DATA : LOC_MAX TYPE int4.
CLEAR INT_TAB_ID.
REFRESH INT_TAB_ID.
COUNT = LOC_MAX + 1.
DO 10 TIMES.
MOVE COUNT TO INT_TAB_ID-TAB_ID.
APPEND INT_TAB_ID.
COUNT = COUNT + 1.
ENDDO.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'TAB_ID' u201C Internal table field name
DYNPPROG = 'PROG_NAME u201C Program name
DYNPNR = SY-DYNNR
DYNPROFIELD = 'TAB_ID' u201C Field where u need F4 help this can be ur selection creen parameter
VALUE_ORG = 'S'
WINDOW_TITLE = u2018Any descriptionu2019
TABLES
VALUE_TAB = INT_TAB_ID. u201C Internal table name
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
regards
Ajantha R