Posts

Showing posts with the label File Handling Techniques

Passing Excel data to Internal Table

Image
  *&---------------------------------------------------------------------* *& Report ZVB_UPLOAD *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT  zvb_upload . TABLES : vbak . TYPES : BEGIN  OF  ty_file ,         vbeln  TYPE  vbak - vbeln ,         auart  TYPE  vbak - auart ,        END  OF  ty_file . DATA : it_file  TYPE  TABLE  OF  ty_file ,      iw_file  TYPE  ty_file . DATA : lv_file  TYPE  rlgrap - filename ,      it_raw   TYPE  truxs_t_text_data . PARAMETERS : p_file  TYPE  ibipparms - path . AT  SELECTION-SCREEN  ON  VALUE-REQUEST  FO...

File Handling Introduction

  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.  To open a file for read access, use the FOR INPUT option of the OPEN DATASET statement  To open a file for write access, use the FOR OUTPUT option of the OPEN DATASET statement  To open a file for appending data to the file, use the FOR APPENDING option of the OPEN DATASET statement  To process a file in binary mode, use the IN BINARY MODE option of the OPEN DATASET statement  To process a file in text mode, use the IN TEXT MODE option of the OPEN DATASET statement  To open a file at a specific position, use the AT POSITION option of the   OPEN DATASET   statement. When you work with the operating systems UNIX or WINDOWS NT, you can send an operating system command with the statement OPEN DATASET. To do so, use the option FILTER. To receive th...

File Handling - Archiving

Image
  Archiving : Moving the data from one folder to another folder and deleting it from the old folder . *&---------------------------------------------------------------------* *& Report ZVB_FH_ARCH *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT  zvb_fh_arch . TABLES : vbap . TYPES :  BEGIN  OF  ty_vbap ,          vbeln ( 10 )  TYPE  c ,          posnr ( 5 )   TYPE  c ,          matnr ( 40 )  TYPE  c ,         END  OF  ty_vbap . DATA : it_vbap  TYPE  TABLE  OF  ty_vbap ,      iw_vbap  TYPE  ty_vbap . DATA : lv_file    TYPE...

Reading Data From Application Layer

Image
 Reading Data From Application Layer: *&---------------------------------------------------------------------* *& Report ZVB_FH_WFILE *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT  zvb_fh_readfile . TABLES : vbap . TYPES :  BEGIN  OF  ty_vbap ,          vbeln ( 10 )  TYPE  c ,          posnr ( 5 )   TYPE  c ,          matnr ( 40 )  TYPE  c ,         END  OF  ty_vbap . DATA : it_vbap  TYPE  TABLE  OF  ty_vbap ,      iw_vbap  TYPE  ty_vbap . DATA : lv_file    TYPE  string  VALUE  '/tmp/SO Item Details.txt...