Display of Time Stamps based on the TimeZones
Hi experts,
I am new to Internationalization topic and wants to
display Time Stamps based on the TimeZones.
For example, If I choose Asia/Calcutta as my TimeZone
it is displaying "Mon Aug 28 11:02:47 GMT+5:30 2001" as the TimeStamp.(I am in this TimeZone,which is default to me.)
Similarly If I select any other TimeZone, it should display the TimeStamp in the same format but the values in the Time Stamp should reflect the selected TimeZone.
I will be thankful to you if u could help me to get the solution.
Srinivas.
Hi Srinivas,
It comes down to some tinkering in the java.util.* package.
First off, you'll need to familiarise yourself with the Calendar class. This basically replaces the old Date class from old versions of the JDK, and allows you to hold certain dates and times. You can get one by calling Calendar.getInstance();
You can then set a TimeZone on this Calendar by calling myCalendar.setTimeZone().
To create a basic TimeZone, have a look at the SimpleTimeZone class - it'll allow you to set the hours ahead or behind GMT, as well as a start date for this time zone, and even gives the ability to add daylight savings time.
From there, the time zone you add to the Calendar should produce the correct dates for you. Changing the time zone within a Calendar that already holds a date and time should alter that date and time accordingly.
If you want to get really clever, have a look at the Locale class - it allows you to specify a default language and country. You can then apply this to your Calendar by calling Calendar.getInstance(Locale myLocale) instead of the version above. If you have the international JDK (i.e. the one with i18n.jar onboard), Calendar should be clever enough to format the dates nicely for you if you use a fairly well-known Locale (such as American English and so on).
A Locale will also let you format dates in a location-specific way if you want to output them to the screen later on down the track. A quick look at SimpleDateFormat and some of the other DateFormat classes should tell you what you need to know.
If you can't quite get your head around any of the above, feel free to reply again!
Martin Hughes
Similar Messages
-
how can i make a graph
y is number(the blue wire)pasing from UDP port,
x is the time stamp.
plus in the same time this graph can display several differenr numbers to compare. -
I Need Interactive Report for displaying vendor information. Based on the s
Interactive Report for displaying vendor information. Based on the selection made by the corresponding Vendor Bank Details are listed such that the line selected in the basic list was visible along with the secondary list.
hi
Hi
Use the Table LFA1 and LFB1 in the basic list
and LFBK table details in the secondary list
see the sample code related to customer Sales orders
modify it with the Vendor tables
REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
HEADING.
*TABLES DECLARATION
TABLES : KNA1, VBAK, VBAP.
*SELECT OPTIONS
SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
*INITIALIZATION
INITIALIZATION.
CUST_NO-LOW = '01'.
CUST_NO-HIGH = '5000'.
CUST_NO-SIGN = 'I'.
CUST_NO-OPTION = 'BT'.
APPEND CUST_NO.
*SELECTION SCREEN VALIDATION
AT SELECTION-SCREEN ON CUST_NO.
LOOP AT SCREEN.
IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
MESSAGE E001(ZTJ1).
ENDIF.
ENDLOOP.
*BASIC LIST SELECTION
START-OF-SELECTION.
SELECT KUNNR NAME1 ORT01 LAND1 INTO
(KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
FROM KNA1
WHERE KUNNR IN CUST_NO.
WRITE:/1 SY-VLINE,
KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
KNA1-NAME1 UNDER 'NAME',
61 SY-VLINE,
KNA1-ORT01 UNDER 'CITY',
86 SY-VLINE,
KNA1-LAND1 UNDER 'COUNTRY',
103 SY-VLINE.
HIDE: KNA1-KUNNR.
ENDSELECT.
ULINE.
*SECONDARY LIST ACCESS
AT user-command.
IF SY-UCOMM = 'IONE'.
PERFORM SALES_ORD.
ENDIF.
IF SY-UCOMM = 'ITWO'.
PERFORM ITEM_DET.
ENDIF.
*TOP OF PAGE
TOP-OF-PAGE.
FORMAT COLOR 1.
WRITE : 'CUSTOMER DETAILS'.
FORMAT COLOR 1 OFF.
ULINE.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'NAME',
61 SY-VLINE,
63 'CITY',
86 SY-VLINE,
88 'COUNTRY',
103 SY-VLINE.
ULINE.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR SECONDARY LISTS
TOP-OF-PAGE DURING LINE-SELECTION.
*TOP OF PAGE FOR 1ST SECONDARY LIST
IF SY-UCOMM = 'IONE'.
ULINE.
FORMAT COLOR 1.
WRITE : 'SALES ORDER DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'SALES ORDER NO.',
40 SY-VLINE,
42 'DATE',
60 SY-VLINE,
62 'CREATOR',
85 SY-VLINE,
87 'DOC DATE',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR 2ND SECONDARY LIST
IF SY-UCOMM = 'ITWO'.
ULINE.
FORMAT COLOR 1.
WRITE : 'ITEM DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'SALES ORDER NO.',
40 SY-VLINE,
42 'SALES ITEM NO.',
60 SY-VLINE,
62 'ORDER QUANTITY',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*END OF PAGE
END-OF-PAGE.
ULINE.
WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
SY-PAGNO.
SKIP.
*& Form SALES_ORD
*& FIRST SECONDARY LIST FORM
FORM SALES_ORD .
SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
(VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
FROM VBAK
WHERE KUNNR = KNA1-KUNNR.
WRITE:/1 SY-VLINE,
VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
40 SY-VLINE,
VBAK-ERDAT UNDER 'DATE',
60 SY-VLINE,
VBAK-ERNAM UNDER 'CREATOR',
85 SY-VLINE,
VBAK-AUDAT UNDER 'DOC DATE',
103 SY-VLINE.
HIDE : VBAK-VBELN.
ENDSELECT.
ULINE.
ENDFORM. " SALES_ORD
*& Form ITEM_DET
*& SECOND SECONDARY LIST FORM
FORM ITEM_DET .
SELECT VBELN POSNR KWMENG INTO
(VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
FROM VBAP
WHERE VBELN = VBAK-VBELN.
WRITE : /1 SY-VLINE,
VBAP-VBELN UNDER 'SALES ORDER NO.',
40 SY-VLINE,
VBAP-POSNR UNDER 'SALES ITEM NO.',
60 SY-VLINE,
VBAP-KWMENG UNDER 'ORDER QUANTITY',
103 SY-VLINE.
ENDSELECT.
ULINE.
ENDFORM. " ITEM_DET
REPORT demo_list_at_pf.
START-OF-SELECTION.
WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
AT pf5.
PERFORM out.
AT pf6.
PERFORM out.
AT pf7.
PERFORM out.
AT pf8.
PERFORM out.
FORM out.
WRITE: 'Secondary List by PF-Key Selection',
/ 'SY-LSIND =', sy-lsind,
/ 'SY-UCOMM =', sy-ucomm.
ENDFORM.
After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
Secondary List by PF-Key Selection
SY-LSIND = 14
SY-UCOMM = PF06
Example for AT USER-COMMAND.
REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
START-OF-SELECTION.
WRITE: 'Basic List',
/ 'SY-LSIND:', sy-lsind.
TOP-OF-PAGE.
WRITE 'Top-of-Page'.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-pfkey.
WHEN 'TEST'.
WRITE 'Self-defined GUI for Function Codes'.
ULINE.
ENDCASE.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
PERFORM out.
sy-lsind = sy-lsind - 1.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'FC1'.
PERFORM out.
WRITE / 'Button FUN 1 was pressed'.
WHEN 'FC2'.
PERFORM out.
WRITE / 'Button FUN 2 was pressed'.
WHEN 'FC3'.
PERFORM out.
WRITE / 'Button FUN 3 was pressed'.
WHEN 'FC4'.
PERFORM out.
WRITE / 'Button FUN 4 was pressed'.
WHEN 'FC5'.
PERFORM out.
WRITE / 'Button FUN 5 was pressed'.
ENDCASE.
sy-lsind = sy-lsind - 1.
FORM out.
WRITE: 'Secondary List',
/ 'SY-LSIND:', sy-lsind,
/ 'SY-PFKEY:', sy-pfkey.
ENDFORM.
<b>Vendor performance report</b>
See this sample code
*"Table declarations...................................................
TABLES:
EKKO, " Purchasing Document Header
CDHDR, " Change document header
SSCRFIELDS. " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
S_EKGRP FOR EKKO-EKGRP, " Purchasing group
S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
S_UDATE FOR CDHDR-UDATE. " Creation date of the change
" document
*" Data declarations...................................................
Field String to hold Purchase Document Number *
DATA:
BEGIN OF FS_EBELN,
EBELN(90) TYPE C, " Purchase Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
" the Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EBELN,
Field String to hold Purchase Document Header *
BEGIN OF FS_EKKO,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor *
BEGIN OF FS_LFA1,
LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
NAME1 TYPE LFA1-NAME1, " Name1
END OF FS_LFA1,
Field String to hold Change date and the name of the user *
BEGIN OF FS_CDHDR,
OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
OBJECTID TYPE CDHDR-OBJECTID, " Object value
CHANGENR TYPE CDHDR-CHANGENR, " Document change number
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
END OF FS_CDHDR,
Field String to hold Change document items *
BEGIN OF FS_CDPOS,
OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
OBJECTID(10) TYPE C, " Object Value
CHANGENR TYPE CDPOS-CHANGENR, " Document change number
TABNAME TYPE CDPOS-TABNAME, " Table Name
FNAME TYPE CDPOS-FNAME, " Field Name
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_CDPOS,
Field String to hold Date Element Name *
BEGIN OF FS_DATAELE,
TABNAME TYPE DD03L-TABNAME, " Table Name
FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
END OF FS_DATAELE,
Field String to hold Short Text of the Date Element *
BEGIN OF FS_TEXT,
ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid *
BEGIN OF FS_OUTTAB,
EBELN TYPE EKKO-EBELN, " Purchasing Document Number
ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
" Object
LIFNR TYPE EKKO-LIFNR, " Vendor's account number
EKGRP TYPE EKKO-EKGRP, " Purchasing group
BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
WERKS TYPE LFA1-WERKS, " Plant
NAME1 TYPE LFA1-NAME1, " Name1
USERNAME TYPE CDHDR-USERNAME, " User name
UDATE TYPE CDHDR-UDATE, " Creation date of the change
" document
DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
" Repository Objects
VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
END OF FS_OUTTAB,
Internal table to hold Purchase Document Number *
T_EBELN LIKE STANDARD TABLE
OF FS_EBELN,
Internal table to hold Purchase Document Header *
T_EKKO LIKE STANDARD TABLE
OF FS_EKKO,
Temp Internal table to hold Purchase Document Header *
T_EKKO_TEMP LIKE STANDARD TABLE
OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor *
T_LFA1 LIKE STANDARD TABLE
OF FS_LFA1,
Internal Table to hold Change date and the name of the user *
T_CDHDR LIKE STANDARD TABLE
OF FS_CDHDR,
Internal Table to hold Change document items *
T_CDPOS LIKE STANDARD TABLE
OF FS_CDPOS,
Temp. Internal Table to hold Change document items *
T_CDPOS_TEMP LIKE STANDARD TABLE
OF FS_CDPOS,
Internal Table to hold Data Element Name *
T_DATAELE LIKE STANDARD TABLE
OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name *
T_DATAELE_TEMP LIKE STANDARD TABLE
OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element *
T_TEXT LIKE STANDARD TABLE
OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid *
T_OUTTAB LIKE STANDARD TABLE
OF FS_OUTTAB.
C L A S S D E F I N I T I O N *
CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables *
DATA:
W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
W_VALUE TYPE EKKO-EBELN, " Reflected Value
W_SPACE VALUE ' ', " Space
W_FLAG TYPE I, " Flag Variable
W_VARIANT TYPE DISVARIANT, " Variant
*--- ALV Grid
W_GRID TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
T_FIELDCAT TYPE LVC_T_FCAT.
AT SELECTION-SCREEN EVENT *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
PERFORM VALIDATE_PUR_GRP.
START-OF-SELECTION EVENT *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
PERFORM SELECT_PO.
CHECK W_FLAG EQ 0.
Subroutine to select Object values.
PERFORM SELECT_OBJ_ID.
CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
PERFORM SELECT_CHANGED_VALUE.
CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
PERFORM DESCRIPTION.
END-OF-SELECTION EVENT *
END-OF-SELECTION.
IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
CALL SCREEN 100.
ENDIF. " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
HANDLE_HOTSPOT_CLICK
FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
PERFORM GET_CELL_INFO.
SET PARAMETER ID 'BES' FIELD W_VALUE.
CALL TRANSACTION 'ME23N'.
ENDMETHOD. " HANDLE_HOTSPOT_CLICK
ENDCLASS. " LCL_EVENT_HANDLER
*& Module STATUS_0100 OUTPUT
PBO Event
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'OOPS'.
SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
PERFORM FILL_VARIANT.
IF W_GRID IS INITIAL.
CREATE OBJECT W_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = CL_GUI_CONTAINER=>SCREEN0
I_APPL_EVENTS =
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
I_FCAT_COMPLETE = SPACE
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0
CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT = W_VARIANT
I_SAVE = 'A'
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = T_OUTTAB
IT_FIELDCATALOG = T_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC <> 0.
ENDIF. " IF W_GRID IS INITIAL
CREATE OBJECT W_EVENT_CLICK.
SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
PAI Event
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form PREPARE_FIELD_CATALOG
Subroutine to build the Field catalog
<--P_T_FIELDCAT Field Catalog Table
FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
LS_FCAT-FIELDNAME = 'EKGRP'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Number...
LS_FCAT-FIELDNAME = 'EBELN'.
LS_FCAT-REF_TABLE = 'EKKO' .
LS_FCAT-EMPHASIZE = 'C411'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-HOTSPOT = 'X'.
APPEND LS_FCAT TO PT_FIELDCAT .
CLEAR LS_FCAT .
Name of Person who Created the Object...
LS_FCAT-FIELDNAME = 'ERNAM'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-OUTPUTLEN = '15' .
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Purchasing Document Date...
LS_FCAT-FIELDNAME = 'BEDAT'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Vendor's account number...
LS_FCAT-FIELDNAME = 'LIFNR'.
LS_FCAT-REF_TABLE = 'EKKO'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
LS_FCAT-FIELDNAME = 'NAME1'.
LS_FCAT-REF_TABLE = 'LFA1'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Vendor Name'(001).
LS_FCAT-SELTEXT = 'Vendor Name'(001).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Creation date of the change document...
LS_FCAT-FIELDNAME = 'UDATE'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Change Date'(002).
LS_FCAT-SELTEXT = 'Change Date'(002).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
User name of the person responsible in change document...
LS_FCAT-FIELDNAME = 'USERNAME'.
LS_FCAT-REF_TABLE = 'CDHDR'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '10'.
LS_FCAT-COLTEXT = 'Modified by'(003).
LS_FCAT-SELTEXT = 'Modified by'(003).
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
LS_FCAT-FIELDNAME = 'DDTEXT'.
LS_FCAT-REF_TABLE = 'DD04T'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
Old contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_OLD'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
New contents of changed field...
LS_FCAT-FIELDNAME = 'VALUE_NEW'.
LS_FCAT-REF_TABLE = 'CDPOS'.
LS_FCAT-INTTYPE = 'C'.
LS_FCAT-OUTPUTLEN = '12'.
APPEND LS_FCAT TO PT_FIELDCAT.
CLEAR LS_FCAT.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S401(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDFORM. " SELECT_PO
*& Form SELECT_OBJ_ID
Subroutine to select Object ID
There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
SELECT OBJECTCLAS " Object Class
OBJECTID " Object value
CHANGENR " Document change number
USERNAME " User name
UDATE " Creation date
FROM CDHDR
INTO TABLE T_CDHDR
FOR ALL ENTRIES IN T_EBELN
WHERE OBJECTID EQ T_EBELN-EBELN
AND UDATE IN S_UDATE
AND TCODE IN ('ME21N','ME22N','ME23N').
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Header Not Found'(031).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EBELN IS INITIAL
ENDFORM. " SELECT_OBJ_ID
*& Form SELECT_CHANGED_VALUE
Subroutine to select Changed Values
There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
SELECT OBJECTCLAS " Object class
OBJECTID " Object value
CHANGENR " Document change number
TABNAME " Table Name
FNAME " Field Name
VALUE_NEW " New contents of changed field
VALUE_OLD " Old contents of changed field
FROM CDPOS
PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
FOR ALL ENTRIES IN T_CDHDR
WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
AND OBJECTID EQ T_CDHDR-OBJECTID
AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.
IF SY-SUBRC NE 0.
W_FLAG = 1.
MESSAGE S833(M8) WITH 'Item Not Found'(032).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_CDHDR IS INITIAL
T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM. " SELECT_CHANGED_VALUE
*& Form SELECT_PUR_DOC
Subroutine to select Purchase Order Details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
SORT T_EBELN BY EBELN.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
FS_CDPOS-OBJECTID BINARY SEARCH.
IF SY-SUBRC NE 0.
DELETE TABLE T_EBELN FROM FS_EBELN.
ENDIF. " IF SY-SUBRC NE 0.
ENDLOOP. " LOOP AT T_CDPOS...
LOOP AT T_EBELN INTO FS_EBELN.
MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
APPEND FS_EKKO TO T_EKKO.
ENDLOOP. " LOOP AT T_EBELN...
T_EKKO_TEMP[] = T_EKKO[].
ENDIF. " IF NOT T_CDPOS IS INITIAL
ENDFORM. " SELECT_PUR_DOC
*& Form SELECT_VENDOR
Subroutine to select Vendor details
There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
IF NOT T_EKKO IS INITIAL.
SORT T_EKKO_TEMP BY LIFNR.
DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
SELECT LIFNR " Account Number of Vendor or
" Creditor
NAME1 " Name 1
FROM LFA1
INTO TABLE T_LFA1
FOR ALL ENTRIES IN T_EKKO_TEMP
WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
IF SY-SUBRC NE 0.
MESSAGE S002(M8) WITH 'Master Details'(033).
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_EKKO IS INITIAL
ENDFORM. " SELECT_VENDOR
*& Form DESCRIPTION
Subroutine to get the description
There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
SORT T_CDPOS_TEMP BY TABNAME FNAME.
DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
SELECT TABNAME " Table Name
FIELDNAME " Field Name
ROLLNAME " Data element
FROM DD03L
INTO TABLE T_DATAELE
FOR ALL ENTRIES IN T_CDPOS_TEMP
WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
IF NOT T_DATAELE IS INITIAL.
T_DATAELE_TEMP[] = T_DATAELE[].
SORT T_DATAELE_TEMP BY ROLLNAME.
DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
SELECT ROLLNAME " Data element
DDTEXT " Short Text Describing R/3
" Repository Objects
FROM DD04T
INTO TABLE T_TEXT
FOR ALL ENTRIES IN T_DATAELE_TEMP
WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
AND DDLANGUAGE EQ SY-LANGU.
IF SY-SUBRC NE 0.
EXIT.
ENDIF. " IF SY-SUBRC NE 0.
ENDIF. " IF NOT T_DATAELE IS INITIAL.
ENDIF. " IF NOT T_CDPOS IS INITIAL.
ENDFORM. " DESCRIPTION
*& Form FILL_OUTTAB
Subroutine to populate the Outtab
There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
SORT T_EKKO BY EBELN.
SORT T_LFA1 BY LIFNR.
SORT T_DATAELE BY TABNAME FIELDNAME.
SORT T_TEXT BY ROLLNAME.
LOOP AT T_CDPOS INTO FS_CDPOS.
READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
OBJECTCLAS = FS_CDPOS-OBJECTCLAS
OBJECTID = FS_CDPOS-OBJECTID
CHANGENR = FS_CDPOS-CHANGENR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
READ TABLE T_EKKO INTO FS_EKKO WITH KEY
EBELN = FS_CDHDR-OBJECTID
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
LIFNR = FS_EKKO-LIFNR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
TABNAME = FS_CDPOS-TABNAME
FIELDNAME = FS_CDPOS-FNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
READ TABLE T_TEXT INTO FS_TEXT WITH KEY
ROLLNAME = FS_DATAELE-ROLLNAME
BINARY SEARCH.
IF SY-SUBRC EQ 0.
MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF. " IF SY-SUBRC EQ 0.
APPEND FS_OUTTAB TO T_OUTTAB.
CLEAR FS_OUTTAB.
ENDLOOP.
ENDFORM. " FILL_OUTTAB
*& Form GET_CELL_INFO
Subroutine to get the Cell Information
--> W_VALUE Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
CALL METHOD W_GRID->GET_CURRENT_CELL
IMPORTING
E_ROW =
E_VALUE = W_VALUE
E_COL =
ES_ROW_ID =
ES_COL_ID =
ES_ROW_NO =
ENDFORM. " GET_CELL_INFO
*& Form VALIDATE_PD_NUM
Subroutine to validate Purchase Document Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
IF NOT S_EBELN[] IS INITIAL.
SELECT EBELN " Purchase Document Number
FROM EKKO
INTO W_EBELN
UP TO 1 ROWS
WHERE EBELN IN S_EBELN.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E717(M8).
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EBELN[]...
ENDFORM. " VALIDATE_PD_NUM
*& Form VALIDATE_VEN_NUM
Subroutine to validate Vendor Number
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
IF NOT S_LIFNR[] IS INITIAL.
SELECT LIFNR " Vendor Number
FROM LFA1
INTO W_LIFNR
UP TO 1 ROWS
WHERE LIFNR IN S_LIFNR.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E002(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_LIFNR[]...
ENDFORM. " VALIDATE_VEN_NUM
*& Form VALIDATE_PUR_GRP
Subroutine to validate the Purchase Group
There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
IF NOT S_EKGRP[] IS INITIAL.
SELECT EKGRP " Purchase Group
FROM T024
INTO W_EKGRP
UP TO 1 ROWS
WHERE EKGRP IN S_EKGRP.
ENDSELECT.
IF SY-SUBRC NE 0.
CLEAR SSCRFIELDS-UCOMM.
MESSAGE E622(M8) WITH W_SPACE.
ENDIF. " IF SY-SUBRC NE 0
ENDIF. " IF NOT S_EKFRP[]...
ENDFORM. " VALIDATE_PUR_GRP
*& Form FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
W_VARIANT-REPORT = SY-REPID.
W_VARIANT-USERNAME = SY-UNAME.
ENDFORM. " FILL_VARIANT
<b>Reward if usefull</b> -
I'm Using Lookout 6.02, in a XP Pro Windows Machine, Service Pack 3.
I have an application that collects data at the rate of 20 samples per second. It works just fine, the CSV File contains all the samples without missing a single one.
The problem is that the time stamp in the data file only shows hours and minutes. With 20 sample per second, there are 1200 samples per minute. It is hard to figure out in which second or sample number, occurred some events collected. These files are open with Excel and analyzed with Excel. There is no easy way to implement a search or a guidance for knowing the sample number or the exact time in Excel. My problem is to add the seconds and if possible the milliseconds to the time stamp done by the spreadsheet object.
Any suggestion?
Other ways to do the same that includes the time stamp all the way down to milliseconds?Create another column with the Now() function, then set the calumn format to hh:mm:ss.s
expression would be now(trigger) for the date and time or now(trigger)-today(trigger) for just time
The trigger will cause the expression to stay updated, perhaps using the same trigger for logging the spreadsheet.
Good luck
Mike
Message Edited by Mike@DTSI on 01-16-2009 04:12 PM
Mike Crabtree - Lead Developer
Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
(866) 964-6948 / (760) 247-9512 -
Adding time stamp while archiving the file in b2b
Hi
I want to add the time stamp when archiving the file when I am using file/ftp channel. can anybody tell me how can I do that. otherwise it is overwriting the exising file in archive directory.
Thanks
SriHi Sri,
otherwise it is overwriting the exising file in archive directory.It might be happening because inbound files are not having unique name. You have two options -
1. Make sure that inbound files have unique name (you may add timestamp in inbound filename format)
2. Do not use the archive feature of Oracle B2B. Instead use a transport callout to write a copy of incoming document into desired directory with desired filename. To know more about callout offering of Oracle B2B, please refer -
http://docs.oracle.com/cd/E28280_01/user.1111/e10229/callouts.htm#CHDEFBDG
Regards,
Anuj -
Problem in getting the Date object based on the TimeZone
Hi,
I need to create a Date object that holds the time of the specified TimeZone.
I am using TimeZone and Calendar object for that, but when I call the Calendar object's getTime() method, it returns
a Date object that holds the local time.
Can somebody let me know what why?
Here is what I uses in my code.
TimeZone tz = TimeZone.getTimeZone("IST");
Calendar cal = new GregorianCalendar(tz);
System.out.println("Date of "IST" TimeZone = " + cal.getTime());
Instead of cal.getTime, if I do the following I am getting the values correctly.
int month = cal.get(Calendar.MONTH); // 0..11
int day = cal.get(Calendar.DATE); // 0..11
int hour12 = cal.get(Calendar.HOUR); // 0..11
int minutes = cal.get(Calendar.MINUTE); // 0..59
Can somebody let me know why I am not able to assign the Date of the TimeZone specified.
Is there anything wrong with the code?
SebIs there anything wrong with the code?No, only with your understanding of the Date class. From the API:
The class Date represents a specific instant in time, with millisecond precision.
The different time displayed for different TimeZones around the world are just that: a display format for the same instant in time.
To display the "instant in time" in a different TimeZone, use DateFormat. Here's a small sample:TimeZone tz = TimeZone.getTimeZone ("GMT");
Calendar c = Calendar.getInstance (tz);
System.out.println(c.getTime ()); // prints Tue Mar 18 02:56:53 IST 2008
DateFormat dtf = DateFormat.getTimeInstance ();
dtf.setTimeZone (tz);
System.out.println(dtf.format (c.getTime ())); // prints 9:26:53 PMIt's no different from formatting the same number in various ways: 10 decimal == 0xA hexadecimal == 012 octal == 1010 binary. Same value, different representation. Same intant in time, different local time for each zone.
Savvy?
cheers, db -
JSP page display wrong time when compared to the server time
Hi,
This problem seems to weird but it is happening
I have web application running where time is displayed in the page. In this application time is very critical. Currently, time is an hour behind the orginal time.
I checked the server it is displaying proper time.
As a matter of troubleshooting, I wrote a java program and run the program in the same server, where the application is running. The java program returns me proper time , but JSP is still displaying time an hour behind. To trouble shoot further, I created a test jsp page to just display the time and accessed the time and the jsp displayed wrong time as well, an hour behind.
I am running[ tomcat 4.0.3 and j2sdk1.4.3 in suse linux enterprise server 9.0
My Java program
import java.util.*;
import java.text.*;
public class TestDate
public static void main(String s[])
try{
DateFormat DF = new SimpleDateFormat( "dd/MM/yyyy");
DateFormat DT = new SimpleDateFormat("hh:mm aa");
SimpleDateFormat fmt=new SimpleDateFormat("HH.mm");
Calendar cal= Calendar.getInstance();
java.util.Date dt=cal.getTime();
String curdt=DT.format(dt);
System.out.println("Server Time" + curdt + "\n");
int hh = cal.get(Calendar.HOUR);
int mm = cal.get(Calendar.MINUTE);
int aa = cal.get(Calendar.AM_PM);
System.out.println("Time" + hh +":"+mm+":"+aa+"\n");
}catch(Exception e) {
e.printStackTrace();
This display Time3:30:1
My JSP Page
<%@ page import="java.util.*,java.text.*"%>
<%
Calendar calen;
calen = Calendar.getInstance();
int hh=calen.get(Calendar.HOUR);
int mm=calen.get(Calendar.MINUTE);
int aa=calen.get(Calendar.AM_PM);
%>
<%=hh%> <%=mm%> <%=aa%>
This display 2 30 1
When I run Date in linux server it gives 3:30 PM EST 2004
I am really confused, why this is happening, If you have any solutions or idea please post the solution.My guess is that the weirdness is caused by Daylight savings time.
I will presume that you and the server are in the same timezone :-)
Alternatively it could be caused by getting a different Locale.
Try the following
Print out "date.getTime()" value (ie long representing number of millis)
They should be the same (or close) in both the app and in JSP
Try simple date format in your JSP as well - what does that result in?
Print the calendar object, and look for the difference.
It might be in Locale, Timezone, or whether DST is set or not.
Hope this helps,
evnafets -
Missed Incident Resoultion Time Filter Based on the Assignee in SAP BO
Greetings!
I am trying to find a way to filter the below results in SAP BO using the BMC ITSM universe, based on the person who missed the Incident Resolution Time.
However, I have filtered the below result based on the following query:
Due Date Time > Last Assigned Date. - (Applied in the query object filter)
& Min (Last Assigned Date). - Applied on the formula of inserted tables
But, when I try to insert the Last Modified By column and the Assignment Group, it ignores all my filters and puts all the assignees who had worked on this > than the due date and time.
Please help me out to filter only the person who breached the ticket, eg: In this case, INC58518 was breached by "hlayiseka.mkhombo". I need to display only this assignee and his assigned group.
Incident
ID
Due Date Time
Last Assigned
Date
Last Modified
By
Assignment
Detail.Assigned Group
Goal
Progress
INC000000058518
2/10/2015
1:27:03 PM
3/1/2015
1:52:10 PM
dalia.serhal
Business
Relationship Management
Incident
Resolution Time
Missed
INC000000058518
2/10/2015
1:27:03 PM
3/1/2015
2:14:37 PM
dalia.serhal
Service
Design
Incident
Resolution Time
Missed
INC000000058518
2/10/2015
1:27:03 PM
2/26/2015
2:35:48 PM
guruprasath.jayarama
Service
Design
Incident
Resolution Time
Missed
INC000000058518
2/10/2015 1:27:03 PM
2/11/2015
11:26:32 AM
hlayiseka.mkhombo
Service
Improvement
Incident
Resolution Time
Missed
Thanks in advance for your feedback and inputs.
Regards
SherwinI have also tried using the formula First (Last Modified By), but it doesn't give me the correct value. i.e, the actual assignee doesn't seem to match with the Last Assigned Date.
-
Changing time stamp format in the file receiver adapter file name
Hi all,
How can we change the standard date time stamp from
filename_yyyymmdd-hhmmss-mil
to
filename_yymmdd_hhmmss
i.e., I want "underscores" instead of "hyphens" and also I do not want the MilliSeconds.
I read in the forums that I have to use the combination of variable substitution and mapping functions to do this, but not sure how exactly.
Can the experts help me with this please?
Many thanks.Hello Ramesh,
You can make this possible using runtime filename creation using UDF.
Please go though the below steps.
Message mapping:
Create an UDF and include the piece of code that captures the Filename and Timestamp from source side via ASMA.
Modify them according to our requirement by adding the <Timestamp> at the end of <filename> with _.
Map the UDF to any of the top level node so that the modified filename will be available for the target communication channel
UDF Code is:
try {
String filename = "";
String timestamp = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","SourceFileTimestamp");
filename = conf1.get(key1);
timestamp = conf1.get(key2);
filename = filenametimestamp".xml";
filename = filename.replaceAll( "-" ,"_" );
conf1.put(key1,filename);
return filename;
catch(Exception e)
String exception = e.toString();
return exception;
Click on Advanced tab and check the Option u201CSetAdapterSpecificMessageAttributesu201D in addition to that check the attribute that are required to be captured during run time. In our case File Name and Source File Time Stamp are required to be checked
In the receiver communication channel Mention u2018 * u2018as File Name Scheme.
Click on Advanced tab and check the Option u201CSetAdapterSpecificMessageAttributesu201D in addition to that check the attribute u201CFile Nameu201D which will carry the modified value in the UDF .
i hope this will help you.
Monica -
Needs Query to get the cycle time automatically based on the value provided in the UDF on OWOR table
Dear all,
Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
Details of UDF:-
1.Start date =10/07/14 (Field Name U_EA_REST)
2.Start time =10:00 (Field Name U_EA_REASTARTTIME)
3.End date =11/07/14 (Field Name U_EA_REET)
4.End Time=14:00 (Field Name U_EA_REAENDTIME
Cycle Time=_______ (Field Name U_EA_REACYCLETIME)
Regards,
BanugopanRajendranDear all,
Need a query to get the Cycle time in hr based on the value provide in the udf on OWOR table.
Details of UDF:-
1.Start date =10/07/14 (Field Name U_EA_REST) - Date Type
2.Start time =10:00 (Field Name U_EA_REASTARTTIME) - Hour Type
3.End date =11/07/14 (Field Name U_EA_REET) - Date Type
4.End Time=14:00 (Field Name U_EA_REAENDTIME - Hour Type
Cycle Time=_______ (Field Name U_EA_REACYCLETIME) - Hour Type
Regards,
BanugopanRajendran -
Login time changes based on the rpd and webcat
Hi,
I have setup a new environment where I have installed Weblogic as the application server and on top of it, I have installed the OBIEE. I have done the necessary configuration changes also.
To test my changes, I have pointed my nqsconfig.ini file to default 'samplesales' rpd and same in instanceconfig. Now when the Administrator logs in, he can login and see the dashboard screen without much delay.
Now when I changed both nqsconfig.ini and instanceconfig to point to my organization rpd and webcat, it takes about 5 mins for the Administrator to login and see the dashboard screen. Same is the case for any other user also.
The user can finally see the dashboard screen but it is taking long time.
Could anyone please let me know what might be the reason?
Thanks,
HariHi Srinivas,
It comes down to some tinkering in the java.util.* package.
First off, you'll need to familiarise yourself with the Calendar class. This basically replaces the old Date class from old versions of the JDK, and allows you to hold certain dates and times. You can get one by calling Calendar.getInstance();
You can then set a TimeZone on this Calendar by calling myCalendar.setTimeZone().
To create a basic TimeZone, have a look at the SimpleTimeZone class - it'll allow you to set the hours ahead or behind GMT, as well as a start date for this time zone, and even gives the ability to add daylight savings time.
From there, the time zone you add to the Calendar should produce the correct dates for you. Changing the time zone within a Calendar that already holds a date and time should alter that date and time accordingly.
If you want to get really clever, have a look at the Locale class - it allows you to specify a default language and country. You can then apply this to your Calendar by calling Calendar.getInstance(Locale myLocale) instead of the version above. If you have the international JDK (i.e. the one with i18n.jar onboard), Calendar should be clever enough to format the dates nicely for you if you use a fairly well-known Locale (such as American English and so on).
A Locale will also let you format dates in a location-specific way if you want to output them to the screen later on down the track. A quick look at SimpleDateFormat and some of the other DateFormat classes should tell you what you need to know.
If you can't quite get your head around any of the above, feel free to reply again!
Martin Hughes -
Display custom time-stamps on a graph
Hello
I have some data in the format (yyyy-mm-dd, value). I would like to plot it like that in a graph chart.
The problem is that I cant transform the string 'yyyy-mm-dd' into a labview time-stamp.
Is there any way around?
Thanks,
AntonioUse Scan From String function:
Note that you did not provide time information, so you just get 6 PM. Check the LabVIEW Help for further details on the Scan From String function.
Message Edited by smercurio_fc on 05-22-2008 01:58 PM
Attachments:
Example_VI.png 2 KB -
Can I date and time stamp photos on the photo?
I would like the date and time viable on the photo.
RobCob wrote:
I'm honestly only concerned about my photos and music.
You can Manually Backup your iPhoto Library and your iTunes Library to an External Drive without addition Software.
How to correctly move your media:
iTunes: How to move the library to an EHD
Early iPhoto: How to move the Library to an EHD
iPhoto '11: Move your iPhoto library to a new location
iMovie: How to move the Library to an EHD
It is important that the External Hard Drive is formatted as Mac OS Extended (journaled). -
How can the date/time stamp be reset when writing an LVM file. The new_input starts a new file, but the date/time stamp is not reset (the first sample time of the new file is offset from the previous file).
The date/time stamp is reset when the the program is stopped and restarted, but I would like to do this programmatically.
MikeLet me add some details to the problem.... My observation is that the Write LVM Express VI on its first call writes the header which includes the date/time stamp. If waveforms are present at that first call, it will write them along with their date/time stamp. If the waveform date/time stamp is equal to the LVM header date/time stamp, the first "X" value will be 0. The X values are the offset by:
(the waveform date/time stamp + sample*dt)- LVM header date/time stamp
On the second thru n call of the Write LVM VI, the waveforms are written with the X value following the equation above. The process of writing the LVM file works great if the VI is currently stopped, run VI, VI writes data, and then Stop VI. The next running of this sequence will correctly write the new file.
My issue is that I can not execute the Start/Stop VI sequence. My Write LVM VI is in a loop with the Write LVM VI loop selected by a case structure. What I need is to be able to emulate a first call to the Write LVM VI which will assign the new filename and write the header properly (i.e. assigning a new date/time stamp based on the first call). I've tried combinations of the new_filename and reset inputs to the VI, but these do not reset the date/time stamp in the header. Any ideas to make the Write LVM work in this manner? I would prefer to modify the existing Express VI or put some shell around it to perform this function.
Thanks,
Mike. -
How do you determine the time stamp or pointer in an Event?
Perhaps I want to tell someone to check the specific point in an event, like 22:08 into the event or from marker 1234 to 5678. What markers does iMovie use?
Maybe I have 20 favorite clips in an Event and I want to reference a specific one.
When playing back a YouTube video I can say, Go to the 2:38 mark. With an event, what time stamp can I reference?Event clips have a time code based on the time of day you shot the clip. Clips are listed in the event in chronological order. So you you want to point somebody to the action that tool place on March 23 at 10:03:45, you can.
Click VIEW/Playhead Info. Now as you skim your mouse over the event clips, you will see the date and time info.
This works on clips shot by a digital camera. If you have clips shot by older analog cameras like VHS or 8MM, you need to take some additional steps. Let me know if you need this.
Maybe you are looking for
-
Family hates 1.9 - how can we get old version back?
We live in Mass and got IMG 1.9 two days ago. We can't stand it. We find the guide and DVR menu is much harder to read; the changed colors and format make it difficult to see at a distance. And its much slower. We can't click through the guide cha
-
Nvidia GTX 560ti,570 & 580 video cards
I have upgraded to CS5 after many years of using Premiere 6.5 for SD footage. The move to CS5 was required because I have moved into the HD world. Now it is time to upgrade to one of the CUDA enabled video cards since my Quadro FX4500 does not suppor
-
Anybody know anything about: CS3 - on windows 7 (working in XP mode) - Font server: Universal Font. Trouble is that PS font don't work in the Adobe CS 3 all applikations. Any soloution?
-
Hi MM Gurus Could any one share the BAPI's in MM specific to Business Processes which was required by the client and it had been fulfilled and implemented successfully. Appreciate if you can elaborate on what was the requirement and steps to accompl
-
Talent Development Integration with Flexible Performance - please advise?
Has anyone used the SAP Development Plans under the New SAP Talent Development EHP4? Is this primarily for key talent in a business or used for every employee? If you have used this, have you been able to integrate the development plan items from the