SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Lists (Reports) | Формирование листингов



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Function Modules | Функциональные модули
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Fri Sep 14, 2007 1:54 pm    Post subject: Lists (Reports) | Формирование листингов Reply with quote

PRINT_SELECTIONS - Builds nice ready to print table within Report Id, variant, date/time and selected parameters / selection options.
Receives Report Id (sy-cprog), variant (sy-slset).
Note. Parameter MODE is not used. Returns internal table (parameter INFOTABLE).
Example.
Code:

REPORT ZVVRLPOP.
  TABLES USR01.

  SELECT-OPTIONS: S_USER FOR USR01-BNAME,
                  S_LANGU FOR USR01-LANGU.

  PARAMETER: P_NAME(12) DEFAULT 'Victor',
             P_CITY(12) DEFAULT 'Minsk'.

  DATA: BEGIN OF INFOTAB OCCURS 0,
    FLAG,
    OLENGTH TYPE X,
    LINE LIKE RSVAR-INFOLINE,
  END OF INFOTAB.

*---- 1st ----
  WRITE / '1st: PRINT_SELECTIONS' color col_key.
  CALL FUNCTION 'PRINT_SELECTIONS'
    EXPORTING
      MODE = 1
      RNAME = SY-CPROG
      RVARIANTE = SY-SLSET
    TABLES
      INFOTAB = INFOTAB
    EXCEPTIONS
      OTHERS = 1.

  LOOP AT INFOTAB.
    WRITE: / '=>', INFOTAB-LINE.
  ENDLOOP.

*---- 2nd ----
  WRITE / '2nd: FM_SELECTION_CRITERIA_PRINT' color col_key.
  CALL FUNCTION 'FM_SELECTION_CRITERIA_PRINT'
    EXPORTING
      I_REPORT_NAME = SY-CPROG
    EXCEPTIONS
      OTHERS = 1.

  WRITE / 'End of data.' color col_key.


RS_COVERPAGE_SELECTIONS - Internal use: Generate table for printing cover sheet Called from PRINT_SELECTIONS

FM_SELECTION_CRITERIA_PRINT - Just prints selection criteria for the report (sy-cprog).

GET_PRINT_PARAMETERS - Read, determine, change spool print parameters and archive parameters
Only correct way to modify a print or archive parameter record (see FM documentation).

LIST_FROM_MEMORY - Prepared list import from memory report report01.
...
data listtab like listobject occurs 1.
...
* Either other report
* has exported the list to memory, or
submit report02...
exporting list to memory and return.
call function 'LIST_FROM_MEMORY'
tables listobject = listtab.
* process listtab (see below)

LIST_TO_MEMORY - Exports list of SY-LSIND to memory

LIST_FREE_MEMORY - Refreshes list saved in memory [and listobject table]

WRITE_LIST - Display a (saved) list object
Writes list (e.g. imported from memory), not encapsulated in a CALL SCREEN. Can be used after or before WRITE statement to add list data to the current screen

DISPLAY_LIST - List object display (ABAPLIST)
Displays list (e.g. imported from memory) in full screen or dialog box.

SAVE_LIST - Save list
Saves list of SY-LSIND as internal table

Code:
report z_save_list.
 
data: list like abaplist occurs 0 with header line.
data: begin of listout occurs 0,
      line(1024) type c,
      end of listout.
 
do 100 times.
  write:/ sy-index.
enddo.
 
call function 'SAVE_LIST'
* EXPORTING
*   LIST_INDEX               = '0'
  tables
    listobject               = list
 exceptions
   list_index_invalid       = 1
   others                   = 2
          .
 
call function 'LIST_TO_ASCI'
     tables
          listobject         = list
          listasci           = listout
     exceptions
          empty_list         = 1
          list_index_invalid = 2
          others             = 3.
 
call function 'GUI_DOWNLOAD'
     exporting
          filename = 'C:\Test.txt'
     tables
          data_tab = listout.


LIST_TO_ASCI - Saves list of SY-LSIND as text internal table (without line breaks, icons, colors etc)

LIST_TO_TXT

Code:
REPORT z_list_to_txt.

DATA : BEGIN OF itab OCCURS 0,
              l(100) TYPE c,
END OF itab.

WRITE :/ 'am'.

CALL FUNCTION 'LIST_TO_TXT'
EXPORTING
LIST_INDEX = 0
TABLES
listtxt = itab
* LISTOBJECT =
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3

call function 'GUI_DOWNLOAD'
     exporting
          filename = 'C:\Test.txt'
     tables
          data_tab = itab.
.


LIST_DOWNLOAD - ABAP list download Like List->Save->Local file. METHOD = RTF | DAT | HTML | NOCO(no conversion) | space(selection dialog)

DOWNLOAD_LIST - Download list in ASCI format (called from LIST_DOWNLOAD when METHOD = NOCO)

LIST_DOWNLOAD_HTML - Download list in HTML format (called from LIST_DOWNLOAD when METHOD = HTML)

LIST_SCROLL_LINE_TOPMOST - Scroll List Display: Selected Line Becomes First Line E.g. to place an interactively-selected line (SY-LILLI) directly after the page header:
call function 'LIST_SCROLL_LINE_TOPMOST'
exporting list_line = sy-lilli.
See also SCROLL statement.

LIST_SCAN - Calls standard Find window.

WWW_LIST_TO_HTML - After running a report, call this function to convert the list output to HTML.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Function Modules | Функциональные модули All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.