‎2009 Feb 05 7:31 AM
Dear Experts,
While outputting select-options data, it is displaying data as
IBT2008070120080901
How to supress data and i want to display data as
Purchasing Date: 01.07.2008 - 01.09.2008.
Please provide ur suggestion to solve this issue.
Regards,
Bharat.
‎2009 Feb 05 7:34 AM
try this
SELECT-OPTIONS: date FOR sy-datum.
write : 'Purchasing order', date-low, ' - ' , date-high.
Edited by: abap on Feb 5, 2009 8:35 AM
‎2009 Feb 05 7:35 AM
Hi,
Loop on selection table and display the low n high value with write statement .
Regards,
Prashant
‎2009 Feb 05 7:37 AM
IBT2008070120080901------>
sign = I
option = bt
low = 20080701
high = 20080901
so ur table ,
itab-sign will give i
itab-option will give bt
itab-low = 20080701
itab-high = 20080901
check on date format
‎2009 Feb 05 7:40 AM
Hi ..
Please check the sample code
data: v_date TYPE ERSDA,
v_datelow TYPE char10,
v_datehigh TYPE char10.
SELECT-OPTIONS: s_date FOR v_date.
write: s_date-low to v_datelow mm/dd/yyyy.
write: s_date-high to v_datehigh mm/dd/yyyy.
WRITE: / v_datelow, '-', v_datehigh.
‎2009 Feb 05 7:41 AM
Hi,
Test the following code hope will solve out you problem,
SELECT-OPTIONS sodate FOR sy-datum.
DATA: test(50).
WRITE: 'Purchasing Order', sodate-low, '-', sodate-high to test.
WRITE: test.Kind Regards,
Faisal
‎2009 Feb 05 7:41 AM
Hi,
You are printing out entire line. As select options simply creates a table with 4 fields with such structure
selection-options date for sy-datum.
"date now has such structure
data begin of date occurs 0,
sign,
option,
low,
high,
end of date.
What you do is displaying entrie row of that table.
Do as abap said. Just display particular fields, low (for storing lowest range) and high for storing higest one. sing and options are of no interests here, as long as option = 'BT' (between) is set, you are interested only in date between these two in low and high.
Regards
Marcin
‎2009 Feb 05 7:49 AM
hi bro...
you can try out following snippet.
data:
w_date1 like sy-datum,
w_date2 like sy-datum.
loop at s_opt.
w_date1 = s_opt-low.
w_date2 = s_opt-high.
write: 'purchase date:' , w_date1,'-',w_date2.
endloop.
regards
‎2009 Feb 05 8:09 AM
Hi
SELECT-OPTIONS p_date for SY-DATUM.
loop at p_date.
write: / , 'Purchasing Date:' , p_date-low, '-' , p_date-high.
endloop.
Hope this helps
Regards,
Jayanthi.K
‎2009 Feb 05 8:11 AM
Hi,
select-options :
s_temp for ....
while displaying give s_temp-low - s_temp-high
‎2009 Feb 05 8:18 AM
Hi,
If you have multiple Dates in Select-Option Than test the following Code hope will help you.
SELECT-OPTIONS sodate FOR sy-datum.
DATA: test(50).
LOOP AT sodate WHERE sign = 'I'. " Use this Condition for only the Included Values.
IF sodate-high = '00000000'. " Use this Condition when user enter only one Date,
WRITE: / 'Purchasing Order Date : ', sodate-low TO test.
ELSE.
WRITE: / 'Purchasing Order Date : ', sodate-low, '-', sodate-high TO test.
ENDIF.
WRITE: test.
CLEAR: test.
ENDLOOP.Kind Regards,
Faisal
‎2009 Feb 05 8:35 AM
Hi ,
You can try the following code---
SELECT-OPTIONS : s_date FOR sy-datum .
AT SELECTION-SCREEN OUTPUT .
s_date-option = 'BT' .
s_date-sign = 'I'.
s_date-low = '20080701'.
s_date-high = '20080901'.
APPEND s_date.
Regards
Pinaki Mukherjee
‎2009 Feb 05 9:35 AM
‎2009 Feb 05 9:44 AM
Hi,
Try this,
'IBT20008070120080901'
Here sign is I
option is BT
low and high values are 20080701 and 20080901
SELECT-OPTIONS :
s_date for sy-datum .
AT SELECTION-SCREEN OUTPUT .
s_date-sign = 'I'.
s_date-option = 'BT' .
s_date-low = '20080701'.
s_date-high = '20080901'.
APPEND s_date.