Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Upload file from Presentation to Application

Former Member
0 Likes
1,558

Hi Friends,

I M uploading EXEL file from presentation to application server.

but in the transaction AL11 when i double click the file path ,i can not see the EXEL data. it is appearing the dump data. that way, i m finding the dump data in internal table also . what can i do for uploading EXEL file to application server.

please help me.

Thanks,

Rohini

1 ACCEPTED SOLUTION
Read only

former_member386202
Active Contributor
0 Likes
1,471

Hi,

USe transaction CG3Z

Regards,

Prashant

Hi Friends,

I M uploading EXEL file from presentation to application server.

but in the transaction AL11 when i double click the file path ,i can not see the EXEL data. it is appearing the dump data. that way, i m finding the dump data in internal table also . what can i do for uploading EXEL file to application server.

please help me.

Thanks,

Rohini

9 REPLIES 9
Read only

former_member386202
Active Contributor
0 Likes
1,472

Hi,

USe transaction CG3Z

Regards,

Prashant

Read only

Former Member
0 Likes
1,471

Hi ,

What is the file format you are trying to write to the application server.?

Sudheer. A

Read only

Former Member
0 Likes
1,471

Thanks for ur reply friend

I m using cg3z only to upload EXEL file to application server... But I M not finding proper data When double click On the file pathe in AL11 Transation.

thanks,

Rohini

Read only

0 Likes
1,471

Hi

I dont think you would get that. Its better to convert the excel to CSV format and then upload. It works good also when you read the same file from a program.

Thanks

Sourav

Read only

0 Likes
1,471

Hi

I dont think you would get that. Its better to convert the excel to CSV format and then upload. It works good also when you read the same file from a program.

Thanks

Sourav

Read only

Former Member
0 Likes
1,471

Hi,

Use ALSM_EXCEL_TO_INTERNAL_TABLE to move from Excel to Internal table.

Work with Open DATASET , and move internal table data to application server path.

If data is there in your internal table , then this must work , check the syntax from help .

TC

Sajimon Chandran

Read only

Former Member
0 Likes
1,471

hi,

Using tcode CG3Y, I think only two types of files can be uploaded to application server ie.BIN file format,ASC file format.

So try to save excel file into csv file format and then try uploading.

Regards,

MMJaffer.

Read only

Former Member
0 Likes
1,471

hai rohini

To upload excel file to AL11 Please refer to the given below code:

data : if_intern type  kcde_cells occurs 0 with header line.
  data : vf_index type i.
  data : vf_start_col type i value '1',
         vf_end_col   type i value '256'.
  field-symbols : <fs>.

* ----------- " Define Internal tables for ABAP.
data: begin of i_mat OCCURS 10,
      empc(5),
      name(12),
      Age(3),
      end of i_mat.

* ----------- " Define data variables for ABAP.
*             " Define data variables for Excel Upload.
data: p_text type natxt.
data: dataset(150) type c.:

* ----------- " Selection-Screen.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
parameters: p_file2  type rlgrap-filename,
            p_brow2 type i,
            p_erow2 type i.
SELECTION-SCREEN END OF BLOCK B1.
* ----------- " At Selection- screen.
at selection-screen on value-request for p_file2.
  call function 'KD_GET_FILENAME_ON_F4'
    EXPORTING
      program_name = syst-repid
    CHANGING
      file_name    = p_file2.
* ----------- " Start of ABAP SQL Commands
START-OF-SELECTION.
*  dataset = '/tmp/new.xls'.
   dataset = '/tmp/new.xls'.
  if rg1 = 'X'.
   if p_file2 is not initial and
      p_brow2 is not initial and
      p_erow2 is not initial.
 call function 'KCD_EXCEL_OLE_TO_INT_CONVERT'
    EXPORTING
      filename    = p_filename
      i_begin_col = vf_start_col
      i_begin_row = p_brow2
      i_end_col   = vf_end_col
      i_end_row   = p_erow2
    TABLES
      intern      = if_intern.
  if if_intern[] is initial.
    p_text = 'No Data Uploaded'.
  else.
    sort if_intern by row col.
    loop at if_intern.
      move : if_intern-col to vf_index.
      assign component vf_index of structure p_download to <fs>.
      move : if_intern-value to <fs>.
      at end of row.
        append p_download.
        clear p_download.
      endat.
    endloop.
  endif.

 delete dataset dataset.
  open dataset dataset for output in text mode encoding default.
  loop at i_mat.
    if sy-subrc eq 0.
      transfer i_mat to dataset.
    endif.
  endloop.
  close dataset dataset.

Read only

0 Likes
1,471

HI shelly

thanks for helping

if you dont mind please tell me ..... what is "p_download" i.e, structure , variable or internal table.

thanks ,

Rohini