Sie sind auf Seite 1von 10

IBM Global Services

Presentation Server Files

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Objectives
The participants will be able to:
Describe how local files are processed in an Inbound SAP Interface.
Write an ABAP program that processes a file located on the Presentation Server.

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Overview
In this chapter, we will learn how to process files on a presentation server

Database Server

Application

Servers

Presentation Servers

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Use of an Internal Table


Internal Table
To create a local file, you must transfer the contents of an internal table.

Internal Table
To read a local file, you must read the contents into an internal table.

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Create Local File

GUI_DOWNLOAD function module


CALL FUNCTION GUI_DOWNLOAD EXPORTING FILENAME = <Name of the file>

FILETYPE

= <File Type (ASC or BIN)>

APPEND = <Create new or extend> WRITE_FIELD_SEPARATOR = <separator> IMPORTING FILELENGTH= <Number of bytes transferred> TABLES DATA_TAB EXCEPTIONS. . . . = <internal table to transfer>

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Read Local File

GUI_UPLOAD function module


CALL FUNCTION GUI_UPLOAD EXPORTING

FILENAME = <Name of the file>


FILETYPE IMPORTING FILELENGTH = <File length> TABLES DATA_TAB EXCEPTIONS. . . . = <Transfer table for file data> = <File Type (ASC or BIN)> HAS_FIELD_SEPARATOR<Separator>

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Demonstration
Writing an ABAP program that processes a file located on the Presentation Server.

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Practice
Writing an ABAP program that processes a file located on the Presentation Server.

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Summary
To create a local file you must transfer the contents of an internal table.

To read a local file you must read the contents into an internal table.
You can use the function module GUI_DOWNLOAD to create a local file.

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

IBM Global Services

Questions
What is the function module used to upload file to presentation server?

10

Data Interfaces | 7.03

March-2005

2005 IBM Corporation

Das könnte Ihnen auch gefallen