La vida de un DBA, Basis y Bedel en Puerto Rico
2008/02/21
  Como imprimir a un archivo PDF desde SAP

La PC debe tener una impresora definida con nombre FILE, que escriba en el puerto FILE: y que utilice un driver PostScript de una impresora comun. En mi PC, utilice los drivers de la “Lexmark Optra T610 PS”.
Imprimiremos a traves del programa SAPlpd en el SAPGUI.

Primero, debemos crear una impresora en Windows en la PC que vaya a generar los archivos:

Adicionalmente, debera existir en SAP una impresora llamada z_pdf_file (en minusculas). La impresora tendra las siguientes propiedades:

En el tab “Device Attributes”

En el tab “Access Method”

Una vez hechos los dos pasos anteriores, podemos imprimir cualquier reporte desde SAP en un archivo PDF en el front-end. En el “Output device” ponemos la impresora z_pdf_file y le damos al boton de imprimir.

Automaticamente se abrira SAPlpd y unos segundos mas tarde, se abrira un dialog box preguntando “Print to File / Output File Name”. Colocaremos un nombre de archivo local en la PC, como por ejemplo C:\temp\reporte.pdf

 
  Seleccionar un archivo en el servidor o en el cliente con ABAP

*&---------------------------------------------------------------------*
*& Report  Z_SELECCIONA_ARCHIVO                                        *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

report Z_SELECCIONA_ARCHIVO.

" selecccionar un archivo en el servidor o en el cliente

data:
   L_C_S          type C,  " archivo en cliente o en servidor
   L_ARCH(255)    type C,
   L_ERROR_C      type STRING,
   L_AUX          type STRING.  " variable utilitaria

" para buscar el nombre del servidor
data:
   L_SERVER like MSXXLIST-NAME,
   L_RFCSI_EXPORT like RFCSI.

selection-screen begin of block B1 with frame.
parameters:
   R_CLT radiobutton group RAD1 default 'X',
   R_SRV radiobutton group RAD1.
selection-screen end of block B1.

"at selection-screen on value-request for P_PATH.
start-of-selection.

   if R_SRV = 'X'.
      " application server (vulgo SERVIDOR SAP)
      L_C_S = 'A'.

      " busco el nombre del servidor, para que la funcion F4_DXFILENAME_TOPRECURSION
      "    no lo pregunte
      call function 'RFC_SYSTEM_INFO'
         importing
            RFCSI_EXPORT = L_RFCSI_EXPORT.
      move L_RFCSI_EXPORT-RFCDEST to L_SERVER.
   else.
      " presentation server (vulgo CLIENTE)
      L_C_S = 'P'.
   endif.

   " server
   call function 'F4_DXFILENAME_TOPRECURSION'
      exporting
         I_LOCATION_FLAG       = L_C_S
         I_SERVER              = L_SERVER
         I_PATH                = 'C:\SAPPayroll'
         "FILEMASK              = '*.txt'
         "FILEOPERATION         = 'R'
      importing
         "O_LOCATION_FLAG       =
         "O_SERVER              =
         O_PATH                = L_ARCH
         "ABEND_FLAG            =
      exceptions
         "RFC_ERROR             = 1
         "ERROR_WITH_GUI        = 2
         others                = 3
   .
   if SY-SUBRC <> 0.
      L_ERROR_C = SY-SUBRC.
      concatenate 'Error seleccionando archivo' L_ERROR_C into L_AUX separated by SPACE.
      message L_AUX type 'E'.
   endif.

start-of-selection.
   if L_ARCH = SPACE.
      message 'Archivo no seleccionado' type 'E'.
   else.
      concatenate 'Archivo ' L_ARCH into L_AUX separated by SPACE.
      message L_AUX type 'I'.
   endif.

* END

 
  Bloquear el acceso a un mandante de SAP

Para impedir que los usuarios se conecten a un mandante SAP, conectese con su usuario y en la SE37 ejecute la funcion SCCR_LOCK_CLIENT. Los usuarios que esten conectados podran continuar trabajando hasta que se desconecten, pero ningun usuario podra conectarse al mandante, excepto SAP* y DDIC.

Para desbloquear el mandante, use la funcion SCCR_UNLOCK_CLIENT.

Si por mala suerte, bloquea el mandante y no puede volver a conectarse a SAP para desbloquearlo, pidale al DBA que actualice T000.CCTEMPLOCK con un espacio en blanco para el mandante rebelde.  Apague y vuelva a levantar SAP y todo deberia volver a  la normalidad.

 
  Microsoft Word 2003 - Disable reading layout
Taken from here:
http://malektips.com/word_2003_0005.html

Microsoft Word 2003

Disable Reading Layout

SUMMARY: Prevent Word 2003's Reading Layout for more accurate-looking documents onscreen.
When you open Microsoft Word 2003 documents from e-mail attachments or from other sources, Word 2003 displays them in what is called a "Reading Layout". While this layout is supposed to make the documents easier to scan through as it repaginates them to better fit your screen, many people dislike this feature as it can mess up tables of contents, lists, tables, and long paragraphs.
If you'd like to disable this feature and open documents in the default (Print Layout) instead, follow this tip.
1. Click the "Tools" menu and choose "Options".
2. When the "Options" multi-tabbed dialog box appears, click "General".
3. Uncheck "Allow starting in Reading Layout".
4. Click "OK" to close the dialog box.

 

Mi foto
Nombre: MADS
Ubicación: San Juan, Puerto Rico, United States
Archivos
mayo 2007 / febrero 2008 / marzo 2008 / abril 2008 / mayo 2008 / junio 2008 / julio 2008 / febrero 2010 / marzo 2010 /


Powered by Blogger

Suscribirse a
Entradas [Atom]