Xstring
Hi all ,
I declared function module import and export parameters type of XSTRING .
Here is my code
SELECT SINGLE * FROM marc INTO t_marc WHERE matnr = material.
materila declared as XSTRING . material existed in marc table but always after this statement sy-subrc = '4'
is this due to xsting ? what i have to do when i declare a variable as x string?
Is the material number appended with leading zeroes??
or conver XSTRING to STRING using FM HR_KR_XSTRING_TO_STRING
and then use CONVERSION_EXIT_ALPHA_INPUT to get the leading zeroes and then pass that to select statement
Similar Messages
-
Open Adobe Print Form from ALV Int. Rprt using the XSTRING already present
Hello Friends,
I have a typicall issue that how to open a Adobe Print Form when a user double clicks in the ALV Report. Here when the user double clicks in the ALV Interactive Report using the unique ID I am getting the Adobe Form from a FTP location in the Form of XSTRING, now using the ABAP ADOBE PRINT FORM not using WebDynpro Application, I need to process this XSTRING and show up the Adobe Print Form.
OR
Is there a way to send the XSTRING to the Output Device or Printer to Display the PDF Form.
Friends please help me in solving this issue.
Thanks and Regards
Pradeep Goli
Edited by: Pradeep Goli on Mar 19, 2009 1:49 PM
Edited by: Pradeep Goli on Mar 19, 2009 2:51 PMHi Pradeep Goli,
it is possible to show PDF in SAP GUI.
Michal
REPORT ZTEST_DISPLAY_PDF.
* You must create dynpro 500 with custom control named HTML.
* In this custom control will be displayed PDF.
DATA: g_pdf TYPE xstring,
pdf_my_container TYPE REF TO cl_gui_custom_container,
pdf_html_control TYPE REF TO cl_gui_html_viewer.
START-OF-SELECTION.
PERFORM create_and_display.
FORM create_and_display.
*** Your code fo filling g_pdf
CALL SCREEN '500'.
ENDFORM.
* PDF preview in HTML control
module html_control output.
perform pbo_html_control.
endmodule.
module html_control input.
perform pai_html_control.
endmodule.
* PAI
FORM pai_html_control.
SET SCREEN '0'.
ENDFORM.
* Showing of PDF
FORM pbo_html_control.
DATA: l_pdf_alignment TYPE i,
l_count TYPE i,
l_noprint TYPE fpboolean,
l_noarc TYPE fpboolean,
l_noprintarc TYPE fpboolean.
* CLEAR: fcode.
SET PF-STATUS 'VIEW_PDF'.
* container
IF pdf_my_container IS INITIAL.
CREATE OBJECT pdf_my_container
EXPORTING
container_name = 'HTML'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE e150(FPRUNX).
RETURN.
ENDIF.
ENDIF.
* html control
IF pdf_html_control IS INITIAL.
CREATE OBJECT pdf_html_control
EXPORTING
parent = pdf_my_container
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE e150(FPRUNX).
RETURN.
ENDIF.
* alignment
l_pdf_alignment = pdf_html_control->align_at_left +
pdf_html_control->align_at_right +
pdf_html_control->align_at_top +
pdf_html_control->align_at_bottom.
CALL METHOD pdf_html_control->set_alignment
EXPORTING
alignment = l_pdf_alignment
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE e150(FPRUNX).
RETURN.
ENDIF.
ENDIF.
PERFORM pdf_show USING g_pdf.
ENDFORM.
FORM pdf_show USING p_pdf_data TYPE xstring.
STATICS: ls_url TYPE i.
TYPES: lt_pdf_table(1000) TYPE x.
DATA: l_myurl(80) TYPE c,
l_url(80) TYPE c,
l_pdf_data TYPE STANDARD TABLE OF lt_pdf_table,
l_pdf_size TYPE i,
l_pdf_line TYPE lt_pdf_table,
l_offset TYPE i,
l_len TYPE i.
l_pdf_size = XSTRLEN( p_pdf_data ).
l_len = l_pdf_size.
WHILE l_len >= 1000.
l_pdf_line = p_pdf_data+l_offset(1000).
APPEND l_pdf_line TO l_pdf_data.
ADD 1000 TO l_offset.
SUBTRACT 1000 FROM l_len.
ENDWHILE.
IF l_len > 0.
l_pdf_line = p_pdf_data+l_offset(l_len).
APPEND l_pdf_line TO l_pdf_data.
ENDIF.
ADD 1 TO ls_url.
l_myurl(8) = ls_url.
CONCATENATE l_myurl '.pdf' INTO l_myurl.
SHIFT l_myurl LEFT DELETING LEADING space.
CALL METHOD pdf_html_control->load_data
EXPORTING
url = l_myurl
size = l_pdf_size
type = 'application' "#EC NOTEXT
subtype = 'pdf' "#EC NOTEXT
IMPORTING
assigned_url = l_url
CHANGING
data_table = l_pdf_data
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE e152(FPRUNX).
RETURN.
ENDIF.
* show data
CALL METHOD pdf_html_control->show_data
EXPORTING
url = l_url
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE e152(FPRUNX).
RETURN.
ENDIF.
ENDFORM. -
Fm to convert XSTRING TO STRING in SRM 7.0
HI All ,
i have created a web dynpro application for Uploading excel . Now i am not getting any workaround to convert X STRING to STRING . In SAP there is a FM HR_KR_XSTRING_TO_STRING but its not there in SRM so when i tried to copy the same in SRM and try to convert its getting converted in Junk characters . Please help me out in this .
Regards
ShankarHI Nilema ,
I have tried ur code also but still the same result .
METHOD onactionon_upload .
TYPES :
BEGIN OF str_itab,
name(10) TYPE c,
age(10) TYPE c,
END OF str_itab.
DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
i_data TYPE STANDARD TABLE OF string,
lo_nd_sflight TYPE REF TO if_wd_context_node,
lo_el_sflight TYPE REF TO if_wd_context_element,
l_string TYPE string,
fs_table TYPE str_itab,
l_xstring TYPE xstring,
fields TYPE string_table,
lv_field TYPE string,
lv_codepage TYPE CPCODEPAGE.
DATA : t_table TYPE if_main=>element_datatab,
data_table TYPE if_main=>element_datatab.
get single attribute
break akedia.
wd_context->get_attribute(
EXPORTING
name = `DATASOURCE`
IMPORTING
value = l_xstring ).
CALL FUNCTION 'SCP_CODEPAGE_BY_EXTERNAL_NAME'
EXPORTING
external_name = 'ISO-8859-1'
KIND = 'H'
IMPORTING
SAP_CODEPAGE = lv_codepage
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
lv_codepage = '1100'.
ENDIF.
CALL FUNCTION 'LXE_COMMON_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IN_CODEPAGE = lv_codepage
EX_CODEPAGE = '0000'
UNMASK_CRLF = ''
IMPORTING
EX_STRING = l_string
EXCEPTIONS
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.
SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
Bind With table Element.
LOOP AT i_data INTO l_string.
SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
READ TABLE fields INTO lv_field INDEX 1.
fs_table-name = lv_field.
READ TABLE fields INTO lv_field INDEX 2.
fs_table-age = lv_field.
APPEND fs_table TO t_table1.
ENDLOOP.
lo_nd_sflight = wd_context->get_child_node( 'DATATAB' ).
lo_nd_sflight->bind_table( t_table1 ).
ENDMETHOD. -
Adobe Forms function module - downloading the xstring output in PDF file
Hi Guys,
I'm using Adobe forms and fetching its output in an XSTRING PDF format. How can I download this XSTRING output to a PDF file and store on the local file system?
I'm using the following approach to getting a PDF output:
ls_outputparams-getpdf = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = ls_outputparams.
* Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZADOBEFORM'
IMPORTING
e_funcname = lv_fmname.
IF sy-subrc <> 0.
ELSE.
* Call the Adobe Form function module
CALL FUNCTION lv_fmname
EXPORTING
/1bcdwb/docparams = ls_docparams
IMPORTING
/1bcdwb/formoutput = ls_form_output
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
* Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'.
Now, the variable LS_FORM_OUTPUT-PDF contains the PDF output in XSTRING. My question is how can I download this as a PDF file to my local machine.
Kind Regards,
Shailesh.hi guys,
im using all FM to download my PDF adobe but in this part :
ls_spfli-carrid = 'AA'.
ls_spfli-connid = '0017'.
APPEND ls_spfli TO it_spfli.
flag = 'X'.
is_address_type = '1'.
is_address_number = '22515'.
is_person_number = '22517'.
is_country = 'IN'.
*&--- Call the generated function module
CALL FUNCTION '/1BCDWB/SM00000200'
EXPORTING
* /1BCDWB/DOCPARAMS =
it_spfli = it_spfli
flag = flag
is_address_type = is_address_type
is_address_number = is_address_number
is_person_number = is_person_number
is_country = is_country
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
I have usage_error knowing that the execution of the function module in SE37 pass successfuly and also the execution of the forms .
in your opinion what can be the problem?
Kind Regards, -
How can I extract the data from Xstring .
Hi Gurus ,
How can I extract the data from a XSTRING .
I have to get the data which is filled in the survey form the data is getting saved in form of xstring .
Someone told me that there is a standard FM for that . but I am not able to find .
Please reply with the FM in case some one knows about it .
Thanks in advance .The following code works as of 7.0 (in any SAP system):
FORM XSTRING_TO_STRING USING input TYPE xstring CHANGING output TYPE string.
TYPES : BEGIN OF ty_struc,
line TYPE c LENGTH 100,
END OF ty_struc.
DATA lt_char TYPE TABLE OF ty_struc.
DATA length TYPE i.
length = xstrlen( input ) / cl_abap_char_utilities=>charsize.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = input
tables
binary_tab = lt_char.
CONCATENATE LINES OF lt_char INTO output RESPECTING BLANKS.
output = output(length).
ENDFORM.
Edited by: Sandra Rossi on Mar 30, 2010 12:24 AM -
Convert XString to String and String to IWDResource
Hi everybody,
we want to open a PDF-Document from Backend in Web Dynpro. For the communication we use a Web Service.
In Backend we have a PDF-Document with data type XSTRING.
1. In Backend we convert the PDF-Document from XSTRING to STRING in order to send it via Web Service
2. Then we call the Web Service and pass by the STRING param
3. In Web Dynpro we convert the value from STRING to Bytes, like below:
IWDResource resource = WDResourceFactory.createResource( myPDFStringFromWS.getBytes(), "Doc1", WDWebResourceType.PDF);
4. We bind the Resource to a FileDownload-UI.
Unfortunately we get the error message: Document is not a valid PDF
How can we convert a String to IWDResource? Could the problem be in our first step, where we convert the XSTRING into STRING?
regards,
SidHello Sid,
IWDResource resource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(wdContext.currentFileElement().getString()),"PDF",WDWebResourceType.PDF,true);
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.toString(),"PDF");
window.show();
Can you try this and let us know.
Regards
Nizamudeen SM -
Create image of XSTRING data and display it in Web Dynpro
Hello,
I am trying to dynamically display an image in a Web Dynpro ABAP Image-Control. The problem is that the data is stored in the DB as XSTRING and I can't find a Method for example to create a new object in the MIME-Repository of the data which is read out of the DB at runtime.
I have already converted the XSTRING into w3mime-Format with the function module RSFO_XSTRING_TO_MIME, but the Control needs a string of a url to display the image (for example to a MIME-Object of the component or a link to a file on the ITS).
Is there somehow a possibility to do this?
Thanks for your help,
Kolja
Solved this way: See /people/brian.mckellar/blog/2003/09/30/bsp-in-depth-writing-an-http-handler
Message was edited by: Kolja EweringHi you may go through the below post to find what could be a better way to do that.
http://forum.java.sun.com/thread.jspa?threadID=5163829
REGARDS,
RaHuL -
Hi All,
I need to convert the XSTRING to STRING and i need a FM or method which converts all the special characters like Å, ö, ä, å, ü as it is.
Im getting the xstring value from excel sheet using file upload in WEB UI.
The class used is CL_HTMLB_FILEUPLOAD and the attribute is FILE_CONTENT which is of type XSTRING.
I have few special characters in the excel sheet which i need as string.
I have modified this FM CRM_IC_XML_XSTRING2STRING to convert the Xstrin gto string... but stilll the replacement is not working.
Can anyone suggest me...Any different solution i can use to get the file upload in string. Or get the characters from Xstring
Useful answers are much apprieciated.
Thanx in advance
Siva.Hey,
Why dont you check this method
ECATT_CONV_STRING_TO_XSTRING. Not sure whether it supports special characters or not
Regards,
Vinay -
Messy code problem while translating XString to String in OfficeControl
Hi Expert,
I have messy code problem while translating XString to String in XML-Format Word Doc in OfficeControl.
I upload an XML-Format template Word Doc to server as a MIME Object.
When OfficeControl is started in Web Dynpro, OfficeControl automatically open the XML-Format template.
For the first time, I get the XString-type Context attribute bind to the content of the Word Doc,
then translate it to string, I got the XML-format content, it's great!
However, after the first time, when I input any new contents in MS Word in Web Dynpro,
no matter I execute "Ctrl + S" or click the "savedocument" button,
when I translate the XString Context attribute to String, I got messy code. (but the first time, it is good plain text)
I use the function module: ECATT_CONV_XSTRING_TO_STRING (good for first time, dump after first time),
SCMS_XSTRING_TO_BINARY, SCMS_BINARY_TO_STRING (good for first time, messy code after first time).
My Demo source code is in: (system) SMV --> (local object) zhaode --> (Dynpro Component) ztest_office_control
core source code is as:
clear itab.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = lv_datas
IMPORTING
OUTPUT_LENGTH = lv_length
TABLES
binary_tab = itab.
CALL FUNCTION 'SCMS_BINARY_TO_STRING'
EXPORTING
input_length = lv_length
mimetype = 'text/plain; charset=utf-8'
IMPORTING
text_buffer = lv_datas_string
output_length = lv_data_len
TABLES
binary_tab = itab.
Can you give me some advice?
Many thanks in advance.
Best Regards,You have already posted this same question several times (and some very similiar questions) within the forum. Please do NOT multiple post your questions. This is against the forum rules of engagement. SAP employee or not, you will find yourself banned from the forums if you don't follow the rules.
-
Error converting XSTRING to STRING (unicode, codepage)
Hi all,
I have a problem converting data from an external file into SAP.
The file is uploaded via an application created in web dynpro, where I use the upload functionality. This returns the file in the XSTRING format, and then use the following to convert (where l_xstring is the file and l_string is how I want the file):
l_string TYPE string,
l_xstring TYPE xstring,
convt = cl_abap_conv_in_ce=>create( input = l_xstring ).
convt->read( IMPORTING data = l_string ).
This worked perfectly - until I recieved a file containing russian characters
The SAP system (BI) is in Unicode, so this should be ok.
I get a:
CONVT_CODEPAGE
CX_SY_CONVERSION_CODEPAGE
Error, when trying to run it.
Also the following migth be helpful:
At the conversion of a text from codepage '4110' to codepage '4102':
- a character was found that cannot be displayed in one of the two
codepages;
- or it was detected that this conversion is not supported
The running ABAP program 'CL_ABAP_CONV_IN_CE============CP' had to be
terminated as the conversion
would have produced incorrect data.
The number of characters that could not be displayed (and therefore not
be converted), is 18141. If this number is 0, the second error case, as
mentioned above, has occurred.
I have tried setting the codepage parameter of the READ method, but to no success.
Anyone ??
-TonniFriend,
Call the FM like below....
CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'
EXPORTING
IM_XSTRING = x
IM_ENCODING = 'UTF-8'
IMPORTING
EX_STRING = x. -
Xstring to string for ms_excel
Hi ALL,
I am using OFFICE CONTROL UI ELEMENT for displaying iternal table data into EXCEL OFFICE CONTROL UI .
i am displaying data into OFFICE CONTROL UI EXCEL, then i will update excel of office control and then i will save,when i save that updated data need to send one internal table .
DATA :OUT_STRING1 TYPE STRING,
CONTENTXMLSOURCE TYPE XSTRING.
WD_CONTEXT->GET_ATTRIBUTE( EXPORTING NAME = 'DATAS' IMPORTING VALUE = CONTENTXMLSOURCE ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
FROM_CODEPAGE = '8500'
IN_XSTRING = CONTENTXMLSOURCE
OUT_LEN =
IMPORTING
OUT_STRING = OUT_STRING1.
data lr_conv type ref to cl_abap_conv_in_ce.
lr_conv = cl_abap_conv_in_ce=>create( ).
lr_conv->convert( exporting input = xstring importing data = string ).
NOT FOR LIKE Excel file (like Tab Delimited, CVS, XML, etc). Only for ms_excel.
the above mention two concepts are not working to convert from xstring to string ,is there any concept ms_excel format xstring to string?
THANKS,
RAMA
Edited by: Ramakullay Challa on Sep 25, 2009 2:03 PM
Edited by: Ramakullay Challa on Sep 25, 2009 2:06 PMHi Lekha,
When i am activating one method , insede this method i am calling one c lass.
data: DATASOURCE type ref to CL_WD_OFFICE_CONTROL,
content type xstring.
TRY.
DATASOURCE = cl_wd_office_control=>GET_DATA_SOURCE( VALUE = CONTENT ).
CATCH CX_WD_ACF_EXCEPTION.
ENDTRY.
error .any idea lekha.
*you can use only use "class=>method" with static methos.*
data: DATASOURCE type ref to CL_WD_OFFICE_CONTROL,
content type xstring.
CONTENT = DATASOURCE->GET_DATA_SOURCE( ).
no error.
thanks.
thanks,
rama
Edited by: Ramakullay Challa on Sep 28, 2009 7:08 AM
Edited by: Ramakullay Challa on Sep 28, 2009 7:09 AM
Edited by: Ramakullay Challa on Sep 28, 2009 11:26 AM -
Need a function module to convert xstring to string in web dynpro applicati
hi,
need a function module to convert xstring to string in web dynpro application other than HR_KR_XSTRING_TO_STRING.
Moderator message: please (re)search yourself first.
Edited by: Thomas Zloch on Nov 17, 2010 5:31 PMHi,
Check the following link:
FM to convert XString to String
Regards,
Bhaskar -
FM to convert XString to String
I am developing an simple application to upload an excel file and display its contents in a table in Solution manager using Web dynpro.
But 'HR_KR_XSTRING_TO_STRING' is not avaiable in DS1.
Can you help me find a replacement for this function module.
TYPES :
BEGIN OF str_itab,
name(10) TYPE c,
age(10) TYPE c,
END OF str_itab.
DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
i_data TYPE STANDARD TABLE OF string,
lo_nd_sflight TYPE REF TO if_wd_context_node,
lo_el_sflight TYPE REF TO if_wd_context_element,
l_string TYPE char200,
fs_table TYPE str_itab,
l_xstring TYPE char200,
fields TYPE string_table,
lv_field TYPE string.
DATA : t_table TYPE if_main=>elements_data_tab,
data_table TYPE if_main=>elements_data_tab.
get single attribute
wd_context->get_attribute(
EXPORTING name = `DATASOURCE`
IMPORTING value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
Bind With table Element.
LOOP AT i_data INTO l_string.
SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields. READ TABLE fields INTO lv_field INDEX 1.
fs_table-name = lv_field. READ TABLE fields INTO lv_field INDEX 2.
fs_table-age = lv_field. APPEND fs_table TO t_table1.
ENDLOOP.
lo_nd_sflight = wd_context->get_child_node( 'DATA_TAB' ).
lo_nd_sflight->bind_table( t_table1 ).
Thanks in advance
AkshathaIt is not appropriate to ask general ABAP questions such as this in the Web Dynpro ABAP Forum. As your punishment I will help with your question.
In this sample buffer is the XSTRING, text_buffer is the string. You have to supply an encoding to tell the system what codepage/unicode type the XSTRING is.
data: convin type ref to cl_abap_conv_in_ce,
call method cl_abap_conv_in_ce=>create
exporting
encoding = encoding
input = buffer
receiving
conv = convin.
call method convin->read
importing
data = text_buffer. -
Conversion of XSTRING to String is incomplete
Hi ,
I am trying to conver a Xstring to String. But the output string after conversion is incomplete.
Here is the code snippet-
CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE
EXPORTING
INPUT = l_xstring
ENCODING = 'UTF-8'
REPLACEMENT = '?'
IGNORE_CERR = ABAP_TRUE
RECEIVING
CONV = loc_CONV.
length = xstrlen( l_xstring ).
CALL METHOD loc_CONV->READ
EXPORTING
N = length
IMPORTING
DATA = loc_string
LEN = length.
Can anyone please help?
Best Regards,
LataHi,
http://www.sapfans.com/forums/viewtopic.php?p=403405&sid=e524cddae19e7ae48a12477e68c6032d
Regards,
Sravanthi -
Need to know the size of the variable declared as Xstring
Hi All,
I have got all the files from the applications server(for a given path) and have zipped all in to one file. But now need to find the size of it and throw a error message if it is less than a byte.
Variable whick holds all the zipped data is " zip_content ". it is declared as " data: zip_content type xstring ".
Not sure how to get the size of the variable " zip_content ".
When checked around found FM : EPS_GET_FILE_ATTRIBUTES but this requires File name or path. In my case I have only the
variable.
Thanks in Advance
Regards
JithuHi,
When using
data: l_cnt type i.
l_cnt = xstrlen( g_zip_content ) .
xstrlen will return only in byte mode and not in character mode.
Thus the value l_cnt = 12112 which you got is in bytes which can be used to check your condition.
Regards,
Vik
Edited by: vikred on Jul 29, 2009 4:01 PM -
Create pdf from xstring in the web ui
Hello everybody,
our requirement is to save a xstring as a pdf-file from the web ui. The xstring comes from an internal table.
The problem is that we dont know how we can sent the xstring to the browser.
We found this links but they do not help.
Downloads in WebUI-Anwendungen
Download data from web ui to Excel and PPT - CRM - SCN Wiki
We tried this code but it gives an error. When we change the type to csv, it will save a csv-file containing the code of the BSP. Something must be wrong with the response, we think.
server->response->set_header_field(
name = 'Content-Disposition'"#EC NOTEXT
value = 'attachment; filename=myfile.pdf').
server->response->set_header_field(
name = 'Content-Type'"#EC NOTEXT
value = 'application/pdfl' ).
DATA lv_content_bin TYPE xstring value 'any xstring'
comp_controller->server->response->append_data(
EXPORTING
data = lv_content_bin " Binärdaten
Does anybody know, how we can fix this?
Greetings ChristianHi Christian,
I have done something like this for putting a PNG or JPG image to a page dynamically. It's a different MIME type but this code may help for a BSP page with flow logic:
_m_response->set_data( lv_xstr ).
_m_response->set_header_field( name = if_http_header_fields=>content_type
value = lv_mime ).
_m_response->set_status( code = 200 reason = 'OK' ).
_m_navigation->response_complete( ).
lv_xstr would be your XSTRING content and for your case lv_mime would be 'application/pdf'. Hopefully it can help you out.
Regards,
Ryan Crosby
Maybe you are looking for
-
How can i remove my old bonjour so i can reinstall itunes
how can i remove my old bonjour so i can reinstall i tunes (many thanks)
-
Message while Craeting new Exchnage rate conversion factor
Hi, I want to maintain new currency conversion in OB08, for CHF to INR, we are maintianing conversion for this currecny first time while maintaining it is giving message as No exchange rate conversion factors could be found for the currency pair
-
LCRSAPRFC is missing in Visual Admin (JCo RFC Provider)
H y, I'm facing a problem while connecting our SolMan via RFC to SLD. Found documents explainig how to set up connection to SLD. SAPSLDAPI (was present in Abap and Java - wrong credentials - repaired) LCRSAPRFC (only present as RFC CONN in ABAP, but
-
Just bought i pad and it will not go through the set up process
I have just purchased an ipad and it will not go through the set up process. Anyone else had this problem ?
-
Cannot use my credit card?
Dear, I cannot buy anything on itunes store. Always error when I submit order and this page say please contact iTunes support to complete order. Please check for me. Thanks,