2008 Apr 24 7:12 PM
I need to ask for the month in a selection screen (january, feb...) witha F4, wathever
How can I do that???
Thanks
2008 Apr 24 7:18 PM
hi check this ,
report .
tables: t247 , DFIES.
parameters:p_month LIKE T247-MNR.
data: begin of itab occurs 0,
mnr like t247-mnr,
ktx like t247-ktx,
end of itab .
DATA : LT_FIELDS TYPE TABLE OF DFIES,
LS_FIELD TYPE DFIES.
at selection-screen on value-request for p_month.
select MNR
KTX
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 = 'MNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab
FIELD_TAB = LT_FIELDS .
regards,
venkat.
I need to ask for the month in a selection screen (january, feb...) witha F4, wathever
How can I do that???
Thanks
2008 Apr 24 7:18 PM
hi check this ,
report .
tables: t247 , DFIES.
parameters:p_month LIKE T247-MNR.
data: begin of itab occurs 0,
mnr like t247-mnr,
ktx like t247-ktx,
end of itab .
DATA : LT_FIELDS TYPE TABLE OF DFIES,
LS_FIELD TYPE DFIES.
at selection-screen on value-request for p_month.
select MNR
KTX
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 = 'MNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab
FIELD_TAB = LT_FIELDS .
regards,
venkat.
2008 Apr 24 7:19 PM
Try this.
REPORT rich_0001.
data: begin of imonths occurs 0,
month type numc2,
end of imonths.
parameter: p_month type numc2.
INITIALIZATION.
imonths-month = 0.
do 12 times.
imonths-month = imonths-month + 1.
append imonths.
enddo.
at selection-screen on value-request for p_month.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'MONTH'
dynprofield = 'P_MONTH'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = imonths.
start-of-selection.Regards,
Rich Heilman
2008 Apr 24 7:21 PM
parameters: p_month type month.
you can create the search help using table T247.
Thanks,
Srinivas
Edited by: Srinivas R on Apr 24, 2008 8:21 PM
2008 Apr 24 7:42 PM
This should give u Months in text format in the selection screen.
data: begin of imonths occurs 0,
month type fcltx,
end of imonths.
parameter: p_month type FCLTX.
INITIALIZATION.
select ltx from t247 into table imonths where spras eq 'EN'.
at selection-screen on value-request for p_month.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'MONTH'
dynprofield = 'P_MONTH'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = imonths.
start-of-selection.
2008 Apr 26 7:39 PM
There is a table "T015M" which stores the names of the months. You can try
with that, i.e. you can provide value help using that table.. still some
problem.. contact me..
2008 Apr 26 8:02 PM
Hi,
Please refer the code below:
PARAMETERS: sp_month(18) TYPE c.
DATA:BEGIN OF itab OCCURS 0,
month(20) type c,
END OF itab.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sp_month.
itab-month = 'January'.
APPEND itab.
clear itab.
"Append all months to itab
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MONTH'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'SP_MONTH'
value_org = 'S'
TABLES
value_tab = itab.
Thanks,
Sriram Ponna.
2008 Apr 26 8:49 PM
Hi ASHUTOSH,
I HAVE WRITTEN THIS CODE ONCE FOR MY USE TRY IT ....
tables: t247 , DFIES.
parameters:P_Month LIKE T247-MNR.
data: begin of itab occurs 0,
MNR like T247-MNR,
KTX like T247-KTX,
end of itab .
DATA : LTF_FIELDS TYPE TABLE OF DFIES,
LTF_FIELD TYPE DFIES.
at selection-screen on value-request for P_MONTH.
select MNR
KTX
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 = 'MNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab
FIELD_TAB = LTF_FIELDS .
regards,
JYOTHI
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |