Buscador de User Exit por TCODE
*&---------------------------------------------------------------------*
*& Report ZBUSCO_EXIT *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZBUSCO_EXIT no standard page heading.
.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
*---End of Program
SAP NETWEAVER 2007s Trial
Despues de instalar el trial y de hacerlo funcionar.
El siguiente reporte nos genera la data del caso de vuelo SFLIGHT.
SAPBC_DATA_GENERATOR
PACKAGE del trial:
SAP_ABAPWD
SWDP_DEMO_TUTORIALS Demo Tutorials for Web Dynpro ABAP
Z_ABAP_BOOK Training and Demo Programs - ABAP Book
Z_FLIGHTMODEL_WS Web services for flight model
Z_NSPPOSTINST NSP Post Installation Steps
SPELL_AMOUNT - Texto de importes
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = L_ENTRADA "Indicar importe
CURRENCY = 'EUR' "Indicar moneda
LANGUAGE = SY-LANGU "Indicar idioma texto
IMPORTING
IN_WORDS = L_RESULTADO
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
L_entrada es el importe que quieras traducir a letras. El resultado lo tendras en L_RESULTADO. Más detallado:
L_RESULTADO-WORD = parte entera
L_RESULTADO-IN_WORDS = parte decimal.
ALV - Catalogo
ALV – Catálogo
ROW_POS:
Solo se informará este campo en el caso en el que el report de salida sea multilínea. Valores: 0, 1, 2 y 3.
COL_POS:
Solo es relevante en el caso que se quiera que la salida en el listado tenga un orden distinto a su posición en la tabla interna de datos.
TABNAME:
Nombre de la tabla interna que contiene los datos a mostrar en el listado.
REF_FIELDNAME:
Nombre del campo de la tabla del diccionario de datos al cual está referenciado el campo de la tabla interna (en el caso en el que lo esté).
CFIELDNAME:
Nombre del campo de la tabla interna de datos que contiene la moneda para el campo importe.
CTABNAME:
Este dato sólo es relevante informarlo para listados con más de una cabecera.
QFIELDNAME:
Nombre del campo de la tabla interna de datos que contiene la unidad de medida para el campo cantidad.
QTABNAME:
Este dato solo es relevante informarlo para listados con más de una cabecera.
OUTPUTLEN:
Siempre que el campo a mostrar en el listado de salida no esté referenciado a ningún campo de tabla del diccionario, se especificará aquí la longitud de salida del campo.
KEY:
El campo del registro actual se tomará como clave si se marca este campo. No podrá ocultarse en el listado de salida este campo.
KEY_SEL:
El campo será clave, pero podrá no salir en el listado de salida.
NO_OUT:
El campo no será mostrado en el listado de salida.
TECH:
Si se marca este campo, el campo actual no puede nunca salir en el listado de salida.
EMPHASIZE:
Para mostrar el campo de algún color.
HOTSPOT:
El campo aparece como hotspot.
FIX_COLUMN:
Si se marca, este campo aparecería como columna fija.
DO_SUM:
Se calculará la suma de este campo.
NO_SUM:
No se calculará la suma de este campo.
ICON:
El campo será mostrado como un icono.
SYMBOL:
El campo será mostrado como un símbolo.
JUST:
Justificación del campo. R= justificado a la derecha, L= justificado a la izquierda, C= centrado.
LZERO:
Mostrará los campos de tipo NUMC justificados a la derecha y sin ceros a la izquierda.
NO_SIGN:
Mostrará el campo sin signos.
NO_ZERO:
Suprime los 0’s.
EDIT_MASK:
Mostrará el campo con una máscara.
SELTEXT_L:
Se mostrará en la cabecera de la columna el texto largo de la definición del campo en la tabla del diccinario de datos.
SELTEXT_M:
Se mostrará en la cabecera de la columna el texto medio de la definición del campo en la tabla del diccinario de datos.
SELTEXT_S:
Se mostrará en la cabecera de la columna el texto corto de la definición del campo en la tabla del diccinario de datos.
DDICTXT:
Especificará mediante L, M y S el texto largo, medio o corto que se utilizará en los títulos de las cabeceras.
DATATYPE:
Se especificará cuando el campo de la tabla interna de datos no esté referenciado a ningún campo de tabla del diccionario de datos.
DDIC_OUTPUTLEN:
Especifica la longitud de salida. Para campos no referenciados al diccionario de datos.
SP_GROUP:
Si se marca este campo, el campo actual pertenecerá a un grupo que se especificará después en el parámetro IT_SPECIAL_GROUPS.
REPREP:
El campo será tomado como un criterio de selección
Campo password (oculto) en reporte
Si se desea mostrar un como de entrada como texto oculto, o como un campo de password (ej. carácteres '****') debe insertar un código similar al siguiente ejemplo:
PARAMETERS: P_PASSWD(8) MODIF ID MiTexto. <--- "MiTexto" es un ID de grupo
...
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'MiTexto'. "Comprueba si el ID es = al que queremos que se oculteSCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
END-OF-SELECTION.
Wildcard
Wildcard para busquedas.
z* Que comienzan con z
*sale* Que contienen el string sale, tal como rvsale07
*f+ Que contienen una f como el carácter penúltimo, tal como rmlogifa
rp+++sch Que comienzan con rp, terminan en sch y contienen tres caracteres
cualesquiera entre medio, tal como rp012sch o rpinvsch
Llamar aplicación externa de SAP
WS_EXECUTE permite ejecutar el programa externo de SAP, permite pasar parámetros.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
* DOCUMENT = ' '
* CD = ' '
COMMANDLINE = ' -min -a c:destino.zip c:1.txt c:2.txt'
* INFORM = ' '
PROGRAM = 'winzip32.exe'
* STAT = ' '
* WINID = ' '
* OSMAC_SCRIPT = ' '
* OSMAC_CREATOR = ' '
* WIN16_EXT = ' '
* EXEC_RC = ' '
* IMPORTING
* RBUFF =
* EXCEPTIONS
* FRONTEND_ERROR = 1
* NO_BATCH = 2
* PROG_NOT_FOUND = 3
* ILLEGAL_OPTION = 4
* GUI_REFUSE_EXECUTE = 5
* OTHERS = 6
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
System values
Para cuando no se tenga acceso a la se11
SY-INDEX Number of loop passes
SY-PAGNO Runtime: Current page in list
SY-TABIX Runtime: Current line of an internal table
SY-TFILL Current number of entries in internal table
SY-TLOPC Internal use
SY-TMAXL Maximum number of entries in internal table
SY-TOCCU OCCURS parameter with internal tables
SY-TTABC Number of line last read in an internal table
SY-TSTIS Internal use
SY-TTABI Offset of internal table in roll area
SY-DBCNT Number of elements in edited dataset with DB operations
SY-FDPOS Location of a string
SY-COLNO Current column during list creation
SY-LINCT Number of list lines
SY-LINNO Current line for list creation
SY-LINSZ Line size of list
SY-PAGCT Page size of list from REPORT statement
SY-MACOL Number of columns from SET MARGIN
SY-MAROW No. of lines from SET MARGIN statement
SY-TLENG Line width of an internal table
SY-SFOFF Internal use
SY-WILLI Number of current window line
SY-LILLI Number of current list line
SY-SUBRC Return value after specific ABAP/4 statements
SY-FLENG Internal use (field length)
SY-CUCOL Cursor position (column)
SY-CUROW Cursor position (line)
SY-LSIND Number of secondary list
SY-LISTI Number of current list line
SY-STEPL Number of LOOP line at screen step
SY-TPAGI Flag indicating roll-out of internal table to paging area
SY-WINX1 Window coordinate (column left)
SY-WINY1 Window coordinate (line left)
SY-WINX2 Window coordinate (column right)
SY-WINY2 Window coordinate (line right)
SY-WINCO Cursor position in window (column)
SY-WINRO Cursor position in window (line)
SY-WINDI Index of current window line
SY-SROWS Lines on screen
SY-SCOLS Columns on screen
SY-LOOPC Number of LOOP lines at screen step loop
SY-FOLEN Internal use (field output length)
SY-FODEC Internal use (field decimal places)
SY-TZONE Time difference from 'Greenwich Mean Time' (UTC) in seconds
SY-DAYST Summertime active ? ('daylight saving time')
SY-FTYPE Internal use (field type)
SY-APPLI SAP applications
SY-FDAYW Factory calendar weekday
SY-CCURS Rate specification/result field (CURRENCY CONVERT)
SY-CCURT Table rate from currency conversion
SY-DEBUG Internal use
SY-CTYPE Exchange rate type 'M','B','G' from CURRENCY CONVERSION
SY-INPUT Internal use
SY-LANGU SAP logon language key
SY-MODNO Number of alternative modi
SY-BATCH Background active (X)
SY-BINPT Batch input active (X)
SY-CALLD CALL mode active (X)
SY-DYNNR Number of current screen
SY-DYNGR Screen group of current screen
SY-NEWPA Internal use
SY-PRI40 Internal use
SY-RSTRT Internal use
SY-WTITL Standard page header indicator
SY-CPAGE Current page number
SY-DBNAM Logical database for ABAP/4 program
SY-MANDT Client number from SAP logon
SY-PREFX ABAP/4 prefix for background jobs
SY-FMKEY Current function code menu
SY-PEXPI Print: Spool retention period
SY-PRINI Internal use
SY-PRIMM Print: Print immediately
SY-PRREL Print: Delete after printing
SY-PLAYO Internal use
SY-PRBIG Print: Selection cover sheet
SY-PLAYP Internal use
SY-PRNEW Print: New spool request (list)
SY-PRLOG Internal use
SY-PDEST Print: Output device
SY-PLIST Print: Name of spool request (list name)
SY-PAUTH Internal use
SY-PRDSN Print: Name of spool dataset
SY-PNWPA Internal use
SY-CALLR Print: ID for print dialog function
SY-REPI2 Internal use
SY-RTITL Print: Report title of program to be printed
SY-PRREC Print: Recipient
SY-PRTXT Print: Text for cover sheet
SY-PRABT Print: Department on cover sheet
SY-LPASS Internal use
SY-NRPAG Internal use
SY-PAART Print: Format
SY-PRCOP Print: Number of copies
SY-BATZS Background SUBMIT: Immediately
SY-BSPLD Background SUBMIT: List output to spool
SY-BREP4 Background SUBMIT: Root name of request report
SY-BATZO Background SUBMIT: Once
SY-BATZD Background SUBMIT: Daily
SY-BATZW Background SUBMIT: Weekly
SY-BATZM Background SUBMIT: Monthly
SY-CTABL Exchange rate table from currency conversion
SY-DBSY-S System: Database system
SY-DCSY-S System: Dialog system
SY-MACDB Program: Name of file for matchcode access
SY-SY-SID System: SAP system ID
SY-OPSY-S System: Operating system
SY-PFKEY Runtime: Current F key status
SY-SAPRL System: SAP Release
SY-TCODE Session: Current transaction code
SY-UCOMM Interact.: Command field function entry
SY-CFWAE Internal use
SY-CHWAE Internal use
SY-SPONO Runtime: Spool number for list output
SY-SPONR Runtime: Spool number from TRANSFER statement
SY-WAERS T001: Company code currency after reading B segment
SY-CDATE Date of rate from currency conversion
SY-DATUM system: Date
SY-SLSET Name of selection set
SY-SUBTY ABAP/4: Call type for SUBMIT
SY-SUBCS Internal: CALL status of program
SY-GROUP Internal: Bundling
SY-FFILE Internal: Flat file (USING/GENERATING DATASET)
SY-UZEIT system: Time
SY-DSNAM Runtime: Name of dataset for spool output
SY-REPID Program: Name of ABAP/4 program
SY-TABID Internal use
SY-TFDSN Runtime: Dataset for data extracts
SY-UNAME Session: SAP user from SAP logon
SY-LSTAT Interact.: Status information for each list level
SY-ABCDE Constant: Alphabet (A,B,C,...)
SY-MARKY Current line character for MARK
SY-SFNAM No longer used
SY-TNAME Name of internal table after an access
SY-MSGLI Interact.: Message line (line 23)
SY-TITLE Title of ABAP/4 program
SY-ENTRY Internal use
SY-LISEL Interact.: Selected line
SY-ULINE Constant: Underline (---------...)
SY-XCODE Extended command field
SY-CPROG Runtime: Main program
SY-XPROG Internal use (system-EXIT program)
SY-XFORM Internal use (system-EXIT form)
SY-LDBPG Program: ABAP/4 database program for SY--DBNAM
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-TVAR Runtime: Text variable for ABAP/4 text elements
SY-MSGID Message ID
SY-MSGTY Message type (E,I.W,...)
SY-MSGNO Message number
SY-MSGV Message variable
SY-MSGV Message variable
SY-MSGV Message variable
SY-MSGV Message variable
SY-ONCOM Internal: ON COMMIT flag
SY-VLINE Constant: Vertical bar
SY-WINSL Interact.: Selected window line
SY-STACO Interact.: List displayed from column
SY-STARO Interact.: Page displayd from line
SY-DATAR Flag: Data received
SY-HOST Host
SY-STLOCDB Local database exists
SY-STLOCOP Local database operation
SY-STDATLO Local date for user
SY-STTIMLO Local time for user
SY-STTSTLO Timestamp (date and time) for user
SY-STZONLO Time zone of user
SY-STDATUT Global date related to UTC (GMT)
SY-STTIMUT Global time related to UTC (GMT)
SY-STTSTUT Timestamp (date and time) related to UTC (GMT)
PopUp de texto a Usuario
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = SY-MANDT
USER = USR_TABL-BNAME
MESSAGE = MESSAGE
EXCEPTIONS
USER_NOT_FOUND = 1.
Buscar un string en todos los programas
RSRSCAN1 - Search a String in all programs, and the list of hits in the program.
