FM "GUI_UPLOAD" : Error Message
Dear All,
I'm doing one Customer Invoice upload program.
In the selection screen, I have one parameter to get File path from the users.
It executes first time without any error.
I dont change any parameter in the selection screen. I execute this program again. But it shows an information message stating "WRONG PARAMETER: FILE_NAME" and after OK, it shows an error message stating "File is not available". This error is coming from the FM "GUI_UPLOAD".
I set breakpoint after GUI_UPLOAD. SY-SUBRC = 1. It means "file_open_error = 1".
Can anyone tell the reason and solution for this problem?
Points will be rewarded.
Thanks & Regards,
Neeraj
yes u need to assign file name type string ......see the sample code ...........here i have used class 'frontend services' to fetch the file......
DATA: FILENAME TYPE STRING, "Default File Name
FILETABLE TYPE FILETABLE, "Table Holding Selected Files
V_RC TYPE I, "Return Code, Number of Files or -1 If Error Occurred
V_FILE TYPE STRING. "
FILENAME = 'C:\Documents and Settings\ramyav\Desktop\raam.txt'..
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILENAME = FILENAME
FILE_FILTER =
WITH_ENCODING =
INITIAL_DIRECTORY =
MULTISELECTION =
CHANGING
FILE_TABLE = FILETABLE
RC = V_RC
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
READ TABLE FILETABLE INDEX 1 INTO V_FILE.
ENDIF.
IF V_RC = 1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE = VIRUS_SCAN_PROFILE
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH = FILELENGTH
HEADER = HEADER
TABLES
DATA_TAB = IT_TABLE
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
reward points if helpful
Similar Messages
-
How to display error message ??
Hi,
I have a BDC program to upload data from an excel sheet. I could see that some records of data fail to pass and hence after my bdc run i would like to display error message for the failed records as follows:
costcenter:
cost element:
fiscal year:
etc etc
is it possible ?? how to do that ? please explain in detail.
for ur reference my program is pasted below.
thanks
*& Report ZBDC_BUDGET_UPLOAD
REPORT ZBDC_BUDGET_UPLOAD.
types: begin of tdata,
rec(150) type c,
end of tdata,
begin of tmtgp,
costcent LIKE CCSS-KOSTL,
costelem LIKE CCSS-KSTAR,
fisyear LIKE CCSS-GJAHR,
jan(10),
feb(10),
mar(10),
apr(10),
may(10),
jun(10),
jul(10),
aug(10),
sep(10),
oct(10),
nov(10),
dec(10),
end of tmtgp.
data: idata type table of tdata with header line.
data: imtgp type table of tmtgp with header line.
Data : fieldval(10) type c.
selection-screen begin of block b1 with frame title text-001.
parameters: p_file type localfile default 'C:\budget_data_csv.csv'.
selection-screen end of block b1.
include zbdcrecx1.
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.
perform upload_data.
loop at imtgp.
Write imtgp-fisyear to fieldval.
perform open_group.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(04)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KPP0B-VALUE(04)'
fieldval.
Write imtgp-costcent to fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KPP0B-VALUE(06)'
fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-costelem to fieldval.
perform bdc_field using 'KPP0B-VALUE(09)'
fieldval.
perform bdc_dynpro using 'SAPLKPP0' '1000'.
perform bdc_field using 'BDC_CURSOR'
'KPP0B-VALUE(04)'.
perform bdc_field using 'BDC_OKCODE'
'=CSPB'.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jan to fieldval.
perform bdc_field using 'Z-BDC03(01)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(02)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-feb to fieldval.
perform bdc_field using 'Z-BDC03(02)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(03)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-mar to fieldval.
perform bdc_field using 'Z-BDC03(03)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(04)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-apr to fieldval.
perform bdc_field using 'Z-BDC03(04)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(05)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-may to fieldval.
perform bdc_field using 'Z-BDC03(05)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jun to fieldval.
perform bdc_field using 'Z-BDC03(06)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(07)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-jul to fieldval.
perform bdc_field using 'Z-BDC03(07)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(08)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-aug to fieldval.
perform bdc_field using 'Z-BDC03(08)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(09)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-sep to fieldval.
perform bdc_field using 'Z-BDC03(09)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(10)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-oct to fieldval.
perform bdc_field using 'Z-BDC03(10)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(11)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-nov to fieldval.
perform bdc_field using 'Z-BDC03(11)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(12)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
Write imtgp-dec to fieldval.
perform bdc_field using 'Z-BDC03(12)'
fieldval.
perform bdc_dynpro using 'SAPLKPP2' '0110'.
perform bdc_field using 'BDC_CURSOR'
'Z-BDC03(12)'.
perform bdc_field using 'BDC_OKCODE'
'=CBUC'.
perform bdc_transaction using 'KP06'.
perform close_group.
endloop.
form upload_data.
data: filename type string.
clear idata.
refresh idata.
filename = p_file.
call function 'GUI_UPLOAD'
exporting filename = filename
filetype = 'ASC'
tables data_tab = idata
exceptions file_open_error = 1
file_read_error = 2
no_authority = 6
others = 17.
check sy-subrc = 0.
loop at idata.
clear imtgp.
split idata at ',' into imtgp-costcent imtgp-costelem imtgp-fisyear
imtgp-jan imtgp-feb imtgp-mar imtgp-apr imtgp-may imtgp-jun imtgp-jul
imtgp-aug imtgp-sep imtgp-oct imtgp-nov imtgp-dec.
append imtgp.
endloop.
endform.check the below code,.,
DATA : t_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll WITH HEADER LINE.
CALL TRANSACTION '<DELIVERYTRANSACTION>' USING t_bdctab
mode 'N'
MESSAGES INTO t_bdcmsgcoll.
DESCRIBE TABLE t_bdcmsgcoll LINES g_lines.
READ TABLE t_bdcmsgcoll INDEX g_lines.
IF t_bdcmsgcoll-msgtyp = 'S' AND
t_bdcmsgcoll-msgid = <Msg id> AND
t_bdcmsgcoll-msgnr = <Msg number>.
* Trap your Call Transaction messages
t_success-deliverynumber = t_bdcmsgcoll-msgv1.
* You can format the message returned by call transaction using function 'FORMAT_MESSAGE' which will return g_mesg
t_success-message = g_mesg.
APPEND t_success.
CLEAR t_success.
ELSE.
* If there an Error-Do this..
READ TABLE t_bdcmsgcoll WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
* Format your message using FORMAT_MESSAGE "FM
CLEAR g_mesg.
t_error-msg = g_mesg_incl.
APPEND t_error.
CLEAR t_error.
ENDIF.
ENDIF.
* Clear for next run
CLEAR: t_bdcmsgcoll,
t_bdctab.
REFRESH: t_bdcmsgcoll[],
t_bdctab[]. -
hi experts
i am using a report to read the contents of the file from the desktop. the selection screen contains a parameter field for user to input the file path. in the program i am gui_upload to read the contents. if the read is not successfull i am throwing a message like this
message e345(xyz) with text-001
no what is happening when i enter an invalid path in the field and execute the program the error message is coming in the status bar, but then the std icons at the top of the screen like back. cancel and exit buttons are not viisble. so i have to again go back to se38 and execute the program. how do i go back to selection screen once an error occurs.
thankshi
one more clarification about exit statement. suppose if i have a form like this
form xxx
read table xyz with key name = 'abc'.
if sy-subrc = 0
exit.
endif.
read table xyz wiht key name = 'def'.
endform.
now when the sy-subrc equal to 0 whether the control comes out of the form or it comes out of the if condition. i basically want to come out of the form
thanks -
Error message while uploading the flat file
Hi Experts,
I am getting the error message while uploading the flat file.
Message class: MG
Number: 147
The message is: Several descriptions exist for the language JA.
Please guide me why this error is occuring.
Regards
Akshayhi,
how are you uploading the file and where ?
u can use open dataset , read dataset or gui_upload
check this link
http://help.sap.com/saphelp_nw04/helpdata/en/c8/e92637c2cbf357e10000009b38f936/frameset.htm -
Windows Vista: Ipod Error Message, no longer read by PCs
Hello,
I have a 5th generation black ipod video with 30GB of memory.
The other day I hooked it up to my laptop (Toshiba, 4 months old) that it's been functioning on with no problems whatsoever. This weird error message flashed twice about it not being able to sync because of some software problem.
Eversince then, the only thing I can charge my ipod on is the family treadmill in the basement (~_~) as no other computer in the house recognizes it. I can't even charge it through the wall sockets, either.
I have changed the ipod cord, still no luck. I've also reset the device about 3 or 4 times and uninstalled, restarted the laptop then reinstalled itunes. I would like to reset it back to factory settings but that's impossible as computers/laptops don't pick it up. I live very far from a Mac store...
What's a girl to do? I can't live without my Busta Rhymes and Wu-Tang Clan!
Any advice would be greatly appreciated! Thanks!you have to update Vista go to this site and up-date http://windowsupdate.microsoft.com
-
Error message into a Variable.
Dear users,
I have a rather usual (unusual from the weekend beers for me though!!) query which I can't figure out a proper way to implement.
My requirement is like this:
I have a message class in which I want to define a text 'Employee number & not found'.
I want to use this in the program, but not to raise this error. Instead, I want to move this error message with the Employee number into a Character(200) variable.
So instead of using MESSAGE e0xx(messageclass) USING employee number, I would like to move the error text into a variable which looks like:
lv_text = e0xx(messageclass) USING '1234' which stores the text 'Employee number 1234 not found' in lv_text.
How would I acheive it??
Thanks, V!Try tis way
message e999(00) with i_emp-empno into lv_text.
press f1 in message will provide you more details
a® -
IPod seen by windows, not by iTunes+ weird error message
I have a first generation 2GB iPod nano and i use windows xp. I can't load any music because iTunes doesn't see my iPod and an error message pops up that reads like this: "iTunes: iTunes.exe corrupt file. The file or directory \iPod_Control\iTunes is corrupt and unredable. Please run the checkdisk utility." I've tried everything, reinstalling iTunes, different versions, reinstalling OS, resetting iPod, even on another computer, same problem. Other than that, the iPod works normally, it's just lacking music..
and why is there no email adress from apple for service qustions? 10xI still don't get it, how can I put it in disk mode if I CANNOT see the iPod in iTunes..?
Did you read the document i linked you to? here's another link to it:
Putting iPod into Disk Mode
whereabouts in that procedure in that document (that you get to by clicking that link) does it say that you have to connect it to iTunes to put it into disk mode?
... never mind ... i guess you've fixed it anyway ... -
Error message iPod cannot update b/c all of the playlists no longer exist
Hello. I have been getting this error message. "Songs on the iPod "MAR(the name of my iPod)" cannot update because all of the playlists selecting for updating no longer exist." And my playlists are still on the left side in my iTunes. They do exist. I have a feeling ths might have to do with the fact that on vacation the person I was visiting gave me a gift of putting all of his music that would fit into the external hard drive part of my iPod, and for the past week or so I have been putting that music onto my 40 GB portable hard drive at home. I suspect I took a vital folder out of my iPod by accident. Right now I have the folder iPod_control if I open my iPod up in My Computer. Am I missing something? Right now my iPod is empty because iTunes made a composite playlist last week and I deleted it thinking I could get my real playlists back. Can you help me, or reccomend a site/someone who can? Thank you.
PC Windows XPhiya!
And my playlists are still on the left side in my iTunes. They do exist.
let's just doublecheck this. folks get this message if they have "automatically update selected playlists only" selected in their itunes "ipod" preferences tab. so bring up that tab ("edit > preferences", click "ipod" while the ipod is showing up in the source list), and do a playlist by playlist crosscheck of the playlists selected in that tab, and the playlists showing up in the itunes sourcelist.
is there any playlist selected in the preferences tab that isn't showing up in the sourcelist?
love, b -
Windows Blue Screen Error Message Appears As Soon As IPod Connected
Everytime I connect my IPod to my computer, I get the Windows Blue Screen error message. Thought it was the cable, so plugged cable in by itself. No problem. Uninstalled IPod and ITunes software and then plugged in IPod, still got the Blue Screen. The Blue Screen says something about "recent plugged in device problem". It is not the cable, it must be the IPod. Did not have this problem when I bought it. Tried it on labtop and get the same error message. I can't do updater or anything that requires me to plug the IPod into a computer because the Blue Screen appears immediately. When I unplug, the Blue Screen remains and locks up the computer so I have to restart each time. I have tried everything I can think of. Please help.
Hi Mike thank you for replying,
I am not able to start the computer in safe mode, safe mode with networking, last good known configuration etc, Each time it quickly blue screens and restarts about two secs into the process.
I was unable to try a clean OS install from the disk as it gave the blue screen error shown in the original post. The same thing happened when I tried to use the repair option on the XP home disc. So i can't get into the computer at all to start diagnosing the fault, the only clue I have is the error message, and after searching the internet I haven't found much enlightenment from that yet.
If you can help me out or suggest where to search it would be much appreciated.
Thx -
IPod Error Message: "The disk could not be read from or written to."
Hello!
I was syncing my sister's video iPod (30GB) and this error message pops up "Attempting to copy to the disk. "SARAH'S IPO" failed. The disk could not be read from or written to."
I have restored it three times already, but once it starts putting the music and files back onto the iPod it pops up with that error message. I have updated to the latest version of iTunes and iPod software available. My OS is Windows XP.
Is this something serious? Will I be able to fix it myself or will I need to send it in to be fixed by Apple? Will that be expensive? We didn’t get the Apple replacement plan. D=
Any help would be greatly appreciated. Thank you in advance. ^_^
PowerBook G4 Mac OS X (10.4.3) 15" PowerBook 1.5 GHz PowerPC G4, 1.5GB RAM - Windows XP with iPod 5 GenerationOkay I went thru that entire list and here's what I got...
(1) My OS is XP and is running fine.
(2) I've updated my windows
(3) I don't know of any software that might be interfering.
(4) There are no damaged files.
(5) My Windows hard-drive is not damaged and I've tried restoring my iPod's disk thru iTunes but it still doesn't work.
(6) I don't have an iPod photo and I can't find the folder to delete the cache if if I did.
(7) The USB cord is firmly connected into my USB port and my iPod
(8) My music is on my external hard-drive so I need to keep 3rd-party hardware connected
(9) I will try another USB cord to see if that works.
Is there anything else that I can do? Can Apple fix this?
Please let me know. -
IPod Touch will no longer sync...error message.
For some reason my older iPod Touch without a camera on it will not sync any more and I am getting an error message saying this iPod cannot be synced. Now I had it set up to sync over Wi-Fi and I would occasionally hook up to the computer with the cable and got error messages on both. Now I read something about removing the SC Info Folder. If I do that will that mess things up with syncing my iPhone?
What is the exact wording of the error message?
-
Error Message: Need to purge Cache in Adobe Bridge CC (on PC)
I tried purging using Adobe Bridge by going to Edit/Preferences/Cache then purging, but it becomes non responsive. The error message said the problem files were at Users/(my user name)/AppData/Roaming/Adobe/BridgeCC/Cache. There are 4 files in there that are taking up 124 GB! Can I simply delete these files or will it corrupt my regular files? I tried doing as some other forums suggested and hold the ALT key down when opening Bridge before purging, but no luck.
Yes, you can delete the cache files manually, Just be advised that Bridge will become very, very slow until it finishes rebuilding its caches. Depending on your files, that can take a few minutes or several hours.
A good way of doing it is at night, so you can do it before going to bed and let Bridge rebuild caches overnight.
If you can, save the cache files before deleting them to an external drive, so that you'll have them as backup if something goes wrong. -
Error message when installing Photoshop CS2 in Windows 8
I just upgraded to a computer with Windows 8. I use Photoshop CS2. I am getting the error message below when starting photoshop after installation. I changed program folders, but that did not work. Please advise.
Error: an error has been detected and activation cannot continue. Please restart your computer and reinstall application.http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
-
Adobe Photoshop CS2 Error messages after update to mac os 10.4.6
After updated to mac os 10.4.6 everytime I use Photoshop CS2 I receive an error message "Could not complete your request because of a program error"
I did all the workarounds that were described in document 331627 from Adobe's website and nothing worked.
I also subscribe to maxosx.com support and someone suggested removing the legal.localized/Tien...file from the photoshop cs2/legal directory, but everytime I tried to select the directory "legal" from within the finder view, it disappeared and closed the finder window.
HELP!Did you upgrade from a previous version of OS X like 10.3.x or 10.2.x or from a prior version of 10.4.x? If the former, there are probably some files in your previous system folder that need to be restored.
Otherwise, double click Photoshop when it's closed, and then IMMEDIATELY hold Command + Option + Shift. You'll get a box for resetting the settings. Select Yes and maybe that will help.
--Ryan -
Upload Error message: HTTPS protocol is not supported
Hi,
Whenever I do a quick par upload i'm getting an 'Operation failed' message to check sap-plugin.log.
Log says
Upload Error message: HTTPS protocol is not supported, please ensure this server is not using HTTPS. My webdynpro applications are getting deployed without any issues.
How to resolve this?
Thanks
SumathiHi Sumathi,
As there are often problems with the Quick PAR Upload reported, I would suggest to use the "normal" PAR upload from the icon tray (you have to activate the portal icons in the icon tray). That is almost that "quick" (one or two clicks more needed, we don't talk about more than a second) and - it works (it least it should, and at least it works in most cases even if the Quick PAR Upload fails).
Hope it helps
Detlev
Maybe you are looking for
-
I am running Snow Leopard and have a Mobile Me account. My Mobile Me account expires at the end of June. I have been told that I will need to buy the Lion upgrade to run icloud on my imac, but I am aware that Lion is due to be replaced by Mountain
-
Iphone 4 overheats after upgrading to ios 5.1
I have an iphone 4 and made un upgrade to ios 5.1 yesterday, and so far that was a big mistake. My phone started to overheat terribly - when I am using or charging it, and also the battery drains way too fast and it takes ages to charge it. I have tr
-
Why does Pages 5 want to download again in the App store?
Pages 5, Keynote 6 and Numbers 3 keep showing up in the App store as new downloads. I have downloaded them five times, but the reappear as new downloads. Is this a bug in the App store?
-
Nokia 5230 wishlist for new firmware
Solve the restart problem. Make it possible to drag the text down to continue reading rather than to select text. Make the qwerty keyboard and camera useful. Alternative to use the scrollbar in applications and gallery. Remove the sluggishness and i
-
How do you remove music from iPhone?
how do I remove music from my iphone as my iphone is memory is full. no capacity