Páginas

martes, 16 de octubre de 2012

Transformar Char o String en formato Datetime en SQL

-- SQL Server string to date / datetime conversion - datetime string format sql server

-- MSSQL string to datetime conversion - convert char to date - convert varchar to date
-- Subtract 100 from style number (format) for yy instead yyyy (or ccyy with century)


SELECT convert(datetime, 'Oct 23 2012 11:01AM', 100) -- mon dd yyyy hh:mmAM (or PM)
SELECT convert(datetime, 'Oct 23 2012 11:01AM') -- 2012-10-23 11:01:00.000

-- Without century (yy) string date conversion - convert string to datetime function


SELECT convert(datetime, 'Oct 23 12 11:01AM', 0) -- mon dd yy hh:mmAM (or PM)
SELECT convert(datetime, 'Oct 23 12 11:01AM') -- 2012-10-23 11:01:00.000


-- Convert string to datetime sql - convert string to date sql - sql dates format
-- T-SQL convert string to datetime - SQL Server convert string to date

SELECT convert(datetime, '10/23/2016', 101) -- mm/dd/yyyy
SELECT convert(datetime, '2016.10.23', 102) -- yyyy.mm.dd ANSI date with century
SELECT convert(datetime, '23/10/2016', 103) -- dd/mm/yyyy
SELECT convert(datetime, '23.10.2016', 104) -- dd.mm.yyyy
SELECT convert(datetime, '23-10-2016', 105) -- dd-mm-yyyy
-- mon types are nondeterministic conversions, dependent on language setting
SELECT convert(datetime, '23 OCT 2016', 106) -- dd mon yyyy
SELECT convert(datetime, 'Oct 23, 2016', 107) -- mon dd, yyyy

-- 2016-10-23 00:00:00.000

SELECT convert(datetime, '20:10:44', 108) -- hh:mm:ss

-- 1900-01-01 20:10:44.000
-- mon dd yyyy hh:mm:ss:mmmAM (or PM) - sql time format - SQL Server datetime format

SELECT convert(datetime, 'Oct 23 2016 11:02:44:013AM', 109)

-- 2016-10-23 11:02:44.013

SELECT convert(datetime, '10-23-2016', 110) -- mm-dd-yyyy
SELECT convert(datetime, '2016/10/23', 111) -- yyyy/mm/dd

-- YYYYMMDD ISO date format works at any language setting - international standard

SELECT convert(datetime, '20161023')
SELECT convert(datetime, '20161023', 112) -- ISO yyyymmdd

-- 2016-10-23 00:00:00.000

SELECT convert(datetime, '23 Oct 2016 11:02:07:577', 113) -- dd mon yyyy hh:mm:ss:mmm

-- 2016-10-23 11:02:07.577

SELECT convert(datetime, '20:10:25:300', 114) -- hh:mm:ss:mmm(24h)

-- 1900-01-01 20:10:25.300

SELECT convert(datetime, '2016-10-23 20:44:11', 120) -- yyyy-mm-dd hh:mm:ss(24h)

-- 2016-10-23 20:44:11.000

SELECT convert(datetime, '2016-10-23 20:44:11.500', 121) -- yyyy-mm-dd hh:mm:ss.mmm

-- 2016-10-23 20:44:11.500
-- Style 126 is ISO 8601 format: international standard - works with any language setting

SELECT convert(datetime, '2008-10-23T18:52:47.513', 126) -- yyyy-mm-ddThh:mm:ss(.mmm)

-- 2008-10-23 18:52:47.513

SELECT convert(datetime, N'23 شوال 1429 6:52:47:513PM', 130) -- Islamic/Hijri date
SELECT convert(datetime, '23/10/1429 6:52:47:513PM', 131) -- Islamic/Hijri date

-- Convert DDMMYYYY format to datetime - sql server to date / datetime

SELECT convert(datetime, STUFF(STUFF('31012016',3,0,'-'),6,0,'-'), 105)

-- 2016-01-31 00:00:00.000
-- SQL Server T-SQL string to datetime conversion without century - some exceptions
-- nondeterministic means language setting dependent such as Mar/Mär/mars/márc

