2009 Nov 16 1:56 PM
I have a a string field that I create via call transformation.
I now want to download that string to my PC.
I can not use the GUI_DOWNLOAD because it demands a table to download - I have a string field so i can not use a table to download.
So i am tring to use the tranfer statement.
It returns sy-subrc = 0 but nothing is downloaded.
Here is the sample code.
data: lv_result_xml. type string.
Call to XSLT Transformation
TRY.
CALL TRANSFORMATION zrcs_xfer_wrty_xslt
SOURCE batchtime = filetime
saletab = saletab
RESULT XML lv_result_xml.
CATCH cx_xslt_exception INTO xslt_error.
xslt_message = xslt_error->get_text( ).
RAISE xslt_error.
ENDTRY.
******************************************************
types: begin of ty_xml_line,
data(256) type x,
*end of ty_xml_line.
*
*data: wa_xmlrec type ty_xml_line.
*
:.
OPEN DATASET zfile FOR OUTPUT IN BINARY MODE.
TRANSFER lv_result_xml TO zfile. "LENGTH w_size.
*loop at xml_tab into wa_xmlrec.
*v_strlen = strlen( wa_xmlrec ).
*transfer wa_xmlrec to v_serfile length v_strlen1.
*endloop.
CLOSE DATASET zfile.
I have a a string field that I create via call transformation.
I now want to download that string to my PC.
I can not use the GUI_DOWNLOAD because it demands a table to download - I have a string field so i can not use a table to download.
So i am tring to use the tranfer statement.
It returns sy-subrc = 0 but nothing is downloaded.
Here is the sample code.
data: lv_result_xml. type string.
Call to XSLT Transformation
TRY.
CALL TRANSFORMATION zrcs_xfer_wrty_xslt
SOURCE batchtime = filetime
saletab = saletab
RESULT XML lv_result_xml.
CATCH cx_xslt_exception INTO xslt_error.
xslt_message = xslt_error->get_text( ).
RAISE xslt_error.
ENDTRY.
******************************************************
types: begin of ty_xml_line,
data(256) type x,
*end of ty_xml_line.
*
*data: wa_xmlrec type ty_xml_line.
*
:.
OPEN DATASET zfile FOR OUTPUT IN BINARY MODE.
TRANSFER lv_result_xml TO zfile. "LENGTH w_size.
*loop at xml_tab into wa_xmlrec.
*v_strlen = strlen( wa_xmlrec ).
*transfer wa_xmlrec to v_serfile length v_strlen1.
*endloop.
CLOSE DATASET zfile.
2009 Nov 16 2:05 PM
Looking at your other posts I don't know whether this is still an open issue. One thing you should note however: OPEN DATASET - TRANSFER - CLOSE DATASET creates files on the application server, not on your workstation.
Rgds,
Mark
2009 Nov 16 2:19 PM
Yep - we got it working and just let it go to the application server instead of my PC.
Found that out just before checked replies but thanks.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |