Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Data Type Initial field length Valid field length Initial value
ABAP
Numeric types I 4 F 8 P 8 Character types C D N T 1 8 1 6
TRANSACCION Object Navigator Repository Infor. System Function Builder ABAP Editor Business Object Repository Abap Dictionary Data Browser Code Inspector User Overview AS Abap Instances Overview Work Process RFC Connectors Scheduling Background Lock Entries List of Spool Requests Define Background Job RFC Connections Function Builder Data Browser Maintain Table Views GUI Painter Class Builder ABAP Splitscreen Editor Shared Objects Cusrtomizing Project Manag. Enhancements BAdI Builder BAdI Implementations Modification Browser Trasport Message Class
Command
DESCRIPTION
Call transaction in a new session Call a transaction in the same session
PARAMETERS pa_mun TYPE i. ADD 1 TO gv_counter. (suma 1 a la variable) CLEAR gv_var1, Gv_var2. => reset de contents of a data object to initial type
SE80 SE84 SE37 SE38 BAPI SE11 SE16 SCID SM04 SM51 SM50 SM59 SM36 SM12 SP02 SM36 SM59 SE37 SE16 SM30 SE41 SE24 SE39 SHMA SPRO CMOD SE18 SE19 SE95 SE91
Overview of sessions End logon session End logo session without save Delete current session
To end the current transaction and return to the starting menu
0 0 0 ''
Adition
Division
Text field (alphanumeric characters) Date field '00000000' (Format: YYYYMMDD) Numeric text field '0 0' (numeric characters) Time field '000000' (format: HHMMSS) X'0 0' Hexadecimal field
DIV Integral Division without Remainder MOD Remainder after integral division
System Fields
System Field
Hexadecimal type X 1
IF result > 0. WRITE / 'Result greater than zero.'. ELSE. WRITE / 'Result less or equal zero.'. ENDIF. IF result IS NOT INITIAL. IF NOT (a=1 OR b=2) AND c = 3
Meaning
sy-subrc sy-mandt sy-uname sy-langu sy-datum sy-uzeit sy-tcode sy-repid sy-index sy-tabix sy-listi sy-lsind
Return Code 0 = OK Logon Client Logon Name user Logon Language user Local Date ABAP System Local Time ABAP System Current Transaction Code Name Current Program Loop Counter DO & WHILE used for record count of internal tables List processing, index of current list List processing, details list index
TYPES <Type> [ <length> ] <Type>[ <decimals> ]. DATA <campo> [ (<longitud>)] <tipo> [ <valor> ] [ <decimales> ] DATA: BEGIN OF PERSON, NAME(20), AGE TYPE I, END OF PERSON. TYPES TYPE_PERSONS LIKE PERSON OCCURS 20. DATA PERSONS TYPE TYPE_PERSONS. PERSON-NAME = 'Michael'. PERSON-AGE = 25. APPEND PERSON TO PERSONS.
CASE gv_var. WHEN AA . statements WHEN BB . statements WHEN OTHERS . statements ENDCASE.
Reporting Commands
(imprime valor en pantalla) write:/10(45) 'Total No of Employees entered:', gd_records, "/10 indents 10 chars /10(45) 'Number of Employees processed successfully:'. "(45) sets field lenth new-line. "moves to a new line describe table it_error lines gd_lines. "gets number of records in a table skip 2. "skips 2 lines write:/10 sy-vline, "sy-vline creates a vertical line (10) 'Employee' COLOR COL_HEADING, sy-vline, "COLOR changes background colour (50) 'Description' COLOR COL_HEADING, sy-vline.
DO. Statements [sy-index > Loop Counter] IF <abort_condition> . EXIT. ENDIF. ENDDO. DO n TIMES. Statements [sy-index a Loop Counter] IF <abort_condition> . EXIT. ENDIF. ENDDO.
[ Recorre filas de tabla interna ] LOOP AT <internal table> ... Statements ENDLOOP . WHILE <condition> . Statements
http://abap4.tripod.com/ Transaction_Codes.html
ENDWHILE .
Subroutines
Sintaxis de declaracin: (igual para subrutinas internas y externas) FORM nombre [ parmetros ]. statements. ENDFORM. Llamada a una subrutina interna: PERFORM nombre [ parmetros ]. Llamada a una subrutina externa: PERFORM name (programa) [ parms ] [ IF FOUND ].
En este caso se debe indicar el programa en el cual se encuentra la subrutina llamada. Con IF FOUND, si la subrutina no existe, la sentencia PERFORM es ignorada y no se genera error.
Internal tables
[ Declaring New]
DATA <itab> TYPE|LIKE <tabkind> OF <linetype> WITH <key> [INITIAL SIZE <n>] [WITH HEADER LINE].
[ Assigning ]
[ Initializing ]
[ + System Fields]
- sy-lisel : contains data of the selected line. - sy-lsind : contains the level of report (from 0 to 21)
CALL BY REFERENCE El parmetro formal y el actual ocupan la misma posicin de memoria, con lo que su valor puede ser modificado por la subrutina. Se pasa la direccin del parmetro, no una copia. Se puede usar en TABLES, USING y CHANGING. FORM nombre [ parmetros ]. USING Value(pv_act) TYPE I Value(pv_max) TYPE I CHANGING Value(cv_pc) TYPE gty_perc.
statements.
EQ = NE <> >< LT
Meaning equal to equal to not equal to not equal to not equal to less than
<operator>
Meaning less than less than or equal to less than or equal to greater than greater than greater than or equal to greater than or equal to Type s i
MESSAGE
[identify the message in table T100] [Message Maintenance - SE91] [Message Types - SE91]
Meaning Behavior Message appears in Status message Program continues without interruption Status line in next screen Information Warning Error Termination Short dump Program continues after interruption Context dependent Context dependent Program Aborted Runtime error MESSAGE_TYPE_X is triggered Modal dialog box Status bar Status bar Modal dialog box Short dump
w e a INTO x
[ Specifying the Message Dynamically ] MESSAGE ID <id> TYPE <t> NUMBER <n> [WITH <f1> ... <f4>] [RAISING <exc>]. [ Filling Message Texts Dynamically ]
MESSAGE ... WITH <f1> ... <f 4>.
Screens
The screens in a single ABAP program can be combined to form screen sequences. You can call single screens or screen sequences either using a transaction code from outside the ABAP program, or by using the CALL SCREEN statement in the corresponding ABAP program. When you call a screen or screen sequence, the screen flow logic takes control of the ABAP program execution. You can define screen sequences dynamically by setting the next screen attribute for a screen dynamically in the ABAP program. Selection screens are one of the three types of screen in the R/3 System, along with dialog screens and lists. You use them whenever you want the user to enter either a single value for a field or fields, or to enter selection criteria. Las listas no definen botones y recursos con nombres que luego se utilizan en ABAP en este caso se utilizan areas de trabajo libres y las sentencias WRITE, ULINE; and SKIP .
[ Calling ABAP Dialog Modules ] MODULE <mod> OUTPUT. ... ENDMODULE. [ SELECT SCREEN ] Tres sentencias para manejar las select screen. PARAMETERS for single fields SELECT-OPTIONS for complex selections SELECTION-SCREEN for formatting the selection screen and defining user-specific selection screens
SELECTION-SCREEN BEGIN OF SCREEN <numb><title>] [AS WINDOW].</title> [TITLE ... SELECTION-SCREEN END OF SCREEN <numb>.
[ Definicin de una tabla de control en "Module Pool" ] CONTROLS ctrl TYPE TABLEVIEW USING SCREEN scr.
Meaning Executable programs Module pools (Dialog Programs) Function groups Class pools Interface pools Subroutine pools Type groups or pools are introduced with the TYPE-POOL statement. Include programs