SAP Reports / Programs

HPLAZSWA SAP ABAP Report - Creating ZUS ZSWA report







HPLAZSWA is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter HPLAZSWA into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT HPLAZSWA. "Basic submit
SUBMIT HPLAZSWA AND RETURN. "Return to original report after report execution complete
SUBMIT HPLAZSWA VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: P_DZSWA = D .
Selection Text: P_YEAR = D .
Selection Text: S_RSA = RSA codes of absences
Title: Creating ZUS ZSWA report
Text Symbol: 001 = ZSWA file was saved.
Text Symbol: 002 = No ZSWA data was found for the specified employees.
Text Symbol: E04 = File write error
Text Symbol: FR0 = ZSWA parameters
Text Symbol: M01 = Messages
Text Symbol: M02 = Message text
Text Symbol: PRG = Personnel numbers processed:
Text Symbol: RSA = Excluded absences from ZSWA file
Text Symbol: S00 = File
Text Symbol: S01 = Download ZSWA file


INCLUDES used within this REPORT HPLAZSWA

INCLUDE PCZUDPL0.


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

WS_ULDL_PATH CALL FUNCTION 'WS_ULDL_PATH' IMPORTING DOWNLOAD_PATH = filepath.

WS_FILENAME_GET CALL FUNCTION 'WS_FILENAME_GET' EXPORTING DEF_FILENAME = filename DEF_PATH = filepath MASK = ',*.*,*.*.'

SAPGUI_PROGRESS_INDICATOR CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING TEXT = buffer.

HR_PL_COMPANY_GET_ID CALL FUNCTION 'HR_PL_COMPANY_GET_ID' EXPORTING company_key = p_ckey IMPORTING payer_id = p_payerid EXCEPTIONS OTHERS = 1.

HR_PL_COMPANY_GET_DETAILS CALL FUNCTION 'HR_PL_COMPANY_GET_DETAILS' EXPORTING COMPANY_KEY = p_ckey MODE = 1 "ZUS mode * TRANS = 0 * NATION_ADDR = * LANGU = 'L' IMPORTING COMPANY_DATA = p_cd EXCEPTIONS COMPANY_NOT_FOUND = 1 OTHERS = 2 .

HR_DISPLAY_ERROR_LIST CALL FUNCTION 'HR_DISPLAY_ERROR_LIST' EXPORTING NO_POPUP = 'X' NO_PRINT = ' ' LINESIZE = 100 LISTHEADER = TEXT-M01 COLHEADER = TEXT-M02 TABLES ERROR = g_run_messages EXCEPTIONS INVALID_LINESIZE = 1 OTHERS = 2.

RP_TS_CREATE_OBJECT CALL FUNCTION 'RP_TS_CREATE_OBJECT' EXPORTING OBJKN = objnm OBJNR = objnr EMPFG = ' ' IMPORTING TSOBJ = dataset_exp EXCEPTIONS OTHERS = 1.

RSTS_WRITE CALL FUNCTION 'RSTS_WRITE' TABLES DATATAB = pt_xml EXCEPTIONS FB_CALL_HANDLE = 1 FB_ERROR = 2 FB_RSTS_NOCONV = 3 FB_RSTS_OTHER = 4 OTHERS = 5.

RSTS_CLOSE CALL FUNCTION 'RSTS_CLOSE' EXCEPTIONS OTHERS = 1.

HR_PL_DOWNLOAD CALL FUNCTION 'HR_PL_DOWNLOAD' EXPORTING FILENAME = lv_fname APPEND = ' ' EXT_CODE_PAGE = 'iso-8859-2' CRLF = 'X' TABLES DATA_TAB = pt_xml EXCEPTIONS FILE_WRITE_ERROR = 1 NO_BATCH = 2 GUI_REFUSE_FILETRANSFER = 3 INVALID_TYPE = 4 NO_AUTHORITY = 5 UNKNOWN_ERROR = 6 HEADER_NOT_ALLOWED = 7 SEPARATOR_NOT_ALLOWED = 8 FILESIZE_NOT_ALLOWED = 9 HEADER_TOO_LONG = 10 DP_ERROR_CREATE = 11 DP_ERROR_SEND = 12 DP_ERROR_WRITE = 13 UNKNOWN_DP_ERROR = 14 ACCESS_DENIED = 15 DP_OUT_OF_MEMORY = 16 DISK_FULL = 17 DP_TIMEOUT = 18 FILE_NOT_FOUND = 19 DATAPROVIDER_EXCEPTION = 20 CONTROL_FLUSH_ERROR = 21 INVALID_FILESIZE = 22 CUSTOMER_ERROR = 23 OTHERS = 24.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name HPLAZSWA or its description.