Routine that transforms YYYYMMDD to output view of DD.MM.YYYY
Hello
Can somebody tell me the Routine that transforms YYYYMMDD to output view of DD.MM.YYYY
Thanks
Hi,
Hi
DATA :
w_d1 TYPE sy-datum.
w_str TYPE string.
w_dot TYPE c VALUE'.'.
(assigne value of the source filed that you need to convert to w_d1)
CONCATENATE w_d16(2) w_dot w_d14(2) w_dot w_d1+0(4) INTO w_str.
RESULT = w_str.
Output will be
dd.mm.yyyy
Regards
Mahesh
Edited by: Monymahesh on Jan 7, 2010 3:05 PM
Similar Messages
-
Difference between Start Routine and End Routine in Transformations
Hi Friends,
I'm using BI 7.0... here in Transformations step we have two options..that is START ROUTINE... and END ROUTINE... What is the Difference between Start Routine and End Routine in Transformations..
When we go for Start Routine.. and when we go for End Routine..
Plz clarrify... points will be rearded..
thanks
babuHi,
One real time scenario for End Routine.
We have a scenario where in a datasource field is mapped to three infoobjects on the datatarget side. There are 2 key figures which need to get data after these these Infoobjects are filled. The best place for this to happen would be in a End Routine, where in we would loop through the results package and using the values of the infoobjects from the data target ( Cube in this case).
Hope this helps,
HD -
Start/Field Routine in Transformations (ABAP)
Hi Experts
Please update me on how to proceed and ABAP Code required.
DSOFULL->CUBE
DSO Active Table: /BIC/AEMPPED00
Data In DSO
Emp_ID--Emp_SDATE--Emp_TDate
1-----01.01.2008
1---01.01.2008--01.06.2008
1-----01.01.2008
Data Expected in CUBE
Emp_ID--Emp_SDATEEmp_TDate-----Ter_Date
1---01.01.2008--
01.06.2008
1---01.01.200801.06.2008---01.06.2008
1---01.01.2008--
I need a start routine or field routine that
Will loading data from DSO to CUBE the code should look for employee latest record and if it find Emp_TDatevalue then it should populate both recordsTer_date in cube with Emp_TDate
Please adviseHi,
i am providin you a sample code please modify it (field name and tables name's as per your requirement).
Please write the code in transformation rule of field Emp_TDate.
Map field Emp_SDATE to the target field for Emp_TDATE .
SELECT * FROM /BIC/AEMPPED00
WHERE Emp_SDATE NE ' '.
if sy-subrc is initial.
result = source_field-Emp_SDATE.
else.
result = ' '.
endif.
Please replace the emp_SDATE field with the source field name.
But still i have some question...
1. On what basis u decide the latest record ??
Can u please explain scenarion bit mroe clearly.
Thanks
Dipika
Edited by: Dipika Tyagi on Jun 24, 2008 8:47 AM -
Problem with Routine in Transformation
I have a routine that uses TIMECALC_DIFF to determine the difference between to date/times held in timestamp format.
All it generates is a duration of zero, no matter what the inputs are.
Value for YDATTIM is 20050812121821 and for YDATTIMF is 20050813121821 and the answer given is zero, when it should be 86400.
CONSTANTS: gc_timezone_system TYPE timezone VALUE 'MSTNO'.
DATA: t_first(14) TYPE c,
t_last(14) TYPE c,
/BIC/YDATTIM TYPE timestamp,
/BIC/YDATTIMF TYPE timestamp,
/BIC/YDATDUR TYPE i.
CALL FUNCTION 'TIMECALC_DIFF'
EXPORTING
timestamp1 = /BIC/YDATTIM
timestamp2 = /BIC/YDATTIMF
timezone = gc_timezone_system
IMPORTING
difference = /BIC/YDATDUR.
RESULT = /BIC/YDATDUR.
Thanks
SteveIn the transformation it generates the following code, and this doesn't seem to be editable;
IMPORTING
request type rsrequest
datapackid type rsdatapid
SOURCE_FIELDS-/BIC/YDATTIMF TYPE /BIC/OIYDATTIMF
SOURCE_FIELDS-/BIC/YDATTIM TYPE /BIC/OIYDATTIM
EXPORTING
RESULT type tys_TG_1-/BIC/YDATDUR**
DATA:
MONITOR_REC TYPE rsmonitor.
I have put all the code generated below
PROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
Rule specific types
TYPES:
BEGIN OF tys_SC_1,
InfoObject: YDATTIMF Finish date/time.
/BIC/YDATTIMF TYPE /BIC/OIYDATTIMF,
InfoObject: YDATTIM Start date/time.
/BIC/YDATTIM TYPE /BIC/OIYDATTIM,
Field: RECORD.
RECORD TYPE RSARECORD,
END OF tys_SC_1.
TYPES:
BEGIN OF tys_TG_1,
InfoObject: YDATDUR Duration.
/BIC/YDATDUR TYPE /BIC/OIYDATDUR,
END OF tys_TG_1.
$$ begin of global - insert your declaration only below this line -
$$ end of global - insert your declaration only before this line -
METHODS
compute_YDATDUR
IMPORTING
request type rsrequest
datapackid type rsdatapid
SOURCE_FIELDS type tys_SC_1
EXPORTING
RESULT type tys_TG_1-/BIC/YDATDUR
monitor type rstr_ty_t_monitor
RAISING
cx_rsrout_abort
cx_rsrout_skip_record
cx_rsrout_skip_val.
METHODS
invert_YDATDUR
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
METHOD compute_YDATDUR.
IMPORTING
request type rsrequest
datapackid type rsdatapid
SOURCE_FIELDS-/BIC/YDATTIMF TYPE /BIC/OIYDATTIMF
SOURCE_FIELDS-/BIC/YDATTIM TYPE /BIC/OIYDATTIM
EXPORTING
RESULT type tys_TG_1-/BIC/YDATDUR
DATA:
MONITOR_REC TYPE rsmonitor.
$$ begin of routine - insert your code only below this line -
CONSTANTS: gc_timezone_system TYPE timezone VALUE 'GMTUK'.
DATA: t_first(14) TYPE c,
t_last(14) TYPE c,
/BIC/YDATTIM TYPE timestamp,
/BIC/YDATTIMF TYPE timestamp,
/BIC/YDATDUR TYPE i.
CALL FUNCTION 'ZZTIMEDIFF'
EXPORTING
/BIC/YDATTIM = /BIC/YDATTIM
/BIC/YDATTIMF = /BIC/YDATTIMF
timezone = gc_timezone_system
IMPORTING
difference = /BIC/YDATDUR.
RESULT = /BIC/YDATDUR.
$$ end of routine - insert your code only before this line -
ENDMETHOD. "compute_YDATDUR
Method invert_YDATDUR
This subroutine needs to be implemented only for direct access
(for better performance) and for the Report/Report Interface
(drill through).
The inverse routine should transform a projection and
a selection for the target to a projection and a selection
for the source, respectively.
If the implementation remains empty all fields are filled and
all values are selected.
METHOD invert_YDATDUR.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
ENDMETHOD. "invert_YDATDUR
ENDCLASS. "routine IMPLEMENTATION
Thanks
Steve -
Pass Values to Output View WDA
Hello WDA experts,
I am creating a simple application to create 2 views. 1 Input and othe output view. I created Input view and able to get the input fields and do further selections in some strucutres in the method. Now I want to pass these values to output view fields. Where should I do the coding and what interface is to be used? Some coding clue please.
Thanks
Prasadhi prasad..........
Consider you are having two views, view1 and view2.
You want to pass a value from view1 to view2.
Have an input field in view1.
Create a node in the component controller.
create an attribute in that node.
now go to your view1->context.
drag the node you created, from the component controller to your view context.
now map the attribute to your input field.
you might be having a button to navigate to view2.
in view2 consider you are having another input field which displays the value you enterd in view1.
now drag the same node into your view 2 context.
so now view1 nad view2 will be sharing the same node.
so automatically the values will be passed.
---regards,
alex b justin. -
Xmltype.transform and xsl:output method="html"
hi, 9.2.0.4 winxp,
i wonder whether xmltype.transform regards any output instructions in the stylesheet. i requested any of xml, html and text and always got the same result?
any ideas or hints to more info?
regards peterSorry for jumping in on this thread, but I have a question regarding you reply. I have an XSL stylesheet that preforms XML to HTML conversion. Everything works correctly with the exception of those HTML tags that are not weel formed. Using your example if I have something like:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<input type="text" name="{NAME}" size="{DISPLAY_LENGTH}" maxlength="{LENGTH}"></input>
</xsl:stylesheet>
It would render HTML in the format of
<HTML>
<input type="text" name="in1" size="10" maxlength="20"/>
</HTML>
While IE can handle this Netscape can not. Is there anyway to generate completely cross browser complient HTML with XSL?
Thanks! -
How to suppress Lookup transformation no-match output if all rows match.
Hi. I have a Lookup Transformation that sends its matched output to an OLEDB destination and its no-match output to a flat file destination. The Lookup Transformation is configured to "Redirect rows to no match output" when there are no matches.
The problem is that even when all rows match (there is no no-match output), the flat file destination creates an empty file. How can I change this so that the no-match out put "runs" only if there is no-match output? I don't want an empty file to
be created if all rows match.
Thanks.Hi Peter,
If I am not mistaken, there is no way of controlling the creation of empty files. However this can be handled by adding a "File System Task" to Control Flow for deleting the file if no records are gone through "No-Match Output". Here are the steps for doing
it;
Create a variable for holding number of records going through No-Match output.
Use the variable with "Row Count" transformation. Set "Row Count" in between "Look up" and "Flat File Destination".
Add a "File System Task" just after the "Data Flow Task" for deleting the file.
Set Precedence constraint with an expression using the variable created for executing "File System Task".
Dinesh Priyankara
http://dinesql.blogspot.com/
Please use Mark as answer (Or Propose as answer) or Vote as helpful if the post is useful. -
Error while Migrating the custom routines in Transformations
Dear All,
I am in the process of migrating BW 3.5 to BI 7.0.I migrated the Standard cubes and DSO's from BW3.5 to BI 7.0 flow successfully.
But while migrating the transformations which are having the custom routines,I am facing the below errors.
The data object "COMM_STRUCTURE" does not have a component called BIC/ZGROSSPRI".But the routine contains BIC/ZGROSSPRI.
I tried to change the BW 3.5 terminology to BI 7.0 terminology.(Like COMM_STRUCTURE replaced by SOURCE_FIELDS).But unable to solve.There are nearly 20 custome routines written in all transformations.
Can any one guide me who faced the same tyepe of problem?
Thanks & Regards,
DinakarHI,
We need to include Source and Target see the below article.
http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
How to Correct Routines in Transformations
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/g-i/how%20to%20correct%20routines%20in%20transformations.pdf
Thanks
Reddy -
Start Routine on Transformations
Hi Friends
I've Start routine on transfer rules with internal table and it was working fine.
Now I'm trying to define the internal table with occurs 0 but it's throwing error saying occurs not support in new version.
How can we define an internal table in start routine of transformations in BI7?
The code as follows for internal table.
data: begin of it_ord occurs 0,
AUFNR(000012) TYPE C,
ZZARBPL(000008) TYPE C,
WERKS(000004) TYPE C,
end of it_ord.
Regards,
Chandu.Hi
I've defined as follows
types: begin of it_ord ,
AUFNR(000012) TYPE C,
ARBPL(000008) TYPE C,
WERKS(000004) TYPE C,
end of it_ord.
data: temp_tabix like sy-tabix,
is_datapak type tys_SC_1.
data it_ordt type table of it_ord .
It's throwing error saying it_ort is a table with no header line and therefore has no component called aufnr.
If I define with header line then header line not supported.
What could be the problem?
I've changed like you said but it's giving the following error.
E:"IT_WA" is not a table with header line.
Regards,
Chandu.
Edited by: Chandu on Feb 18, 2009 8:44 AM -
My Apple TV will not show my photos in iPhoto on my iMac in the same sequence of images that I can see when viewing the iPhoto photos on my iMac. This is especially frustrating when I try to show my travel pictures in sequence on my TV. I have to resort to showing them on my iMac which defeats the principle purpose for purchasing my MacTV. Does anyone have a solution?
My Apple TV is Model MC 572C/A and the software is 5.2.1 (6025)
My iMac is Mac OSX version 10.7.5
THANKS!
Doug MayI can't recall whether slideshows are ordered by title or date, but you can manually re-arrange the albums in iPhoto, then batch change them once you have the order you want.
-
I have a football game recorded on a DVD+R disc that I was trying to view on my MacBook using DVD Player. The video comes onto the screen, but immediately freezes, and then disappears. An error message comes up saying that DVD player unexpectedly quit. My MacBook operating system is Mac OS X, version 10.5.8. DVD Player is App version 5.0.3, framework version 5.0.7.
However, the DVD+R works on both my Dad's and my brother's laptops. My Dad's laptop is an iBook G4 with Mac OS X operating system, version 10.3.9. The DVD Player is version 4.0. My brother's laptop is a MacBook Pro with Mac OS X operating system, version 10.7.2. The DVD Player is App version 5500.26.1 and framework version 5.5.0. The DVD+R plays fine on their laptops, but will not play on mine.
AnthonyLao Bo,
yes, you can locate and copy a file from your HD to a USB key using UNIX commands. If you know the exact name of the file which you’re trying to locate, try this:
find / -iname filename -print
This command will search your entire internal disk for the particular filename. If you know that it’s within a particular user account, then you can save search time with this variation:
find /Users/username -iname filename -print
Either variation of this command will print all files found which have the given filename. Presuming that you’re able to identify the correct file, you can copy it to a USB key using the command
cp -p filename_returned_by_find /Volumes/USB_volume
If you’re not sure which volume name your USB key has, this command will show you what the possibilities are:
ls /Volumes
Please let me know if you have any trouble with these commands. -
How to set the default value of a LOV that is found in a view criteria
HI,
I need to set the default value of an LOV that is found in a view criteria. I tried to set a groovy expression but unfortunately it wasn't read. i also tried to bind the LOV to a bind variable and set the value of the bind variable in the constructor of my backing bean but unfortunately the default value appeared the second time i entered the screen and not on page load.
Can anyone advise where can i set the default value,
Thanksif you want some default value in LOV. you go to edit list of value wizard-> UI hint->include no selection Item checkbox -checked.use labeled item first of list- and beside that put the label. but when you try to get value, it will show null.but you can manipulate in ur java , if it default value
-
is there a plug-in that will allow me to view CR2 (raw) files from a Cannon 5D Mark III to PSE 9 ?
The 5D.3 was first supported in ACR 6.7 which you need PSE 10 to use, so there is no plug-in for PSE9 that will allow opening the files from a camera newer than when PSE9 became obsolete.
Besides getting PSE12, assuming it is supported on your current computer—check the specs, you can use the free DNG Converter available from http://www.adobe.com/downloads/updates.html
to convert your CR2 files to DNG files that are compatible with older versions of ACR. Be sure to set your DNGC compatibility settings to a version old enough to be openable with PSE 10’s ACR.
As far as whether the OP is serious, it doesn’t hurt to ask the question before spending money on something you didn’t need. -
View Output/View Log options are redirecting to browser automatically in Oracle Apps 11i
Hi,
Can any one please let me know the what is the option to change popup options in oracle apps 11i.
My requirement is when I click on view Output/View Log options it should pop up there itself rather than redirecting to browser.
Application version is : 11.5.10.2
Thanks,
GovindHi,
Clear the value for the following profile option:
Viewer: Text
Regards,
Bashar -
User Defined Field that gives the date output of the last price update.
We would like to create a User Defined Field (UDF) with a Formatted Search (FMS) on the Item Master form that gives the date output of the last price update specifically the wholesale price.
Last Price Update
Pricelist 2 = Wholesale
Is this feasible?
If it is feasible what is the recommended approach?
Current working UDF on Item Master.
/* Date output is based on all the latest updates on the Item Master.*/
select max(updatedate)
from aitm
where itemcode = $[oitm.itemcode]
Resources that were helpful.
1.(Note:1165947 - Tracking Item Price Changes.)
2. Case 4-I6: Query on price updates. Mastering SQL Queries for SAP Business One By: Gordon DuThank you Gordon,
We are looking for the date output of the 'Last Price Update' based on 'Pricelist 2 = Wholesale' which is the challenge.
These 2 are the parameters for the date output, I should have mentioned that in my original message.
Last Price Update
Pricelist 2 = Wholesale
Per reading a bunch of other similar Forum Questions it looked like it is might not be possible to do. With there being no date on the AIT1 table and AITM.Updatedate is based on any and all updates not just last 'Last Price Update' and not sure how to use the loginstanc.
Thanks,
Vern
Maybe you are looking for
-
How to add a mm-dd-yyyy date field type in a Planning Data Form
Hi John, pls, I have one question regarding the possibility of adding a date field type for example 03-03-2009 in a cell of Planning Data Form application. for example, I created: - 2 members in Period dimension: StartProject and EndProject and I nee
-
CS 5 Extended won't open Raw files from my Canon SL1
My Raw plug-in version is 6.7.0.339. Is there a later version for me to download and install? Do I need to use Adobe DNG Converter? If so, which version? Forgive me if this question has been asked before. I did search the forums but didn't find an an
-
I have Kodak EasyShare so is there a way to sign on to that onlie photo service via APA SE
I tried to create the online service through APASE, but it didn't let me since I was registered with Kodak EasyShare.
-
Hi folks, I m using JDBC adapter at the Receiver side, and i m using "XML SQL Format" as message protocol. the document format looks like ; <root> <StatementName1> <dbTableName action=UPDATE | UPDATE_INSERT> <table>realDbTableName</table> <ac
-
Nokia5800,after upgrading software,phone don`t wor...
hi i upgraded the firmware to 51 version everything was completed and the phone shut down since than, it won`t start again all i get is a vibrating of the battery for 20 sec and nothing else any idea what`s wrong? hard restart don`t work either thank