Default system month and year
Hello Experts,
I am new to SAP BO Design Studio. I have been exploring it quite a bit but I am facing some challenge with one
issue. I will appreciate if anyone of you can assist me solving this issue.
Version: Design Studio 1.1 SP2
Data source: 1 x Bex query
Report Type: Bar Chart using for monthly analysis
Challenge: I am using DROPDOWN for default month/year but when I execute the report, DROPDOWN
is only showing the default value which I selected for the DROPDOWN items as default.
Business wants to see current month / year with current data when executing the
report. If they want to select another date then they can select from dropdown
to explore further for previous months / year report.
In the DROPDOWN_1 Item selection, I have selected year-month.
I am also using LISTBOX_1 which set to invisible and populating current date e.g 04/02/2014 just for me to check the feed from backend.
I have tried using the following script I on startup and DROPDOWN_1 Script but no luck.
On Startup:
POPUP_DISCLAIMER.show();
DROPDOWN_1.setSelectedValue(DS_1.getVariableValueExt("ZCURMTH"));
LISTBOX_1.setItems(DS_3.getMemberList("ZDATE",
MemberPresentation.TEXT, MemberDisplay.TEXT, 1));
TEXT_TIME_STAMP.setText("Data refreshed as of "+LISTBOX_1.getSelectedText());
On “DROPDOWN_1:
APPLICATION.setVariableValueExt("ZCURMTH",
DROPDOWN_1.getSelectedValue());
Display Items:
In the past, we have used this process with variables at back end and also with ABAP. But I would like to know if we can achieve this without ABAP or BW effort.
Thank you.
Hi Nikhil,
Thank you for reply.
I have used your above script on startup.
var vDate = APPLICATION.getInfo().dateNowInternalFormat;
var vDay = Convert.subString(APPLICATION.getInfo().dateNowInternalFormat, 6,8);
vMonth = Convert.subString(APPLICATION.getInfo().dateNowInternalFormat, 4,6);
vYear = Convert.subString(APPLICATION.getInfo().dateNowInternalFormat, 0,4);"
What it did is showing "Fical Year Period" as display rather then current year/month.
How can I show current year/month from my values of Dropbox_1 as default value of current month.
Thanks.
Similar Messages
-
DRQ: Isolate the Daily, Monthly and Yearly CheckBoxes in Selection Criteria
Module: Financials => Financial Reports => Accounting => General Ledger
Request to Isolate the Daily, Monthly and Yearly Check Boxes in the General Ledger - Selection Criteria screen, instead of an option in the report window.
Problem: If there is BP/General Ledger having long transaction list, then once user un-check any of the check boxes system takes long time to remove/hide those rows which contains Totals. Which is effecting the performance of the report also. Also those checkboxes appeared with check marked by default.
If user has an option in the selection criteria screen, then they can choose which Total they want before previewing the report and mark accordingly.
Thanks & Regards
Anjan BhowmickBeing reached to 10 open question, I am forced to close this thread
-
Daily, Monthly, and Yearly Report
Hi I am new to the BAM. I have a BPM process. I want to generate the daily, monthly and yearly report for it. Please advise how can I achieve it. I have a one dimension variable on the process.
Thanks in advance!Hi,
Try this query to get default ware house and its quantity and modify above query.
SELECT T0.[ItemCode], T0.[WhsCode], T0.[OnHand] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[WhsCode] = T1.[DfltWH] and T1.[ItemCode] = [%0]
Thanks & Regards,
Nagarajan -
To get first date and end date after entering any month and year
Hi,
I need to to get first date and end date of a month and year in yyyyMMdd format. I am reading month and year from a properties file. But I don't know how to get the first date and End date in given format. The properties file gives me just text. But I don't know how to get the date format using this. I need this urgently. Can anyone help me to get code for this?
I am reading the fields as,
Properties props = new Properties();
props.load(new FileInputStream("AnyMonthVolume.properties"));
String date_month = props.getProperty("date_month");
String date_year = props.getProperty("date_year");
Thanks.I know this has been posted a while ago but incase someone looking for it, here is the code to get the end of current month date.
Calendar cal = Calendar.getInstance();
cal.setTime(new java.util.Date());
cal.set(Calendar.DATE, 1); //set the date to start of month
cal.add(Calendar.MONTH,1);
cal.add(Calendar.DATE,-1);
System.out.println(cal.getTime()); -
Can we modify the pnp selection screen and get only month and year?
Dear Freinds,
I have requirement where i have to modify the PNP selection screen. So with the help of report category and coding in AT SELECTION-SCREEN OUTPUT , i have modified all the fields relating to dates . i.e i have removed all the radio buttons (i.e Today, Current month,current year etc) and finally
i have landed with only Period ( PNPBEGDA & PNPENDDA range) . But i dont want the PNPBEGDA & PNPENDDA range , but i want only is the month and year ( i.e just like the PNPPABRP & PNPPABRJ)
on my selection screen along with the pernr .
i have used the below code to close all the fields except pnpbegda and pnpendda.
AT Selection-Screen output.
loop at screen.
IF screen-group4 = '098' .
screen-input = '0'.
screen-invisible = '1'.
ENDIF.
IF screen-group4 = '092' .
screen-input = '0'.
screen-invisible = '1'.
ENDIF.
IF screen-group4 = '094' .
screen-input = '0'.
screen-invisible = '1'.
ENDIF.
IF screen-group4 = '100' .
screen-input = '0'.
screen-invisible = '1'.
ENDIF.
IF screen-group4 = '104' .
screen-input = '0'.
screen-invisible = '1'.
ENDIF.
MODIFY SCREEN.
endloop.
i.e on my selection screen i want only month & year combination and pernr -
when iam using the logical database PNP . Could any one please let me know how can i get only mon & year only on my selection screen .
If it is possible please let me know .
Thanks & regards
divya.Hi ,
The requirement is that the user doesnt want to enter the date range i.e for ex: 01012008 to 31012008.
As per the requirement the user will enter only the month and year only . so i on the selection screen
i want only the month and year only . Is there any means i can modify the date period which is there by
default (PNPbegda and PNPendda) on PNP selection screen. Instead of we givign to the user the
PNPBEGDA and PNPPENDA i want is only month and year .
AS already the code has already been written and now they have asked that they want only the month and year on the selection screen.
Please suggest me in this regard.If iam hiding all the buttons relating the dates fields, and now if iam adding the parameters for the month and year it is coming below below the fields pernr , personnel ara and subara , company code , payroll area, employee group of the standard fields of PNP selection screen , there by any body could please suggest me how to change.
regards
divya. -
Could some body help me:
I am try to get Date, Month and Year
I got stuck, Anyone help me this:
public class DateMonth
public static void main(String[] args)
toDay = new toDay("February 21, 2002");
dayofWeek = today.getDay();
System.out.println("Current month is " + toDay.getMonth());
System.out.println("Current day is " + getDate());
System.out.println("Current year is " + toDay.getYear());
toDay.setDate(toDay.getDate()+60)
System.out.println("Sixty days from now is ");
System.out.println(toDay);
}Try something like this:
import java.util.*;
public class DateMonth {
public static void main(String[] args) {
// Note: 0 = January
Calendar calendar = new GregorianCalendar();
System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
System.out.println("DATE: " + calendar.get(Calendar.DATE));
System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
// 60 days from now
calendar.add(calendar.DATE, 60);
System.out.println("\nSixty days from now");
System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
System.out.println("DATE: " + calendar.get(Calendar.DATE));
System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
}Remember that January is 0!
Take a look at the GregorianCalendar class:
http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html
Hope this helps!
DesQuite -
Find month and year of a given date
Hi,
How to find the month and year of a given date.
month ( sy-datum) year ( sy-datum )
--Balahi
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
Call Function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Using teh abiove u can get difference but when u pass previous year u wont get the exact.
There is no seperate FM for this, u have to use three FM.
If possible using these three FM code u can create an FM.
For years and months between two days:
DATA: EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE PREL-BEGDA,
TODATE LIKE PREL-BEGDA DEFAULT SY-DATUM.
CALL FUNCTION 'COMPUTE_YEARS_BETWEEN_DATES'
EXPORTING
first_date = fromdate
MODIFY_INTERVAL = ' '
second_date = todate
IMPORTING
YEARS_BETWEEN_DATES = EYEARS
EXCEPTIONS
SEQUENCE_OF_DATES_NOT_VALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Write:/ eyears.
DATA: EMONTHS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE SY-DATUM,
TODATE LIKE SY-DATUM
DEFAULT SY-DATUM.
CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
EXPORTING
i_datum_bis = fromdate
i_datum_von = todate
I_KZ_INCL_BIS = ' '
IMPORTING
E_MONATE = emonths
write:/ emonths
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = x_faede-zfbdt
I_DATUM_VON = p_fdat
I_KZ_EXCL_VON = '0'
I_KZ_INCL_BIS = '0'
I_KZ_ULT_BIS = ' '
I_KZ_ULT_VON = ' '
I_STGMETH = '0'
I_SZBMETH = '1'
IMPORTING
E_TAGE = dias_v.
IF SY-SUBRC <> 0.
ENDIF.
x_faede-zfbdt -> 20050915
p_fdat -> 20050811
dias_v = 4
try this and let me know.
regards
ravish
<b>plz dont forget to reward useful points</b> -
Selection screen - month and year
Hi friends,
I have a selection screen where I need to have two fields one for Period(month) and the other for Fiscal year. So I used
parameters : p_lfmon like mbewh-lfmon.
parameters : p_lfgja like mbewh-lfgja.
My requirement is when I execute the program I want to see the current period(08) and Year(2006) in these two fields. And also I was wondering if we can add the input help F4 for these two fields as they dont have one right now.
Finally if I want to compare the these two fields month and year with a field in normal date format (08/25/2006), what is the easiest way to do that.
Waiting for replies. Especially from Rich. ThanksIf you need to default the current fiscal period, then you can do this.
report zrich_0001.
data: datum type sy-datum value '20060806'.
parameters: p_spbup type spbup .
initialization.
data: xgjahr type bkpf-gjahr.
data: xpoper type t009b-poper.
call function 'FI_PERIOD_DETERMINE'
exporting
i_budat = sy-datum
i_bukrs = '0010'
importing
e_gjahr = xgjahr
e_poper = xpoper.
concatenate xgjahr xpoper+1(2) into p_spbup.
start-of-selection.
if datum+0(6) = p_spbup.
write:/ datum, 'is in period', p_spbup.
endif.
Regards,
Rich Heilman -
Getting Day, month and year from Date object
hello everybody,
Date mydate = Resultset.getDate(indexField);
Now i would like to get day, month and year from mydate.
In another words, i'm looking for something equivalent to
mydate.getDay() as this method is deprecated.
Can somebody help me out please?
Thank you in advance,swvc2000,
Here is a sample class that demonstrates two ways in which to do this.import java.util.*;
import java.text.*;
public class DateSplitter {
public static void main(String args[]) {
/* even though your date is from a result set,
pretend the following date is your date that
you are using. The try catch block is used
because I hand-crafted my date using
SimpleDateFormat. Substitute your date.*/
Date yourDate = null;
try {
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
yourDate = formatter.parse("05/06/2000");
} catch (ParseException e) { }
//the following gets the current date
Calendar c = Calendar.getInstance();
//use the calendar object to set it to your date
c.setTime(yourDate);
//note months start at zero
int month = c.get(Calendar.MONTH);
int year = c.get(Calendar.YEAR);
int dayOfMonth = c.get(Calendar.DAY_OF_MONTH);
System.out.println("Calendar Month: "+month);
System.out.println("Calendar Day: "+dayOfMonth);
System.out.println("Calendar Year: "+year);
System.out.println();
/* Simple date format can also be used to strip them
out of your date object. When you use it, notice that
months start at 1. Also, it returns string values. If
you need integer values, you will have to use
Integer.parseInt() as I did below. If you are
only concerned about the string values, just remove
the Integer.parseInt part. */
DateFormat formatter = new SimpleDateFormat("M");
month = Integer.parseInt(formatter.format(yourDate));
System.out.println("SDF Month: "+ month);
formatter = new SimpleDateFormat("d");
dayOfMonth = Integer.parseInt(formatter.format(yourDate));
System.out.println("SDF Day: "+ dayOfMonth);
formatter = new SimpleDateFormat("yyyy");
year = Integer.parseInt(formatter.format(yourDate));
System.out.println("SDF Year: "+ year);
}//end main
}//end DateSplitter classtajenkins -
Need to combine month and year to get date YYYY-MM-DD format
Month and year are table fields and they will have values like
Month in format = mm example 01
year in format = YYYY example 2010
Now i need to concatenate month and year to derive date .
Expected result Result :2010-01-01
Example :Month =01
Year =2010
MudassarThe principle of any tiered architecture is that display formatting is done in a presentation layer. This is not just SQL and Client/Server programming; it is the foundation of all modern programming. Not knowing this is like a doctor who does not know
about germs or a chemist who does not know about atoms.
This is reviewed in the first 1-2 weeks of any database class. Why are you violating it??
Next, you do not even know that column are not fields!
T-SQL now has a DATE data type, which defaults to the ISO-8601 display format (yyyy-mm-dd). Are you using it? If you had been polite we would see your DDL and know.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
I want to keep date special month and year.
I want to keep date special month and year.
Example in sqlplus
insert into area(input_time) values(to_date('MAR-04','MON-YY'));
and select
select input_time from area;
the result
01 MAR 2004
in Oracle
01-MAR-2004 12:00:00 AM
I don't keep day, but I want to keep month and year.
Can you do?
Thanks.An Oracle date column must contain a date down to the second. If you don't specify a day or a time, it will default to the first of the month and midnight.
If you want a column to only contain values at the beginning of a particular month, you can create a CHECK constraint that verifies that
input_time = trunc( input_time, 'MM' )Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
First month and year relevancy for COI
When transferring the data from legacy system to ECC/BCS system, what is the context in the Year and period of first data entry will help the COI process.
Suppose the go live is on Jan 2008, is it put the first month and year as 001,2008.
How this impacts BCS ,particularly COI functionality in future if the data of starting in BCS as first month and year.
How does this impact the future execution of the function.Venkat,
do you mean Year & Period of 1st Collection fields in the Companies screen?
If yes, then the answer is very easy. If you have clicked on the 1st field description and then press F1, you would get the following help:
Year of First Data Collection
Attribute of the consolidation unit, which specifies the first period for which reported financial data can be entered or collected for that consolidation unit.
You are able to record reported financial data in the period of first entry and the year of first entry, even if posting and entry is blocked.
Dependencies
In customizing of consolidation units, you specify the year of first entry along with the period of first entry.
Regarding the periods.
I usually start customization in the period that is definitely earlier than go-live period.
Because:
1. I need to upload beginning balances. Usually I do this upload in the last periods of the year prior to go-live. -- in order to make balance carryforward.
2. In case of CoI I need to post and consolidate the history of capital. In periods prior go-live.
Edited by: Eugene Khusainov on Apr 25, 2008 8:54 AM -
Testing Monthly and Yearly Schedules
Is there is a quick way to test Monthly and Yearly Schedules without waiting for a month/year.
You can use Calendar object to perform monthly and yearly calculations.
What I do is abstract calls to System.currentTimeInMillis() so I can run tests faster than real time.
Another way is to change you tests to second/minute schedules and if these work, monthly/yearly schedules should also work. -
Needing a multi-month and year-in-view option for ical!
Hello all!
I could really use a multi-month and year-in-view format in ical... I've seen some dated posts - is anyone aware of any new developments/options for this?
thanks and peace-
DWI turn off all calendars but the birthdays. Select [Print]. Choose all the months you want to see. Deselect all calendars but birthdays. Click [Continue]. On the next menu, go to "Layout", select how many pages to print on the paper. I usually print a border around each calendar then you're good to go!
By only printing the birthdays calenar, you won't get too many appointments to get in the way of brain storming and future planning, yet the computer still thinks its printing a useful calendar. -
How to get Week,Month and Year details from a date column
Hi frenz,
I've a column like tran_date which is a date column..... I need the next week details based on this column and so on...
I need month and year details as well based on this tran_date column.... can any one tell me how...
Thanks in advanceMy example for objects:
create or replace type date_object as object
centure number,
year number,
month number,
day number,
hour number,
minute number,
second number,
daypart number,
week number,
constructor function date_object(p_dt date)
return SELF as result
create or replace type body date_object is
constructor function date_object(p_dt date)
return SELF as result
as
begin
SELF.centure:= trunc(to_char(p_dt,'YYYY')/100);
SELF.year:= to_char(p_dt,'YYYY');
SELF.month:= to_char(p_dt,'MM');
SELF.day:= to_char(p_dt,'DD');
SELF.hour:= to_char(p_dt,'HH24');
SELF.minute:= to_char(p_dt,'MI');
SELF.second:= to_char(p_dt,'SS');
SELF.daypart:= p_dt-trunc(p_dt,'DD');
SELF.week:= to_char(p_dt,'IW');
return;
end;
end;
select date_object(sysdate),
date_object(sysdate).year
from dual;Regards,
Sayan M.
Maybe you are looking for
-
I just submitted my first textbook, and it only covers the first quarter of my course. I'm planning on submitting the others as I finish them. One problem that I think I will encounter, is that if I create each quarter as a separate iBooks publicat
-
Fnd_request.submit_request error with PA_SRS_DATES2 value set
Hi, We are applications 12.0.6 with 10.2.0.3.0 database. I'm trying to submit the "PRC: Generate Draft Revenue for a Single Project" through fnd_request.submit_request and is erroring out with "PA: Error - Entered Accrue through date is not within op
-
How to find the Databse field used in which Transaction
Hi, I have one query about: How to find the particular field from the Database table, used in which transaction? Bottomline: I want to find the LIKP- LIFEX field, used in which Transaction. I know it is related to inbound delivery, but i couldn't fi
-
Playlist prints tracks all within one inch or so.........this has happened before.......don't recall what I did to fix.
-
Why do I get a black exclamation mark blocking a photo when I click on a thumbnail in iPhoto?
Why am I getting a triangle with a black exclamation mark when I click on theumbnails in iPhoto?