09-18-2008 6:43 AM
Hi,
I need to give month name & year as input for the client.I want to know how to give search help for these.
selection-screen:begin of block b1 with frame title text-001.
parameters:p_mon type char10.
parameters:p_year type char4.
selection-screen:end of block b1.
thanks in advance.
09-18-2008 6:46 AM
09-18-2008 6:49 AM
Hi..,
You can create search help for this parameters in the AT SELECTION ON VALUE REQUEST event.
In that for month..,
Create one internal table with 15 cahr field.
and populate all month names into that table with append statement.
And then use F4IF_INT... Function module...
And for Year..
Let me know if there is any range?
Thanks,
Naveen.I
09-18-2008 6:52 AM
09-18-2008 7:08 AM
Hi,
search for similar fields in tables like LFAI which gives name1
MKPF which gives year in field mjahr.
Try this
SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_name LIKE LFA1-NAME1OBLIGATORY,
P_YEAR LIKE MKPF-MJAHR OBLIGATORY,
P_DATE LIKE SY-DATUM.
SELECTION-SCREEN END OF BLOCK BLOCK1 .
09-18-2008 7:23 AM
hi,
following code going for dump.....any soln pls
selection-screen:begin of block b1 with frame title text-001.
parameters : p_month type char10."LIKE isellist-month.
parameters:p_year type char4 obligatory.
selection-screen:end of block b1.
data:begin of itab occurs 0,
ltx like t247-ltx,
end of itab.
select * from t247 into corresponding fields of TABLE itab where spras = 'EN'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_month.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = p_month
PVALKEY = ' '
DYNPPROG = sy-repid
DYNPNR = ' '
DYNPROFIELD = p_month
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'C'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = itab[]
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.
09-18-2008 7:40 AM
Hi...
P_MONTH should be in quotes... while passing into function module..
Check this sample code..,
data: ltx like t247-ltx.
data:begin of itab occurs 0,
ltx like t247-ltx,
end of itab.
selection-screen:begin of block b1 with frame title text-001.
parameters : p_month like ltx.
parameters:p_year type char4 obligatory.
selection-screen:end of block b1.
at selection-screen on value-request for p_month.
select * from t247 into corresponding fields of table itab where spras = 'EN'.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'P_MONTH'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_MONTH'
value_org = 'S'
display = 'F'
tables
value_tab = itab.
Thanks,
Naveen.I
09-18-2008 7:48 AM
Hi Hosmath,
I guess the following will be very easy to use.It will have automatic search help for month
PARAMETERS : p_month TYPE ALMONTH.
Cheers,
Kothand
09-18-2008 7:52 AM
HI KOTHAND,
IS THERE ANY SEARCH HELP FOR YEAR LIKE THIS....PLS HELP