Posts

Showing posts from April, 2020

Uploading and Downloading Programs - SAP ABAP(Flat file to Database Table and Vice-Versa)

Image
Uploading Program Uploading programs are used to upload the data from Flat files/Input files into SAP. Step1: Prepare an input file as below to upload into SAP Step2: Write an ABAP Program in SE38 and -> Declare Local Structure ( declared as per the available input file fields ), Internal table and Work area. -> Make use of Function Module: GUI_UPLOAD to upload the data from Input file to Internal table . Example:    CALL FUNCTION  ' GUI_UPLOAD '      EXPORTING       FILENAME             =  L_PATH     " Input File Path       FILETYPE             =  'ASC'       HAS_FIELD_SEPARATOR  =  'X'      TABLES       DATA_TAB             =  IT .        " Internal table to hold the File data    IF  SY - SUBRC <>  0 . * Implement suitable error handling here    ENDIF . Now, the data will be available in Internal table IT. By using Internal Table data, we can do following activities: -> we can upload the Int

Modularization Techniques-Questions and Answers - SAP ABAP

MODULARIZATION Questions and Answers 1. What are Modularization and its benefits? If the program contains the same or similar blocks of statements or it is required to process the same function several times, we can avoid redundancy by using modularization techniques. By modularizing the ABAP/4 programs we make them easy to read and improve their structure. Modularized programs are also easier to maintain and to update. 2. How can we create callable modules of program code within one ABAP/4 Program? A. By defining macros. B. By creating include programs in the library. 3. What are subroutines? Subroutines are program modules which can be called from other ABAP/4 programs or within the same program. 4. What are the types of Subroutines? A. Internal Subroutines: The source code of the internal subroutines will be in the same ABAP/4 program as the calling procedure (internal call). B. External Subroutines: The source code of the external subroutines will be in a