Select-options.. Date range..URgent...
Hi All,
Can anyone let me know.. how to give last one month date range in select options.
Regards,
Parvez.
Hi,
In the INITIALIZATION event you can do that.
v_month = sy-datum+4(2) - 1.
v_year = sy-datum+0(4).
concatenate v_year v_month 01 to v_date1
concatenate v_year v_month 31 to v_date2
Or get the 1st and last dates of the last month and
s_date-low = date1 (1st date of last month).
s_date-sign= 'I'
s_date-high = date2 (last date of last month).
s_date-option = 'BT'
append s_date.
reward if useful
regards,
anji
Similar Messages
-
How to use select options whitout ranges ie like parameter
how to use select options whitout ranges ie like parameter and pls send me the code on that
thanks
raja.hi,
SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b>
eg: code
<b>SELECT-OPTIONS : s_kunnr for kna1-kunnr <b>no intervels.</b></b>
data: itab type table of kna1 with header line.
select * from kna1 into table itab where kunnr IN s_kunnr.
rgds
Anver -
Difference between select-option and range
Hi,
wat are the difference between select-option and range
where u have to use those and give the syntax for the range option.
if u use range option in report programming there is any advantages ?
pls reply for this ..
thanks
ramsHi,
Not much of a difference,
A Select-Option could be like,
SELECT-OPTIONS sel FOR f
And a Range could be like,
DATA: BEGIN OF sel OCCURS 10,
SIGN(1),
OPTION(2),
LOW LIKE f,
HIGH LIKE f,
END OF sel.
Here they both function the same. But then the Select-Options has numerous options associated with it than the RANGE option.
Hope it helps,
Pradip Parmar. -
Hello , I need your help , to access to every date in an interval of the select option , in order to execute a function module that use date in one of its parameters .
select-options : dat for sy-datum .
CALL FUNCTION 'ZPRUEBA''
EXPORTING
offic =
chdsk =
inicio_periodo =
FIM_PERIODO = dat "but i need here every date of the interval
NO_UPDATE =
IMPORTING
NR_COBRANCAS =
ENDSELECT.
How can I do that ? , tnhx.hi
put the function module in the loop.
data : date like sy-datum.
select-options : s_date for date.
while ( s_date-low LE s_date-high ).
CALL FUNCTION 'ZPRUEBA''
EXPORTING
offic =
chdsk =
inicio_periodo =
FIM_PERIODO = s_date-low
NO_UPDATE =
IMPORTING
NR_COBRANCAS =
add 1 to s_date-low.
endwhile.
reward if helpful
prasanth -
How to display null values in the graphs, when i select a date range?
Hi,
Can you please help me in achieving the below requirement:
We have a date promt, i have selected the date range from 12-Oct-2009 to 15-Oct-2009 and clicked on the go button.
In the above date range, data is only availabe on 14-Oct-2009. here the requirement is to display as all the records (12th, 13th , 14th & 15th) in the bar graph.
Currently the graph view is displaying the data only for 14-Oct-2009 in the bar graph.
If data is not available it should display in the bar graph as empty for that particular dates.
Help is highly apprieciated.
Thanks in Advance.Check out [this post|http://obiee101.blogspot.com/2009/04/obiee-showing-zero-in-bargraph.html].
-
Hi all,
Belated Happy Holi.
Can u explain me the difference between
Select-options and ranges?
When, where and how to use them ?
I know the basic differences, but i need to know in deep .
could u give me the informatin with a scenario please ?
Thanks in advance
RaviHI
<u>SELECT-OPTIONS:</u> Declare an internal table that is also linked to input fields on a selection screen
<u>RANGES:</u> Declare an internal table with the same structure as in select-options, but without linking it to a selection screen.
FOR FURTHER DOCUMENTATION PLEASE GO THROUGH THE LINK
<a href="http://72.14.203.104/search?q=cache:btyoj86smhEJ:www.sap-img.com/abap/difference-between-select-options-ranges.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=1">Difference Between Select-Options & Ranges</a>
<a href="http://72.14.203.104/search?q=cache:EJgiHLpghDEJ:help.sap.com/saphelp_nw04/helpdata/en/fc/eb3034358411d1829f0000e829fbfe/content.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=4">Statical Declaration</a>
<a href="http://72.14.203.104/search?q=cache:VWS1erlabRIJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htmSelect-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=5">Selection tables</a>
REGARDS
ANOOP
Message was edited by: ANOOP R.S -
XL Reporter - Selection of date range for report templates
Dear All,
I want to create a report using XL reporter and attach it to the main SAP B1 reports module . For this I have created the template using report composer .
Issue:
I have only one sub-period (ie,year wise in the posting periods)
how i can select the date range in the Composer and attach it to the main menu.
Regards,
Suresh Kannan.P.Suresh,
1. Goto Report Designer
2. there u can find "Advanced Report Builder" on left side of the window
3. At the below u can find three buttons like "Parameters", "Properties","Apply"
4. Click on "Parameters"
5. then Parameters window will populate
6. Click the new Button
7. Name: give as u like
Category: Literal
Type: Date
Attribute: Leave blank
Default Vale: Leave Blank
Prompt: From Date
This is the process to create the parameters.
create two parameters. one is fdate and ldate. -
Problem in Passing the select-options data in smartforms
Dear ABAPers,
I have developed new layout for Delivery Chellan using smartforms.
using parameters i am getting document no, corresponding all details getting print.
but the client wants to use multiple document no.
in function module also i am passing only one import parameter (i.e. doc.no).
my requirement is how to pass multiple data in smartfroms.
Thanks & Regards,
AshokDear ABAPers,
Here i give my code Please check it out and tell me where i am going wrong.
*& Report ZMM_DC_FORM *
REPORT ZMM_DC_FORM .
Data Declaration
tables : mseg,
mkpf,
ekpo,
ekko,
objk,
mbew,
ser03,
twlad,
makt,
adrc.
data : begin of struct_mblnr,
mblnr type mblnr,
end of struct_mblnr.
data : it_mblnr like table of struct_mblnr with header line.
data : begin of i_struct,
mblnr like mseg-mblnr,
mjahr like mseg-mjahr,
matnr like mseg-matnr,
erfmg like mseg-erfmg,
werks like mseg-werks,
lgort like mseg-lgort,
ebeln like mseg-ebeln,
ebelp like mseg-ebelp,
umwrk like mseg-umwrk,
end of i_struct.
data : begin of bednr_struct,
matnr type ekpo-matnr,
bednr type ekpo-bednr,
end of bednr_struct.
data : begin of price_struct,
matnr type mseg-matnr,
verpr type mbew-verpr,
stprs type mbew-stprs,
end of price_struct.
data : begin of serial_struct,
matnr like objk-matnr,
sernr like objk-sernr,
end of serial_struct.
data : begin of fi_struct,
matnr type mseg-matnr,
maktx type makt-maktx,
bednr type ekpo-bednr,
erfmg type mseg-erfmg,
verpr type mbew-verpr,
val_p type mbew-verpr,
end of fi_struct.
data : it_tab like table of i_struct with header line.
data : it_add1 type table of adrc with header line,
it_add2 type table of adrc with header line.
data : it_bednr like table of bednr_struct with header line.
data : it_price like table of price_struct with header line.
data : it_ser type table of ZMM_DC_SERIAL with header line.
data : it_final like table of fi_struct with header line.
data : s_date like mkpf-budat.
data : s_ebeln like ekpo-ebeln.
DATA : FM_NAME TYPE RS38L_FNAM.
Selection Screen Variables
selection-screen : begin of block b1 with frame title text-001.
select-options : s_mblnr for mseg-mblnr.
parameters : s_mjahr type mseg-mjahr.
selection-screen : end of block b1.
Start of Selection
start-of-selection.
select mblnr from mseg into table it_mblnr where mblnr ge s_mblnr-low
and mblnr le s_mblnr-high.
delete adjacent Duplicates from it_mblnr.
*loop at it_mblnr.
*write : it_mblnr-mblnr.
*endloop.
loop at it_mblnr.
select mblnr
mjahr
matnr
erfmg
werks
lgort
ebeln
ebelp
umwrk from mseg into table it_tab where mblnr = it_mblnr-mblnr
and mjahr = s_mjahr
and xauto <> 'X'.
read table it_tab index 1.
*code for PO Number
s_ebeln = it_tab-ebeln.
*code for Supplying plant address
select single adrnr from twlad into twlad-adrnr where werks = it_tab-werks
and lgort = it_tab-lgort.
select single * from adrc into it_add1 where addrnumber = twlad-adrnr.
clear twlad-adrnr.
*code for receiving plant address
select single lgort from ekpo into ekpo-lgort where ebeln = it_tab-ebeln
and ebelp = it_tab-ebelp.
select single adrnr from twlad into twlad-adrnr where werks = it_tab-umwrk
and lgort = ekpo-lgort.
select single * from adrc into it_add2 where addrnumber = twlad-adrnr.
clear : twlad-adrnr,
ekpo-lgort.
*code for the Material Document Date
select single budat from mkpf into s_date where mblnr = it_mblnr-mblnr
and mjahr = s_mjahr.
loop at it_tab.
it_final-matnr = it_tab-matnr.
it_final-erfmg = it_tab-erfmg.
*Code for Material Description
select single maktx from makt into makt-maktx where matnr = it_tab-matnr.
it_final-maktx = makt-maktx.
clear makt-maktx.
*Code for Service order Number
select single matnr
bednr from ekpo into it_bednr where ebeln = it_tab-ebeln
and ebelp = it_tab-ebelp
and matnr = it_tab-matnr.
it_final-bednr = it_bednr-bednr.
*Code for Price for the Material
select single matnr
verpr
stprs from mbew into it_price where matnr = it_tab-matnr
and bwkey = it_tab-werks.
if it_price-verpr <> 0.
it_final-verpr = it_price-verpr.
else.
it_final-verpr = it_price-stprs.
endif.
it_final-val_p = it_final-erfmg * it_price-stprs.
append it_final.
clear it_final.
endloop.
*Code for Serial Number
select single obknr from ser03 into ser03-obknr where mblnr = it_mblnr-mblnr
and vorgang = 'MMSL'.
select matnr
sernr from objk into table it_ser where obknr = ser03-obknr.
clear ser03-obknr.
*Calling Function Module for Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZMM_DC_FORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION FM_NAME
EXPORTING
L_MBLNR = it_mblnr-mblnr
L_DATE = S_DATE
L_EBELN = S_EBELN
IT_ADD1 = IT_ADD1
IT_ADD2 = IT_ADD2
TABLES
IT_FINAL = IT_FINAL
IT_SER = IT_SER.
endloop.
Please help me to solve this problem.It is very urgent.
Thanks & Regards,
Ashok. -
Selection OPTION: Date input problem in Module POOL through Subscreen
Dear ALL,
Being new to ABAP, I am struck in a Problem.
Requirement:
I want an option on the Screen( My Screen 9000) for Date Range. Through this Date-Range I want to filter and pull some data from
Database.
As Date Range Selection option is possible only through Sub-Screen integration. Hence I integrated a Sub-Screen 400 (as below) and named the Sub-Screen area as SEL on my screen.
Problem: As soon as I enter the dates on the screen, then those dates are not taken up by the code.
During debugging I saw the the S_datum-low and S_datum-high are empty (in fact 00000000)
The code follows:
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
Call SUBSCREEN SEL INCLUDING sy-repid '400'.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_9000.
DATA: gv_datum Type dats,
SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
SELECT-OPTIONS: s_datum FOR gv_datum.
SELECTION-SCREEN END OF SCREEN 400 .
Plz help where I am missing something.
Regards
ChandanCall the subscreen during the AT SELECTION-SCREEN event.
SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
SELECT-OPTIONS: s_datum FOR gv_datum.
SELECTION-SCREEN END OF SCREEN 400 .
AT SELECTION-SCREEN.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS '0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT -
Optional date range parameters
Hi All,
I have a 2 parameters from date and to date.When I didn't selected anything in parameters list then it should show all dates data.
Please suggest how to create a optional parameter for date range parameters.Hi Sastry,
For getting optional date parameter we are using formula like this in record selection
Not(hasvalue({?Date})) OR ({employee.Date} = {?Date})
But the solution you provided doesn't contain not .Can you please suggest what is the difference. -
Select -option Date field in MM/YYYY format!
Hi.. Friends..
Iam having DATE field as selection screen SELECT_OPTION parameter.
And I am fetching records from one of my tables with where condition of this select-option.
Now my reuirement is to modify that DATE select-option with 7 characters i.e. MM/YYYY
So if user enters 09/2008 as DATE-LOW.. I have to fetch all records of September 2008.
If user enters 09/2008(lower limit) and 02/2009(Upper limit)...
I have to fetch records between... September 1st 2008 to 28th february 2009.
What is the simplest way to impliment this?
Thanks,
Naveen.IHi
Use data element SPMON as in below code.
TABLES: S001.
DATA: l_year(4) TYPE n,
l_month(3) TYPE n,
g_sdate TYPE sy-datum,
g_edate TYPE sy-datum.
RANGES: gr_pdate FOR sy-datum.
CONSTANTS: lc_low TYPE sy-datum VALUE '00010101',
lc_high TYPE sy-datum VALUE '99990101'.
SELECT-OPTIONS: s_spmon FOR s001-spmon.
l_year = s_spmon-low(4).
l_month = s_spmon-low+4(2).
* Get the first day of PERIOD-LOW
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = l_year
i_periv = 'K2'
i_poper = l_month
IMPORTING
e_date = g_sdate
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
l_year = s_spmon-high(4).
l_month = s_spmon-high+4(2).
* Get the last day of PERIOD-HIGH
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = l_year
i_periv = 'K2'
i_poper = l_month
IMPORTING
e_date = g_edate
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF NOT s_spmon-low IS INITIAL.
gr_pdate-low = g_sdate.
ELSE.
gr_pdate-low = lc_low.
ENDIF.
IF NOT s_spmon-high IS INITIAL.
gr_pdate-high = g_edate.
ELSE.
gr_pdate-high = lc_high.
ENDIF.
IF NOT s_spmon-low IS INITIAL OR NOT s_spmon-high IS INITIAL.
gr_pdate-option = 'BT'.
gr_pdate-sign = 'I'.
APPEND gr_pdate.
ENDIF.
" SELECT RECORDS
" >>> SELECT field1 field2 FROM TAB1 WHERE erdat IN gr_pdate. <<< -
Hi,
I have developed a selection screen. There's a button that lauches an action to perform when the selection screen fields are filled. When the user inputs bad data, the program warn the user that the filled entries have an error and clear the screen inputs.
How can I manage to display back the data that was previously filled ? Should I use the INITIALIZATION key word ?
Thanks in advance for your help.
ThibaultHere is a point,
I am at least trying to initialize the select option range value, so that the user does not have to type in a value (I am trying to do that for test purpose only):
selection-screen begin of screen 1 as subscreen.
select-options S1 for
VBAP-VGBEL
modif id 001.
selection-screen end of screen 1 .
INITIALIZATION.
DATA: lv_s1Low TYPE VGBEL,
lv_s1High TYPE VGBEL.
lv_s1Low = '888'.
lv_s1High = '889'.
MOVE: 'BT' TO S1,
lv_s1Low TO S1-LOW,
lv_s1High TO S1-HIGH.
APPEND S1.
When executing the program, nothing happens, the input fields are still empy !!When this will be working, I will be able to get back the previously typed in values.
Thanks in advance for your help.
Thibault -
Select options- (negavtive range)
Hi,
My doubt is ...Is it possible to add a condition in the code to fetch data if we enter a range of valuesin the RED column of the selection screen .To be precise I want to restrict dates in my selection screen,if i enter certain dates in the selection screen I dont want the details of that date to be printed.By default itself if i enter it in the Red column ,it will restrict but my requirement is to do some more changes if I have given it in the RED columns,so I want to knw if i can add code in the program ,if so how to do it.Please advice.Hi,
Please try something like this.
select-options: so_date for sy-datum.
initialization.
*exclude the dates between August 01, 2007 and August 10, 2007
so_date-sign = 'E'.
so_date-option = 'BT'.
so_date-low = '20070801'.
so_date-high = '20070810'.
append so_date.
Regards,
Ferry Lianto -
How to modify a select option without range and mutiple selection??
hi all,
i need to modify a select option by removing the range and option for multiple entry. i other words i need to make select option as parameter.( because i cannot use parameter in my program due to some constraints.)
is it possible to change the select option as per my requirement if yes please let me know how is it possible.
Thanks in advance.
Sreekanth.hi,
Yes u can use code like following way..
select-options : s_matnr for mara-matnr no-extension no intervals.
Reward if helpful.
Regards
Gagan -
Validation for the select option value range of selection screen
Hi All.
if i wish to validate the selection screen parameter for a value range(select options),is it possible?
what should i write in code.Also,m using FM DD_DOMVALUES_GET to get the values for a specific domain name.
Please reply.Hiii,
Yes it is possible.... Can you give me the piece of code ... about the select option
and also the value range against which you want to validate the select option.
So that i can help you with the coding tips...
Thanks in advance.. -
Hi abap gurus,
i have select option for date.
when i select that option it will take date format (DD/MM/YYYY)
but i want (MM/DD/YYYY)
how can i chage this.
Thanks,.
JackYou might not be having access to SU01.
Go to T-code SU3 and change the date format to MM/DD/YYYY.
Or
From Menu go to System-User Profile-Own Data and change the date format to MM/DD/YYYY.
cheers
Amandeep.
Maybe you are looking for
-
iTunes Match keeps "gathering information" on my library, in a loop, without ever making to step 2. I know others have experienced the same issue, but the only advice given was for PC users. Am on Mac. Admittedly, my library is huge (over 10,000 song
-
Changing ipod touch to a different user
My husband just got an Iphone and I got his Ipod touch. How do I reset it so the email and itunes will be in my name and not his?
-
How do you change the start up color
I dont knoow how I did it but the start up color has gone from gray to a pink - Very hard on my old eyes
-
Adobe Illustrator CC 2014 Preview Window
In Adobe Illustrator CC 2014, when I use save for web- the optimize window which shows the preview does not show the exact size of the artwork at 100%, but from bottom drop down when you select 200% then it shows the correct size. Any idea how to fix
-
Open parameters with roman page numbers
Trying to use #page=nn to go to a specific page in a PDF file. My code is an html http link and the PDF file is on a server elsewhere. #page=nn works fine with arabic page numbers, but not with roman numerals used in the PDF file preface, foreword,