Date o/p probelm when download into flat file inf110 tcode in fi

hi,
  when im create payment transaction in f110 tcode in fi , and selct the record and down load into flat file
in flat file first line it shows run date same as we given in transaction,but in second line it shows same date as before
but it shows different date example : firstline it shows 12 .10.2008 and second line 12.10.2008 is right o/p.
         but it shows as first line 12.10.2008,and seconde line 6.10.2008. why it show like that.

Hi Ganesh,
As per my understanding you have an issue with the date while downloading it into the Flat file.
It is displaying the incorrect date in the second line in Flat file. 
Are you downloading the data in Notepad or in the Excel sheet?
Can you please elaborate the issue, if it is in Excel sheet then check if it is displaying multiple records for the same date.
Ex :
                    Date                   Records
             12 .10.2008             ad
                                         fg
                                         as
             6.10.2008               we
                                        af
Check if this is the case...
Regards,
Kittu

Similar Messages

  • "Deep data objects not supported" when writing into a file

    Hello everybody,
    I am having some issues about a program that i made which puts the content of any table in a file that i created.
    The problem is when my table (transparent table) has a deep data type in it (example : a string field, so with undefined length).
    Here is my code :
      DATA : lt_gentable TYPE REF TO data.
      DATA : ls_gentable TYPE REF TO data.
      FIELD-SYMBOLS : <ft_lines> TYPE STANDARD TABLE.
      FIELD-SYMBOLS : <fs_line> TYPE ANY.
      CREATE DATA lt_gentable TYPE TABLE OF (p_tab).
      CREATE DATA ls_gentable TYPE (p_tab).
      "creation of links
      ASSIGN ls_gentable->* TO <fs_line>.
      ASSIGN lt_gentable->* TO <ft_lines>.
      DATA : l_fname     TYPE char80.
      CONCATENATE '\dir\dir2\' l_fname_log INTO l_fname.
      OPEN DATASET l_fname FOR OUTPUT IN BINARY MODE.
      OPEN CURSOR WITH HOLD l_c FOR SELECT * FROM (p_tab).
      DO.
        FETCH NEXT CURSOR l_c INTO TABLE <ft_lines> PACKAGE SIZE p_size.
        IF sy-subrc = 0.
          LOOP AT <ft_lines> INTO <fs_line>.
            TRANSFER <fs_line> TO l_fname.   <=====> GOES INTO DUMP BECAUSE MY TABLE (p_tab) has a string field
          ENDLOOP.
          CLEAR <ft_lines>.
        ELSE.
          CLOSE CURSOR l_c.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET l_fname.
    Here is the message i am getting :
    At the statement
       "TRANSFER f TO ..."
    no deep data objects are supported at the a
    for strings.
    Elementary deep data types are internal tabl
    data object) references and strings (STRING,
    General deep data objects are elementary dee
    that contain deep data objects.
    In this particular case, the operand "f" has
    internal identification "v".
      List of internal ABAP types:
      C    Text (Character)
      N    Numerical text
      D    Date (YYYYMMDD)
      T    Time (HHMMSS)
      X    Hexadecimal
      I    Integer
      P    Packed number
      F    Floating point number
      h    Internal table
      r    Object reference
      l    Data reference
      g    String of type C
      y    String of type X
      s    2-byte integer with plus/minus sign
      b    1-byte integer without plus/minus sig
      u    Structure (flat structure)
      v    Structure (deep structure)
    Can you help me to go through this issue ?
    Any kind of help would be appreciated.
    Christian

    Sandra is correct I agree with him,
    TRANSFER dobj TO dset [LENGTH len]
                          [NO END OF LINE].
    dobj must be character-type . Use String.
    Please read the F1 help for the TRANSFER Statement and also please check the example
    In your case assign the <fs> to Casting File asfollows
    DATA: file TYPE string VALUE `flights.dat`,
          wa TYPE spfli.
    FIELD-SYMBOLS TYPE x.
      ASSIGN wa TO CASTING.
      TRANSFER TO file.
    Hope this helps...

  • Downloading into excel file , the is alignment is out

    The  reports when downloading into excel file is not what we usually getting. The alignment is out.

    Hi Basavaraj,
    When you are creating dynamic internal table(itab1) and fields of internal table, at the same time in the same way  create one more internal table(itab2) resrict this up to 10 columns.
    now
    DATA : num type i,
           FNAME(255) TYPE C
               VALUE '/data/sapdata/filename'.
    CONSTANTS : C_COMMA TYPE C VALUE ','.
    DATA : BEGIN OF I_DISPLAY OCCURS 0,
            REC(400),
           END OF I_DISPLAY.
    loop at itab1
    num = num + 1.
      if num le 100.
       move-corresponding fields to itab2
      else.
        exit.
      endif.
    endloop.
      Give column headings
            itab2-col1 =  'name1'
            itab2-col2 =  'name2'
            itab2-col3 =  'name3'
            itab2-col4 =  'name4'
            itab2-col5 =  'name5'
            itab2-col6 =  'name6'
            itab2-col7 =  'name7'
            itab2-col8 =  'name8'
            itab2-col9 =  'name9'
            itab2-col10 =  'name10'
          INSERT itab2 INDEX 1.
          CLEAR itab2.
    loop itab2.
       CONCATENATE
            itab2-col1
            itab2-col2
            itab2-col3
            itab2-col4
            itab2-col5
            itab2-col6
            itab2-col7
            itab2-col8
            itab2-col9
            itab2-col10
               into I_DISPLAY-REC SEPARATED BY C_COMMA.
         APPEND I_DISPLAY.
         CLEAR I_DISPLAY.
      ENDLOOP.
    OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
          LOOP AT I_DISPLAY.
            TRANSFER I_DISPLAY TO  FNAME.
          ENDLOOP.
        CLOSE DATASET FNAME.
    endloop.

  • Import data from Oracle table into flat file

    How to import the data in the oracle table into flat file using UTL File of PL/SQL....
    I am new in PL/SQL..
    can someone help me in writing query?

    Note : Not Tested.
    DECLARE
    V1 VARCHAR2(32767);
    F1 UTL_FILE.FILE_TYPE;
    cursor c1 is select ename,empno from emp;
    r_c1 c1%rowtype;
    BEGIN
    -- In this example MAX_LINESIZE is less than GET_LINE's length request
    -- so the number of bytes returned will be 256 or less if a line terminator is seen.
    open c1;
    F1 := UTL_FILE.FOPEN('MYDIR','MYFILE','W',256);
    loop
    fetch c1 into r_c1;
    v1:= r_c1.ename||''||To_char(r_c1.empno);
    UTL_FILE.PUT_LINE (F1, v1,TRUE);
    v1:= null;
    Exit when c1%not found;
    end loop;
    UTL_FILE.FCLOSE(F1);
    END;
    http://download.oracle.com/docs/cd/B19306_01/appdev.102
    ------------------------------------------------------------------

  • Urgent!!!Need code to fetch all sales order data and download to flat file

    urgent!!!Need code to fetch all sales order data and download to flat file

                  D A T A B A S E  T A B L E S                          *
    TABLES: vbak,                          "Sales Document: Header Data
            VBAP,                          "Sales Document: Item Data
            MARA,VAPMA,VBPA,VBLB,VBEP,
             VBKD.   "Murali Poli                         .
                  I N T E R N A L   T A B L E S                         *
    Internal table to hold the Delphi material numbers file
    DATA: BEGIN OF tbl_matnr OCCURS 0,
            matnr LIKE mara-matnr,         "Material number
          END   OF tbl_matnr.
    Internal table to hold customer cross ref data
    DATA: BEGIN OF TBL_CUST_SA OCCURS 0,
            OLD_KUNNR LIKE KNA1-KUNNR,     "Old Customer
            OLD_VKORG LIKE A004-VKORG,     "Old Sales organisation
            OLD_VTWEG LIKE A004-VTWEG,     "Old Distribution channel
            NEW_KUNNR LIKE KNA1-KUNNR,     "New Customer
            NEW_VKORG LIKE A004-VKORG,     "New Sales organisation
            NEW_VTWEG LIKE A004-VTWEG,     "New Distribution channel
            PARVW LIKE VBPA-PARVW ,         "Partner function
    END   OF TBL_CUST_SA.
    Internal table to check the material numbers of the input file
    DATA: tbl_mara LIKE tbl_matnr OCCURS 0 WITH HEADER LINE.
    Work area to hold the header record
    DATA: BEGIN OF w_sa_header,
             recordtype(1),                "Record type
             schedulingagreement(4),       "SA Type
             contractreference(10),        "Contract Reference
             salesorg(4),                  "Sales Organization
             distrchannel(2),              "Distribution channel
             division(2),                  "Sales division
             PONUMBER(35),                 "Purchase order number"gsbhondave
             soldtoparty(12),              "Sold-to party
             shiptoparty(12),              "Ship-to party
             collectivenumber(10),         "Collective number
             description(40),              "Description
             roundqty(13),                 "Rounding Qty
             pdsi(4),                                           "PDI
             correctiondeliverydate(8),    "Correction Delivery Dt
             correctionqty(13),            "Correction Qty
             cumulativereceivedqty(13),    "Cumulative Received Qty
             forecastdeliveryschedule(17), "Forecast Delivery Schedule
             forecastdelscheddate(8),      "Forecast Delivery Schedule Dt
             jitdeliveryschedule(17),      "JIT Delivery Schedule
             jitdeliveryscheduledate(8),   "JIT Delivery Schedule Dt
             materialnumber(18),           "Material number
             plant(4),                     "Plant
             item_category(4),             "Item Category
             suppliercode(15),             "Supplier code
             scac(4),                      "SCAC
             deloc(12),                    "DELOC
             pkg_id(12),                   "Packaging ID
             catno(30),                    "Ultimate Cust Part
             lgort(4),                     "Storage Location
             vstel(4),                     "Shipping point
    Adding fields by Murali Poli
             VSBED(2),                     "Shipping conditions
             INCO1(3),                     "Incoterms (part 1)
             INCO2(28),                    "Incoterms (part 2)
             ZECN(1),                      "Engineering Change Letter
    End of Adding fields by Murali Poli
           END OF w_sa_header.
    Work area to hold the forecast record
    DATA: BEGIN OF w_sa_forecast,
             recordtype(1),                "Record Type
             dateformat(1),                "Date format
             forecastdate(8),              "Forecast date
             forecastorderqty(13),         "Order Qty
           END OF w_sa_forecast.
    Work area to hold the jit record
    DATA: BEGIN OF w_sa_jit,
             recordtype(1),                "Record Type
             dateformat(1),                "Date format
             jitdate(8),                   "JIT date
             jittime(6),                   "JIT Time
             jitorderqty(13),              "Order Qty
           END OF w_sa_jit.
    Internal table to hold the Extracted data
    DATA: BEGIN OF tbl_record OCCURS 0,
            record_type,
            DATA(400), " changed from 325 to 400
           END OF tbl_record.
    Internal table to capture the errors
    DATA: BEGIN OF tbl_error OCCURS 0,
            error_text(135),
          END   OF tbl_error.
    Internal table to hold the records of VBAP_VAPMA
    DATA: BEGIN OF tbl_vbap_vapma OCCURS 0,
    VBELN LIKE VAPMA-VBELN, "Sales and distribution document number
    POSNR LIKE VAPMA-POSNR,                "Item number
    AUART LIKE VAPMA-AUART,                "SA Type
    VKORG LIKE VAPMA-VKORG,                "Sales Organization
    VTWEG LIKE VAPMA-VTWEG,                "Distribution channel
    SPART LIKE VAPMA-SPART,                "Division
    KUNNR LIKE VAPMA-KUNNR,                "Sold-to
           plavo like vbap-plavo, "PDI
    MATNR LIKE VAPMA-MATNR,                "Material number
    WERKS LIKE VAPMA-WERKS,                "Plant
    TRVOG LIKE VAPMA-TRVOG,                "Transaction group
    VBTYP LIKE VBAK-VBTYP, "SD document category "Murali Poli
    VSBED LIKE VBAK-VSBED, "Shipping conditions   "Murali Poli
    BSTNK LIKE VBAK-BSTNK,  " Purchase order number " gsbhondave
    KTEXT LIKE VBAK-KTEXT,
    VGBEL LIKE VBAP-VGBEL,                 "Reference document no
    ABLFZ LIKE VBAP-ABLFZ,                 "Rounding qty
    PSTYV LIKE VBAP-PSTYV,                 "Item category
    LGORT LIKE VBAP-LGORT,                 "Storage location
    VSTEL LIKE VBAP-VSTEL,                 "Shipping point
    END   OF TBL_VBAP_VAPMA.
    DATA: BEGIN OF TBL_VBAP OCCURS 0,
    VBELN LIKE VAPMA-VBELN,
    POSNR LIKE VAPMA-POSNR,
    VGBEL LIKE VBAP-VGBEL,
    ABLFZ LIKE VBAP-ABLFZ,
    PSTYV LIKE VBAP-PSTYV,
    LGORT LIKE VBAP-LGORT,
    VSTEL LIKE VBAP-VSTEL,
    END   OF TBL_VBAP.
    Adding by Murali Poli
    DATA:BEGIN OF TBL_VBKD OCCURS 0,
          VBELN LIKE  VBKD-VBELN,
          POSNR LIKE  VBKD-POSNR,
          INCO1 LIKE  VBKD-INCO1,
          INCO2 LIKE  VBKD-INCO2,
         END OF TBL_VBKD.
    End by Murali Poli
    Internal table to hold temporarily the records of VBAP_VAPMA
    DATA: tbl_vbap_vapma_temp LIKE tbl_vbap_vapma OCCURS 0 WITH HEADER LINE.
    Internal table to hold the records of VBPA
    DATA: BEGIN OF tbl_vbpa OCCURS 0,
            vbeln LIKE vbpa-vbeln,         "Sales and distribution
                                           "document number
            posnr LIKE vbpa-posnr,         "Item number
            parvw LIKE vbpa-parvw,         "SP Partner type
            kunnr LIKE vbpa-kunnr,         "Customer number
            lifnr LIKE vbpa-lifnr,         "SCAC code     "DN3K923909
          END   OF tbl_vbpa.
    Internal table to hold the records of VBLB (Forecast)
    DATA: BEGIN OF tbl_vblb_forecast OCCURS 0,
            vbeln  LIKE vblb-vbeln,
            posnr  LIKE vblb-posnr,
            abart  LIKE vblb-abart,        "Release type
            abefz  LIKE vblb-abefz,        "Cumulative Quantity
                                           "Received by Customer
            labnk  LIKE vblb-labnk,        "Delivery schedule
            abrdt  LIKE vblb-abrdt,        "Deivery date
            gjkun LIKE vblb-gjkun,         "Current fiscal year
            vjkun LIKE vblb-vjkun,         "Previous fiscal year
          END   OF tbl_vblb_forecast.
    Internal table to hold the records of VBLB (JIT)
    DATA: BEGIN OF tbl_vblb_jit OCCURS 0,
            vbeln  LIKE vblb-vbeln,
            posnr  LIKE vblb-posnr,
            abart  LIKE vblb-abart,        "Release type
            abefz  LIKE vblb-abefz,        "Cumulative Quantity
                                           "Received by Customer
            labnk  LIKE vblb-labnk,        "Delivery schedule
            abrdt  LIKE vblb-abrdt,        "Deivery date
            gjkun LIKE vblb-gjkun,         "Current fiscal year
            vjkun LIKE vblb-vjkun,         "Previous fiscal year
          END   OF tbl_vblb_jit.
    Internal table to hold the Forecast Schedule lines
    DATA: BEGIN OF tbl_vbep_forecast OCCURS 0,
           vbeln LIKE vbep-vbeln,          "Sales document
           posnr LIKE vbep-posnr,          "Item number
           etenr LIKE vbep-etenr,          "Schedule line
           edatu LIKE vbep-edatu,          "Schedule line date
           ezeit LIKE vbep-ezeit,          "Arrival time       "DN3K923909
           wmeng LIKE vbep-wmeng,          "Order quantity in sales units
           prgrs LIKE vbep-prgrs, "Date type (day, week, month, interval)
           abart LIKE vbep-abart,          "Release type       "DN3K923909
          END   OF tbl_vbep_forecast.
    Internal table to hold the JIT Schedule lines
    DATA: BEGIN OF tbl_vbep_jit OCCURS 0,
           vbeln LIKE vbep-vbeln,          "Sales document
           posnr LIKE vbep-posnr,          "Item number
           etenr LIKE vbep-etenr,          "Schedule line
           edatu LIKE vbep-edatu,          "Schedule line date
           ezeit LIKE vbep-ezeit,          "Arrival time
           wmeng LIKE vbep-wmeng,          "Order quantity in sales units
           prgrs LIKE vbep-prgrs, "Date type (day, week, month, interval)
           abart LIKE vbep-abart,          "Release type      "DN3K923909
          END   OF tbl_vbep_jit.
    Internal table for Long texts
    DATA: tbl_tline  LIKE tline OCCURS 0 WITH HEADER LINE.
                    V A R I A B L E S                                   *
    DATA: v_count               TYPE i,
          V_REPID               LIKE SY-REPID,
          w_eins                LIKE vbap-umvkz VALUE 1,
          v_cumulative_deli_qty LIKE vblb-abefz,
          v_text_name           LIKE thead-tdname,
          v_week                LIKE scal-week,
          v_count_h             TYPE i,    "Count of header records
          v_count_f             TYPE i,    "Count of Forecast records
          v_count_j             TYPE i,    "Count of JIT records
          v_count_t             TYPE i.    "Count of Shipping instructions
    TYPES: unixfile LIKE rlgrap-filename,
           unixdir LIKE rlgrap-filename.
    DATA: v_file1 TYPE unixfile,
          v_file2 TYPE unixfile.
    DATA: tbl_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE.
    *data  tbl_cust_sa.
          S E L E C T - O P T I O N S / P A R A M E T E R S             *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
             Valid-to date
    PARAMETER:
              p_gueen like vbak-gueen obligatory,
             Correction Delivery date
               P_DELDT LIKE VBAK-GUEEN OBLIGATORY.
    Begin of Changes - TIR-40266
                  Plant
    SELECT-OPTIONS: s_werks FOR vbap-werks.
    *SD document category
    SELECT-OPTIONS: S_VBTYP FOR VBAK-VBTYP OBLIGATORY." Murali Poli
             Sales organization
    SELECT-OPTIONS: S_VKORG FOR VBAK-VKORG OBLIGATORY.
    End   of Changes - TIR-40266
    SELECTION-SCREEN SKIP 1.
    PARAMETER:      r1  RADIOBUTTON GROUP rg1.
             Material numbers file
    PARAMETER: P_FILE1 LIKE RLGRAP-FILENAME.
    PARAMETER: P_FILE6 LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT  1(32) text-003.
    SELECTION-SCREEN POSITION 33.
             SD SA Extract file
    PARAMETER: P_FILE2 LIKE RLGRAP-FILENAME
      DEFAULT 'C:\sd_sa_extract.txt'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 2.
    PARAMETER:      r2  RADIOBUTTON GROUP rg1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT  1(32) text-004.
    SELECTION-SCREEN POSITION 33.
    PARAMETER: p_path1 TYPE unixdir OBLIGATORY DEFAULT '/tmp/'.
    SELECTION-SCREEN END OF LINE.
             Material numbers file
    PARAMETER: PU_FILE1 LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT  1(32) text-003.
    SELECTION-SCREEN POSITION 33.
             SD SA Extract file
    PARAMETER: PU_FILE2 LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT  1(64) text-005.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END   OF BLOCK b1.
            A T  S E L E C T I O N   S C R E E N   E V E N T S          *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
      v_repid = syst-repid.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                program_name  = v_repid
           CHANGING
                file_name     = p_file1
           EXCEPTIONS
                mask_too_long = 1
                OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE e009.
      Message shown as 'Error while getting the file name'
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE6.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                program_name  = v_repid
           CHANGING
                FILE_NAME     = P_FILE6
           EXCEPTIONS
                mask_too_long = 1
                OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE e009.
      Message shown as 'Error while getting the file name'
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file2.
      v_repid = syst-repid.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                program_name  = v_repid
           CHANGING
                file_name     = p_file2
           EXCEPTIONS
                mask_too_long = 1
                OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE e009.
      Message shown as 'Error while getting the file name'
      ENDIF.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP rg1.
      IF r1 = 'X'.
        IF  p_file1 = '' OR p_file2 = ''.
          MESSAGE w000 WITH 'Please select a PC file'.
        ENDIF.
        LOOP AT SCREEN.
          IF screen-name = 'P_FILE1' OR
             screen-name = 'P_FILE2'.
            screen-input = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF r2 = 'X'.
        PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
        PERFORM get_value USING 'PU_FILE1' CHANGING pu_file1.
        PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
        PERFORM get_value USING 'PU_FILE2' CHANGING pu_file2.
        IF  pu_file1 = '' OR pu_file2 = ''.
          MESSAGE w000 WITH 'Please select a UNIX file'.
          LOOP AT SCREEN.
            IF screen-name = 'PU_FILE1' OR
               screen-name = 'PU_FILE2'.
              screen-input = '1'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pu_file1.
      PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
      PERFORM get_value USING 'PU_FILE1' CHANGING pu_file1.
      PERFORM popup_unix_filename CHANGING p_path1 pu_file1.
      PERFORM set_value USING 'P_PATH1' p_path1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pu_file2.
      PERFORM get_value USING 'P_PATH1' CHANGING p_path1.
      PERFORM get_value USING 'PU_FILE2' CHANGING pu_file2.
      PERFORM popup_unix_filename CHANGING p_path1 pu_file2.
      PERFORM set_value USING 'P_PATH1' p_path1.
                     T O P - O F - P A G E                              *
    TOP-OF-PAGE.
    PERFORM delphi_header(z_delphi_header_footer)
         USING
         'E & S SD SCHEDULING AGREEMENTS EXTRACT DATA'(016)
          space
          sy-linsz.
               S T A R T - O F  - S E L E C T I O N                     *
    START-OF-SELECTION.
      IF r1 = 'X'.
        PERFORM upload_data_from_pc_files.
      ELSEIF r2 = 'X'.
        PERFORM upload_data_from_unix_files.
      ENDIF.
      PERFORM check_input_data.
      PERFORM get_sd_sa_data.
                   E N D - O F - S E L E C T I O N                      *
    END-OF-SELECTION.
      PERFORM process_data.
                        S U B - R O U T I N E S                          *
    *&      Form  get_value
    FORM get_value USING value(p_fieldname)
                CHANGING value(p_fieldvalue).
      IF v_repid IS INITIAL.
        v_repid = syst-repid.
      ENDIF.
      REFRESH: tbl_dynpfields.
      CLEAR: tbl_dynpfields.
      tbl_dynpfields-fieldname = p_fieldname.
      APPEND tbl_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname               = v_repid
                dynumb               = '1000'
           TABLES
                dynpfields           = tbl_dynpfields
           EXCEPTIONS
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                OTHERS               = 11.
      IF syst-subrc = 0.
        READ TABLE tbl_dynpfields INDEX 1.
        p_fieldvalue = tbl_dynpfields-fieldvalue.
      ENDIF.
      REFRESH: tbl_dynpfields.
    ENDFORM.                               " get_value
          FORM POPUP_UNIX_FILENAME                                      *
    Pops up dialog box to explore the unix filesystem and select a file *
    -->  VALUE(P_PATH)      Path where to start exploring from         *
    -->  VALUE(P_FILENAME)  Default filename in the dialog box         *
    FORM popup_unix_filename CHANGING value(p_path) TYPE unixdir
                                      value(p_filename) TYPE unixfile.
    DATA: v_length TYPE i,
           v_filename TYPE unixfile,
           v_directory LIKE draw-filep,
           v_file LIKE draw-filep.
    IF p_filename(1) = '/'  OR
        p_path IS INITIAL.
       v_filename = p_filename.
    ELSE.
       v_length = strlen( p_path ) - 1.
       IF p_path+v_length(1) <> '/'.
         CONCATENATE p_path '/' INTO p_path.
       ENDIF.
       CONCATENATE p_path p_filename INTO v_filename.
    ENDIF.
    CALL FUNCTION 'Z_UNIX_FILENAME_GET'
          EXPORTING
               def_filename     = v_filename
               mask             = ',*.'
               mode             = 'G'
               title            = 'Get UNIX file...'
          IMPORTING
               filename         = v_filename
          EXCEPTIONS
               inv_winsys       = 1
               no_batch         = 2
               selection_cancel = 3
               selection_error  = 4
               OTHERS           = 5.
    CHECK syst-subrc = 0.
    CALL FUNCTION 'CV120_SPLIT_PATH'
          EXPORTING
               pf_path  = v_filename
          IMPORTING
               pfx_path = v_directory
               pfx_file = v_file
          EXCEPTIONS
               OTHERS   = 1.
    CHECK syst-subrc = 0.
    IF v_directory = p_path.
       p_filename = v_file.
    ELSE.
       p_filename = v_filename.
    ENDIF.
    ENDFORM.
          FORM SET_VALUE                                                *
    Sets the value of a field on the selection screen.                  *
    -->  VALUE(P_FIELDNAME)   Name of the field on the selection screen*
    -->  VALUE(P_FIELDVALUE)  Value of the field                       *
    FORM set_value USING value(p_fieldname)
                         value(p_fieldvalue).
      IF v_repid IS INITIAL.
        v_repid = syst-repid.
      ENDIF.
      CLEAR: tbl_dynpfields.
      tbl_dynpfields-fieldname = p_fieldname.
      tbl_dynpfields-fieldvalue = p_fieldvalue.
      APPEND tbl_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
           EXPORTING
                dyname               = v_repid
                dynumb               = '1000'
           TABLES
                dynpfields           = tbl_dynpfields
           EXCEPTIONS
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                undefind_error       = 7
                OTHERS               = 8.
    ENDFORM.
    *&      Form  upload_data_from_pc_files
    This subroutine is used to upload the data from input files
    FORM upload_data_from_pc_files.
      REFRESH: tbl_matnr.
      CLEAR:   tbl_matnr.
    Upload the data from Delphi Materials file
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = p_file1
                filetype                = 'DAT'
           TABLES
                data_tab                = tbl_matnr
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
        MESSAGE e008 WITH 'Materials file'.
      Message shown as "Error while reading Materials file"
      ENDIF.
      IF sy-subrc = 0 AND tbl_matnr[] IS INITIAL.
        MESSAGE e013 WITH 'Materials'.
      Message shown as "No records found in Materials file"
      ENDIF.
      DELETE tbl_matnr WHERE matnr = ''.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                FILENAME                = P_FILE6
                filetype                = 'DAT'
           TABLES
                DATA_TAB                = TBL_CUST_SA
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
        MESSAGE E008 WITH 'Customer/Sales Area Cross Reference file'.
      Message shown as "Error while reading Materials file"
      ENDIF.
    ENDFORM.                               " upload_data_from_pc_files
    *&      Form  upload_data_from_unix_files
    This subroutine is used to upload the data from UNIX files
    FORM upload_data_from_unix_files.
      REFRESH: tbl_matnr.
      CLEAR:   tbl_matnr.
    Get the complete filename for the Materials file
      PERFORM get_full_filename USING pu_file1 CHANGING v_file1.
    Open the Materials file
      PERFORM open_dataset USING v_file1 'I' 'T' 1.
      CHECK syst-subrc = 0.
    Read the materials file
      DO.
        READ DATASET v_file1 INTO tbl_matnr.
        IF syst-subrc <> 0.
          EXIT.
        ENDIF.
    Populate the read data into the internal table
        APPEND tbl_matnr.
      ENDDO.
      PERFORM close_dataset USING v_file1.
    ENDFORM.                               " upload_data_from_unix_files
          FORM GET_FULL_FILENAME                                        *
    Uses the logical path if necessary to get the full filename         *
    If the filename already has a directory specified, that itself will *
      be the full filename                                              *
    Else the logical path for Conversions will be prefixed to the given *
      filename                                                          *
    FORM get_full_filename USING value(p_file) TYPE unixfile
                        CHANGING value(p_fullfile) TYPE unixfile.
      DATA: v_length TYPE i.
    IF p_file(1) = '/'  OR
        p_path1 IS INITIAL.
       p_fullfile = p_file.
    ELSE.
       v_length = strlen( p_path1 ) - 1.
       IF p_path1+v_length(1) = '/'.
         CONCATENATE p_path1 p_file INTO p_fullfile.
       ELSE.
         CONCATENATE p_path1 '/' p_file INTO p_fullfile.
       ENDIF.
    ENDIF.
    ENDFORM.
          FORM OPEN_DATASET                                             *
    Opens dataset in the specified mode                                 *
    -->  VALUE(P_FILE)    Name of file to be opened                    *
    -->  VALUE(P_IOMODE)  'I' for Input / 'O' for Output               *
    -->  VALUE(P_BTMODE)  'T' for Text / 'B' for Binary                *
    -->  VALUE(P_LEVEL)   If set to > 1, will write error message to   *
                           list Else will supress the error message but *
                           will be available in SYST-MSGV1              *
    FORM open_dataset USING value(p_file) TYPE unixfile
                            value(p_iomode) TYPE c
                            value(p_btmode) TYPE c
                            value(p_level) TYPE i.
      DATA: v_rc LIKE syst-subrc,
            v_msg(100),
            v_listmsg(100).
      IF p_iomode = 'O'.
        IF p_btmode = 'B'.
          OPEN DATASET p_file FOR OUTPUT IN BINARY MODE MESSAGE v_msg.
        ELSE.
          OPEN DATASET p_file FOR OUTPUT IN TEXT MODE MESSAGE v_msg.
        ENDIF.
      ELSE.
        IF p_btmode = 'B'.
          OPEN DATASET p_file FOR INPUT IN BINARY MODE MESSAGE v_msg.
        ELSE.
          OPEN DATASET p_file FOR INPUT IN TEXT MODE MESSAGE v_msg.
        ENDIF.
      ENDIF.
      IF syst-subrc <> 0.
        v_rc = syst-subrc.
        syst-msgv1 = v_msg.
        IF p_level > 0.
          CONCATENATE 'Unable to open' p_file
                 INTO v_listmsg
            SEPARATED BY space.
          IF p_iomode = 'O'.
            CONCATENATE v_listmsg 'for Output'
                   INTO v_listmsg
              SEPARATED BY space.
          ELSE.
            CONCATENATE v_listmsg 'for Input'
                   INTO v_listmsg
              SEPARATED BY space.
          ENDIF.
          IF p_iomode = 'B'.
            CONCATENATE v_listmsg 'in Binary mode'
                   INTO v_listmsg
              SEPARATED BY space.
          ELSE.
            CONCATENATE v_listmsg 'in Text mode'
                   INTO v_listmsg
              SEPARATED BY space.
          ENDIF.
          WRITE: / v_listmsg.
          WRITE: /3 '--', v_msg.
          syst-subrc = v_rc.
        ENDIF.
      ENDIF.
    ENDFORM.
          FORM CLOSE_DATASET                                            *
    Closes dataset                                                      *
    -->  VALUE(P_FILE)  Name of the file to be closed                  *
    FORM close_dataset USING value(p_file) TYPE unixfile.
      CLOSE DATASET p_file.
    ENDFORM.
    *&      Form  check_input_data
    This subroutine is used to check the data from X Ref files
    FORM check_input_data.
      DESCRIBE TABLE tbl_matnr LINES v_count.
    Use the material conversion routine to pad the material numbers
    with zeroes
      LOOP AT tbl_matnr.
        CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
             EXPORTING
                  input        = tbl_matnr-matnr
             IMPORTING
                  output       = tbl_matnr-matnr
             EXCEPTIONS
                  length_error = 1
                  OTHERS       = 2.
        TRANSLATE tbl_matnr-matnr TO UPPER CASE.
        MODIFY tbl_matnr.
      ENDLOOP.
    Get the materials from SAP database using the input materials
      IF NOT tbl_matnr[] IS INITIAL.
        SORT tbl_matnr BY matnr.
        SELECT matnr FROM mara
          INTO TABLE tbl_mara
           FOR ALL ENTRIES IN tbl_matnr
         WHERE matnr = tbl_matnr-matnr.
        SORT tbl_mara BY matnr.
      ENDIF.
    Check the existence of input materials in SAP database
      LOOP AT tbl_matnr.
        READ TABLE tbl_mara WITH KEY matnr = tbl_matnr-matnr
             BINARY SEARCH.
        IF sy-subrc <> 0.
          CONCATENATE 'Material' tbl_matnr-matnr 'does not exist'
                 INTO tbl_error-error_text
            SEPARATED BY space.
          APPEND tbl_error.
          CLEAR  tbl_error.
          DELETE tbl_matnr.
        ENDIF.
      ENDLOOP.
    ENDFORM.                               " check_input_data
    *&      Form  get_sd_sa_data
    This subroutine is used to get the SD Scheduling data from database
    FORM get_sd_sa_data.
    *begin of changes - DN3K923909
      DATA: tbl_vbep LIKE tbl_vbep_forecast OCCURS 0 WITH HEADER LINE,
            tbl_vblb LIKE tbl_vblb_forecast OCCURS 0 WITH HEADER LINE.
    *end of changes - ND3K923909
      REFRESH: tbl_vbap_vapma, tbl_vbpa, tbl_vblb_forecast,
               tbl_vblb_jit, tbl_vbep_forecast, tbl_vbep_jit.
      CLEAR:   tbl_vbap_vapma, tbl_vbpa, tbl_vblb_forecast,
               tbl_vblb_jit, tbl_vbep_forecast, tbl_vbep_jit.
    Get the Scheduling Agreements
      SELECT avbeln aposnr
           a~vgbel
             AAUART avkorg avtweg aspart a~kunnr
            a~ablfz
             A~MATNR
           a~pstyv
             a~werks
           a~lgort
            a~vstel
              ATRVOG BVBTYP BVSBED  BBSTNK B~KTEXT
        FROM VAPMA AS A INNER JOIN VBAK AS B
          ON bvbeln = avbeln
        INTO TABLE tbl_vbap_vapma
         FOR ALL ENTRIES IN tbl_mara
       WHERE a~matnr = tbl_mara-matnr
    Begin of Changes - TIR-40266
         AND a~vkorg IN s_vkorg
         AND a~werks IN s_werks
    End of Changes - TIR-40266
         AND A~TRVOG = '3'
         AND B~VBTYP IN S_VBTYP.           "Murali Poli
        and a~abgru = ''
        and b~gueen >= p_gueen.
      SORT tbl_vbap_vapma BY vbeln posnr.
      IF NOT tbl_vbap_vapma[] IS INITIAL.
        SELECT VBELN POSNR VGBEL ABLFZ PSTYV LGORT VSTEL FROM VBAP
         INTO TABLE  TBL_VBAP FOR ALL ENTRIES IN TBL_VBAP_VAPMA
           WHERE VBELN = TBL_VBAP_VAPMA-VBELN
            AND POSNR = TBL_VBAP_VAPMA-POSNR.
        LOOP AT TBL_VBAP_VAPMA.
          READ TABLE TBL_VBAP WITH KEY VBELN = TBL_VBAP_VAPMA-VBELN
                                       POSNR = TBL_VBAP_VAPMA-POSNR.
          IF SY-SUBRC = 0 .
            TBL_VBAP_VAPMA-VBELN  = TBL_VBAP-VBELN.
            TBL_VBAP_VAPMA-POSNR  = TBL_VBAP-POSNR.
            TBL_VBAP_VAPMA-VGBEL  = TBL_VBAP-VGBEL.
            TBL_VBAP_VAPMA-ABLFZ  = TBL_VBAP-ABLFZ.
            TBL_VBAP_VAPMA-PSTYV  = TBL_VBAP-PSTYV.
            TBL_VBAP_VAPMA-LGORT  = TBL_VBAP-LGORT.
            TBL_VBAP_VAPMA-VSTEL  = TBL_VBAP-VSTEL.
            MODIFY TBL_VBAP_VAPMA .
          ENDIF.
        ENDLOOP.
        tbl_vbap_vapma_temp[] = tbl_vbap_vapma[].
    *--Begin of UnCommentDIR-51476-DN3K932648
    -------------- Begin of Comment -----------  CCR-50124  DN3K928457
        SORT tbl_vbap_vapma_temp BY vbeln.
        DELETE ADJACENT DUPLICATES FROM tbl_vbap_vapma COMPARING vbeln.
    -------------- End of Comment -----------  CCR-50124  DN3K928457
    *--End of UnCommentDIR-51476-DN3K932648
    *--Begin of CommentDIR-51476-DN3K932648
    -------------- Begin of Insert -----------  CCR-50124  DN3K928457
    Duplicate Line Items are being deleted.
       SORT tbl_vbap_vapma BY vbeln posnr.
    DELETE ADJACENT DUPLICATES FROM tbl_vbap_vapma COMPARING vbeln posnr.
    The field for contract in SA is being modified for uniqueness
       loop at tbl_vbap_vapma.
         clear: v_vgbel, v_posnr.
         v_vgbel = tbl_vbap_vapma-vgbel.
         v_posnr = tbl_vbap_vapma-posnr.
         if not v_vgbel is initial .
           shift v_vgbel left deleting leading v_zero.
           shift v_posnr left deleting leading v_zero.
           v_posnr = v_posnr / 10.
           condense: v_vgbel, v_posnr.
           if v_posnr le 9.
             concatenate v_vgbel '0' v_posnr into v_vgbel.
           else.
             concatenate v_vgbel v_posnr into v_vgbel.
           endif.
         endif.
         tbl_vbap_vapma-vgbel = v_vgbel.
         modify tbl_vbap_vapma.
       endloop.
    -------------- End of Insert -----------  CCR-50124  DN3K928457
    *--End of CommentDIR-51476-DN3K932648
    Get the Partner details
       select vbeln posnr parvw kunnr
    *Start of Murali Poli
        SELECT VBELN POSNR INCO1 INCO2
               INTO TABLE TBL_VBKD
               FROM VBKD
               FOR ALL ENTRIES IN TBL_VBAP_VAPMA
               WHERE VBELN = TBL_VBAP_VAPMA-VBELN.
              and posnr  = tbl_vbap_vapma-posnr.
    *End of Murali Poli
        SELECT vbeln posnr parvw kunnr lifnr                    "DN3K923909
          INTO TABLE tbl_vbpa
          FROM vbpa
           FOR ALL ENTRIES IN tbl_vbap_vapma_temp
         WHERE vbeln = tbl_vbap_vapma_temp-vbeln
           AND parvw IN ('WE', 'SP').
    *begin of changes - DN3K923909
       select vbeln posnr abart abefz labnk abrdt gjkun vjkun
         into table tbl_vblb_forecast
         from vblb
          for all entries in tbl_vbap_vapma
        where vbeln = tbl_vbap_vapma-vbeln
          and posnr = tbl_vbap_vapma-posnr
          and abrli = '0000'
          and abart = '1'.
        SELECT vbeln posnr abart abefz labnk abrdt gjkun vjkun
          INTO TABLE tbl_vblb
          FROM vblb
           FOR ALL ENTRIES IN tbl_vbap_vapma
         WHERE vbeln = tbl_vbap_vapma-vbeln
           AND posnr = tbl_vbap_vapma-posnr
           AND abrli = '0000'
           AND abart IN ('1','2').
        SELECT vbeln posnr etenr edatu ezeit wmeng prgrs abart
          INTO TABLE tbl_vbep
          FROM vbep
           FOR ALL ENTRIES IN tbl_vbap_vapma
         WHERE vbeln = tbl_vbap_vapma-vbeln
           AND posnr = tbl_vbap_vapma-posnr
           AND abart IN ('1','2').
    Get the current Forecast delivery schedule
        tbl_vblb_forecast[] = tbl_vblb[].
        DELETE tbl_vblb_forecast WHERE abart = '2'.
    Get the current Forecast Schedule lines
        tbl_vbep_forecast[] = tbl_vbep[].
        DELETE tbl_vbep_forecast WHERE abart = '2'.
    Get the current JIT delivery Schedule
       select vbeln posnr abart abefz labnk abrdt gjkun vjkun
         into table tbl_vblb_jit
         from vblb
          for all entries in tbl_vbap_vapma
        where vbeln = tbl_vbap_vapma-vbeln
          and posnr = tbl_vbap_vapma-posnr

  • Transfer data from Result Set (Execute SQL Task) into Flat File

    Hi to all,
    My problem is this:
     -) I have a stored procedure which use a temporary table in join with another "real" table in select statement. In particular the stored procedure look like this:
    create table #tmp
    col1 varchar(20),
    col2 varchar(50)
    --PUT SOME VALUE IN #TMP
    insert into #tmp
    values ('abc','xyz')
    --SELECT SOME VALUE
    select rt.*
    from realTable rt, #tmp
    where rt.col1 = #tmp.col1
    -) I cannot modify the stored procedure because I'm not admin of database.
    -) I HAVE THE REQUIREMENT OF TRANSFER DATA OF SELECT STATEMENT OF SOTRED PROCEDURE INTO FLAT FILE
    -) THE PROBLEM is that if I use an OLEDB source Task within a Data Flow Task I'm not be able of mapping column from OLEDB source to flat file destination. The reason for this, is that in the "Column page" of OLEDB source task, SSIS do not retrieves
    any column when we using a temporary table. The reason for this, is that SSIS is not be able to retrieve metadata related to temporary table. 
    -) One possible solution to this problem is to use an Execute SQL Task to invoke the stored procedure, store the result returned from stored procedure in a Result Set through a Object type user variable.
    -) The problem now is: How to transfer data from result set to flat file?
    -) Reading here on this forum the solution look be like to use a Script task to transfer data from result set to flat file.
    QUESTIONS: How to transfer data from result set to flat file using a script task?? (I'm not an expert of vb .net) Is it really possible?? P.S.: The number of row returned of stored procedure is very high!
    thanks in advance.

    Hi  Visakh16<abbr
    class="affil"></abbr>
    thanks for the response.
    Your is a good Idea, but I do not have permission to use DDL statement on the database in production environment.

  • Can not see Preveiws when downloading into Lightroom 3

    In downloading photos from my CanonEOS60 into Lightroom 3 I am getting "Preveiw unavailable for this file" help.

    Hi Jim, I have had Lightroom 3 since it came out and have always used raw and had a full preview of all the photos held in the camera, this is what I can,t understand.
    Original message----
    From : [email protected]
    Date : 07/01/2015 - 15:16 (GMTST)
    To : [email protected]
    Subject :  Can not see Preveiws when downloading into Lightroom 3
        Can not see Preveiws when downloading into Lightroom 3
        created by JimHess in Photoshop Lightroom - View the full discussion
    Are these raw images or JPEG images? If they are raw images are you using the sRaw feature? I don't know if your model has that option. Just looking for possibilities.
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7073758#7073758 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7073758#7073758
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Photoshop Lightroom by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Insert into Flat File with no data

    Hello,
    One of my client is encountering a problem in loading data from oracle table to a Flat File.
    We are using a IKM SQL to File.
    A staging area different from Target and defined on the source Logical Schema.
    and options Genreate Header and Insert rows.
    The problem is :
    At the end of the interface execution, which finish without error we see in the file, the header correctly generated which let me think that there's no permission problem with the file.
    But there is no records...
    And I don't know why ???
    There is the .bad and .error files but they are empty.
    The file datastore seems to be well declared with the good delimiters....
    We are using the Sunopsis Driver File :
    com.sunopsis.jdbc.driver.FileDriver
    jdbc:snps:file
    Cause the file are not accepted with the new one ...
    Note that all our interfaces which are reading flat file work fine.
    But there's no one writting in which work.
    If somebody ever had this problem, or just have an idea about this let me know please.
    Cordially,
    BM

    "Bonjour",
    I usually use the snpsoutfile API to unload data into flat file.
    It's not the exact solution at your question, but i's a technical solution.

  • Exporting R3 tables into Flat Files for BPC

    Dear BPC experts,
    I understand currently the way for BPC to extract data from R3 is via flat files. I have the following queries:
    1) What exactly are the T codes and steps required to export R3 tables into flat files (without going through the OpenHub in BI7)? Can this process be automated?
    2) Is Data Manager of BPC equivalent to SSIS (Integration Services) of SQL Server?
    Please advise. Thanks!!
    SJ

    Hi Soong Jeng,
    I would take a look at the existing BI Extractors for the answer to Q1, I am working on finishing up a HTG regarding this. Look for it very soon.
    Here is the code to dump out data from a BI Extractor directly from ERP.
    You need dev permissions in your ERP system and access to an app server folder. ...Good Luck
    *& Report  Z_EXTRACTOR_TO_FILE                                         *
    report  z_extractor_to_file                     .
    type-pools:
      rsaot.
    parameters:
      p_osrce type roosource-oltpsource,
      p_filnm type rlgrap-filename,
      p_maxsz type rsiodynp4-maxsize default 100,
      p_maxfc type rsiodynp4-calls default 10,
      p_updmd type rsiodynp4-updmode default 'F'.
    data:
      l_lines_read type sy-tabix,
      ls_select type rsselect,
      lt_select type table of rsselect,
      ls_field type rsfieldsel,
      lt_field type table of rsfieldsel,
      l_quiet type rois-genflag value 'X',
      l_readonly type rsiodynp4-readonly value 'X',
      l_desc_type type char1 value 'M',
      lr_data type ref to data,
      lt_oltpsource type rsaot_s_osource,
      l_req_no type rsiodynp4-requnr,
      l_debugmode type rsiodynp4-debugmode,
      l_genmode type rois-genflag,
      l_columns type i,
      l_temp_char type char40,
      l_filename    like rlgrap-filename,
      wa_x030l      like x030l,
      tb_dfies      type standard table of dfies,
      wa_dfies      type dfies,
      begin of tb_flditab occurs 0,
    *   field description
        fldname(40)  type c,
      end of tb_flditab,
      ls_flditab like line of tb_flditab,
      l_file type string.
    field-symbols:
      <lt_data> type standard table,
      <ls_data> type any,
      <ls_field> type any.
    call function 'RSA1_SINGLE_OLTPSOURCE_GET'
      exporting
        i_oltpsource   = p_osrce
      importing
        e_s_oltpsource = lt_oltpsource
      exceptions
        no_authority   = 1
        not_exist      = 2
        inconsistent   = 3
        others         = 4.
    if sy-subrc <> 0.
    * ERROR
    endif.
    create data lr_data type standard table of (lt_oltpsource-exstruct).
    assign lr_data->* to <lt_data>.
    call function 'RSFH_GET_DATA_SIMPLE'
      exporting
        i_requnr                     = l_req_no
        i_osource                    = p_osrce
        i_maxsize                    = p_maxsz
        i_maxfetch                   = p_maxfc
        i_updmode                    = p_updmd
        i_debugmode                  = l_debugmode
        i_abapmemory                 = l_genmode
        i_quiet                      = l_quiet
        i_read_only                  = l_readonly
      importing
        e_lines_read                 = l_lines_read
      tables
        i_t_select                   = lt_select
        i_t_field                    = lt_field
        e_t_data                     = <lt_data>
      exceptions
        generation_error             = 1
        interface_table_error        = 2
        metadata_error               = 3
        error_passed_to_mess_handler = 4
        no_authority                 = 5
        others                       = 6.
    * get table/structure field info
    call function 'GET_FIELDTAB'
      exporting
        langu               = sy-langu
        only                = space
        tabname             = lt_oltpsource-exstruct
        withtext            = 'X'
      importing
        header              = wa_x030l
      tables
        fieldtab            = tb_dfies
      exceptions
        internal_error      = 01
        no_texts_found      = 02
        table_has_no_fields = 03
        table_not_activ     = 04.
    * check result
    case sy-subrc.
      when 0.
    *      copy fieldnames
        loop at tb_dfies into wa_dfies.
          case l_desc_type.
            when 'F'.
              tb_flditab-fldname = wa_dfies-fieldname.
            when 'S'.
              tb_flditab-fldname = wa_dfies-scrtext_s.
            when 'M'.
              tb_flditab-fldname = wa_dfies-scrtext_m.
            when 'L'.
              tb_flditab-fldname = wa_dfies-scrtext_l.
            when others.
    *         use fieldname
              tb_flditab-fldname = wa_dfies-fieldname.
          endcase.
          append tb_flditab.
    *        clear variables
          clear: wa_dfies.
        endloop.
      when others.
        message id sy-msgid type sy-msgty number sy-msgno
        with  sy-subrc raising error_get_dictionary_info.
    endcase.
    describe table tb_flditab lines l_columns.
    " MOVE DATA TO THE APPLICATION SERVER
    open dataset p_filnm for output in text mode encoding utf-8
      with windows linefeed.
    data i type i.
    loop at <lt_data> assigning <ls_data>.
      loop at tb_flditab into ls_flditab.
        i = sy-tabix.
        assign component i of structure <ls_data> to <ls_field>.
        l_temp_char = <ls_field>.
        if i eq 1.
          l_file = l_temp_char.
        else.
          concatenate l_file ',' l_temp_char  into l_file.
        endif.
      endloop.
      transfer l_file to p_filnm.
      clear l_file.
    endloop.
    close dataset p_filnm.
    Cheers,
    Scott
    Edited by: Jeffrey Holdeman on May 25, 2010 4:44 PM
    Added  markup to improve readability
    Edited by: Jeffrey Holdeman on May 25, 2010 4:47 PM

  • Payment Order (multiple) Idocs need to be downloaded into single file

    Hello Gurus,
    I am able to generate Idocs for Automatic Payment Run in F110 for message type PAYEXT with PEXR2002 idoc type.  However, what I found is the system generates one idoc per vendor for a single payment method. So, for example if I run APP for 50 vendors at a time, 50 different idocs are generated and placed in AL11.  Currently the requirement is to download the idocs into flat file and upload it in Bank's website. I would like to know is there any way to download all the 50 idocs into a single file (ie a single file containing payment run information for all vendors).
    PS: I use CG3Y Tcode to dowload Idoc from AL11 mentioning the directory path but this can allow me to download only one file at a time.
    Any Info regarding this would be appreciated.
    Thanks in advance,
    -Naryanaan-

    Hi
    I'm facing the same problem . Were you able to solve this by heavy customization.
    best Wishes

  • Query Output to download in flat file through APD  or other means?

    Hello Experts,
    I am currently on BW3.5 system and have requirement to load query output in flat file in .csv format. I checked the option of APD but looks like we cant directly load the query output in flat file like in APD (BW  3.5 system) .
    One way i can think of it...load  the query output in transactional ODS and built an infospoke on it to write into flat file.
    Please advice if there are any better methods to store the query output in flat files.
    Thanks!

    Hi,
    Use RSCRM_BAPI.
    See
    Re: RSCRM_Bapi
    See the help on RSCRM_BAPI
    Re: Running Quaries automatically and saving them in as a Excel file in Server
    Re: Data transfer to external systems
    Re: Loading from a Custom R/3 Table
    Re: How can I schedule my Bex report to execute in background
    Re: How can I insert the RSCRM_BAPI into Process chain?
    Thanks
    Reddy

  • Extracting into Flat Files Using OCI or Pro*C Programs

    Data Extraction into Flat Files from a database Using OCI or Pro*C Programs - please provide me a sample code. It is urgent. Thank you in advance.

    This problem is very simple to solve. Simply use Pro*C, issue an SQL select into a host variable, then use unix "printf" to output the result. An alternative is to use the provided sqlplus utility to grab the data in a script, disabling headers, etc.
    Sadly, this area is a huge, basic hole in the Oracle product offering. While they have an import utility, there is no export utility, except for one that makes binary files not usable outside Oracle. Every other RDBMS I've seen has this. In Informix, you can say something like "export to <filename> select * from <table>", but that syntax is not offered by Oracle Corporation.

  • When downloading a large file, like a movie Internet Explorer automatically provides one with the choice of where to save it - e.g. "C" drive, but Firefox doesn't. How can it be done?

    When downloading a large file, like a movie, Internet Explorer automatically opens a download window offering the choice to "Open" or "Save"the file. This provides one with the choice of where to save it - e.g. "C" drive, in the "My Documents" or "Desktop" folders but Firefox's download window doesn't. This has always frustrated me because I would rather use Firefox exclusively to access the Internet, but when it comes to saving files downloaded off the Internet, sadly, I have to revert to IE!

    If you click on Firefox from the upper-left, then Options, a new window should appear. On that window, click on the general tab. In the middle of the window, you'll see options regarding your downloads, one of which says, "Always ask me where to save files." Click on the bubble for this options, then click Ok. From then on, you should always be prompted on where you want your files saved.

  • When downloading a pdf file I get a message that I must download Adobe Reader. When I do that I am told that it is already installed. Why can't I use it if it's already installed. I-Mac OsX 9.3

    When downloading a pdf file I get a message that I must download Adobe Reader. When I do that I am told that it is already installed. Why can't I use it if it's already installed. I-Mac OsX 9.3

    g -
    I was able to fix the problem with some help from Apple. Whenever I last downloaded Reader, I apparently didn’t complete the process by accepting the Reader contract. I was able to go right to that point in the process and complete the installation. The messages that I needed Reader but it was already installed were quite confusing. It would have been nice if the Adobe installation process that I was re-trying this morning had been able to detect a partial installation. The Troubleshooting page almost had me doing some ridiculous things that wouldn’t have helped.
    MP

  • I have to average data of 1min and then log into text file

    For my application i have to average data of 1min and then log into text file. please guide me on this . To transfer the data i am using notifier.
    Prashant Soni
    LabVIEW Engineer

    hi prashant,
      Check this attachment..I just implemented my idea    in this one.
    Thanks and regards,
    srikrishnaNF
    Attachments:
    Example_VI_BD.png ‏12 KB

Maybe you are looking for