Upload/Download of Investment Programs 
Use
The system provides an upload/download function for investment programs. You can automatically generate the structure of an SAP R/3 investment program from a sequential file (upload), or create a sequential file from an existing R/3 investment program (download). The ABAP programs for this purpose are
Integration
The upload and download of investment programs or investment program sub-trees is handled by the methods of the ExpenditureProgTree business object (Create for uploads and GetDetail for downloads).
Features
Upload and download provide the following functions:
When one of these two parameters is set, the system automatically sets the controlling area of the parent or predecessor position in the program sub-tree.
For more information, see the system documentation for the Create method of the ExpenditureProgTree business object, and its Parent and Predecessor parameters (transaction: BAPI).

This upload/download function applies only to the structure of an investment program. You cannot transfer plan and budget values using upload/download.
Structure of the Sequential File
The upload function requires the records in the sequential file to have a particular format. This required format is specified by the BAPIPROGSTRUC dictionary structure.
For more information on the individual fields, see the system documentation for the Create method of the ExpenditureProgTree business object, and its ProgTree parameter (transaction: BAPI).
Files for uploading must be ASCII files with tab formatting. Each line of the ASCII file represents a record in the BAPIPROGSTRUC dictionary structure, where each tab is interpreted as a field or column change.
The hierarchy of the investment program being created is clearly determined by both
During this process, similar logic applies as for creating a work breakdown structure using the list option.

The investment program you are creating should have as its highest position the position TOP. Position TOP has two positions, A and B, below it. Position A also has two positions below it, A1 and A2. The sequential file for the upload must contain 5 records, with the following structure:
Record 1: Hierarchy level = 01, remaining fields for TOP
Record 2: Hierarchy level = 02, remaining fields for A
Record 3: Hierarchy level = 03, remaining fields for A.1
Record 4: Hierarchy level = 03, remaining fields for A.2
Record 5: Hierarchy level = 02, remaining fields for B

The download function of the R/3 System creates a sequential file that has records in the correct format. SAP recommends, therefore, that you first generate a download file with test program positions from the SAP R/3 System, before you upload a complete investment program from a non-SAP system. You can use the download file as a reference for the upload structure.
Considerations When Using Microsoftã Excel
If you want to create an upload file in Microsoftã Excel, structure the columns in Microsoft ã Excel according to the structure of BAPIPROGSTRUC. Make sure you use leading zeroes (such as company code 0001). Set Text formatting for the cells. In order to generate the actual upload file, you have to save the Microsoftã Excel worksheet in text format separated by tabs (.TXT). To simplify the process, it is recommended that you also save the file in Microsoft ã Excel format in parallel.
On the other hand, you may need to work with an investment program in Microsoftã Excel that was downloaded as an ASCII file. The important thing to note is that when you open the ASCII file in Microsoft ã Excel, all the columns are transferred in Text format and not in Standard Microsoftã Excel format. The reason is that those purely numerical fields with leading zeroes (such as company code 0001) would otherwise be lost in the transfer.
Server
The sequential file can be on the application server or on a presentation server.
Download Procedure
Simply enter the source investment program and the file name.
Upload Procedure
The upload creates only the program positions in the R/3 System. You need to create the program definition before the upload and enter it when carrying out the upload. In addition, you have to enter the
During the upload, the system creates investment program positions and links them together in a hierarchy. The system is not able to automatically enter
The default values in the program type (which is entered in the program definition) determine the investment measures allowed for the new investment program positions.
The new investment program positions have Created system status . If the program type also requires a user status, the system sets the initial user status.
Special Problem: More than One Top Position
The sequential file for the upload is only allowed to contain one record with LEVEL = 01 as the first record (top position). The upload, in particular, is not able to process more than one record with LEVEL = 01. If you have several top positions with LEVEL = 01, generate a separate sequential file for each of these positions along with all positions below them in the hierarchy. Then start the upload for each of these files one after the other. For a combined upload and download (transporting an investment program between SAP system or clients), create download files following the same pattern. This is done by entering one top position as the point of entry position for each download.
Activities
Start the RAIM_UPLOAD program (for uploading investment programs) and RAIM_DOWNLOAD program (for downloading investment programs) by choosing System ® Services ® Reporting (transaction SA38).