En esta oportunidad se trata del libro, en español, "El Arte de programar SAP R/3".
El arte de programar SAP R3
En esta oportunidad se trata del libro, en español, "El Arte de programar SAP R/3".
Intro a SAP Smartforms
4 consejos para aprender a programar SAP
Diferencias entre Abap y Abap-HCM
Deseo conocer las principales diferencias entre Abap y Abap-HCM.
¿Quisiera saber si es requerido saber Abap antes de iniciar Abap-HCM?
¿Que temas se consideran necesarios para aprender Abap-HCM?
No tengo experiencia en abap ni abap hcm.
Manual SAP ABAP en español
¿Técnico? ¿Desarrollador? ¿Programador? Entonces esto te interesará muchísimo... ya que para despedir el año 2015, re-publicamos el aporte de Nelson, desde Venezuela que ha bridado a través de nuestra comunidad de ayuda SAP, nada más y nada menos que los manuales oficiales del lenguaje ABAP (lenguaje de programación para ser desarrollador SAP) totalmente en español, y actualizados al año 2014 (versión 10). ¿Pensaste que no había forma de encontrar estos manuales?
Practicar SAP ABAP con MiniSAP
Detalles de la descarga
Manual SAP ABAP TAW10 y TAW12 (en ingles)
La descarga de éstos manuales en ingles ya no se encuentra disponible.
Si aún deseas aprender ABAP... ¿por qué no descargar los manuales ABAP en español que siguen disponibles?
Encontramos manuales oficiales SAP ABAP en ingles, los TAW10 y TAW12, y en el mismo archivo comprimido podrán encontrar una carpeta que contiene las preguntas del examen de certificación que corresponden al TAW10 parte 1, y parte 2, y al TAW12 en tres partes. Por supuesto está todo en ingles... no hemos podido encontrar ningún manual técnico en español. Si bien recuerdan, los manuales SAP Netweaver también estaban en inglés.
TNAPR: tabla SAP para formularios asociados
Obtener el formulario asociado a una transacción o programa
Por ejemplo, si sabemos que la transacción F_76 usa el programa RFWEKO02, ¿cómo podemos obtener el form que se usa en dicho programa?Conocimientos de ABAP que todo Funcional SAP debería tener
- Tablas de SAP
- LSMW / BDC
- Especificaciones funcionales
- Interfaces & EDI
- QUERY
- Debugging
- Smartforms
- Notas SAP
- Variantes
- Crear transacciones Zeta
Control de Calidad ABAP
Control de Calidad para los programas ABAP
Code Inspector
El "Code Inspector" se puede utilizar en varios escenarios con diferentes tipos de controles, proporcionando ideas sobre la calidad del código desde diversos ángulos.SAP, en la información que brinda la transacción SCI dice:
El "Code Inspector" verifica el rendimiento, la seguridad, la posibilidad de espera, la propensión a cometer errores y la información estadística de objetos individuales o conjuntos de objetos (programas, grupos de funciones, clases, interfaces, objetos DDIC).
El "Code Inspector" puede llamarse directamente desde el editor ABAP (SE38), el Function Builder (SE37) y el generador de clases (SE24) para los objetos individuales correspondientes (Objeto->Verificar->Code Inspector). A continuación, la verificación se realiza con una variante de verificación DEFAULT.
Debuguear SMARTFORMS
Cuando tenemos un smartform en productivo y queremos saber qué corre por detrás y cuando, por lo general no tendremos autorización para andar poniendo breaks en ese entorno. Entonces, podemos investigar todo de la siguiente manera:
- Entramos a la transacción SMARTFORMS, ponemos el nombre del formulario, y le damos visualizar.
- Una vez dentro, presionamos sobre Entorno -- Nombre del módulo de funciones.
- Aparecerá una ventanita con el nombre del módulo de la función que tiene el formulario, lo copiamos.
- Abrimos un modo nuevo, e ingresamos a la transacción SE37
- Ingresamos el nombre de la función que copiamos.
- Buscamos las lineas del programa que tenemos relacionadas con el smartform, y veremos NODE
- Nos situamos sobre la linea que encontramos, y presionamos el ícono de stop.
- Despues ejecutamos.
De ahí, cuando lancemos la transacción correspondiente al programa, el break debería saltar correctamente en productivo, sin necesidad de haber pasado ninguna orden de transporte.
Este aporte increíble pertenece al usuario "E_Hinojosa" del foro oficial de SAP, quien compartió su conocimiento aquí.
Saludos,
SapBlogger desde Consultoría-SAP
Ampliaciones SAP
Ampliaciones SAP
Qué son los Enhancement de SAP ?ABAP External Debugging
El artículo había sido publicado por SAP.com y ahora ha sido eliminado, por lo tanto no se veían las capturas que incluíamos. Hemos eliminado las capturas porque daban error. Mantenemos la info compartida a fines educativos. Disculpen las molestias.
ABAP External Debugging - New User Breakpoint
1. Motivation
The user breakpoint in ABAP helps you to debug the ABAP components of applications, that use RFC- and HTTP- based communications. These could be Web Dynpro applications, BSP's, ABAP-based web services, RFC-enabled function modules and so on. By setting a user breakpoint you can interrupt the processing of external HTTP or RFC requests in your ABAP backend system and debug them.
You can set a user breakpoint in the Object Navigator (transaction SE80) or the ABAP Editor (transaction SE38). Before you set a user breakpoint you may want to specify the user to whom the breakpoint applies. By default your user is set. You can enter the user in the User field of the debugging settings dialog (Utilities->Settings->Debugging). Before you start debugging, make sure that you use the New ABAP Debugger (select the checkbox New Debugger ). Now HTTP or RFC requests can be sent to your ABAP backend system - you are ready to capture them for debugging.
Ampliar ayuda para MatchCode
En muchas ocasiones, las ayudas de busqueda estandar de Sap (Matchcode), a las que accedemos como ayuda para completar los valores de los campos pulsando la tecla de función F4, son insuficientes para nuestras necesidades o no tienen en cuenta cosas tan obvias como no incluir registros que tienen peticiones de borrado.
Para estas ocasiones, tenemos la posibilidad de definir nuestras propias ayudas de búsqueda (Z) e incluirlas como una ayuda adicional en las ayudas estandar. Las ayudas estandar suelen ser ayudas complejas que incluyen varias ayudas simples, que podemos ir seleccionando según nuestras necesidades (en la imagen, podeís ver las ayudas de búsqueda disponibles cuando estamos dando de alta datos maestros de cliente a través de la transacción XD01).
Como ejemplos de ayudas de búsqueda que habitualmente se van a tener que definir en el sistema, tenemos:
- Administración de personal: búsqueda por el segundo apellido, ya que es muy frecuente empleados con los mismos apellidos, y este tipo de búsqueda no esta incluido en el estandar.
- Datos maestros: ayudas de búsqueda que excluyan registros con petición de borrado. Esto puede aplicar a proveedores, clientes, materiales, etc.
- Busqueda por otros criterios: en muchas ocasiones nos puede interesar buscar por otros criterios que no son estandar, campos de cliente u otros campos estandar que andan perdidos en los datos maestros pero por los que nos interesa realizar búsquedas.
- Ayudas personalizadas: también podremos incluir ayudas que ataquen a tablas Z o a vistas de datos estandar y tablas de cliente. Por ejemplo, en un sistema con control de imputaciones por cuentas contables, incluir una ayuda de búsqueda que nos indique, por cuenta contable, donde podemos imputar (tirando de tablas de cliente).
Workflow Diagnostics and SWUD
SWUD is the diagnosis transaction. This will guide you through the fault finding process. The check-list order is determined dynamically according to:
- a) your workflow definition and
- b) the statistics of the most common mistakes made when creating/activating a workflow.
The testbed, provides a launchpad for tests to ensure that your workflow definition is rugged enough for the production environment. It also allows you to access the tasks, subflows, object types, delegated object types and agent assignments directly, without going through the workflow builder first. (Foreground tasks with no agent assignment are marked in red from release 4.5 onwards). This list is also useful as a catalogue of the components of workflow for documentation or transport purposes.
Click on the "info" icon to read a description of the test being performed.
Any workflow accessed through this transaction is added to the last-used list. The workflow can be recalled at a later date by clicking on the reuse icon in the left-hand column of the last-used list.
The workflow can be recalled at a later date by clicking on the reuse icon in the left-hand column of the last-used list.
The next section describes the transactions called from SWUD. Experts may find it easier calling them directly.
Secondary Diagnosis Transactions -
Transaction SWU3: Verify Workflow Customizing.
In this transaction the most important basic customizing for workflow is checked. If you find any errors here, read the documentation for the error. If your system is BBP or CRM, see note 60801.
- Transaction SWEL: Event Log.
Note: Before you can use the event log, you must make sure it is activated. You check this in transaction SWELS. If you are not sure whether or not it is active, just deactivate and activate the event log once.
WARNING: An activated event log can lead to bad performance, and must not be activated constantly in a productive system.
- Transaction SWE2: Event type linkage
A workflow is usually started or triggered by an EVENT so it is important to make sure that an event occurrs. In the event log you can see the event and its business object type. If an event has been successfully created, it is important to check if there is a receiver type for this event. The receiver type is the workflow that has been triggered by the event. The coupling between an event and the receiver can be maintained in trans. SWE2.
- Transaction SWU0: Event simulation
If you have found NO receiver type in the event log, then you should check transaction SWU0, Simulate Events. In this transaction you can simulate an event. The system will check all workflows that could be triggered by the event and tells you whether or not they were triggered. Information is displayed for the workflows that were not triggered successfully.
- Transaction SWI1: Work item list
If a workflow was been correctly triggered and started at least one WORK ITEM should be created. You can view the work items in transaction SWI1, Work Item Selection. The easiest way for the selection is just to go into this transaction after you have checked the event log. By default all the work items of the last hour will be displayed. You will find in this transaction the work item number, the status of the work item and the workflow task that has created the work item. Furthermore, (in the technical workitem display) you can have a look at the container by selecting a work item and using the menu GOTO -> CONTAINER. To display the work item details double click on the item. From the details you can see the selected/ possible/excluded agents for this work item by using the menu GOTO -> AGENT -> SELECTED/POSSIBLE/EXCLUDED AGENTS.
When the status of the work item shows an error you should have a look at the workflow log using the menu EDIT -> DISPLAY WORKFLOW LOG. Here you can see errors that have occurred.
- Transaction PFTC/SWDD: Task editor/Workflow Builder
If you want to have a look at the definition of the workflow you can use transaction PFTC, Maintain Tasks. The button WORKFLOW BUILDER brings you to a graphical display of the workflow structure which is fairly easy to read and understand. On the tabstrip TRIGGERING EVENTS you can check if the triggering is activated or not and deactivate/activate it by clicking on the icon in front of the event.
- Transaction OOCU: Customizing overview
To check if the relevant tasks are activated and users are assigned, you can use transaction OOCU; Task Customizing Overview. In this transaction all the tasks are sorted by the application components and are thus easy to find. Note that if you have almost no entries in this transaction, you should execute the report RS_APPL_REFRESH in transaction SE38.
- Transaction SWUE/SWUS: Event/workflow trigger
If you have activated a user exit, e.g. for the role determination, and you have problems with that, you most probably have to debug the workflow. This can be done using the transaction SWUS or SWUE.
With SWUE you can create an event. After you entered object type and event you have to fill the event parameters and the key for a specific object. If you want to debug the workflow you have to set the flag TRIGGER RECIEVER FM SYNCHR. If you have set a break point in your user exit or in any other function module of the workflow the system will stop at this break point and you can start analyzing.
The second possibility to debug a workflow is to use the transaction SWUS, the workflow test environment. In this transaction you have to enter the workflow task and fill the input data. Please use the F4-help to fill the input data. Here again you have to set a break point in your user exit or in any other function module of the workflow and then the system will stop there.
Summary of the manual alternative to SWUD
Now that you have a better understanding of how to use these transactions, you can follow the steps below to quickly analyze your workflow problems:
1. Go to transaction SWU3 and check if everything is okay. If it is not, please fix it before you proceed.
2. Go to transaction SWEL and check if an event is created. If not, check in transaction SWELS if the event log is activated.
- If you see an event but no workflow is triggered, proceed with step 3.
- If you see an event and a workflow is triggered, but the status of the triggering shows an error, proceed with step 3.
- If you see an event and a workflow is triggered and there is no error, proceed with step 4.
- If the event log is activated and you do not get any event, open up a message using the component of the application to which the business object type belongs. From release 20C for creation of shopping carts the architecture of workflows changed and no events are visible!
3. Go to transaction SWU0 and simulate the event. Is the workflow that you expect to be triggered visible in the simulation?
- If it is not, then check the workflow definition in PFTC. The event must be defined as triggering event.
- If it is, but the event linkage is not activated, go to transaction OOCU and activated it.
- If it is visible, but it is not activated, go to transaction PFTC and activate it.
4. Go to transaction SWI1. Search for the work item that belongs to the workflow. Check the status of the work item.
Reblogged from SDN.sap.com
Changing time zones in SAP ECC 6.0
Time stamps for documents can be stored in two different formats:
- Using standard ABAP date and time fields (YYYYMMDD and HHMMSS). Here the time stamp corresponds to the system time, i.e. the time on the database server as returned by the ABAP system variable SY-DATUM and SY-UZEIT. Using the system time is necessary to avoid situations where, for instance, a financial document created by a user in Berlin (CET) would be modified a few minutes later by a user in New York (EDT). If the user’s time zone were stored in the document data, then it would seem as if the document had been changed before it was created. However, many applications will take the time zone into account when processing these documents. How this is done depends on the time zone-related information that is available for the document. The details are explained in the SAP online help (help.sap.com) in the guide “Time Zones” (CA-GTF-TIM). This same guide also describes various application-specific scenarios.
- Another format that is frequently used is the ABAP time stamp format (handled in ABAP with the “GET TIME STAMP” and “CONVERT TIME STAMP” statements). A time stamp field is always in UTC and the application will automatically convert it to/from the user’s time zone.
Top 10 ABAP Dumps...
1) STORAGE_PARAMETERS_WRONG_SET
The problems with the dump STORAGE_PARAMETERS_WRONG_SET are mainly related to the general restrictions of the 32bit OS. You can address up to 4GB of virtual memory. Each process in OS is running in its own context and can address max. 4GB. The parameters which are related to ‘heap memory' ie abap/heap_area_dia, abap/heap_area_nondia, abap/heap_area_total are should be set to 2 GB. Common approaches which we can take for this dump are:
a) Please use in the 'boot.ini' file the switch '/3GB' and restart your whole computer as described in the below SAP Notes:
SAP Note 552209 - Maximum memory utilization for processes on NT/Win 2000
SAP Note 313347 - Windows NT, 2000, 2003: Editions and memory usage.
b) Another way to avoid this problem is to try to add more criteria to your report/program/transaction so that there will be fewer entries that need to be retrieved from your database or buffers. This way, the system would not need to use up much resource to complete the transaction. The query may have been quite big already and the load cannot be accommodated. So please do add more criteria or options so that there will less data to fetch.
c) To decrease the value of the parameters: rdisp/ROLL_SHM, rdisp/PG_SHM
d) Migrate to 64-bit OS (as per SAP Note 931024 and SAP Note 996600)
How to Send a System Message
Here’s how it goes.
Trying to access the table
When trying to maintain a certain table, the user will receive the following warning:Sending a system message using a standard SAP function module
Once you’ve identified the user, access SE37 – assuming you have permission! In SE37 call SAP standard function module TH_POPUP.<!--more>
Fill in the following input parameters:
- CLIENT: the system client on which you’re working on. If you don’t know this, take a look at the lower right status bar;
- USER: the user for which you want the message to be delivered;
- MESSAGE: the text message you want to deliver to the user;
- MESSAGE_LEN: allows you to define a message length. Leave it empty;
- CUT_BLANKS: allows you to specify if you want to trim existing spaces. Leave it empty.
To submit the message just hit “Execute (F8)”
What the user receives
When you click on “Execute (F8)”, the destination user receives the following message as a pop-up:This is just a simple system tool that can help you in a day to day basis, working with SAP.
Useful ABAP Functions
Function Modules for creating programs (Useful when you are generating programs)
RS_CORR_INSERT : To insert the correction request in the repository.
REPS_OBJECT_ACTIVATE : To activate repository objects, for example – to activate a newly generated program.
RS_DELETE_PROGRAM : To delete the program.
RS_ACCESS_PERMISSION : To lock or unlock a program.
Function Modules related to Date and Time Calculations
DATE_TO_DAY : Returns the Day for the entered date.
DATE_COMPUTE_DAY : Returns weekday for a date
DATE_GET_WEEK : Returns week for a date
Function Modules related to (ALV) ADVANCED LIST VIEWER
REUSE_ALV_GRID_DISPLAY : ALV GridControl full screen
REUSE_ALV_FIELDCATALOG_MERGE : Create field catalog from dictionary structure or internal table
Function Module related to Change Tracking
DAY_ATTRIBUTES_GET : Returns attributes for a range of dates specified
MONTHS_BETWEEN_TWO_DATES : To get the number of months between the two dates.
END_OF_MONTH_DETERMINE_2 : Determines the End of a Month.
HR_HK_DIFF_BT_2_DATES : Find the difference between two dates in years, months and days.
FIMA_DAYS_AND_MONTHS_AND_YEARS : Find the difference between two dates in years, months and days. (Better use this one to find the difference between dates)
MONTH_NAMES_GET : Get the names of the month
WEEK_GET_FIRST_DAY : Get the first day of the week
HRGPBS_HESA_DATE_FORMAT : Format the date in dd/mm/yyyy format
SD_CALC_DURATION_FROM_DATETIME : Find the difference between two date/time and report the difference in hours
L_MC_TIME_DIFFERENCE : Find the time difference between two date/time
HR_99S_INTERVAL_BETWEEN_DATES : Difference between two dates in days, weeks, months
LAST_DAY_OF_MONTHS : Returns the last day of the month
DATE_CHECK_PLAUSIBILITY :Check for the invalid date.
DATE_2D_TO_4D_CONVERSION :Year entry: 2-character to 4-character.
DAY_IN_WEEK :Input date and will give the name of the day 1-monday,2-Tuesday….
Function Modules Related To Formatting
RKD_WORD_WRAP : Wrap text into several lines
CONVERSION_EXIT_ALPHA_INPUT : Pad zeros to the number at the left
CONVERSION_EXIT_ALPHA_OUTPUT : Eliminate zeros to the number at the left
Function Modules Related To Dialog Prompts
POPUP_TO_GET_VALUE : Displays a popup dialog requesting a value for a particular table-fieldname
SAPGUI_PROGRESS_INDICATOR : Displays a progress bar with text to denote the percentage of completion and status
FILENAME_GET : Displays a popup dialog to get the presentation server filename
F4_DATE : Displays a popup dialog to choose date
GUI_UPLOAD : Upload a file from the presentation server
POPUP_TO_SELECT_MONTH : Display a pop-up to select a month
Function modules related to RFC communication
RFC_GET_SYSTEM_INFO : Give system’s information of a remote system
Function modules related to reading/writing files
SUBST_GET_FILE_LIST: To get the list of files from Application Server.
ALSM_EXCEL_TO_INTERNAL_TABLE : Legacy Data Transfer w/ Excel
Function Modules related to sending emails
SO_NEW_DOCUMENT_SEND_API1 – Sends emails with texts.
Function Modules related to F4 Help
FAQ: ABAP List Viewer (ALV)
Hierarchical sequential list: function module >> 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
Fullscreen grid: this uses the function module >> 'REUSE_ALV_GRID_DISPLAY'
ALV Grid Control: Methods of the class >> CL_GUI_ALV_GRID
ALV Tree: Methods of the class >> CL_GUI_ALV_TREE
In Basis Release 6.40, an object-oriented ALV wrapper is provided. This can be used for three different types of tables.
- for simple, two-dimensional tables using the class >> CL_SALV_TABLE
- for hierarchical sequential tables (class CL_SALV_HIERSEQ_TABLE)
- for tree structures (class CL_SALV_TREE)
The object-oriented ALV wrapper, which is provided in Basis Release 6.40, is also released for customers. For more information, see the corresponding class documentation, as well as the sample report SALV*.
The methods of the classes CL_GUI_ALV_TREE CL_GUI_ALV_TREE_SIMPLE, CL_ALV_TABLE_CREATE and the ALV function modules are not released for use by the customer.
The class CL_ALV_TABLE_CREATE is not released.