How to break range of dates into different months in mm/yyyy format
See the following eg:
MaterialNo Validfrom ValidTo RecordNo Value
A100 01.01.2007 13.05.2007 1000 1150/-
14.05.2007 24.08.2007 1001 1550/-
Now I want to break these dates into mm/yyyy format based on a condition. If the date(day) 15th lies in the range of dates
then it should pick that Value.
The output should be in this format.
MaterialNo Validfrom ValidTo Date RecordNo Value
A100 01.01.2007 13.05.2007 012007 1000 1150/-
022007 1000 1150/-
032007 1000 1150/-
042007 1000 1150/-
A100 14.05.2007 24.08.2007 052007 1001 1550/-
062007 1001 1550/-
072007 1001 1550/-
082007 1001 1550/-
Hi Shiva,
In your Report Program, you can define the field of type sy-datum. And then fill the fields with the date. And then you can extract the rest of it manually by this small and simple lines of code. Once you have the date extracting logic then you can output the date in any manner according to your wish.
data : lv_date TYPE sy-datum.
data : lv_month TYPE c LENGTH 2.
data : lv_year TYPE c LENGTH 4.
data : lv_month_year TYPE c LENGTH 6.
lv_date = sy-datum.
lv_month = lv_date+4(2).
lv_year = lv_date+0(4).
CONCATENATE lv_month lv_year INTO lv_month_year.
Hope this helps.
Thanks,
Samantak.
Similar Messages
-
How to display rows of data into different columns?
I'm new to SQL and currently this is what I'm trying to do:
Display multiple rows of data into different columns within the same row
I have a table like this:
CREATE TABLE TRIPLEG(
T# NUMBER(10) NOT NULL,
LEG# NUMBER(2) NOT NULL,
DEPARTURE VARCHAR(30) NOT NULL,
DESTINATION VARCHAR(30) NOT NULL,
CONSTRAINT TRIPLEG_PKEY PRIMARY KEY (T#, LEG#),
CONSTRAINT TRIPLEG_UNIQUE UNIQUE(T#, DEPARTURE, DESTINATION),
CONSTRAINT TRIPLEG_FKEY1 FOREIGN KEY (T#) REFERENCES TRIP(T#) );
INSERT INTO TRIPLEG VALUES( 1, 1, 'Sydney', 'Melbourne');
INSERT INTO TRIPLEG VALUES( 1, 2, 'Melbourne', 'Adelaide');
The result should be something like this:
> T# | ORIGIN | DESTINATION1 | DESTINATION2
> 1 | SYDNEY | MELBORUNE | ADELAIDE
The query should include the `COUNT(T#) < 3` since I only need to display the records less than 3. How can I achieve the results that I want using relational views???
Thanks!!!T#
LEG#
DEPARTURE
DESTINATION
1
1
Sydney
Melbourne
1
2
Melbourne
Adelaide
1
3
Adelaide
India
1
4
India
Dubai
2
1
India
UAE
2
2
UAE
Germany
2
3
Germany
USA
On 11gr2, you may use this :
SELECT t#,
REGEXP_REPLACE (
LISTAGG (departure || '->' || destination, ' ')
WITHIN GROUP (ORDER BY t#, leg#),
'([^ ]+) \1+',
'\1')
FROM tripleg
where leg#<=3
GROUP BY t#;
Output:
1 Sydney->Melbourne->Adelaide->India
2 India->UAE->Germany->USA
Cheers,
Manik. -
Date to show in MM/DD/YYYY format
Hi all,
I am stumped on this simple thing under BIP.How can I get the date to show in MM/DD/YYYY format under BIP ?
Template is created under word, for the field under formatting, type: date, format:M/d/yyyy ( can't find MM/DD/YYYY). But when I browse the document, it always show as "DD-MON-YYYY" format.
How to mitigate this ?
Thanks
MunsharHi ,
hey small mistake in my solution code,just change the format to dd/MM/yyyy (case sensitive code)then it will work
to-char() is used to convert the Date or Number format type to displayable string format.
In our case also it is coverting xml_date_filed into a string to the format of dd/MM/yyyy
so you can try with this formula
in Advanced tab write
*<?xdofx:to_char(MY_DATE_FIELD,'dd/MM/yyyy')?>*
or in properties tab ,under formatting section ,select type as DATE and write the format as dd/MM/yyyy
best/Aravind
Edited by: Aravind on Aug 18, 2011 9:58 AM, with correct solution -
Can we send the data into different data target from single datasource how
Hai
can we send the data into different data target from single datasource how ?Hi,
Create the transformation for each target and connect through DTP if you are in BI 7.0
If it is BW 3.5 create transfer rules and load it Info source and then different update rules for different targets then load it using IP.
If you are speaking about loading data from R3 data source to multiple data sources in BI
Then follow the below step.
1)create init IP's and run the IP's with different selection to different DSO(With same selection it is not possible).
2)Then you will have different delta queues for the same data source in RSA7
3)Your delta loads will run fine to different data sources from same DS in R3.
Hope this helps
Regards,
Venkatesh -
How to save each section report into different excel sheet?
Hi all
How to save each section report into different excel sheet?
I have a report in which there are 4 sections north south west east now i need to save north in excel sheet 1 , south in sheet2, west in sheet3, and east in sheet4. under each section there is list report.
Please let me know is it possible are not if possible let me no the procedure to be followed.
Thank youIf you're running XI 3.1 you might be able to solve this as follows.
1. Create four users: east, west, north, south
2. Create a profile that filters on the variable you used for the section/break
3. Publish the report
3.1 Set users created above to be the enterprise recipients
3.2 Add personalization (the profile created above)
3.3 Check the Deliver objects to each user in Destinations
(3.4 You could use %SI_OWNER% to get a nice suffix to the report name)
This should cause four reports to be created, each with its own "personalized" contents. -
Split data into different fields in TR
I have a flat file with space (multiple spaces between different fields) as a delimiter. The problem is, file is coming from 3rd party and they don't want to change the separator as comma or tab delimited CSV file. I have to load data in ODS (BW 3x).
Now I am thinking to load line by line and then split data into different objects in Transfer rules.
The Records looks like:
*009785499 ssss BC sssss 2988 ssss 244 sss 772 sss 200
*000000033 ssss AB ssss 0 ssss 0 ssss 0 ssss 0
*000004533 ssss EE ssss 8 ssss 3 ssss 2 ssss 4
s = space
Now I want data to split like:
Field1 = 009785499
Field2 = BC
Field3 = 2988
Field4 = 244
Field5 = 772
Field6 = 200
After 1st line load, go to 2nd line and split the data as above and so on. Could you help me with the code pleaseu2026?
Is it a good design to load data? Any other idea?
I appreciate your helps..Hi,
Not sure how efficient this is, but you can try an approach on the lines of this link /people/sap.user72/blog/2006/05/27/long-texts-in-sap-bw-modeling
Make your transfer structure in this format. Say the length of each line is 200 characters. Make the first field of the structure of length 200. That is, the length of Field1 in the Trans Struc will be 200.
The second field can be the length of Field2 as you need in your ODS, and similarly for Field3 to Field6. Load it as a CSV file. Since there are no commas, the entire line will enter into the first field of the Trans Structure. This can be broken up into individual fields in the Transfer Rules.
Now, in your Start Routine of transfer rules, write code like this (similar to the ex in the blog):
Field-symbols <fs> type transfer-structure.
Loop at Datapak assigning <fs>.
split <fs>-Field1 at 'ssss' into <fs>-field1 <fs>-field2 <fs>-field3....
modify datapak from <fs>
endloop.
Now you can assign Field1 of Trans Struc to Field1 of Comm Struc, Field2 of Trans Struc to Field2 of Comm Struc and so on.
Hope it helps!
Edited by: Suhas Karnik on Jun 17, 2008 10:28 PM -
Breaking up the weblogs into different categories
It will be really nice to break up the weblogs into different categories based on technical areas(kind of like forum but not that many categories). There could be one category where all the general discussion weblog could be posted. I think this will generate more traffic towards weblogs. Right now lot of the technical weblogs are getting lost among the general content. Just a suggestion. Love to hear back from SDN members.
Hi Sing,
Once in a while this request comes up and I have the same reaction as Craig has. It's there, just select Topics and every one of them has it's own page.
For example here is the EP page:
https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/weblogs/topic/22
Your latest Weblog still on top although there were many other posts on the most recent weblogs page.
It makes me think how we could better make it available to people. The weblogs as well as the link on the main EP page is directly to this page.
Not sure what else can be done, besides a Weblog pointing it out again.
Best, Mark. -
SegregatingTable data into different bucket with equal numebr of
Hi Guys,
I wanted to process table data in chunks not all the rows at a time. How can we achieve this in oracle.
Example :
I have one table EMP which has ten thousands rows(10,000) rows. Now these ten thousands rows are joined with other tables to process data and it takes time. So I wanted to pass one thousands rows at a time as an input to the procedures so that processing should happen only with 1 thousands rows at a time. This table does not have any primary key. So it there any method in oracle using that I can segregating the tables data into different buckets with equal number of rows.
I have used DBMS_PARALLEL_EXECUTE but its taking lots of time. Any help will be appreciated.I have one table EMP which has ten thousands rows(10,000) rows. Now these ten thousands rows are joined with other tables to process data and it takes time.
OK... So this is your actual problem. And the solution you are trying to come up with does not sound promising. So lets take a step back and re-think our strategy here. First thing would be how about we see some code? Show us your code that you say is running slow. And we can take it from there. The number 10,000 is a very small number. And if that is causing performance issue then you are in some big trouble.
And also it wouldn't hurt if you could read this Re: 3. How to improve the performance of my query? / My query is running slow. -
How to Get the Current data into Planning Layout from the Planning cube
Hi,
I have a problem in BPS. I am selecting the data from cube based on Month org details but I want to see the latest data. How can i get this data into planning cube.
Like
data
Tran cal month org amt
1 jan a 100
1 feb a 200
if i want to read based on Tran org as input values I shoud get the below data but I am getting the previous data.
Tran cal month org amt
1 feb a 200
Kindly help me in this regard
Thanks
NaveenNaveen,
Are yo having issue when you save something in the layout, the data doesn't appear in the listcube ? Or do you have issue that the latest data you see in the cube doesn't appear in the layout ?
For the former issue, please look at your selections of listcube and for the second issue, please check your planning level definition, make sure all the restrictions you have applied are valid for this latest data to be presented in the layout.
Hope this helps.
Cheers
Srini -
How to display the header data on different position in alv report
hi all,
how to display the header data on different position in alv report.
for example ,
customer name
xxxx xxxx
vendor name street
xxxx xxxx xxxxx
pls help me .hi
as per my understanding you need to trnasfer header internal table data to pdf..
please check the following links for internal table to pdf..
Convertion of Internal table data to PDF
This link is related to ur issue
Re: how to insert the calling of the FM: OTF to PDF
Thanks -
How to populate the Quering data into Excel sheet in Oracle
Dear Guys,
How to populate the Quering data into Excel sheet in oracle.
Please provide a solution.
Thanks & Regards,
Senthil K KumarHi
To make Excel sheets from sqlplus, you can use the markup html tag in sqlplus.
Here's an example.
Example
<code>
SET LINESIZE 4000
SET VERIFY OFF
SET FEEDBACK OFF
SET PAGESIZE 999
SET MARKUP HTML ON ENTMAP ON SPOOL ON PREFORMAT OFF
SPOOL c:\test_xls.xls
SELECT object_type
, SUBSTR( object_name, 1, 30 ) object
, created
, last_ddl_time
, status
FROM user_objects
ORDER BY 1, 2
SPOOL OFF
SET MARKUP HTML OFF ENTMAP OFF SPOOL OFF PREFORMAT ON
SET LINESIZE 2000 VERIFY ON FEEDBACK ON
</code> -
How to download the Dynamic data into PPT format
Hi Friends,
I have one doubt on WDJ. How to download the Dynamic data into PPT format. For Example Some Dynamic data is available in to View in that One Download Link or button available. Click on Download link or button download that data into PPT Format
Is it possible for WDJ. If possible please tell me.
Or
How to create Business Graphics in Web Dynpro Applications depening up on Excel Data and finally we can download the Business Graphics into powerpoint presentation.
Thank you,
Regards
Vijay Kalluri
Edited by: KalluriVijay on Mar 11, 2011 6:34 AMHi Govindu,
1. I have one doubt on WDJ. Click on either Submit Buttion or LinkToURL UI we can download the file that file having ppt formate(Text.PPT).
I am using NWDS Version: 7.0.09 and Java Version: JDK 1.6
2. is it possible to download the business Graphics in to the PPT by using Java DynPro
Regards
VijayK -
How to send ALV output data into Excel sheet format via Mail to the user?
Hi friends,
I have a doubt ie,
How to send ALV output data into Excel sheet format via Mail to the user?
regards
MoosaHi,
Provide the output internal table to the objbin in the below FM
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_docdata
put_in_outbox = c_x
TABLES
packing_list = i_objpack
object_header = i_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
and specify the document type
i_objpack-doc_type = 'XLS'.
and try.
Regards,
Nandha -
How to store jsp session data of different user in util.hashmap
how to store jsp session data of different user in java.util.hashmap
and access the data of all user on the server side
The same example is given in professional jsp but its not working.
I can use getIds() of httpsessioncontext but it's depricatedHi
I'm trying to make an example.
With the following codes you can get the date from the session.
request.getSession().getAttribute("sessionname")
To store it in a hashmap you could do it like this ->
Hashmap hm = new Hashmap();
hm.put(Object key, request.getSession().getAttribute("sessionname"));
I hope you understand it if not just write it!
Cyrill -
How to save the form data into adobe db?
Hi All,
How to save the form data into adobe db?
I have designed one xdp file.
Through processFormSubmission(), I got the submitted form data as Document obj.
Then I have called the workflow kickoff program.
code:
InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
"invoke", //Specify the operation name
params, //Specify input values (HashMap obj)
false); //Create an asynchronous request
It successfulyy started the workflow, but the submitted form data is not saved anywhere.
And also, How get the form data from tables?
Please provide the solution for the above.
Thanks in advance.
Regards,
Saravanan GYou need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
Jasmin
Maybe you are looking for
-
My apple tv is not allowed a gateway thru my router..how do get around thi
my apple tv will not go through my router and communicate with pc. does anyone know of a solution for this
-
Can I use Streaming Video in Java Application?
Will i be able to use Streaming Video in Java Application, if yes can anyhow out there pls teach me how to do it... thanks...
-
How do I delete memorized sites from address bar in Safari?
Hello, I already read a lot of similar questions but didn't really find an answer. And I'm sorry if something is not well written as english is not my first language. I'm trying to completely clear my address bar in safari, which still shows the same
-
Root guard best practices? Where to put it?
Hey all, We recently implemented root guard on our two core devices, on both ports that point to our distribution layer. This broke the link from our secondary router to the distribution layer, which remains in a BKN state due to the root BPDU that
-
To read an authorization profile.
Hi, I am trying to provide authorization in a HR report. An administrative person can execute the report. At this momet, a user can see the information of all employees. Instead, the users should be restricted for a group of employees whos organizat