SELECT convert(datetime, 'Oct 23 16 11:02:44AM') -- Default
SELECT convert(datetime, '10/23/16', 1) -- mm/dd/yy U.S.
SELECT convert(datetime, '16.10.23', 2) -- yy.mm.dd ANSI
SELECT convert(datetime, '23/10/16', 3) -- dd/mm/yy UK/FR
SELECT convert(datetime, '23.10.16', 4) -- dd.mm.yy German
SELECT convert(datetime, '23-10-16', 5) -- dd-mm-yy Italian
SELECT convert(datetime, '23 OCT 16', 6) -- dd mon yy non-det.
SELECT convert(datetime, 'Oct 23, 16', 7) -- mon dd, yy non-det.
SELECT convert(datetime, '20:10:44', 8) -- hh:mm:ss
SELECT convert(datetime, 'Oct 23 16 11:02:44:013AM', 9) -- Default with msec
SELECT convert(datetime, '10-23-16', 10) -- mm-dd-yy U.S.
SELECT convert(datetime, '16/10/23', 11) -- yy/mm/dd Japan
SELECT convert(datetime, '161023', 12) -- yymmdd ISO
SELECT convert(datetime, '23 Oct 16 11:02:07:577', 13) -- dd mon yy hh:mm:ss:mmm EU dflt
SELECT convert(datetime, '20:10:25:300', 14) -- hh:mm:ss:mmm(24h)
SELECT convert(datetime, '2016-10-23 20:44:11',20) -- yyyy-mm-dd hh:mm:ss(24h) ODBC can.
SELECT convert(datetime, '2016-10-23 20:44:11.500', 21)-- yyyy-mm-dd hh:mm:ss.mmm ODBC

Mas info -> aquí

miércoles, 10 de octubre de 2012

Listado de las transacciones más utilizadas en SAP

Listado de las transacciones mas utilizadas en cada ámbito:


Desarrollo


SE38: Editor ABAP

SE80: Examinador de objetos

SM35: BatchInput

SE37: Funciones

BAPI: Explorador Bapis

SE93: Transacciones

ST05: Traza de programas

SE18: Consultar BADI (definición)

SE19: Modificar BADI (implementación)

ST22: Ver dumps

SE24: Class Builder

SM36: Crear JOBs

SM37: Traza de JOBs

SM62: Creación eventos

SAAB: Gestión de break-points y asserts

SLG0: Crear objetos de LOG

SLG1: Consultar LOGs

SLG2: Borrar LOGs

WE60: Consulta de IDOCs

DWDM: Ejemplos ABAP

SWO3: Explorador de Business Objects

Tablas/Estructuras

SE11: Diccionario ABAP

SE16: Visualizar tabla

SE16N: Visualizar tabla

SE30: Visualizar tabla e incluir código ABAP

SM30: Vistas de actualización / Mantenimiento

BS22: Status de órdenes

SNRO: Secuencias de números

Smartforms

SE71: SapScript

NACE: Gestión de mensajes

SE73: Gestión de fuentes

SMARTSTYLES: Definir el estilo del formulario

SMARTFORMS: Crear el formulario

SE63: Traducción de SmartForms

SE78: Cargar/Gestionar Imágenes (bitmap / para sapscript o smartform)

SO10: Textos estándares - Cargar/Gestionar Imágenes (tiff / solo para sapscript)

SPAD: Gestión de SPOOL (definiciones de impresoras, tamaños de papel...)

Sistema

SM04: Eliminar sesiones abiertas

SM12: Liberar bloqueos

SE01: Transporte

STMS: Transporte

SPAD: Impresoras

SP01: Spool de impresiones en general de cualquier usuario

SP02: Spool de impresiones propias o del usuario utilizado

SE03: Buscar objetos en orden de transporte y tareas

SM59: Cambiar de sistema (internamente)

SM36: Crear Jobs

SM62: Crear eventos

SM37: Borrar Jobs

ST05: Trazas

SU01: Configuración de usuarios

AL11: Navegador sistema de ficheros

SXDA: Direct Input

SM69: Ejecución de comandos del S.O.

CACS_FILE_COPY: Subir/Bajar ficheros del servidor

LSMW: Legacy System Migration Workbench (carga masivas de datos)

BDLR: Biblioteca de programas para cargas de datos

SCC1: Transportar ordenes de un mandante a otro

RSBDCOS0: Reporte para ejecutar comandos a nivel de SO

AL11: Transaccion para ver/navegar en la estructura de directorios del S.O.

Querys

SQ01: Editor Query

PP: Producción

CO01: Crear orden de producción

CO02: Editar orden de producción

CO03: Visualizar orden de producción

CO11N: Notificar orden de producción

KO88: Liquidar orden de producción

CO13: Anular notificación

