Application Development 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: 

Application server

Former Member
0 Kudos

Hi All,

I have the Flat file in Desktop. I need to transfer the Flat File[ Data's] to the Application Server.

My Flat File is in Excel Sheet.

Anybody send me the Coding or step By Step Procedure.

Thanks in advance,

Points will be rewarded.

1 ACCEPTED SOLUTION

former_member189059
Active Contributor
0 Kudos

Hello Doak,

Use the transaction CG3Z

put the filename and execute

11 REPLIES 11

Former Member
0 Kudos

Hello Doak

Please check if transaction CG3Z helps...

Regards,

Arun

0 Kudos

Hi,

Thanks for your quick responce.

But In CG3Z Transaction, I press the F4 button in Source File field and select the My Flat File.

But It not displayed in the Field "Source Field".

I dont know, Why it happens?

Thanks.

former_member189059
Active Contributor
0 Kudos

Hello Doak,

Use the transaction CG3Z

put the filename and execute

Former Member
0 Kudos

Hello Doak

Please confirm whether on F4 you choose files of type 'All files(.)'

Regards,

Arun

0 Kudos

Thanks Arun,

Ya I Conformed. I selected all files and then select my flat file. But i can't get the Path of the Source File.

Thanks.

0 Kudos

Just double click on the file.. it will copy the Path as well as the name to the 'Source file on front end' field

former_member189059
Active Contributor
0 Kudos

For the target destination, i'd suggest that you use the same path provided by default in CG3Z until '...SYS\global\' and then replace the word 'substanc' with your filename

Former Member
0 Kudos

Hello Doak

Please check if there are any authorization issues.. by typing /NSU53 on the same screen after you chose the file...

Regards,

Arun

Former Member
0 Kudos

Hi

i had same req

i developed a program

if it is usefull for u reward me

REPORT ZSD_EXCEL2.

types: begin of ttab ,

fld1(30) type c,

fld2(30) type c,

fld3(30) type c,

fld4(30) type c,

fld5(30) type c,

end of ttab.

data: itab type table of ttab with header line.

selection-screen skip 1.

parameters: p_file type localfile default

'C:\test.xls'.

selection-screen skip 1.

at selection-screen on value-request for p_file.

call function 'KD_GET_FILENAME_ON_F4'

exporting

static = 'X'

changing

file_name = p_file.

start-of-selection.

clear itab. refresh itab.

perform upload_data.

loop at itab.

write:/ itab-fld1, itab-fld2, itab-fld3, itab-fld4, itab-fld5.

endloop.

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

  • Upload_Data

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

form upload_data.

data: file type rlgrap-filename.

data: xcel type table of alsmex_tabline with header line.

file = p_file.

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'

exporting

filename = file

i_begin_col = '1'

i_begin_row = '1'

i_end_col = '200'

i_end_row = '5000'

tables

intern = xcel

exceptions

inconsistent_parameters = 1

upload_ole = 2

others = 3.

loop at xcel.

case xcel-col.

when '0001'.

itab-fld1 = xcel-value.

when '0002'.

itab-fld2 = xcel-value.

when '0003'.

itab-fld3 = xcel-value.

when '0004'.

itab-fld4 = xcel-value.

when '0005'.

itab-fld5 = xcel-value.

endcase.

at end of row.

append itab.

clear itab.

endat.

endloop.

endform.

*CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'

  • EXPORTING

  • DEFAULTOPTION = 'N'

  • TEXTLINE1 = 'The selected report already exists, do you'

  • TEXTLINE2 = LC_LINE2

  • TITEL = 'Report already exists'

  • CANCEL_DISPLAY = SPACE

  • IMPORTING

  • ANSWER = LC_ANSWER

  • EXCEPTIONS

  • OTHERS = 1.

  • ELSE.

  • LC_ANSWER = 'J'.

  • ENDIF.

0 Kudos

Hi Experts,

Still I didnt get the answer. Is any Function modules is there for This requirement.

Thanks.

0 Kudos

There are function modules such as the ones used above

but CG3Z is still the easiest way