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: 

unable to get the data into internal table with GUI_UPLOAD

Former Member
0 Kudos
137

Hi All,

Here i am facing problem when i am trying to upload the data from flatfile which is located my desktop with GUI_UPLOAD, that i need to transer to Application server file, but when i executed the program it is showing that records written 0.

Here i able to upload the data from flatfile which is in my C Drive. but i unable to load from desktop file.

If any one help me in this.

Regards.

Venkat N

1 ACCEPTED SOLUTION

former_member235056
Active Contributor
0 Kudos
103

Hi,

Look u cannot use gui_upload for getting flat file from desktop u have to use dataset functions like open dataset,close dataset.

Pls reward points,

Regards,

Ameet

7 REPLIES 7

Former Member
0 Kudos
103

Hi,

To the Application server you cant use GUI_DOWNLOAD , You have to use OPEN DATASET.

May i know the code for uploading? can you paste?

Former Member
0 Kudos
103

For application server you have to use open dataset..

Regards,

Omkar.

former_member181962
Active Contributor
0 Kudos
103

show your code.What is the file name that you are passing to the GUI_UPLOAD function module?

you can as well use the transaction CG3Z to move a file on the PS to AS.

Regards,

Ravi

Former Member
0 Kudos
103

HI venkat,

1. just check sy-subrc immediately after calling this FM.

2. It will give clue to what went wrong.

3. Also double-check the full exact path to the file name. (along with extension)

regards,

amit m.

Former Member
0 Kudos
103

Hi,

try this:

DATA: DATEI_PC TYPE STRING.

*

TYPES: BEGIN OF IMARA,

MATNR LIKE MARA-MATNR,

MTART LIKE MARA-MATNR,

END OF IMARA.

*

DATA: ITAB TYPE TABLE OF IMARA WITH HEADER LINE.

*

SELECT MATNR MTART INTO TABLE ITAB FROM MARA UP TO 10 ROWS.

*

<b> CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_DESKTOP_DIRECTORY

CHANGING

DESKTOP_DIRECTORY = DATEI_PC.

*

CALL METHOD CL_GUI_CFW=>FLUSH.</b>

*

  • MATNR.TXT is the file in your desktop

CONCATENATE DATEI_PC '\MATNR.TXT' INTO DATEI_PC.

*

CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD

EXPORTING

FILENAME = DATEI_PC

FILETYPE = 'ASC'

CHANGING

DATA_TAB = ITAB[].

Hope it helps.

Regards, Dieter

0 Kudos
103

Hi

Thanks for your reply, but now i am getting data into my internal table from flat file from desktop. now i am trying to transerfer the data to mm01 and mm02 and appliation server by using standard direct input program MRP_MATERIAL_MASTER_DATA_LOAD,

when i executing my program it is showing how many records it written and job also started.

but when i go to AL11 Tcode for see the Appserver file now i can't find it. And also if i go to MM03 to see the material numbers avialble, here also i could n't find it.

Can u Help in this it will be helpful for me.

Thanks & Regards

Venkat N

former_member235056
Active Contributor
0 Kudos
104

Hi,

Look u cannot use gui_upload for getting flat file from desktop u have to use dataset functions like open dataset,close dataset.

Pls reward points,

Regards,

Ameet