sy tabix abap что это
Difference between Sy-tabix and Sy-index
Sy-tabix vs Sy-index
Sy-tabix is used to find the current line in the internal table; it’s a current line index. Whereas sy-index in used to find the number of current pass in the loop statement.
sy-tabix = Index of Internal Tables
set by commands processing internal tables (e.g. READ, LOOP)
It contains the nr/index of the last line accessed for standard or sorted tables. In case of hashed tables it is set to 0
since hashed tables are no index tables, they use a hash administration.
sy-index = Loop Index.
set by DO and WHILE loops. contains the number of the loop passes including the current pass.
APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
COLLECT sets SY-TABIX to the index of the existing or inserted line in the table.
LOOP AT sets the SY-TABIX to the index of the current line at the beginning of each loop lass.At the end of loop, SY-TABIX is reset to the value that it had before entering the loop.
READ TABLE sets SY-TABIX to the index of the table line read.If you use a binary search and system doesn’t a line SY-TABIX contains the total no. of lines.
sy-tabix is nothing but the index or row number of an internal table.
when control goes to the twentieth record of the table, then sy-tabix will hold value 20.
On otherhand, sy-index denotes the number of processing for any loop statements like do, while etc.
ABAP guide
ABAP. Tips, tricks & code examples.
воскресенье, 11 сентября 2016 г.
Типы данных
Типы данных делятся на три категории: стандартные, локальные и глобальные.
Стандартные типы бывают фиксированной, заданной или переменной длины.
Фиксированной длины | |
D | Дата (Date) |
Формат – ГГГГММДД | |
Длина – 8 | |
Значение по умолчанию – ‘00000000’ | |
T | Время (Time) |
Формат – ЧЧММСС | |
Длина – 6 | |
Значение по умолчанию – ‘000000’ | |
I | Целое число (Integer) |
Длина – 4 | |
Значение по умолчанию – 0 | |
F | Число с плавающей запятой (Float) |
Длина – 8 | |
Значение по умолчанию – 0.0 | |
Заданной длины | |
C | Последовательность символов (Character) |
Длина по умолчанию – 1 | |
Значение по умолчанию – ‘’ (пустая строка) | |
N | Последовательность числовых символов (Numericalcharacter) |
Длина по умолчанию – 1 | |
Значение по умолчанию – ‘0’ | |
X | Байтовая последовательность (Hexadecimal) |
Длина по умолчанию – 1 | |
Значение по умолчанию – ‘00’ | |
P | Упакованное число (Packed number) |
Длина по умолчанию – 8 | |
Значение по умолчанию – 0 | |
Переменной длины | |
STRING | Последовательность символов переменной длины (String) |
XSTRING | Байтовая последовательность переменной длины (Hexadecimal string) |
D
Объявление нескольких полей можно объединить, поставив после DATA двоеточие и записав объявление полей через запятую.
Чтобы определить поле того же типа, что и ранее объявленное, вместо TYPE используется LIKE.
Константа определяется словом CONSTANTS с указанием типа, длины и числа десятичных разрядов аналогично объявлению полей. Дополнение VALUE для константы обязательно. Таким образом определяется её значение.
Стандартные типы могут использоваться для определения локальных типов данных. Локальные типы существуют только в программе и могут использоваться только в ней. Локальный тип определяется служебным словом TYPES.
Глобальные типы определяются в ABAP-словаре и могут использоваться во всей системе (во всей рассматриваемой SAP-системе).
Структуры содержат фиксированное число полей и служат для объединения простых полей в более сложный, например, данные о сотруднике. Структуры объявляются служебными словами BEGIN OF и END OF.
Аналогично можно объявить тип структуры, чтобы в дальнейшем использовать его для объявления полей.
Для обращения к полю структуры надо указать её имя и через дефис имя поля.
В системе предусмотрена глобальная структура SYST, которая хранит системные данные. Доступ к ней в программе осуществляется по имени SY. Некоторые значения системных переменных указаны ниже.
Инструкция по использованию отладчика
Венц Власта Александровна
ведущий специалист FI/TR/SL
Использование отладчика (Debugger)
Введение: назначение отладчика
Как известно, отладчик предназначен для пошагового выполнения программ с целью наблюдения за значением переменных и управления их значениями. Его используют при:
Существуют несколько способов запуска исполнения программного кода в режиме отладки:
Рис. 1 Транзакция SE38 –запуск отладчика
Рис. 2 Запуск отладчика в любом окне системы
В том случае, когда известно имя выполняемой программы, удобно воспользоваться ABAP-редактором. Если же имя выполняемой программы неизвестно, либо программа имеет сложную структуру вызова, то удобнее воспользоваться вызовом отладчика с помощью команды «/h».
Вход в отладчик (возможен двумя путями):
Точка прерывания – сигнал в строке кода, который вызывает прекращение выполнения программы на этой строке и запускает ABAP-отладчик.
Перезапуск отладчика
Выключение отладчика (продолжить выполнение программы в обычном режиме)
Выход из отладчика с выходом из программы
Выход из режима отладки с последующим выполнением программы имеет особенность – режим отладки может быть возобновлен в случае наличия точек прерывания в модуле программы.
Интерфейс
Отображение исходного кода
Позиционирование на указанном столбце кода
Позиционирование на указанной строке кода
Увеличение фрагмента кода
Позиционирование на текущем операторе
Доступные способы отображения данных
Управление отладкой
Позволяет выполнить оператор в текущей строке с заходом в вызываемую подпрограмму/функцию/программу (Рис. 3)
Рис. 3 Отладчик
Позволяет выполнить оператор в текущей строке с обходом вызываемой подпрограммы/функции/программы
Возвращает из вызываемой подпрограммы/функции/программы в главную программу
Запускает выполнение программы до следующей точки прерывания
Просмотр/изменение значений полей
Нажмите Enter, значение поля отобразится.
Так же можно отобразить значение поле для просмотра двойным щелчком по этому полю.
Sy-subrc –- системная переменная, хранящая код возврата: результат выполнения какого-либо действия. 0 – действие выполнено успешно. Другие значения зависят от исполняемого оператора.
Sy-tabix – текущий индекс строки, читаемой внутренней таблицы.
Sy-dbcnt – число считанных строк из БД
Sy-dynnr – номер экрана.
Просмотр/изменение внутренних таблиц
Для отображения внутренних таблиц переключитесь в режим просмотра таблиц (нажмите кнопку ) и скопируйте название таблицы в поле «ВнутрТаблица».
Прочие функции
Если хотите прочитать статью полностью и оставить свои комментарии присоединяйтесь к sapland
SAP ERP / ABAP полезные ресурсы
Честно говоря, эту статью я пишу даже больше для себя — чтобы как то систематизировать информацию по внутреннему языку программирования ABAP/4 системы SAP R/3 в одном месте. Тем не менее, я буду очень рад, если кому то ещё она окажется полезной и сэкономит время. Сразу оговорюсь, что статья ориентирована на новичков, которые только начинают изучать ABAP/4 (коим, в некоторой мере, я и сам являюсь).
Меня сразу заинтересовали «/4» и «/3» в названиях продукта и языка программирования (далее ЯП) для него. Однако, всё весьма банально. Согласно википедии, буква R из R/3 является начальной буквой слова «Realtime» и означает немедленную проводку и актуализацию данных, которые в рамках интеграции немедленно доступны всем заинтересованным отделам предприятия. Цифра 3 означает, что в системе реализована архитектура клиент/сервер приложений/система управления базами данных (трёхзвенная модель), в отличие от R/2, которая работала на мейнфреймах. А название ABAP расшифровывается как Advanced Business Application Programming, а цифра «4» символизирует отношение к четвёртому поколению ЯП. Язык был создан в 1980 году для работы с системой SAP R/2, позднее унаследован в SAP R/3. С более подробной информацией все желающие могут ознакомиться непосредственно на вики.
Чуть более подробную информацию в сравнении с вики можно найти здесь. Кроме того, на этом же сайте можно найти книгу, с которой я бы рекомендовал начать изучение материала. Несмотря на то, что выпущена она 17(!) лет назад, большая часть информации в ней остаётся актуальной. Кроме того, существенный ее плюс в том, что это одна из немногих книг по сабжу, переведённая на русский язык. Конечно, тот факт, что ЯП почти не претерпел изменений за такой промежуток времени и при этом остаётся актуальным по сей день вызвал немалое удивление (во всяком случае у меня), но, по крайней мере, чувствуется его «фундаментальность». Тем не менее, существует перечень функциональных модулей (ФМ) в системе, которые считаются устаревшими. Ознакомится можно здесь.
Собственно, моя карьера сложилась так, что внезапно пришлось переквалифицироваться из программиста C# в «абаперы». Во многом это случилось из-за кризиса (с моей прежней должности меня сократили), но, как ни странно, оказалась востребованной разработка для SAP. Для провинциального города, где я живу, большинство заводов и 1С считают роскошью, а тут SAP… Впрочем, довольно лирики.
Вообще, обычно рекомендуют начинать изучение с курсов ВС400, ВС401, ВС402 и т.д.
При должном упорстве можно их нагуглить (причём в русском исполнении). Если же устраивает и английский (на самом деле так даже лучше — всё же переводчики частенько играют роль «сломанного телефона»), то здесь есть большой перечень разных курсов; все можно скачать по прямым ссылкам. Тем не менее, лично для себя, больше пользы я почувствовал от ранее упомянутой мной книги за авторством Кречмера и Вейса.
Также к полезным для начинающих я бы отнёс этот ресурс. Здесь автор последовательно шаг за шагом обучает работе в системе (по его словам это необходимый минимум для Junior ABAP programmer-а). Последняя статья там была написана 7 июня 2015 года и как раз про alv. Поначалу очень полезно, но, конечно, хотелось бы, чтобы сайт не «забросили». Кстати, некоторые, указанные мной ссылки есть и в похожей теме, а также базовая информация по синтаксису языка.
Небольшие понятные примеры можно найти здесь (правда, их не так уж много, но зато аккуратно оформлено): abapmaster.com.
Хочу сразу заметить, что методом вывода информации на экран с помощью ключевого слова WRITE сейчас стараются не пользоваться — его практически полностью вытесняют т.н. ALV-отчёты.
Официальная справка по ALV.
Кстати, здесь можно увидеть перечень всех ключевых слов, используемых в ЯП АВАР/4. А здесь всё то же самое, только с краткими примерами, но не так удобно для просмотра. Вообще, по alv есть достаточно много информации (я начинал отсюда) и большую часть времени разработчик будет иметь дело именно с этим. У пользователей всегда есть желания типа «А можно мне вот такой z-отчётик, чтобы как в ххх транзакции, только попроще и с другими таблицами?»
(Примечание: В SAP R/3 все программы, таблицы и прочее, созданное пользователями, должно начинаться с букв y или z).
Много примеров с исходниками можно взять отсюда. На этом ресурсе предлагают выучить всё за 21 день… Весьма оптимистично, но статьи и правда неплохие. Всё на английском.
Вот тут и тут блоги АВАР-разработчиков; можно найти некоторые полезные советы.
Кстати, тем, кто не хочет долго разбираться во всех этих делах есть особая волшебная ссылка. Тем, кто настроен крайне серьёзно и решительно, заходить по ней не обязательно. Много плюшек для начинающих разработчиков здесь, ну и вообще по сайту полезные вещи есть — скрытие исходников, проверка исходников на «хардкод» и проч.
Далее идут уже большие сайты — не только для новичков, но и для матёрых «саперов». Про ABAP в общем и про ALV в частности. Немного про BADI и WebDyn технологии написано здесь (английский). Тут тоже нашёл полезные вещи, но ресурс англоязычный.
Отсюда я очень много взял примеров (в частности, маленькие хитрости по работе с транзакциями). Отзывчивый форум. Хорошие ресурсы на русском языке.
Официальная справка по АВАР. Желающие проверить себя или подготовиться к сертификации, могут скачать приложение или ознакомиться с книгой. Здесь случайные вопросы с относительно подробными ответами.
Примеры сертификационных вопросов:
1. If a table does not have MANDT as part of the primary key, it is ____.
A: A structure
B: Invalid
C: Client-independent
D: Not mandatory
2. In regard to CALL, which of the following is NOT a valid statement?
A: CALL FUNCTION
B: CALL SCREEN
C: CALL TRANSACTION
D: CALL PROGRAM
3. Name the type of ABAP Dictionary table that has these characteristics:
Same number of fields as the database table
Same name as database table
Maps 1:1 to database table
A: Pooled
B: Cluster
C: Transparent
D: View
4. An event starts with an event keyword and ends with:
A: Program execution.
B: END-OF-EVENT.
C: Another event keyword.
D: END-EVENT.
5. What is the system field for the current date?
A: SY-DATUM
B: SY-DATE
C: SY-DATID
D: SY-SDATE
6. The following code indicates:
SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab
WHERE fld1 IN sfld1.
A: Add rows to the existing rows of itab.
B: Add rows to itab after first deleting any existing rows of itab.
C: Select rows from tab1 for matching itab entries.
D: Nothing, this is a syntax error.
7. You may change the following data object as shown below so that it equals 3.14.
CONSTANTS: PI type P decimals 2 value ‘3.1’.
PI = ‘3.14’.
8. The SAP service that ensures data integrity by handling locking is called:
A: Update
B: Dialog
C: Enqueue/Dequeue
D: Spool
9. Which of these sentences most accurately describes the GET VBAK LATE. event?
A: This event is processed before the second time the GET VBAK event is processed.
B: This event is processed after all occurrences of the GET VBAK event are completed.
C: This event will only be processed after the user has selected a basic list row.
D: This event is only processed if no records are selected from table VBAK.
10. Which of the following is not a true statement in regard to a hashed internal table type?
A: Its key must always be UNIQUE.
B: May only be accessed by its key.
C: Response time for accessing a row depends on the number of entries in the table.
D: Declared using internal table type HASHED TABLE.
11. TO include database-specific SQL statements within an ABAP program, code them between:
A: NATIVE SQL_ENDNATIVE.
B: DB SQL_ENDDB.
C: SELECT_ENDSELECT.
D: EXEC SQL_ENDEXEC.
12. To measure how long a block of code runs, use the ABAP statement:
A: GET TIME.
B: SET TIME FIELD.
C: GET RUN TIME FIELD.
D: SET CURSOR FIELD.
13. When a secondary list is being processed, the data of the basic list is available by default.
DATA: BEGIN OF itab OCCURS 10,
qty type I,
END OF itab.
DO 25 TIMES. itab-qty = sy-index. APPEND itab. ENDDO.
LOOP AT itab WHERE qty > 10.
WRITE: /1 itab-qty.
ENDLOOP.
This will result in:
A: Output of only those itab rows with a qty field less than 10
B: Output of the first 10 itab rows with a qty field greater than 10
C: A syntax error
D: None of the above
15. After a DESCRIBE TABLE statement SY-TFILL will contain
A: The number of rows in the internal table.
B: The current OCCURS value.
C: Zero, if the table contains one or more rows.
D: The length of the internal table row structure.
16. You may declare your own internal table type using the TYPES keyword.
17. After adding rows to an internal table with COLLECT, you should avoid adding more rows with APPEND.
18. Which of the following is not a component of control break processing when looping at an internal table?
A: AT START OF
B: AT FIRST
C: AT LAST
D: AT NEW
19. A dictionary table is made available for use within an ABAP program via the TABLES statement.
20. Which of the following would be best for hiding further selection criteria until a function is chosen?
A: AT NEW SELECTION-SCREEN
B: SELECTION-SCREEN AT LINE-SELECTION
C: SUBMIT SELECTION-SCREEN
D: CALL SELECTION-SCREEN
21. What must you code in the flow logic to prevent a module from being called unless a field contains a non-initial value (as determined by its data type)?
A: ON INPUT
B: CHAIN
C: FIELD
D: ON REQUEST
22. The AT USER-COMMAND event is triggered by functions defined in the ____.
A: screen painter
B: ABAP report
C: menu painter status
D: ABAP Dictionary
23. In regard to a function group, which of the following is NOT a true statement?
A: Combines similar function modules.
B: Shares global data with all its function modules.
C: Exists within the ABAP workbench as an include program.
D: Shares subroutines with all its function modules.
24. In regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.
A: EXCLUDING
B: IMMEDIATELY
C: WITHOUT
D: HIDE
25. In regard to data transported in PAI when the FIELD statement is used, which of the following is NOT a true statement?
A: Fields in PBO are transported directly from PAI.
B: Fields with identical names are transported to the ABAP side.
C: Fields not defined in FIELD statements are transported first.
D: Fields that are defined in FIELD statements are transported when their corresponding module is called.
26. The order in which an event appears in the ABAP code determines when the event is processed.
27. A field declared as type T has the following internal representation:
A: SSMMHH
B: HHMMSS
C: MMHHSS
D: HHSSMM
28. Which of the following is NOT a component of the default standard ABAP report header?
A: Date and Time
B: List title
C: Page number
D: Underline
29. Assuming a pushbutton with function code ‘FUNC’ is available in the toolbar of a list report, what event is processed when the button is clicked?
A: AT USER-COMMAND.
B: AT PFn.
C: AT SELECTION-SCREEN.
D: END-OF-SELECTION.
30. In regard to field selection, what option of the SELECT statement is required?
A: FOR ALL ENTRIES
B: WHERE
C: INTO
D: MOVE-CORRESPONDING
31. The following program outputs what?
INITIALIZATION.
write: /1 ‘Set_’.
START-OF-SELECTION.
write: /1 ‘GO!!’.
A: Set_ GO. (each on its own line)
B: Set_ Ready_ GO. (all on their own lines)
C: Ready_ GO. (each on its own line)
D: Ready_ Set_ GO. (all on their own lines)
32. To declare a selection criterion that does not appear on the selection screen, use:
A: NO-DISPLAY
B: INVISIBLE
C: MODIF ID
D: OBLIGATORY
33. An internal table that is nested within another internal table should not contain a header line.
34. What is output by the following code?
DATA: BEGIN OF itab OCCURS 0, letter type c, END OF itab.
itab-letter = ‘A’. APPEND itab. itab-letter = ‘B’. APPEND itab.
itab-letter = ‘C’. APPEND itab. itab-letter = ‘D’. APPEND itab.
LOOP AT itab.
SY-TABIX = 2.
WRITE itab-letter.
EXIT.
ENDLOOP.
A: A
B: A B C D
C: B
D: B C D
35. To select all database entries for a certain WHERE clause into an internal table in one step, use
A: SELECT_INTO TABLE itab_
B: SELECT_INTO itab_
C: SELECT_APPENDING itab
D: SELECT_itab_
36. After a successful SELECT statement, what does SY-SUBRC equal?
37. This selection screen syntax forces the user to input a value:
A: REQUIRED-ENTRY
B: OBLIGATORY
C: DEFAULT
D: SELECTION-SCREEN EXCLUDE
38. If the following code results in a syntax error, the remedy is:
DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1
WITH HEADER LINE.
itab-field1 = ‘Company’. itab-field2 = ‘1234’. INSERT TABLE itab.
itab-field1 = ‘Bank’. itab-field2 = ‘ABC’. INSERT TABLE itab.
LOOP AT itab.
write: /1 itab-field1, itab-field2.
ENDLOOP.
A: There is no syntax error here
B: Remove the SORT statement
C: Change INSERT to APPEND
D: Add a WHERE clause to the loop
39. If this code results in an error, the remedy is:
SELECT fld1 fld2 FROM tab1 WHERE fld3 = pfld3.
WRITE: /1 tab1-fld1, tab1-fld2.
ENDSELECT.
A: Add a SY-SUBRC check.
B: Change the WHERE clause to use fld1 or fld2.
C: Remove the /1 from the WRITE statement.
D: Add INTO (tab1-fld1, tab1-fld2).
40. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must include an index number.
41. To allow the user to enter values on the screen for a list field, use:
A: OPEN LINE.
B: SET CURSOR FIELD.
C: WRITE fld AS INPUT FIELD.
D: FORMAT INPUT ON.
42. Before a function module may be tested, it must first be:
A: Linked
B: Authorized
C: Released
D: Active
43. To include a field on your screen that is not in the ABAP Dictionary, which include program should contain the data declaration for the field?
A: PBO module include program
B: TOP include program
C: PAI module include program
D: Subroutine include program
44. If a table contains many duplicate values for a field, minimize the number of records returned by using this SELECT statement addition.
A: MIN
B: ORDER BY
C: DISTINCT
D: DELETE
45. The system internal table used for dynamic screen modification is named:
A: ITAB
B: SCREEN
C: MODTAB
D: SMOD
46. Within the source code of a function module, errors are handled via the keyword:
A: EXCEPTION
B: RAISE
C: STOP
D: ABEND
47. Which system field contains the contents of a selected line?
A: SY-CUCOL
B: SY-LILLI
C: SY-CUROW
D: SY-LISEL
48. The following statement writes what type of data object?
WRITE: /1 ‘Total Amount:’.
A: Text literal
B: Text variable
C: In-code comment
D: Text integer
49. For the code below, second_field is of what data type?
DATA: first_field type P, second_field like first_field.
50. Which of the following describes the internal representation of a type D data object?
A: DDMMYYYY
B: YYYYDDMM
C: MMDDYYYY
D: YYYYMMDD
51. A BDC program is used for all of the following except:
A: Downloading data to a local file
B: Data interfaces between SAP and external systems
C: Initial data transfer
D: Entering a large amount of data
52. In regard to PERFORM, which of the following is NOT a true statement?
A: May be used within a subroutine.
B: Requires actual parameters.
C: Recursive calls are allowed in ABAP.
D: Can call a subroutine in another program.
53. What is the transaction code for the ABAP Editor?
A: SE11
B: SE38
C: SE36
D: SE16
54. In regard to HIDE, which of the following is NOT a true statement?
A: Saves the contents of variables in relation to a list line’s row number.
B: The hidden variables must be output on a list line.
C: The HIDE area is retrieved when using the READ LINE statement.
D: The HIDE area is retrieved when an interactive event is triggered.
55. Database locks are sufficient in a multi-user environment.
56. The complete technical definition of a table field is determined by the field’s:
A: Domain
B: Field name
C: Data type
D: Data element
57. In regard to LEAVE, which of the following is NOT a true statement?
A: May be used to return immediately to a calling program.
B: May be used to stop the current loop pass and get the next.
C: May be used to start a new transaction.
D: May be used to go to the next screen.
58. The following code indicates:
SELECT fld6 fld3 fld2 fld1 FROM tab1 INTO CORRESPONDING FIELDS OF TABLE itab
WHERE fld3 = pfld3.
A: The order of the fields in itab does not matter.
B: Fill the header line of itab, but not the body.
C: Table itab can only contain fields also in table tab1.
D: None of the above.
59. The ABAP statement below indicates that the program should continue with the next line of code if the internal table itab:
CHECK NOT itab[] IS INITIAL.
A: Contains no rows
B: Contains at least one row
C: Has a header line
D: Has an empty header line
60. What will be output by the following code?
DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab.
itab-fval = 1. APPEND itab.
itab-fval = 2. APPEND itab.
FREE itab.
WRITE: /1 itab-fval.
A: 2
B: 0
C: blank
D: 1
61. To allow the user to enter a range of values on a selection screen, use the ABAP keyword:
A: DATA.
B: RANGES.
C: PARAMETERS.
D: SELECT-OPTIONS.
62. If an internal table is declared without a header line, what else must you declare to work with the table’s rows?
A: Another internal table with a header line.
B: A work area with the same structure as the internal table.
C: An internal table type using the TYPES statement.
D: A PARAMETER.
63. Assuming an internal table contains 2000 entries, how many entries will it have after the following line of code is executed?
DELETE itab FROM 1500 TO 1700.
A: This is a syntax error.
B: 1801
C: 1800
D: 1799
64. To remove lines from a database table, use ____.
A: UPDATE
B: MODIFY
C: ERASE
D: DELETE
65. All of the following may be performed using SET CURSOR except:
A: Move the cursor to a specific field on a list.
B: Move the cursor to a specific list line.
C: Move the cursor to a specific pushbutton, activating that function.
D: Move the cursor to a specific row and column on a list.
66. When is it optional to pass an actual parameter to a required formal parameter of a function module?
A: The actual parameter is type C.
B: The formal parameter contains a default value.
C: The formal parameter’s \«Reference\» attribute is turned on.
D: It is never optional.
67. Coding two INITIALIZATION events will cause a syntax error.
68. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good method for improving performance.
69. To save information on a list line for use after the line is selected, use this keyword.
A: APPEND
B: EXPORT
C: WRITE
D: HIDE
70. To bypass automatic field input checks, include this in PAI.
A: AT EXIT-COMMAND
B: ON INPUT
C: ON REQUEST
D: LEAVE TO SCREEN 0.
71. Within a function module’s source code, if the MESSAGE_RAISING statement is executed, all of the following system fields are filled automatically except:
A: SY-MSGTY
B: SY-MSGNO
C: SY-MSGV1
D: SY-MSGWA
72. The following code indicates:
REPORT ZLISTTST.
START-OF-SELECTION.
WRITE: text-001.
FORMAT HOTSPOT ON.
WRITE: text-002.
FORMAT HOTSPOT OFF.
AT LINE-SELECTION.
WRITE / text-003.
A: Text-002 may not be selected.
B: The value of text-002 is stored in a special memory area.
C: Text-002 may be clicked once to trigger the output of text-003.
D: None of the above.
73. The ____ type of ABAP Dictionary view consists of one or more transparent tables and may be accessed by an ABAP program using Open SQL.
A: Database view
B: Projection view
C: Help view
D: Entity view
74. A concrete field is associated with a field-symbol via ABAP keyword
A: MOVE
B: WRITE
C: ASSIGN
D: VALUE
75. The output for the following code will be:
report zabaprg.
DATA: char_field type C.
char_field = ‘ABAP data’.
A: ABAP data
B: A
C: Nothing, there is a syntax error
D: None of the above
76. Page footers are coded in the event:
A: TOP-OF-PAGE.
B: END-OF-SELECTION.
C: NEW-PAGE.
D: END-OF-PAGE.
77. The event AT SELECTION-SCREEN OUTPUT. occurs before the selection screen is displayed and is the best event for assigning default values to selection criteria.
78. The TABLES statement declares a data object.
79. Assuming tab1-fld7 is not a key field, how can you prevent reading all the table rows?
SELECT fld1 fld2 fld3 FROM tab1 INTO (fld4, fld5, fld6)
WHERE fld7 = pfld7.
WRITE: /1 fld4, fld5, fld6.
ENDSELECT.
A: Take fld7 out of the WHERE clause.
B: Create an index in the ABAP Dictionary for tab1-fld7.
C: Use INTO TABLE instead of just INTO.
D: Take the WRITE statement out of the SELECT_ENDSELECT.
80. Which of the following is NOT a required attribute when creating an ABAP program?
A: Application
B: Title
C: Status
D: Type
81. When creating a transparent table in the ABAP Dictionary, which step automatically creates the table in the underlying database?
A: Adding technical settings to the table
B: Checking the table syntax
C: Saving the table
D: Activating the table
82. Within the ABAP program attributes, Type = 1 represents:
A: INCLUDE program
B: Online program
C: Module pool
D: Function group
E: Subroutine pool
83. If this code results in an error, the remedy is:
SELECT fld1 SUM( fld1 ) FROM tab1 INTO_
A: Remove the spaces from SUM( fld1 ).
B: Move SUM( fld1 ) before fld1.
C: Add GROUP BY f1.
D: Change to SUM( DISTINCT f1 ).
84. Which keyword adds rows to an internal table while accumulating numeric values?
A: INSERT
B: APPEND
C: COLLECT
D: GROUP
85. Assuming itab has a header line, what will be output by the following code?
READ TABLE itab INDEX 3 TRANSPORTING field1.
WRITE: /1 itab-field1, itab-field2.
A: The contents of the third row’s itab-field1.
B: The contents of the third row’s itab-field1 and itab-field2.
C: The contents of the third row’s itab-field2.
D: Nothing.
86. The following code indicates:
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: myparam(10) type C,
Myparam2(10) type N,
SELECTION-SCREEN END OF BLOCK.
A: Draw a box around myparam and myparam2 on the selection screen.
B: Allow myparam and myparam2 to be ready for input during an error dialog.
C: Do not display myparam and myparam2 on the selection screen.
D: Display myparam and myparam2 only if both fields have default values.
87. Which statement will sort the data of an internal table with fields FRUIT, QTY, and PRICE so that it appears as follows?
Apples 12 22.50
Apples 9 18.25
Oranges 15 17.35
Bananas 20 10.20
Bananas 15 6.89
Bananas 5 2.75
A: SORT itab DESCENDING BY QTY PRICE.
B: SORT itab BY PRICE FRUIT.
C: SORT itab.
D: SORT itab BY PRICE DESCENDING.
88. Which keyword adds a line anywhere within an internal table?
A: APPEND
B: MODIFY
C: ADD
D: INSERT
89. To read a single line of an internal table, use the following:
A: LOOP AT itab. _ ENDLOOP.
B: READ itab.
C: SELECT SINGLE * FROM itab.
D: READ TABLE itab.
90. Which Open SQL statement should not be used with cluster databases?
A: UPDATE
B: MODIFY
C: DELETE
D: INSERT
91. To include a field on your screen that is not in the ABAP Dictionary, which include program should contain the data declaration for the field?
A: PBO module include program
B: TOP include program
C: PAI module include program
D: Subroutine include program
92. This flow logic statement is used to make multiple fields open for input after an error or warning message.
A: GROUP
B: FIELD-GROUP
C: CHAIN
D: LOOP AT SCREEN
PERFORM subroutine USING var.
The var field is known as what type of parameter?
A: Formal
B: Actual
C: Static
D: Value
Ещё в САПе очень любят давать таблицам и переменным «неговорящие» названия, но зато придумали
Стандартные темы оформления IDE в SAP GUI не подразумевают тёмной темы, но я предпочитаю использовать именно её.
Здесь можно скачать настройки.
Ссылка на статью о том, как следует, а как не следует программировать (актуальна не только для АВАР). Ну и в продолжение темы вот несколько примеров реализации «шаблонов проектирования» на АВАР/4:
Пара ссылок по функциональным модулям (ФМ), для вывода всплывающих окон в АВАР:
Небольшая программка для импорта/экспорта SAP таблиц в текстовые файлы — мне пару раз пригодилось.
Пример реализации экрана выборки (selection screen) и alv-отчёта в пределах одного экрана.
В целом изложение получилось немного скомканным, но, скажу честно, я не писатель. Ещё раз замечу, практически все ссылки будут интересны исключительно новичкам(я был бы счастлив, если бы нашёл подобную статью в своё время). Те, кто хотя бы полгода уже занимается изучением сабжа, скорее всего, уже нашли весь материал самостоятельно на просторах интернета. Буду рад любым вашим исправлениям/дополнениям в комментариях. Спасибо.
Немного обновлю статью. Нашёл еще один ресурс, выглядит неплохо: sapbrainsonline.com
Ещё ссылки из комментариев:
irvil 6 ноября 2015 в 20:08:
На sapland.ru часто бывают полезные статьи по ABAP. Есть еще русскоязычный форум sapforum.biz.
amok 7 ноября 2015 в 09:38:
Официальная справка обновилась до версии 7.50