SD: Ventas

VA01: Crear pedido

VA02: Modificar pedido

VA03: Visualizar pedido

VL02N: Modificar entrega

VL03N: Visualizar entrega

VF01: Crear factura

VF02: Modificar factura

VF03: Consultar factura

VA22: Ofertas

MM: Gestión de materiales

ME23N: Consultar pedidos de compras

ME22N: Modificar pedidos de compras

ME21N: Crear pedidos de compras

MM02: Editar material

MB51: Buscar docs de material

MB03: Consultar doc de material

MB1C: Movimientos de mercancía (poner stock...)

MMSC: Dar de alta un material en un almacén

FI: finanzas

FB01: Crear asiento contable

FB02: Modificar asiento contable

FB03: Consultar asiento contable

FIBF: Acceso a BTEs

IDoc/EDI

WE60: Mensajes IDoc

WE21: Puertas IDoc

WE20: Interlocutores EDI

WE02: Listado IDoc con status

WE16: Cargar fichero de texto IDoc

WE19: Reprocesado de IDoc (visible/debugging)

BD87: Reprocesado de IDoc

Salir

/ex: Sale de una transacción sin preguntar

miércoles, 8 de agosto de 2012

Accentos alert y confirm en Javascript

Cuando mostramos letras acentuadas y la letra ñ en alertas javascript, en ciertas ocasiones y dependiendo de la codificación usada, sulue salir un caracter raro.

Para solventar este problema poner codificación UTF-8 en javascript.

tabla de codificación:

\u00e1 -> á
\u00e9 -> é
\u00ed -> í
\u00f3 -> ó
\u00fa -> ú

\u00c1 -> Á
\u00c9 -> É
\u00cd -> Í
\u00d3 -> Ó
\u00da -> Ú

\u00f1 -> ñ
\u00d1 -> Ñ

Ejemplo:
alert('Alerta ! Fecha de instauraci'+'\u00f3'+'n no puede ser anterior ...');

viernes, 20 de julio de 2012

Logins Huerfanos en SQL

Cuando se restauran Base de datos entre servidores diferentes, suelen quedar logins huerfanos en las base de datos.

Para comprobar logins huerfanos de un base de datos, podemos ejecutar el siguiente paramentro:

EXEC sp_change_users_login 'Report';


Para reparar el login huerfano, basta con usar lo siguiente:

EXEC sp_change_users_login 'Auto_Fix', 'LoginHuerfanoDelReport'

lunes, 27 de febrero de 2012

Temas Resueltos en Fix 12 de Business Objects 4

ADAPT01543794


When rescheduling a recurring schedule with the start time being later than current timestamp creates a new

instance immediately

The new instance is created only at the next scheduled time

Limitations:

New Behavior:

Description:

ADAPT01577972

Using an OLAP MSAS Unx(ODBO mode), WebI shows incorrect and inconsistent results for values over 2

decimal places (for measures)

WebI displays correct decimal values.

Limitations:

New Behavior:

Description:

ADAPT01580632

"Open Document: ERROR INF" is displayed when opening in Viewing mode WebIntelligence reports migrated

from XI 3.x to BI 4.0 using Upgrade Management Tool/

This problem is resolved

Limitations:

New Behavior:

Description:

ADAPT01593059

After importing recurring schedules from Crystal Reports Server 2008 to Crystal Reports 2011, recurring

schedules failed with the error "File fb46d065b195f0.rpt not found on File Repository Server."

The problem is resolved.

Limitations:

New Behavior:

Description:

ADAPT01596275

Refreshing a WebIntelligence report based on BICS access fails with error message similar to "while trying to

invoke the method com.sap.ip.bi.base.application.service.rfcproxy.IRfcFunction.getImportingParameters() of an

object loaded from local variable".

This problem occurs periodically with SAP BusinessObjects Enterprise platform deployment.

Problem is fixed.

Limitations:

New Behavior:

Description:

ADAPT01596686

Dynamic recipients list empty if Web Intelligence Refresh on open active

New Behavior:

Description:

Problem is resolved

Limitations:Problem is resolved

Limitations:

ADAPT01603028

Impossible to place a dimension in the WebIntelligence Filter Bar once the dimension has been removed from its

hierarchy class in Universe Design Tool.

The issue is resolved.

Limitations:

New Behavior:

Description:



ADAPT01603798

Feature Change Source in a webi reports generates an error message "expected element name 'Query' and not

'DP'"

This problem is resolved

