Show TOC

Example documentationExample: Implementing EXIT_RSAQEXCE_001 Locate this document in the navigation structure

 

The following is a simple example of how to implement the EXIT_RSAQEXCE_001 function module.

The transferred tables LISTDESC and DATATAB are displayed as a list. The fields FCONT, FCURPOS and FGRAF are not included in the display of the LISTDESC table. This simple example clearly shows how to interpret the individual parameters and how to access the data table.

Syntax Syntax

  1. ***INCLUDE ZXQUEU01.
    
    FIELD-SYMBOLS <F>.
    NEW-PAGE LINE-SIZE 132.
    WRITE: / 'Query', PROGRAM+16(14), 'of
    user group', PROGRAM+4(12).
    ULINE. SKIP 1.
    WRITE: / 'Fields of sublist', LIST_ID.
    ULINE.
    LOOP AT LISTDESC WHERE LID = LIST_ID.
    WRITE:	/ LISTDESC-FDESC,
    	LISTDESC-FNAME,
    	LISTDESC-FPOS,
    	LISTDESC-FTYP,
    	LISTDESC-FLEN,
    	LISTDESC-FDEC,
    	LISTDESC-FOLEN,
    	LISTDESC-FCUR,
    	LISTDESC-FADD.
    	LISTDESC-FCOL.
    ENDLOOP.  
    SKIP 1.
    WRITE: / 'Data table'.
    ULINE.  
    LOOP AT DATATAB.
    	NEW-LINE.  
    	DO.  
    		ASSIGN COMPONENT SY-INDEX OF STRUCTURE DATATAB TO <F>.
    		IF SY-SUBRC <> 0. EXIT. ENDIF.
    		WRITE <F>.
    	ENDDO.  
    ENDLOOP.
    ULINE. 
End of the code.