Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: How to read XML file directly from portal

$
0
0

Hi Satish,

may be its help you..

 

 

 

type-pools: truxs.

 

parameters: p_file type  rlgrap-filename.

 

types: begin of t_datatab,

      col1(30)    type c,

      col2(30)    type c,

      col3(30)    type c,

      end of t_datatab.

 

data: it_datatab type standard table of t_datatab,

      wa_datatab type t_datatab.

 

data: it_raw type truxs_t_text_data.

 

* At selection screen

at selection-screen on value-request for p_file.

  call function 'F4_FILENAME'

    exporting

      field_name = 'P_FILE'

    importing

      file_name  = p_file.

 

 

***********************************************************************

*START-OF-SELECTION.

start-of-selection.

 

  call function 'TEXT_CONVERT_XLS_TO_SAP'

    exporting

*     I_FIELD_SEPERATOR        =

      i_line_header            =  'X'

      i_tab_raw_data           =  it_raw       " WORK TABLE

      i_filename               =  p_file

    tables

      i_tab_converted_data     = it_datatab[]    "ACTUAL DATA

   exceptions

      conversion_failed        = 1

      others                   = 2.

 

  if sy-subrc <> 0.

    message id sy-msgid type sy-msgty number sy-msgno

            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  endif.

 

 

***********************************************************************

* END-OF-SELECTION.

end-of-selection.

  loop at it_datatab into wa_datatab.

    write:/ wa_datatab-col1,

            wa_datatab-col2,

            wa_datatab-col3.

  endloop.

 

 

Regards and Thanks

Niraj Sinha


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>