0% found this document useful (0 votes)
17 views3 pages

Zacdoca Report Extract1 Styled Techspec

The document outlines the technical specifications for the ZACDOCA_REPORT_EXTRACT1 program, designed to extract financial data from the ACDOCA table in SAP S/4HANA and save it as a tab-delimited .TXT file. It details the business requirements, challenges, and solution overview, including functional flows with code snippets for file path selection, data extraction, and file saving. Additionally, it includes testing and validation procedures, assumptions, and notes regarding user authorization and execution conditions.

Uploaded by

Mini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

Zacdoca Report Extract1 Styled Techspec

The document outlines the technical specifications for the ZACDOCA_REPORT_EXTRACT1 program, designed to extract financial data from the ACDOCA table in SAP S/4HANA and save it as a tab-delimited .TXT file. It details the business requirements, challenges, and solution overview, including functional flows with code snippets for file path selection, data extraction, and file saving. Additionally, it includes testing and validation procedures, assumptions, and notes regarding user authorization and execution conditions.

Uploaded by

Mini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Technical Specification

Program: ZACDOCA_REPORT_EXTRACT1

SAP Version: S/4HANA ON PREMISE

Customer: [Client Name]

Prepared By: Shrity Kumari

Date: 04/04/2025
1. Business Requirement
The business requires a utility to extract financial data from the ACDOCA table in SAP. The
extracted data should be saved in a tab-delimited .TXT file format locally on the user's
system. This helps in offline reconciliation, sharing, or audits.

2. Challenge
Ensuring performance and flexibility while querying large volume data from ACDOCA.
Providing a user-friendly interface for path selection and managing header logic based on
append option.

3. Solution Overview
A report program allows selection of key ACDOCA fields via selection-screen, dynamically
creates a file name using system date, and downloads selected records into a TXT file in tab-
delimited format.

4. Functional Flow with Code Snippets

4.1 File Path Help – F4 Logic


AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath.
PERFORM f4_file_path.

Opens frontend save dialog to let user choose local path with default filename based on
current month/year.

4.2 Data Extraction from ACDOCA


SELECT rbukrs, gjahr, belnr, rwcur, racct, rcntr, prctr, rbusa,
tsl, wsl, hsl, drcrk, poper, budat, bldat, blart,
bschl, ktosl, matnr
INTO TABLE @lt_acdoca
FROM acdoca
WHERE rbukrs IN @s_rbukrs
AND belnr IN @s_belnr
AND gjahr IN @s_gjahr
AND budat IN @s_budat
AND poper IN @s_poper
AND blart IN @s_blart.

Fetches records from ACDOCA using user-entered selection-screen filters.

4.3 TXT Data Build Logic


IF p_append IS INITIAL.
CONCATENATE 'Company Code' 'Fiscal Year' 'Document Number' ...
INTO lv_line SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
APPEND lv_line TO lt_txt.
ENDIF.

LOOP AT lt_acdoca INTO wa_acdoca.


CONCATENATE wa_acdoca-rbukrs wa_acdoca-gjahr ... INTO lv_line SEPARATED BY
TAB.
APPEND lv_line TO lt_txt.
ENDLOOP.

Prepares header row if not appending and loops over internal table to build tab-delimited
records.

4.4 File Save to Local System


CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING filename = p_fpath
filetype = 'ASC'
append = p_append
CHANGING data_tab = lt_txt.

Downloads the built internal table to a local .TXT file using SAP GUI frontend service.

5. Tables & Objects Used


• ACDOCA – Source table for universal journal entries
• T247 – Used to get month name for file naming

6. Key Classes / Methods Used


• CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG – File browser for selecting local
path
• CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD – Download file to frontend

7. Testing & Validation


• Check extraction for single/multiple company codes
• Verify file download path and data consistency
• Validate file open in Excel/Notepad
• Check append logic by downloading multiple files

8. Assumptions / Notes
• User has proper authorization to run the program and access local system
• Program must run in SAP GUI (not supported for background execution)
• File download path must be writable

You might also like