Redondeo y decimales en ABAP
Muchas veces tenesmo problemas con el redondeo, acá hay algunas instrucciones útiles para el manejo de los mismos.
DATA N TYPE P DECIMALS 2.
DATA M TYPE P DECIMALS 2 VALUE '-5.55'.
N = ABS( M ). WRITE: 'ABS: ', N.
N = SIGN( M ). WRITE: / 'SIGN: ', N.
N = CEIL( M ). WRITE: / 'CEIL: ', N.
N = FLOOR( M ). WRITE: / 'FLOOR:', N.
N = TRUNC( M ). WRITE: / 'TRUNC:', N.
N = FRAC( M ). WRITE: / 'FRAC: ', N.
* The output appears as follows:
*
* ABS: 5.55 (nro absoluto)
*
* SIGN: 1.00-
*
* CEIL: 5.00- (redondea hacia arriba)
*
* FLOOR: 6.00- (redondea hacia abajo)
*
* TRUNC: 5.00- (parte entera)
*
* FRAC: 0.55- (parte decimal)
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
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
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)
Condición lógica de Strings
CO Contiene sólo.
CN No contiene sólo.
CA Contiene algún.
NA No contiene algún.
CS Contiene el string.
NS No contiene el string.
CP Contiene el pattern.
‘*’ cualquier número de caracteres.
‘+’ cualquier carácter.
‘#’
NP No contiene el pattern.
‘*’ cualquier número de caracteres.
‘+’ cualquier carácter.
‘#’