2007 Jul 19 12:28 PM
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
2007 Jul 19 12:43 PM
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
2007 Jul 19 12:30 PM
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?
2007 Jul 19 12:32 PM
For application server you have to use open dataset..
Regards,
Omkar.
2007 Jul 19 12:35 PM
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
2007 Jul 19 12:36 PM
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.
2007 Jul 19 12:38 PM
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
2007 Jul 20 2:49 PM
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
2007 Jul 19 12:43 PM
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