вторник, 27 августа 2013 г.

Finding the name of the BADI used in a Transaction



Scenario: Need to find the name of the BADI available in a transaction
  1. Go to Transaction SE24
  2. Enter the Object Type CL_EXITHANDLER and click on Display.
  3. Double Click on method "GET_INSTANCE".
  4. Put a Break-point on 
Call method cl_exithandler=>get_class_name_by_interface
  1. Run any Transaction for which you need enhancements.
  2. The execution will stop at the break point. Check the values of variable 'exit_name', it will give you the BADI name called at that time.
This way you will find all the BADIs called on click of any button in any transaction.

Оригинал 

понедельник, 19 августа 2013 г.

Отладка модальных (диалоговых) окон


Для переключения модального (диалогового) окна в режим отладки, делаем на рабочем столе текстовый файл со следующим содержимым

[FUNCTION]
Command=/H
Title=Debugger
Type=SystemCommand 

затем просто перетаскиваем и бросаем его на модальное окно, в результате включится отладка

среда, 24 июля 2013 г.

Negative values on screens, I/O templates for screen fields

When you try to display a field with negative content on a screen,
you can run into the error : "FX015: Sign lost."
As a solution you could change the I/O template for 
the field from "____________" to
"___________V" (with +/- sign).

Althoug SAP tells "... The template of an input/output field
on a screen may only consist of underscores. At runtime, this is       
replaced with a suitable template (for example, for entering a date).
"(message 620(37)), you can change the template, eg. for negativ values (V)
and separators.

воскресенье, 14 июля 2013 г.

Вызов программных единиц в разрезе сессий


Класс для обработки событий ALV Grid

Шаблон для класса, обрабатывающего события cl_gui_alv_grid

Заполнение списка доступных вариантов отображений



Инициализация столбца ALV Grid


Инициализация скрина с ALV Grid



Application Logging

SAP provides a method to use a standard logging facility for all of your custom ABAP programs. It consists of several transaction codes, tables, and function modules. By using the SAP functionality, it is possible to have a standard way to store error messages, making the handling of errors much simpler, and increasing the maintainablity of code.
Transaction Codes: SLG0 is used to configure categories for the error messages, and SLG1 is used to view the messages.
Tables: BALHDR is the main (header table), and BALM contains all of the detailed messages.
Function Modules: Much like the SAP function modules used to send email, these function modules would benefit from having a simpler interface wrapped around them. The function modules can be found in Function Group SLG0. Look for the INIT, HEADER, and MESSAGE function modules, as well as the WRITE_DB (I think that is the name...). If you want examples of how these function modules are used, please do a where used on them. I am unable to post the SAP examples here.
All APPL_LOG function modules are from 3.0. Starting at 4.6, see function groups that start with SBAL.

ABAP OLE

Пока только ссылка на доки 

Основные транзакции ABAP-ера



ABAPDOCU - Документация
SE80     ABAP WorkBench
SE11     ABAP-словарь: ведение
SE12     ABAP-словарь: просмотр
SM04    Список пользователей
SM50    Обзор рабочих процессов
SE16     Браузер данных
SE16N  Общий просмотр таблиц
SE17     Общий просмотр таблиц
SE37     ABAP-функциональные модули
SE38     ABAP-редактор
SE39     Полиэкранный редактор (новый)
SE01     Организатор переносов (расш. ракурс)


LUW-ы

BD LUW:
Неявные коммиты:
    - Перед отправкой экрана на сервер перзентации с сервера приложений
    - Перед отправкой диалгового сообщения
    - Перед синхронным/асинхронным вызовом через RFC
    - Конструкция CALL TRANSACTION <t_code> или SUBMIT <program>
Явные :
    - COMMIT WORK (ROLLBACK WORK - В случает отката)

Colors in Lists

Syntax
FORMAT COLOR = <c> INTENSIFIED = <int> INVERSE = <inv>.

INTENSIFIED - переключатель яркости

INVERSE  - переключатель цвет фона/цвет шрифта


<n>
<c>
ColorIntended for
OFF
or COL_BACKGROUND
0
depends on GUIbackground
1
or COL_HEADING
1
gray-blueheaders
2
or COL_NORMAL
2
light graylist bodies
3
or COL_TOTAL
3
yellowtotals
4
or COL_KEY
4
blue-greenkey columns
5
or COL_POSITIVE
5
greenpositive threshold value
6
or COL_NEGATIVE
6
rednegative threshold value
7
or COL_GROUP
7
violetControl levels