How to post a header using GUI_DOWNLOAD
hello:
i would like to ask one favor, i trying to download a fiel to a PC i am using the GUI_DOWNLOAD function when i sent the it_table to the function this works well , but now i need to sent the name of the colums for each colums, i sending a tables with the names of that colums but the function is sending an error.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = nombre
filetype = 'ASC'
confirm_overwrite = 'X'
TABLES
data_tab = t_itab2
fieldnames = t_fieldnames. HERE SEND THE ERROR MSG.
note: this file is gonna be download from ITS that why iam using the GUI_DOWNLOAD.
please does anybody knows how to send the names of the colums for one file using this function?
thanks a lot for you help.
If you are using a newer system, then the GUI_DOWNLOAD funciton module does contain a TABLES parameter for fieldnames. Here is an example.
REPORT zrich_0001.
TYPES: BEGIN OF t_fldnames,
fldname(30) type c,
END OF t_fldnames.
DATA: ifldnm TYPE TABLE OF t_fldnames WITH HEADER LINE.
DATA: ispfli TYPE TABLE OF spfli.
SELECT * INTO TABLE ispfli FROM spfli.
ifldnm-fldname = 'Client'. append ifldnm.
ifldnm-fldname = 'Airline Code'. append ifldnm.
ifldnm-fldname = 'Flight Connection Number'. append ifldnm.
ifldnm-fldname = 'Country Key'. append ifldnm.
ifldnm-fldname = 'Departure city'. append ifldnm.
ifldnm-fldname = 'Departure airport'. append ifldnm.
ifldnm-fldname = 'Country Key'. append ifldnm.
ifldnm-fldname = 'Arrival city'. append ifldnm.
ifldnm-fldname = 'Destination airport'. append ifldnm.
ifldnm-fldname = 'Flight time'. append ifldnm.
ifldnm-fldname = 'Departure time'. append ifldnm.
ifldnm-fldname = 'Arrival time'. append ifldnm.
ifldnm-fldname = 'Distance'. append ifldnm.
ifldnm-fldname = 'Mass unit of distance (kms, miles)'. append ifldnm.
ifldnm-fldname = 'Flight type'. append ifldnm.
ifldnm-fldname = 'Arrival n day(s) later'. append ifldnm.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:/test.xls'
write_field_separator = 'X'
TABLES
data_tab = ispfli
fieldnames = ifldnm.
This parameter is not supported in a 46c system
Regards,
Rich Heilman
Similar Messages
-
How to bind soap header using jax-rpc
To Whom It May Concern:
I am using Rad7, Ibm Websphere 6.1, on Windows XP.
I created an SoapHeader first using a string and bind it using jax-ws.
It works for jax-ws but unfortunately, my work services uses jax-rpc.
Does anybody know how to bind the soap header using jax-rpc.
Any help or hint would be greatly appreciated it.
Here is my code:
import org.apache.cxf.headers.Header;
import org.apache.cxf.headers.Header.Direction;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.binding.soap.SoapHeader;
import javax.xml.namespace.QName;
import java.io.StringReader;
import java.util.List;
import java.util.ArrayList;
import javax.xml.ws.BindingProvider;
@Test
public void testService() throws Exception {
try
URL wsdlURL = new URL("http://localhost:9087/abc/services/ServiceABCService");
ServiceRequestServiceService service = new ServiceRequestServiceServiceLocator();
ServiceRequestService port = service.getServiceRequestService(wsdlURL);
//How to Add Soap Header using jax-ws
String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><ABCHdrRq "
+ "xmlns=\"http://xmlns.ABCgc.net/ABC/2002/header/\" "
+ ">"
+ "<version>1.0</version><srcInfo><chType>abc</chType><chInst>0124</chInst>" +
"<appName>sSAR</appName><hostName>DW70210521</hostName><userId>fxue</userId>" +
"</srcInfo><startTimeStamp>2010-06-04T13:44:45.132</startTimeStamp><clientDt>2010-06-04T13:44:53.242</clientDt><serviceInfo><serviceName>ServiceRequestService</serviceName>" +
"<serviceFunc>addServiceRequest</serviceFunc></serviceInfo>" +
"<prevTransInfo><prevRqUID>BORS2010-06-04T13:41:10.2067f9368d1-8c5c</prevRqUID>" +
"<prevRespTimestamp>2010-06-04T13:41:10.871</prevRespTimestamp>"+
"<prevRespEndTimestamp>2010-06-04T13:41:10.902</prevRespEndTimestamp>+</prevTransInfo>"+
"</ABCHdrRq>";
SoapHeader dummyHeader1 = new SoapHeader(new QName("uri:http://xmlns.ABCgc.net/ABC/2002/header/", "ABCHdrRq"),
DOMUtils.readXml(new StringReader(xml)).getDocumentElement());
dummyHeader1.setDirection(Direction.DIRECTION_OUT);
List<Header> headers = new ArrayList<Header>();
headers.add(dummyHeader1);
((BindingProvider)port).getRequestContext().put(Header.HEADER_LIST, headers);
//How to Add Soap Header to the request using jax-ws
catch(Exception e)
System.out.println("Exception message:"+e.getMessage());
Yours,
FrustratedWell, how an attachment is processed depends on your application logic...if your application logic requires to processing attachments and verify it before processing the SOAP message, handlers could be better option.
If you need to process the attachment while processing the SOAP message, you can do it in the service implementation class.
In both the cases you need to get access to SOAPMessage object and from there get the attachments with getAttachments method. -
How to post Intercompany GL using BAPI
Hello Experts,
We have a requirement for Intercompany GL posting , we are using BAPI_ACC_DOCUMENT_POST for standard posting but looks like it does not work with intercompany posting.
Can anyone let me know how to post Intercompany GL either using BAPI_ACC_DOCUMENT_POST or any other method.
Thanks
ShramanHi Shraman,
For a requirement for Intercompany GL posting, use BAPI_ACC_DOCUMENT_POST for standard posting with some advanced parameters
In Header of the BAPI, pass the hardcoded values like
DOCUMENTHEADER
OBJ_TYPE = FKKSU
OBJ_KEY = $
OBJ_SYS = System name
BUS_ACT = RFBU
Other parameters you can pass in Header is:
USERNAME
HEADER_TXT
COMP_CODE
DOC_DATE
PSTNG_DATE
TRANS_DATE
FISC_YEAR
FIS_PERIOD
DOC_TYPE
REF_DOC_NO
If you are posting a document in cross-companies 1000 & 1001, you need to pass cost-center with the line item. That is the mandatory field.
Thanks,
Guru -
How to post invoice parked using BAPI- BAPI_INCOMINGINVOICE_CREATE
Hi all,
Can anybody help me with the following scenario:
I am parking Invoice document using BAPI: <b>BAPI_INCOMINGINVOICE_PARK</b>. It gives me a document no. which I can see in frontend system also by committing the BAPI.
But when I try to post the same using BAPI: <b>BAPI_INCOMINGINVOICE_CREATE</b> , It gives me a different document no.
Means it is not posting the document which has been parked earlier but it is creating totally a new document. Can anybody tell me using BAPIs how to post the same document that I had parked using BAPI: <b>BAPI_INCOMINGINVOICE_PARK</b>??
Thanks
SaurabhHi Shraman,
For a requirement for Intercompany GL posting, use BAPI_ACC_DOCUMENT_POST for standard posting with some advanced parameters
In Header of the BAPI, pass the hardcoded values like
DOCUMENTHEADER
OBJ_TYPE = FKKSU
OBJ_KEY = $
OBJ_SYS = System name
BUS_ACT = RFBU
Other parameters you can pass in Header is:
USERNAME
HEADER_TXT
COMP_CODE
DOC_DATE
PSTNG_DATE
TRANS_DATE
FISC_YEAR
FIS_PERIOD
DOC_TYPE
REF_DOC_NO
If you are posting a document in cross-companies 1000 & 1001, you need to pass cost-center with the line item. That is the mandatory field.
Thanks,
Guru -
How to generate soap header using java code
Hi,
I need to generate the following soap header using java DOM.
Can you send me some java code snippet to do so?
<soapenv:Header>
<api:RequesterCredentials soapenv:mustUnderstand="0" xmlns:api="urn:ThinkPod:api:ThinkPodAPI" xmlns:ebl="urn:ThinkPod:apis:eBLBaseComponents">
<ebl:ThinkPodAuthToken>YourToken</ebl:ThinkPodAuthToken>
<ebl:Credentials>
<ebl:DevId>YourDevId</ebl:DevId>
<ebl:AppId>YourAppId</ebl:AppId>
<ebl:AuthCert>YourAuthCert</ebl:AuthCert>
</ebl:Credentials>
</api:RequesterCredentials>
</soapenv:Header>You want to generate that on a mobile device or how is that related to CLDC and MIDP?
-
How is resolve.conf.head used?
What on earth does resolv.conf.head actually do? I have never seen it actually work in any circumstance, and from my Googling on the topics of manually setting DNS servers, practically no one else can use them with any success.
I use DNSMasq for caching. Right now I have the problem of needing to preserve whatever dhcpcd puts in my /etc/resolv.conf, that way I can just let DNSMasq to use it, but I need to set the default DNS server to be localhost. I could just put "nameserver 127.0.0.1" in /etc/resolv.conf.head and, theoretically, everything would work fine, but it doesn't. Manually putting it at the top of resolv.conf, though, does work.
* Is this because the programs that consult resolv.conf are not bothering to check .head?
* Does dhcpcd need to be told to include .head and .tail when writing to resolv.conf?
* How can resolv.conf.head ever be used? Do I need a script to manually ajoin it with resolv.conf ?
The man pages for dhcpcd and resolv.conf don't seem to be useful on this topic.Sounds like you need openresolv
But about dhcpcd - it only re-writes /etc/resolv.conf when dhcpcd changes state. It also puts nice comments in the file. So if those comments are not there then something else was overwritten resolv.conf and not dhcpcd.
To debug dhcpcd scripts, create /etc/dhcpcd.enter-hook and put one line there
set -x
Then launch dhcpcd in the console with debugging - dhcpcd -dB
Good luck! -
Download Header using GUI_DOWNLOAD for more than 100 fields
Hi,
I want to download data with header from a database table using the FM 'GUI_DOWNLOAD'.
I know that this can be achieved by
1. Download headers first to an internal table and call FM ' GUI_DOWNLOAD"
2. then Download data to the same file by calling FM 'GUI_DOWNLOAD' with APPEND = 'X'
But my database table has more than 100 fields, pls tell me how to download all the fields as header information.
Thanks in advance.Hi
This can be done using the FM GUI_DOWNLOAD.
Store all the field names in a internal table, pass the internal table to FIELDNAMES component of the FM. This will download the internal table with headings.
Note - To download it as excel, pass FILETYPE as 'DAT'.
Regards,
Vinod -
How to post multiple message using file adapter in XI2.0
We have to post multiple IDOCS.We have scenario as below.
We will have file structure like as shown below.
VKORG,VTWEG,SPART,BSART,PARVW,PARTNER,BSTDK,MATNR,MENGE,VSART,BSTZD,POLINE,BSARK
BE10;10;10;OR;SP;1000033;;M184-ISS01;2;G;131;0002;
BE10;10;10;OR;SP;1000033;;M184-ISS01;2;G;131;0002;
BE30;10;10;OR;SP;1000033;;M184-ISS01;2;G;131;0002;
For this we want that 2
messages should be created.In first message there will be first 2 records
with VKORG BE10 and in second message there will be last record with VKORG BE30.
We can do it through FILE2XMBWITHSTRUCTURECONVERSION and using some options.
I am sending the configuration that I have done for my adapter.
classname=com.sap.aii.messaging.adapter.ModuleFile2XMB
mode=FILE2XMBWITHSTRUCTURECONVERSION
#mode=FILE2XMB
XMB.TargetURL=http://20.60.53.36:8000/sap/xi/engine?type=entry
XMB.ReceiverBusinessSystem=sapdev210
#XMB.ContentKind=B
XMB.ContentKind=T
#XMB.ContentType=application/xml
XMB.ContentType=text/xml
#XMB.ContentType=text/plain
XMB.QualityOfService=EO
##xml conversion properties if mode FILE2XMBWITHROWCONVERSION specified (example, see docu)
xml.recordsetStructure=IDOC,*
xml.recordsetName=SALESDATA
xml.recordsetsPerMessage=1
xml.documentName=SALESDATA
#xml.fieldFixedLengths=
xml.IDOC.processFieldNames=fromConfiguration
xml.IDOC.fieldNames=VKORG,VTWEG,SPART,BSART,PARVW,PARTNER,BSTDK,MATNR,MENGE,VSART,BSTZD,POLINE,BSARK
xml.keyFieldName=VKORG
xml.keyFieldType=CaseSensitiveString
xml.IDOC.keyFieldValue=BE10.
xml.IDOC.fieldSeparator= ;
What I have tried is hardcoding 2 in xml.recordsetStructure=IDOC,2.It works fine
Since I already knew this.
Butin real scenario we wont be knowing this that is why I have given * in configuration , and
given
xml.keyFieldName=VKORG
xml.keyFieldType=CaseSensitiveString
xml.IDOC.keyFieldValue=BE10.
With this it should identify on key field and its value and put first 2 records in one message
and last record in second message.
It is not giving any error when we start adapter but no XML message is created.Can u plz help me
for the above problem.
My datatype in repository is like
SALESDATA
IDOC
VKORG
VTWEG
and allother remaining fields.
Is this scenario possible in XI 2.0.If yes then will it be done through above approach or something else.
Thanx.
Rekha.Hi,
I think you can not handle this problem with keyFieldName/keyFieldValue.
In my opinion with keyFieldName/keyFieldValue you can create different substructures of the same XML, but you can not seperate messages with the same substructure.
But I don't know how to handle your problem ;-(
Another point is that I see a dot after xml.IDOC.keyFieldValue=BE10.
My be this is a problem too.
Christoph -
How to get response header using ActionScript and MXML?
So... I have a URL like www.example.com/stream/
I need to make any request to this url and get Http Rewspons header (like this one:
HTTP/1.0 200 OK
Content-type: video/x-flv
Cache-Control: no-cache
I do not need reponse body at all. After I get header need to emmidiatly close connection to that url (so stop to obtain data from it)
How to do such thing (I use Flash builder)?Hai Mahesh
Check the following Code
Data : i_entamiot LIKE ehswas_entamiot.
DATA: gv_batchattributes LIKE bapibatchatt.
DATA: batchstatus LIKE bapibatchstatus.
DATA: lt_bapi_ret LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BAPI_BATCH_GET_DETAIL'
EXPORTING
material = i_entamiot-matnr
batch = i_entamiot-charg
plant = i_entamiot-werkss
IMPORTING
batchattributes = gv_batchattributes
batchstatus = batchstatus
TABLES
return = lt_bapi_ret.
Thanks & regards
Sreenivasulu P -
How to maintain muline header using webdynpro
Hi Friends,
please let me know how shall i maintain muline header in a table ( eg: in a single colum i want to provide Qty,UOM,Price
S.NO ITEM Desc Qty
UOM
Price
OR
i want to split the same header line in two lines.
pleas suggest me.
Thanks,
Mahesh.GattuHi Mahesh,
This is not possible even in ABAP ALV with any methodoligy(with FM's, OOP's with New and Old classes). Why because if you instert the column like our own format it will distrubr the table functionality. It will be problem for Accessibility rule. I think you know about the Accessibility issue. Its like screen reader must be read the screen and the bilnd people also has to be understood correctly.
Thats why this option is not avilable in SAP.
I hope this information will help you to give answer to your click also.
Warm Regards,
Vijay. -
How to post to Twitter using oAuth and UTL_HTTP
I've come across the ORA_TWEET package by Lewis Cunningham.
But when I try to use it I get an error code 34.
It looks like the Authentication method for twitter has changed to use the oAuth API.
Does any know of some sample code that shows how to do this?
ThxPut your question to Lewis.
You provided so little information, here, it is impossible to help you. -
Print ALV Heading using FM REUSE_ALV_COMMENTARY_WRITE
Hi,
How to print the heading using FM REUSE_ALV_COMMENTARY_WRITE?
I need heading format as
Name1 : Date1 :
Name2 : Date2 :
like this. How can I print this?Please provide some example code.
Regards,
Anu.*& Report Y_TOP_PAGE *
REPORT y_top_page .
TABLES : mara.
TYPE-POOLS: slis.
DATA : w_repid LIKE sy-repid.
w_repid = sy-repid.
DATA : BEGIN OF it_mara OCCURS 0,
matnr LIKE mara-matnr,
END OF it_mara.
*layout
DATA: wa_layout TYPE SLIS_LAYOUT_ALV.
*field catalog
DATA: it_fieldcat_wrt_off TYPE slis_t_fieldcat_alv,
wa_fieldcat_wrt_off TYPE slis_fieldcat_alv.
START-OF-SELECTION.
SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara.
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = w_repid
I_INTERNAL_TABNAME = 'IT_MARA'
* i_structure_name = 'IT_MARA'
* I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = w_repid
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fieldcat_wrt_off[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
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 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
is_layout = wa_layout
it_fieldcat = it_fieldcat_wrt_off
TABLES
t_outtab = it_mara
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Form TOP-OF-PAGE *
* ALV Report Header *
FORM top-of-page.
*ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc(10) TYPE c.
* Title
wa_header-typ = 'H'.
wa_header-info = 'CHANDU REPORT'.
APPEND wa_header TO t_header.
CLEAR wa_header.
* Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
APPEND wa_header TO t_header.
CLEAR: wa_header.
* Total No. of Records Selected
* describe table it_ekko lines ld_lines.
* ld_linesc = ld_lines.
* concatenate 'Total No. of Records Selected: ' ld_linesc
* into t_line separated by space.
* wa_header-typ = 'A'.
* wa_header-info = t_line.
* append wa_header to t_header.
* clear: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
* i_logo = 'Z_LOGO'.
ENDFORM. "top-of-page -
How to get Header in Downloaded .xls file using GUI_Download function
How to get Header in Downloaded .xls file using GUI_Download function ???
How to use the the Header parameter available in GUI_Download function .HI,
see this sample code..
data : Begin of t_header occurs 0,
name(30) type c,
end of t_header.
data : Begin of itab occurs 0,
fld1 type char10,
fld2 type char10,
fld3 type char10,
end of itab.
DATA: v_pass_path TYPE string.
append itab.
itab-fld1 = 'Hi'.
itab-fld2 = 'hello'.
itab-fld3 = 'welcome'.
append itab.
append itab.
append itab.
append itab.
append itab.
t_header-name = 'Field1'.
append t_header.
t_header-name = 'Field2'.
append t_header.
t_header-name = 'Field3'.
append t_header.
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
EXPORTING
default_extension = 'XLS'
IMPORTING
fullpath = v_pass_path.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_pass_path
filetype = 'DBF'
TABLES
data_tab = itab
FIELDNAMES = t_header
Cheers,
jose. -
How can I change excel column header using Labile.
Dear Experts,
How can i change excel column header using LabVIEW.
Thanks for any and all help!
M.S.Sivaraj.
Sivaraj M.S
CLDAs I said in my previous post, column headers in Excel are merely row 1 cells. May be I missing something here, so please be more explicit with your question.
I guess you are using the Excel Report tools, and you want to modify an existing sheet. From my limited experience with the Excel Report tools, it is not possible to open an existing woorkbook (except as template...), so the answer to your question should be "Forget it"...
The work around is to use the example I pointed for you before, and either to write the whole new colum headers as a string array, starting in A1, or to write a single string to a given cell in row 1.
Hope this helps
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
Heading during downloading into local file using GUI_DOWNLOAD fun.module
Hi Guru's
we have a requirement that we want the plant description as a heading (first line of the file) in the local file. iam using "GUI_DOWNLOAD" function module for downloading data for which iam passing the charecter type internal table. before downloading iam passing all the filed headings to that table and then appending the internal table data into it. now iam getting data properly with field headings . but before that heading i want one more description for a plant field which iam using in my selection screen
in the fun.module "GUI_DOWNLAOD"
we have HEADER file but it is of XSTRING type so it is taking only 2 char.
so how to use this . Plz help me.
thanks well in advance.
UR's
GSANAHi,
Please check the below link,
header in 'gui_download'
Also check Manoj kumar's reply in the link,
header information to gui_download
Hope this helps.
Best Regards.
Maybe you are looking for
-
I am getting an error in the Sender File adapter as "Configured source directory does not exist". Any idea? FYI.. @source structure path is IP address\Orders @File Name is orders12122006.xml @Transport protocal is File System and MP is File,processin
-
How to get the name of currently logged in user in the network
Hi all, I want to know if there's a way to get the name of the currently logged in user in the network. SYS_CONTEXT('USERENV','OS_USER') won't work for me because our users do not loggin in portal. Any ideas? Thanks in advance. Brett
-
Username not showing up in access log for authenticated users
I'm using form-based authentication in a Java web application on Sun One Web Server v6.1 to restrict access to authenticated users. However, even after the users authenticate and access the application, the username field in the access log is showing
-
Default value on Selection Screen
Hi experts, I want to put sy-datum + 1 as a default value on selection screen. I tried this but it didnt work. Please help me. DATA : tarih like sy-datum. initialization. tarih = sy-datum + 1. SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE TEXT-
-
Intermittent Messages App after mountain lion upgrade
help! it keeps on disconnecting me on AIM and other accounts -internet connection is OK