How to get field label in downloaded file
Hi,
How to get filed labels, when we download a report to an Excel sheet?
Thank U
HI,
Hoping that you are using the 'GUI_Download' FM to download. Then you the
following code
TYPES : BEGIN OF type_xlhead,
colname TYPE char50,
END OF type_xlhead.
data: type_t_xlhead TYPE STANDARD TABLE OF type_xlhead,
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_file
filetype = c_asc
write_field_separator = c_x
TABLES
data_tab = rt_rec_result
fieldnames = type_t_xlhead
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
In the table rt_xlhead pass the name of fields.
DATA : s_xlhead TYPE type_xlhead.
CLEAR s_xlhead.
REFRESH type_t_xlhead .
s_xlhead-colname = 'Company Code'(116).
APPEND s_xlhead TO type_t_xlhead .
CLEAR s_xlhead.
s_xlhead-colname = 'Main Asset Number'(117).
APPEND s_xlhead TO type_t_xlhead
CLEAR s_xlhead.
s_xlhead-colname = 'Sub Number'(118).
APPEND s_xlhead TO type_t_xlhead
CLEAR s_xlhead.
Rewards points if useful
Similar Messages
-
How to get field separator in flat file using GUI_DOWNLOAD function
hi,
how to get field separator in flat file using GUI_DOWNLOAD function.
thanking you.Hi,
Use WRITE_FIELD_SEPARATOR = 'X'.
Check this sample code
REPORT z_file_download.
DATA: w_name(90) TYPE c.
DATA:
BEGIN OF fs_flight,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
price LIKE sflight-price,
currency LIKE sflight-currency,
END OF fs_flight.
DATA:
BEGIN OF fs_head,
carrid(10) TYPE c,
connid(10) TYPE c,
fldate(10) TYPE c,
price(10) TYPE c,
curr(10) TYPE c,
END OF fs_head.
DATA:
t_head LIKE
TABLE OF
fs_head.
DATA:
t_flight LIKE
TABLE OF
fs_flight.
fs_head-carrid = 'CARRID'.
fs_head-connid = 'CONNID'.
fs_head-fldate = 'FLDATE'.
fs_head-price = 'PRICE'.
fs_head-curr = 'CURRENCY'.
APPEND fs_head TO t_head.
SELECT-OPTIONS:
s_carrid FOR fs_flight-carrid.
START-OF-SELECTION.
SELECT carrid
connid
fldate
price
currency
FROM sflight
INTO TABLE t_flight
WHERE carrid IN s_carrid.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\flight.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = t_head
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:\flight.xls'
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = t_flight
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc EQ 0.
MESSAGE 'Download successful' TYPE 'I'.
ENDIF.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to get the functionality of downloading files from internet on my jsp
i have a jsp page that lists me the names of the zip files in a paricular directory on a remote computer over the network.wat i want to do is download those files.so when i click on them it gives me "page cannot be displayed" error.but when i go to that remote machine and run the same jsp to list me the files and download the same it allows me to download the files.but i want the same functionality over the network.so i think that that link is looking for that file locally instead of looking for them over the network.so is it so that i need to give the ip of the remote machine from where i want to download the file and if yes then how and if no then is there any way that i can do it some other way.
in short this functionality is like downloading some file from the net like downloading software or music....i want to incorporate the same on my jsp.please guide me.You can try this, Give the URL from where you want to Download.......
import java.io.*;
import java.net.*;
public class DnldURL {
public static void main (String[] args) {
URL u;
InputStream is = null;
DataInputStream dis;
String s;
try {
u = new URL("http://username:[email protected]:8080/files/for/me/file.txt");
is = u.openStream(); // throws an IOException
dis = new DataInputStream(new BufferedInputStream(is));
while ((s = dis.readLine()) != null) {
System.out.println(s);
} catch (MalformedURLException mue) {
System.out.println("Ouch - a MalformedURLException happened.");
mue.printStackTrace();
System.exit(1);
} catch (IOException ioe) {
System.out.println("Oops- an IOException happened.");
ioe.printStackTrace();
System.exit(1);
} finally {
try {
is.close();
} catch (IOException ioe) {
Here in the URL we will give username and password, if the remote system is password protected. -
How to get the header to downloading fine
Hi,
i am downloading xl file for which i need to get the header.i doesnt no the fieldnames.how to get the header for entire file.Hi,
For this please create an internal table for field names and pass it to FM' WS_DOWNLOAD'.
Sample code:
* internal table for headers
DATA : BEGIN OF it_fieldnames OCCURS 0,
name(100),
END OF it_fieldnames.
g_fname = 'C:\Documents and Settings\kut3kor\Desktop\kar4.xls'.
*populate the internal table
it_fieldnames-name = 'Material Number'.
APPEND it_fieldnames.
it_fieldnames-name = 'Material type'.
APPEND it_fieldnames.
it_fieldnames-name = 'Material group'.
APPEND it_fieldnames.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
* BIN_FILESIZE = ' '
* CODEPAGE = ' '
FILENAME = g_fname
FILETYPE = 'DAT'
* MODE = ' '
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* COL_SELECT = ' '
* COL_SELECTMASK = ' '
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
TABLES
data_tab = gt_mara[]
FIELDNAMES = it_fieldnames[]
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_WRITE_ERROR = 2
* INVALID_FILESIZE = 3
* INVALID_TYPE = 4
* NO_BATCH = 5
* UNKNOWN_ERROR = 6
* INVALID_TABLE_WIDTH = 7
* GUI_REFUSE_FILETRANSFER = 8
* CUSTOMER_ERROR = 9
* OTHERS = 10
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Karuna. -
How to get the complete abap help file
hi
how to get the complete abap help file i mean F1 file.
please provide some me links to download that file.Hi Kiran,
If u want complete help for particular topic ; for that SAP has provided in built Transaction for help.
Transaction is ABAPDOCU.
I have certain link which will help u.
SAP, ABAP interview question and answers
http://www.geocities.com/sap_interviewquestions/
IMP Link for All
http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
Common Links
http://www.sappoint.com/abap.html
http://www.sap-img.com/abap-function.htm
http://www.easymarketplace.de/online-pdfs-q-s.php
http://help.sap.com/
http://sapassist.com/groups/groups.asp?v=sap-r3-dev&m=3&y=2004
http://training.saptechies.com/sap-basis-certification-sample-questions/
http://www.geocities.com/mpioud/Abap_programs.html
http://cma.zdnet.com/book/abap/index.htm
http://www.sapdevelopment.co.uk/
http://www.sap-img.com/
http://juliet.stfx.ca/people/fac/infosys/abap.htm
http://help.sap.com
http://www.sap-img.com
http://www.thespot4sap.com
http://www.sap-basis-abap.com/
http://www.sapdevelopment.co.uk/
http://www.sap-img.com/
http://juliet.stfx.ca/people/fac/infosys/abap.htm
http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://www.sapgenie.com/abap/example_code.htm
http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
http://www.sap-img.com/abap-function.htm
http://www.sapgenie.com/abap/code/abap19.htm
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.planetsap.com/Tips_and_Tricks.htm
http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
http://www.henrikfrank.dk/abapexamples/index.html
http://sap.ittoolbox.com/documents/document.asp?i=752
http://members.aol.com/_ht_a/skarkada/sap/
http://sappoint.com/abap/
http://members.tripod.com/abap4/SAP_Functions.html
http://members.ozemail.com.au/~anmari/sap/index.html
http://www.planetsap.com/Userexit_List.htm
http://www.planetsap.com/Tips_and_Tricks.htm
http://www.kabai.com/abaps/q.htm
http://www.planetsap.com/Userexit_List.htm
http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
http://www.sap-basis-abap.com/index.htm
http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
http://www.geocities.com/ResearchTriangle/1635/system.html
http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
http://www.sapfans.com/sapfans/repos/saprep.htm
http://www.planetsap.com/howdo_a.htm
http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
http://www.sapgenie.com/abap/smartforms_detail.htm
http://www.sap-img.com/abap.htm
http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
http://www.geocities.com/victorav15/sapr3/abap.html
http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
http://abap4.tripod.com/Other_Useful_Tips.html
http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
http://www.sap-basis-abap.com/sapmm.htm
http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
http://sapfans.com/
http://cma.zdnet.com/book/abap/ch03/ch03.htm
http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
http://sappoint.com/abap/
http://www.henrikfrank.dk/abapuk.html
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://www.sapgenie.com/abap/index.htm
http://www.sap-img.com/abap.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
http://www.thespot4sap.com/
http://www.kabai.com/abaps/q.htm
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapgenie.com/abap/tips_and_tricks.htm
http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
Mark Helpfull answrs
Regards
Manoj -
how 2 get the path of a file Using jsp
i have tried getPath...but i'm geting the error
The method getPath(String) is undefined for the type HttpServletRequest
any idea how 2 get the path of a fileYou need ServletContext#getRealPath().
API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) -
How 2 get the path of a file Using jsp
how 2 get the path of a file Using jsp
i have tried getPath...but i'm geting the error
The method getPath(String) is undefined for the type HttpServletRequest
any idea how 2 get the path of a fileYou need ServletContext#getRealPath().
API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) -
How to get instrument and plug in files to logic8?
How to get instrument and plug in files to logic8?
I lost mine in a hard drive crash.
I cant use my DVD jam pack
This is my spec
Modellnamn: iMac
Modellidentifierare: iMac8,1
Processornamn: Intel Core 2 Duo
Processorhastighet: 2,4 GHz
Antal processorer: 1
Totalt antal kärnor: 2
L2-cache: 6 MB
Minne: 3 GB
Busshastighet: 1,07 GHz
Boot ROM-version: IM81.00C1.B00
SMC-version (system): 1.29f1
iMac, OS X Mountain Lion (10.8.2)I think you want to get the latitude and longitude information of client accessing the web application. In the web application you cannot directly get the client location information as the nature of the web application is different from windows applications.
I advise you to develop a Silverlight component and in that Silverlight component use geolocation classes to get client location. Please refer this article for getting data in Silverlight http://www.c-sharpcorner.com/UploadFile/82b980/getting-geo-location-of-user-in-silverlight/
And once you get the location information you can send that data back to ASP.net webpage or call any javascript method as shown here http://ovaismehboob.wordpress.com/2013/06/22/bridging-data-between-asp-net-and-silverlight/
Hope this helps!
Ovais Mehboob Ahmed Khan http://ovaismehboob.wordpress.com -
How To: Get encoding of a remote file
How To: Get encoding of a remote file
Java EE
URL url = new URL ("http://www.someSite.com/myCsvFile.csv"); // comma separated
InputStream is = url.openConnection().getInputStream();
InputStreamReader reader = new InputStreamReader(is);
System.out.println("reader.getEncoding(): " + reader.getEncoding());
For both an ISO-8859-1 file and a UTF-8 file I get the following print out:
reader.getEncoding(): Cp1252
Could it have something to do with this warning during boot the .war?
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
If I use local files it prints ISO8859_1 for one of the files.All of that is because the HTTP server attaches a charset to every response. That's what you are seeing. The server may be using some logic to determine the actual encoding of the file it returns, or it may simply be using a hard-coded charset which may or may not be suitable for reading the file. The latter is unfortunately more likely.
By the way if you receive an XML file over HTTP, and the HTTP charset differs from the encoding declared in the XML document, there's a rule which says the HTTP charset takes precedence. (I don't know where that rule is documented, but I have encountered that situation in real life -- the data came from a Google application -- and that rule was indeed the right thing to do.)
If you're still under the impression that there's something which can look at a file and determine what encoding was used to produce it, let me tell you that there isn't. Sure, there's that XML prolog thing which works for XML files (if they weren't botched by the producer), but for text files in general there's no way to determine their encoding. Short of asking the person who created them, that is. -
Hi all,
Please tell me how to get field from following path
GO to MSC2N --
insert material, batch , plant , storage location
Now select classification...
there is box containing 'characsteristics descr ' & value
so how to get that value
I think that values are store in table cawn but i wont found any link to get that
Correct ans will be rewardedHi,
If you are trying to get the vaues of these charecteristics in your report, then
Try using the fm VB_BATCH_GET_DETAIL
CALL FUNCTION 'VB_BATCH_GET_DETAIL'
EXPORTING
matnr = is_final-matnr
charg = is_final-charg
werks = is_final-werks
get_classification = 'X'
* EXISTENCE_CHECK =
* READ_FROM_BUFFER =
* NO_CLASS_INIT = ' '
* LOCK_BATCH = ' '
IMPORTING
ymcha = ymcha
* CLASSNAME =
TABLES
char_of_batch = it_batch
EXCEPTIONS
no_material = 1
no_batch = 2
no_plant = 3
material_not_found = 4
plant_not_found = 5
no_authority = 6
batch_not_exist = 7
lock_on_batch = 8
OTHERS = 9
also the function module VC_I_GET_CONFIGURATION
And for table try cabn
Regards
Debarshi -
how can my laptop access the downloaded files like mp3 and pdf documents which are in my iphone?
Yes you will need to NAT at some point to go from private to public address space. Here is a basic configuration if you are interested:
interface F8
ip nat inside
interface G0
ip nat outside
ip access-list standard NAT
permit 192.168.11.0 0.0.0.255
ip nat inside source list NAT interface G0 overload -
How to get endtime of a redolog file
How to get endtime of a redolog file..
i get start time from the following statement..but the high time shows as
01-JAN-1988 00:00:00
select TO_CHAR(LOW_TIME,'DD-MON-YYYY HH24:MI:SS'),TO_CHAR(HIGH_TIME,'DD-MON-YYYY HH24:MI:SS') from v$logmnr_logs;
where do i get the correct end timei need the high time of the current redo log..using the folowing query i get
select min(to_char(first_time, 'DD-MON-YY HH24:MI')),
max(to_char(first_time, 'DD-MON-YY HH24:MI')),MEMBERS from v$log
group by members;
MIN(TO_CHAR(FIR MAX(TO_CHAR(FIR MEMBERS
28-NOV-07 09:33 28-NOV-07 12:19 1
it returns the max and min low time among all redo logfiles
what I need is the high time of current log file.
using the next query i get
select min(TO_CHAR(LOW_TIME,'DD-MON-YYYY HH24:MI:SS')),max(TO_CHAR(LOW_TIME,'DD-MON-YYYY HH24:MI:SS')) from v$logmnr_logs;
28-NOV-2007 12:19:09 28-NOV-2007 12:19:09
since i add only current log file to log mining session, v$logmnr_logs would only have information about that file(one row only). so will get same time here for min and max. What i need here is high_time of the current redo log file.
Any idea? -
Our computer has users that you click to log on. My itunes thingy is on my Dad's and I downloaded Itunes on my user, and i am wondering how to get the apps I downloaded on my dad's itunes, to mine. Thanks for any help.
iPads sync to 1 computer only.
All media and apps are tied to the Apple ID that purchased them.
Without your relatives ID and password, you cannot update any of the Apps.
I am pretty certain he is also violating Apples terms of service by giving you the apps. -
How can I save the update download file as I have several devises to upgrade and cant afford the bandwidth to do each via iTunes.
There does not appeare to be any doenloadable files in the download section."Well that's totally unacceptable."
Actually you can only accept it, as it is the way it is. You may not like it, but it is so. Sorry.
" your seriously telling me that Apple expect me to download the same huge file 8 TIMES"
That is exactly what I am telling you.
" No way."
Still true.
"Apple are going to have to come up with another solution."
No. They do not have to do any such thing. They may choose to do so in the future, but there is no reason to believe that they will. -
How can get a database like ****.SQL file for test in sqlplus in oracle8i
How can get a database like ****.SQL file for test in sqlplus in oracle8i,I am a beginner,thanks
I'll give it a guess as to what it is you want but I'm afraid you'll have to give some more information to go on. I appreciate it's difficult for people who are beginners or who don't have English as their first language.
Are you trying to run a SQL file? From SQL*plus you can do either of these:
SQL> start my_file
or
SQL> @my_file
N.B.: if th efile has a .sql extension you don't need to include it, but you do for any other file extension e.g.
SQL> @myfile.run
Here is the page Vijay referred to:
Re: Physical storage Checks & adding disk on server. I hope you find it useful.
You will more helpful links (including links to the Oracle on-line manuals at this page:
Re: How to attach a java bean in forms6i
good luck, APC
Maybe you are looking for
-
I have a Panasonic DMC-FZ38 HD camera and have lots of hd movie clips stored on my old Windows Pc using Photofun software supplied by Panasonic, which I want to transfer to my new Imac computer. I am able to copy my most recent movies that are stil
-
Horizontal streak on monitor milliseconds before it turns off?
Hey, so as the title suggests, I've been seeing this horizontal line over the middle of my Macbook Air Mid-2013's screen whenever I turn it off. It kind of jumps up a bit before the screen turns black. I'm wondering if anyone else has seen this on th
-
HT3728 I can't get the full speed of my internet
My internet is fiber optics and it's 100 mbps and when I do a speed test I only get 30 mbps, while if I connect direct to the internet without using the airport I got the full speed, there is something wrong with my airport and I did the reset but no
-
Hi, I worked with EC-CS and I will have to configure BCS now. Although both have the slected item configurations to balance FS I didn't find a task like the Task 1110 in ECCS which balances the FS after loaded. Is there such task in BCS ? Where can I
-
Have an existing balance and when I buy a song it want deduct from existing balance.