Posts

Showing posts with the label file handling

Interview questions for file handling in ABAP.

  1.What is file handling in ABAP. * It is used to transfer the data from non-sap  to sap and sap to sap. 2. What is Dataset and how you use it? *The sequential files (on application server) are called datasets.  * They are used for file handling in SAP. * ABAP/4 provides three statements for handling files - - The OPEN DATASET statement opens a file. - The CLOSE DATASET statement closes a file. - The DELETE DATASET statement deletes a file.

Reading data from a file on application server

Image
  Reading data from a file on application server Code      REPORT  ZAJAY_FILE_APLSER_READ .      TABLES : zajay_zstu .      TYPES :  BEGIN  OF  ty_zstu ,              zst_id  TYPE  string ,              zst_name  TYPE  zajay_zstu - zst_name ,              zst_dept  TYPE  zajay_zstu - zst_dept ,          zst_fee   TYPE  string ,             END  OF  ty_zstu .      DATA :  it_zstu  TYPE  TABLE  OF  ty_zstu ,           wa_zstu  TYPE  ty_zstu .      DATA :  lf_student ( 25 )  TYPE...

Write data to a file on Application server

Image
       * AL11 - T-code for SAP Directories.     Write data to a file on Application server. Code      REPORT  zajay_file_aplser_write .      TABLES : zajay_zstu .      TYPES :  BEGIN  OF  ty_zstu ,              zst_id    TYPE  zajay_zstu - zst_id ,              zst_name  TYPE  zajay_zstu - zst_name ,              zst_dept  TYPE  zajay_zstu - zst_dept ,              zst_fee   TYPE  zajay_zstu - zst_fee ,             END  OF  ty_zstu .      DATA :  it_zstu  TYPE  TABLE  OF  ty_zstu ,     ...

Write data to the file on presentation server

Image
      * Transfer the data into desktop or presentation server.     * Task: I want to see student details in local system not in sap table based on student id.     Code      REPORT  zajay_file_download .      TABLES : zajay_zstu .      TYPES :  BEGIN  OF  ty_zstu ,              zst_id    TYPE  zajay_zstu - zst_id ,              zst_name  TYPE  zajay_zstu - zst_name ,              zst_dept  TYPE  zajay_zstu - zst_dept ,              zst_fee   TYPE  zajay_zstu - zst_fee ,             END  OF  ty_zstu .      data :  it_zs...