- 3 ways to do interactive report
- Using hide technique.
- Get cursor .
- SY-LISEL.
HIDE:
- Syntax :
HIDE <f>.
- Stores the contents of variable <f> in relation to the current output line (system field SY-LINNO) internally in the so-called HIDE area. <f> must not necessarily appear on the current line.
- READ LINE: The system internally stores all lists created in succession by one report program. Therefore, you can access any list from within the program that was created during the current dialog session and has not been deleted by returning to a previous list level.
- Syntax :
[FIELD VALUE <f1> [INTO <g1>] ... <fn> [INTO <gn>]]
[OF CURRENT PAGE|OF PAGE <n>].
READ CURRENT LINE
[FIELD VALUE <f1> [INTO <g1>] ... <fn> [INTO <gn>]]
- Stores the contents of line from the list on which the event was triggered (list index SY-LISTI, line number SY-LILLI) in the SY-LISEL system field and fills all HIDE information stored for this line back into the corresponding fields. SY-SUBRC = 0 : Ok; = 4 : line does not exist.
- MODIFY LINE:
- Syntax :
[LINE FORMAT <fmt1> ... <fmtn>] - applied for whole line
[FIELD FORMAT <f1> <fmt11> ... <fmt1m> [... <fn> <fmtn1> ... <fmtnm>]]
[LINE VALUE FROM <wa>]
[FIELD VALUE <f1> [FROM <g1>] [... <fn> [FROM <gn>]]. - <f1> means <f1> FROM <f1>
- Changes the line of the list taking values from SY-LISEL (or from the <wa> or <gn>). Usually after List Events: AT LINE-SELECTION, AT PFxx, AT USER-COMMAND, where the SY-LISEL is filled. Fills HIDE information. SY-SUBRC = 0 : Ok; <> 0 : line was not changed.
GET CURSOR:
- Syntax - 1 :
GET CURSOR FIELD <f> [OFFSET <o>]
[LINE <n>] [VALUE <val>] [LENGTH <l>].
- Transfers the name of the field on which the cursor is positioned during a user action into the variable <f>. If the cursor is on a field, the SY-SUBRC is 0, otherwise 4. The system transports the names of global variables, constants, field symbols, or reference parameters of subroutines. For literals, local fields, and VALUE parameters of subroutines, the system sets SY-SUBRC to 0, but transfers SPACE as the name.
- Syntax - 2.
GET CURSOR LINE <n> [OFFSET <o>]
[VALUE <val>] [LENGTH <l>].
- Transfers the number of the line on which the cursor is positioned during a user action into the variable <n>. If the cursor is on a list line, the SY-SUBRC is 0, otherwise 4.
- <n> contains the number of the list line on which the cursor is positioned (SY-LILLI);
- <val> contains the character string output representation of the field|line on which the cursor is positioned. The representation includes formatting characters.
- <l> contains the output length of the field on which the cursor is positioned.
SET CURSOR:
- Syntax :
SET CURSOR FIELD <f> [OFFSET <o>]
[LINE <n>].
- Set cursor at begin of field <f> (should be in uppercase), or at column <o> (begin is ). In step loop or in list processing (if the field is displayed on several lines) <n> is needed. In list processing <n> means SY-LILLI.
- Syntax-2 :
SET CURSOR LINE <n> [OFFSET <o>].
- In list processing <n> means SY-LILLI.
- Syntax -3 :
SET CURSOR <column> <line>.
- <column> and <line> are absolute position on the current screen.
No comments:
Post a Comment