Limitations:

New Behavior:

Description:

ADAPT01603883

When trying to run queries that use prompts with the same prompting message, you get the error:.."Cannot build

the query or generate the report. (WIS 30351) (WIS 30351)"

This problem is solved

Limitations:

New Behavior:

Description:

ADAPT01604098

Reports based on an OLAP connection with a fixed user/password are not being shared. This results in higher

resource consumption on BOE as well as on SAP BW.

The problem is resolved.

In order to benefit from the improvement the OLAP connection(s) created prior to SP2 patch 12 needs to be saved

again (just edit and press ‘save’)

Limitations:

New Behavior:

Description:

ADAPT01604100

Performance of viewing live data reports based on an OLAP connection (i.e. SAP BW) degrades as the number of

users concurrently opening the same Crystal Report increases.

The problem is resolved.

Limitations:

New Behavior:

Description:

ADAPT01606511

WSDL Unable to load Url - qaawsWsdl.zip mechanism does not work.

This problem is resolved.

No limitations.

Limitations:

New Behavior:

Description:

ADAPT01606833

Not able to drag and drop objects into the report

The issue is solved

Limitations:

New Behavior:

Description:

ADAPT01607069

In WebIntelligence, Member selector does does not show any members hierachy value when doing a member

selection on Hierrachy on a BICS query

In WebIntelligence, Member selector does shows any members hierachy value when doing a member selection

on Hierrachy on a BICS query

Limitations:

New Behavior:

Description:

ADAPT01607798

Allow user to open saved workspace with node selection retained.

All nodes are persisted in serialized workspace instead of only the last node selected in the prompt.

Limitations:

New Behavior:

Description:

ADAPT01607921

Saved workspaces refreshes with data when opened.

SAP variables are persisted in serialized workspace and data is refreshed in crosstab.

Limitations:

New Behavior:

Description:

ADAPT01608248

An error may occur when opening in WebIntelligence a converted Desktop Intelligence document.

The issue is resolved.

Limitations:

New Behavior:

Description:

ADAPT01608442

WebIntelligence document with charts lable hidden created with XIR3 are not properly opened in BI 4

This issue is fixed

N/A

Limitations:

New Behavior:

Description:

ADAPT01608952

ConnectionServer32 (CS32) is not crashing when running Web Intelligence reports based on UNV built on OLAP

data sources

New Behavior:

Description:

the CS was crashing before this issue is fixed, now on create,refresh or schedule webi document from OLAP

datasource .unv, cs is not crashing and works fine

Limitations:

ADAPT01609462

Decimal places are displayed as zero (0) in WebI report when they are coming from a calculated member which

is defined as 'Percent' in MSAS 2008

Decimal values are correctly displayed in the report.

Limitations:

New Behavior:

Description:

ADAPT01609491

In WebIntelligence, changing a prompt answer on BICS query dimension does not change the related values in

the report

In WebIntelligence, changing a prompt answer on BICS query dimension changes the related values in the report

Limitations:

New Behavior:

Description:

ADAPT01609822

After a session timeout has happened then we are getting an Error message in the Login page.

The issue is Fixed

Limitations:

New Behavior:

Description:

ADAPT01610477

In Crystal Report For Enterprise after changing the Hierarchy Selection value sor the prompt does not change the

result in the report side

In Crystal Report For Enterprise after changing the Hierarchy Selection value sor the prompt changes directly the

result in the report side

Limitations:

New Behavior:

Description:

ADAPT01610507

It is possible to define a Memory Maximum Threshold limit for the WebIntelligenceProcessingServer. If the

WebIntelligenceProcessingServer reaches this limit, it will restart. In some case the

WebIntelligenceProcessingServer crashed during this restart process.

Now the WebIntelligenceProcessingServer will restart without any crash.

Limitations:

New Behavior:

Description:

ADAPT01612189

After the user selected a value for a factorized prompt (different from the default value), an empty LOV is

proposed to the query filter.

This issue is solved

Limitations:

New Behavior:

Description:

ADAPT01612512

When more than 40 users are viewing a Crystal Report concurently (based on SAPBW data source), about 4% of

the requests to view the first page of the report fail.

This happens only when the jobs are shared in the processing server and there are variable think times between

the actions executed by the users.

This issue is completely resolved.

Limitations:

New Behavior:

Description:

ADAPT01613673

NULL errors are produced when attempting to click on table body or header after merging columns in Web

Intelligence editors

This issue is solved.