I want to call components of an internal table in ABAP-Objects!!!!
Hy all,
I am trying to call the component my_query_info-compuid. But if I do it that way like shown below I get a Syntax error message.
"MY_QUERY_INFO" is a table without a header line and therefore has no component called "COMPUID".
And in Classes and OO its forbidden to declare internal tables with header lines and I also tried it?!
I hope you can give me some help.
DATA: my_query_info TYPE STANDARD TABLE OF
rrmx_s_query_info
WITH DEFAULT KEY
INITIAL SIZE 0.
METHOD get_queries_from_wb.
CALL FUNCTION 'RRMX_WORKBOOK_QUERIES_GET'
EXPORTING
i_workbookid = obj_id
i_objvers = 'A'
IMPORTING
e_t_query_info = my_query_info.
SELECT *
FROM rsrrepdir
INTO table long_query_info
WHERE compuid = my_query_info-compuid.
ENDMETHOD. "get_queries_from_wb
Hello Peter
Fortunately ABAP-OO does no longer allow to use header lines which are only good for spoiling programs.
Below you find my suggestion for OO-compatible coding:
DATA: my_query_info TYPE STANDARD TABLE OF rrmx_s_query_info
WITH DEFAULT KEY,
ls_query LIKE LINE OF my_query_info.
METHOD get_queries_from_wb.
CALL FUNCTION 'RRMX_WORKBOOK_QUERIES_GET'
EXPORTING
i_workbookid = obj_id
i_objvers = 'A'
IMPORTING
e_t_query_info = my_query_info.
"SELECT *
"FROM rsrrepdir
"INTO table long_query_info
"WHERE compuid = my_query_info-compuid.
IF ( my_query_info IS NOT INITIAL ).
SELECT * FROM rsrepdir INTO TABLE long_query_info
FOR ALL ENTRIES IN my_query_info
WHERE compuid = my_query_info-compuid.
ENDIF.
" Or:
LOOP AT my_query_info INTO ls_query.
SELECT * FROM rsrrepdir APPENDING TABLE long_query_info
WHERE compuid = ls_query-compuid.
ENDLOOP.
ENDMETHOD. "get_queries_from_wb
Regards
Uwe
Similar Messages
-
Declaring the internal table in ABAP objects
Hi every1,
Please any one let me know how to declare an internal table in class (ABAP objects). Bcos i am new to this classes.
help me out.
Regards,
MadhaviHi,
Check this example..
TYPES: BEGIN OF TYPE_DATA,
MATNR TYPE MATNR,
WERKS TYPE WERKS_D,
END OF TYPE_DATA.
DATA: T_DATA TYPE STANDARD TABLE OF TYPE_DATA.
DATA: WA_DATA TYPE TYPE_DATA.
Adding rows to the internal table.
WA_DATA-MATNR = 'AA'.
APPEND WA_DATA TO T_DATA.
Processing the interna table
LOOP AT T_DATA INTO WA_DATA.
ENDLOOP.
Thanks,
Naren -
Hi all,
Can we use internal table in ABAP/SAP Query (Infoset - SQ02)? If yes, Pls guide me on the same.
Thanks in advance
Regards
Madhumathi Ato my knowledge u can't use internal tables in ABAP query...it is a mix of tables...
-
How to extract data from info cube into an internal table using ABAP code
HI
Can Anyone plz suggest me
How to extract data from info cube into an internal table using ABAP code like BAPI's or function modules.
Thankx in advance
regds
AJAYHI Dinesh,
Thankq for ur reply
but i ahve already tried to use the function module.
When I try to Use the function module RSDRI_INFOPOV_READ
I get an information message "ERROR GENERATION TEST FRAME".
can U plz tell me what could be the problem
Bye
AJAY -
Want to move data from 1 internal table to other?
Hi,
i have values in one internal table like in 1 st column 13 value..in second column first 13 value blank &
from 14 value starts.....so i want such internal table in another internal table having no blank values ....means in 2nd column value starts from 1st no.
Thanks,
Sagarshow an example how is ur data is currently and how shud it look.
are u trying to say smthing like this.
col1 col2
1
2
3
4
. .5
. .6
. .7
like this?
and want second column to be shifted upwards unconditional;ly or sm matching shud be thr?
Edited by: kartik tarla on Dec 10, 2008 2:24 PM
Edited by: kartik tarla on Dec 10, 2008 2:25 PM -
Want to display multiple rows of internal table on sap script
hi friends,
i have created element in window.and in report i have called all functions as open_form,start_form,write_form,end_form,close_form.
enclosing write_form function in 'loop at itab' and 'endloop',,,,gives error start_form missing even it is written before loop at sattement...
and if start_form is also included in loop at and endloop statement then it shows per record per page......
please suggest .....how to make all records on same page 1 after another rather than of different pagesHi
See the sample script program and code accordingly
*& Report ZTEST12121
*& SAPScripts Example 1
REPORT ztest12121.
*DATABASE TABLES
TABLES: ekko,ekpo,lfa1.
*INTERNAL TABLES AND STRUCTURES
DATA i_ekko LIKE ekko.
DATA i_ekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
DATA i_lfa1 LIKE lfa1.
*PARAMETERS
PARAMETERS: p_ebeln LIKE ekko-ebeln.
*VARIABLES
DATA MAT TYPE STRING VALUE 'MAT NO'.
DATA iTe TYPE STRING VALUE 'ITEM NO'.
DATA QTY TYPE STRING VALUE 'QTY'.
DATA UOM TYPE STRING VALUE 'UOM'.
DATA NET TYPE STRING VALUE 'NET PRICE'.
Data var type integer value 0.
*DATABASE SELECTS
*Header data
SELECT SINGLE * FROM ekko INTO i_ekko WHERE ekko~ebeln = p_ebeln.
IF sy-subrc = 0.
*Item Data
SELECT * FROM ekpo INTO TABLE i_ekpo WHERE ekpo~ebeln = p_ebeln.
IF sy-subrc NE 0.
WRITE 'PURCHASE DOCUMENT ITEM DATA ERROR'.
ELSE.
*Vendor Details
SELECT SINGLE * FROM lfa1 INTO i_lfa1 WHERE lfa1~lifnr = i_ekko-lifnr.
IF sy-subrc NE 0.
WRITE 'VENDOR DOCUMENT ITEM DATA ERROR'.
ENDIF.
ENDIF.
ELSE.
WRITE 'THIS PURCHASE DOCUMENT NUMBER DOESNOT EXISTS'.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
form = 'ZSCRIPT_1'
language = sy-langu
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
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 'WRITE_FORM'
EXPORTING
ELEMENT = 'OFFICEAD'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'OFFICEAD'
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 'WRITE_FORM'
EXPORTING
ELEMENT = 'PODET'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'PODET'
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 'WRITE_FORM'
EXPORTING
ELEMENT = 'TOP'
FUNCTION = 'SET'
TYPE = 'TOP'
WINDOW = 'MAIN'
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT I_EKPO.
var = i_ekpo-netpr * i_ekpo-menge.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BODY'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
EXCEPTIONS
UNOPENED = 1
BAD_PAGEFORMAT_FOR_PRINT = 2
SEND_ERROR = 3
SPOOL_ERROR = 4
CODEPAGE = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>Reward points for useful Answers</b>
Regards
Anji -
Conversion of internal tables from ABAP to XML and Viceversa
Hi ,
I am writing a BAPI to pick the data from SAP system which gives its output to a .NET application. So, i designed XSD and i want the output of the BAPI according to that XSD rather than in the form of normal internal tables.
Can any one please tell me what is the best way to do this ?
I know very little about the simple transformations that are available in ABAP. Do we need to write our own transformation for the conversion of the internal tables to required XML format or do we already have transformations which take the internal tables and XSD to generate the XML required ?
Also for again converting the XML document to ABAP do we need to write a new transformation ?
Reward points are assured for all the replies.
Regards,
Srinivas.to convert internal table to xml format you could use CALL TRANSFORMATION key word
data: xml_out type string .
call transformation (`ID`)
source output = youritab
result xml xml_out.
instead of ID (xslt program) you can desing your own xslt program to generate the xml in the desired format. ID is the standard delivered one -
HI experts,
Is it possible to put the internal
table in the memory in such a way that
that I can access the content
of it in my function calls?
Thanks for your reply.
best regards,
roseHai
Program 1
report zImport_0001.
data: itab type table of string with header line.
field-symbols: <fs> type table.
itab = 'This is the line 1'. append itab.
itab = 'This is the line 2'. append itab.
assign itab[] to <fs>.
export <fs> to memory id 'ZSRITEST'.
submit zsri_0002 and return.
Program 2
REPORT zImport_0002 .
data: itab type table of string with header line.
field-symbols: <fs> type table.
data: wa type string.
assign itab[] to <fs>.
import <fs> from memory id 'ZSRITEST'.
loop at <fs> into wa.
write:/ wa.
endloop.
Thanks & regards
Sreeni
Message was edited by: Sreenivasulu Ponnadi -
Longest length of a data type in an internal table in abap
Hi everyone,
I have a requirement for a client in which i want to read a standard text from SO10 which can be up to 5000 words, store that into an internal table & display it in an excel sheet in a single column in a single field.
I have tried declaring my field as:
field(65535) TYPE c,
edidd-sdata,
char1024,
/SDF/CCM_XSTRING, etc. But the field does not store morre than 128 characters.
Im attaching a screen shot of my final requirement.
can anybody help in this regard??Hi Vinnet,
Declare field with string type and use below sample code to display in a single row or colum.
CONSTANTS: "Char
lc_char1 TYPE char2 VALUE '"' ,
AT NEW esnum. "#EC AT_LOOP_WH
CONCATENATE lc_char1 l_string
INTO l_string
SEPARATED BY space.
ENDAT.
CONCATENATE l_string <field_name>
INTO l_string
SEPARATED BY space.
* Check for last line item to get payment note
AT END OF esnum. "#EC AT_LOOP_WH
CONCATENATE l_string lc_char1
INTO l_string
SEPARATED BY space.
ENDAT.
reward if it helpfull. -
Generating an XML Document from an internal table in ABAP
Good day to all of you;
With ABAP, in the R/3 system, I'm trying to figure out a way to accomplish the following:
1) SELECT a set of Purchase Order data into an internal table.
2) Generate an XML document, containing the above data, using a specific schema.
I've been playing around with function module SAP_CONVERT_TO_XML_FORMAT which has the following interface:
CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ''
I_LINE_HEADER = ''
I_FILENAME = v_fname
I_APPL_KEEP = ''
I_XML_DOC_NAME = v_docname
IMPORTING
PE_BIN_FILESIZE = v_byte
TABLES
I_TAB_SAP_DATA = i_SapData
CHANGING
I_TAB_CONVERTED_DATA = i_XMLData
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
I'm uncertain as to whether or not the Export parameter, I_XML_DOC_NAME refers to some schema or definition and therefore have been excluding it. In doing so, the generated XML document seems to use the field name/type information from my itab for the tags.
If this function module requires an XML Document Name, how do I create one and where do I store it in R/3? If this is not the recommended solution, is anyone familiar with a way to load an XML schema, retrieve some data then have SAP generate an XML document using the schema?
Many thanks for any help available.
THai Phillips
Try with the following Code
This program exports an internal table to an XML file.
Report ZPRUEBA_MML_13 *
Export an internal table to XML document *
NO BORRAR ESTE CODIGO *
REPORT ZPRUEBA_MML_13.
PANTALLA SELECCION *
PARAMETERS: GK_RUTA TYPE RLGRAP-FILENAME.
PANTALLA SELECCION *
TYPE TURNOS *
TYPES: BEGIN OF TURNOS,
LU LIKE T552A-TPR01,
MA LIKE T552A-TPR01,
MI LIKE T552A-TPR01,
JU LIKE T552A-TPR01,
VI LIKE T552A-TPR01,
SA LIKE T552A-TPR01,
DO LIKE T552A-TPR01,
END OF TURNOS.
TYPE TURNOS *
TYPE SOCIO *
TYPES: BEGIN OF SOCIO,
NUMERO LIKE PERNR-PERNR,
REPOSICION LIKE PA0050-ZAUVE,
NOMBRE LIKE PA0002-VORNA,
TURNOS TYPE TURNOS,
END OF SOCIO.
TYPE SOCIO *
ESTRUCTURA ACCESOS *
DATA: BEGIN OF ACCESOS OCCURS 0,
SOCIO TYPE SOCIO,
END OF ACCESOS.
ESTRUCTURA ACCESOS *
START OF SELECTION *
START-OF-SELECTION.
PERFORM LLENA_ACCESOS.
PERFORM DESCARGA_XML.
END-OF-SELECTION.
END OF SELECTION *
FORM LLENA_ACCESOS *
FORM LLENA_ACCESOS.
REFRESH ACCESOS.
CLEAR ACCESOS.
MOVE: '45050' TO ACCESOS-SOCIO-NUMERO,
'MOISES MORENO' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
CLEAR ACCESOS.
MOVE: '45051' TO ACCESOS-SOCIO-NUMERO,
'RUTH PEÑA' TO ACCESOS-SOCIO-NOMBRE,
'0' TO ACCESOS-SOCIO-REPOSICION,
'T1' TO ACCESOS-SOCIO-TURNOS-LU,
'T2' TO ACCESOS-SOCIO-TURNOS-MA,
'T3' TO ACCESOS-SOCIO-TURNOS-MI,
'T4' TO ACCESOS-SOCIO-TURNOS-JU,
'T5' TO ACCESOS-SOCIO-TURNOS-VI,
'T6' TO ACCESOS-SOCIO-TURNOS-SA,
'T7' TO ACCESOS-SOCIO-TURNOS-DO.
APPEND ACCESOS.
ENDFORM.
FORM LLENA_ACCESOS *
FORM DESCARGA_XML *
FORM DESCARGA_XML.
DATA: L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
WRITE: / 'Converting DATA TO DOM 1:'.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'ACCESOS'
DATAOBJECT = ACCESOS[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
IF W_RC IS INITIAL.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
W_RC.
ENDIF.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE 'Ok'.
ELSE.
WRITE: 'Err =',
SY-SUBRC.
ENDIF.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = GK_RUTA
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
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.
ENDFORM.
FORM DESCARGA_XML *
Thanks & regards
Sreenivasulu P -
How to convert xml file into internal table in ABAP Mapping.
Hi All,
I am trying with ABAP mapping. I have one scenario in which I'm using below xml file as a sender from my FTP server.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MTO_ABAP_MAPPING xmlns:ns0="http://Capgemini/Mumbai/sarsingh">
<BookingCode>2KY34R</BookingCode>
- <Passenger>
<Name>SARVESH</Name>
<Address>THANE</Address>
</Passenger>
- <Passenger>
<Name>RAJESH</Name>
<Address>POWAI</Address>
</Passenger>
- <Passenger>
<Name>CARRON</Name>
<Address>JUHU</Address>
</Passenger>
- <Flight>
<Date>03/03/07</Date>
<AirlineID>UA</AirlineID>
<FlightNumber>125</FlightNumber>
<From>LAS</From>
<To>SFO</To>
</Flight>
</ns0:MTO_ABAP_MAPPING>
AT the receiver side I wnat to concatenate the NAME & ADDRESS.
I tried Robert Eijpe's weblog (/people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach)
but couldnt succeed to convert the xml file into internal table perfectly.
Can anybody help on this.
Thanks in advance!!
SarveshHi Sarvesh,
The pdf has details of ABAP mapping. The example given almost matches the xml file you want to be converted.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use abap-mapping in xi 3.0.pdf
Just in case you have not seen this
regards
Vijaya -
Using Internal Table in ABAP OO.
Hi,
I am using a internal table, I am calling a FM, which require Internal table as its parameter. Since Internal table with header line is not supported in ABAP OO. How to attain this.
Thanq For Ur time.
Cheers,
SamHi,
Please look at my example below.
TYPES: BEGIN OF t_vbak,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
erdat TYPE vbak-erdat,
ernam TYPE vbak-ernam,
auart TYPE vbak-auart,
kunnr TYPE vbak-kunnr,
vkgrp TYPE vbak-vkgrp,
END OF t_vbak.
DATA: gt_vbak TYPE STANDARD TABLE OF t_vbak,
gt_vbak_dum LIKE gt_vbak.
*CLASS DEFINITIONS
* CLASS lcl_get_so DEFINITION
CLASS lcl_get_so DEFINITION.
PUBLIC SECTION.
METHODS: get_sales_orders
EXPORTING
ex_vbak LIKE gt_vbak.
ENDCLASS. "lcl_get_so DEFINITION
*CLASS IMPLEMENTATIONS
* CLASS lcl_get_so IMPLEMENTATION
CLASS lcl_get_so IMPLEMENTATION.
METHOD get_sales_orders.
SELECT vbak~vbeln vbap~posnr vbak~erdat
vbak~ernam vbak~auart vbak~kunnr
vbak~vkgrp
FROM vbak
INNER JOIN vbap
ON vbak~vbeln = vbap~vbeln
INTO TABLE gt_vbak
WHERE vbak~erdat IN s_erdat
AND vbak~ernam IN s_ernam
AND vbak~auart IN s_auart
AND vbak~vkgrp IN s_vkgrp
AND vbak~kunnr = p_kunnr.
IF NOT gt_vbak[] IS INITIAL.
ex_vbak[] = gt_vbak[].
ELSE.
MESSAGE i000 WITH 'No data found for given criteria'.
LEAVE TO SCREEN 0.
ENDIF.
ENDMETHOD. "get_sales_orders
ENDCLASS. "lcl_get_so IMPLEMENTATION
* START-OF-SELECTION *
START-OF-SELECTION.
DATA: o_get_so TYPE REF TO lcl_get_so.
CREATE OBJECT: o_get_so.
*Get sales orders
CALL METHOD o_get_so->get_sales_orders
IMPORTING
ex_vbak = gt_vbak_dum.
Hope it helps...
Please award points if it helps... -
Convert an internal table from ABAP to an xml file on the Unix server
I'm trying to convert an internal table to an xml file. This file will be downloaded to a unix server. Can someone help?
Hello Linda,
You can combine the code given by Mahalakshmi with something like this:
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = 'YOUR_LOGICAL_FILE_NAME
parameter_1 = l_file_name_xml
IMPORTING
file_name = l_file_server
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
TRY.
OPEN DATASET l_file_server FOR OUTPUT. "<IN TEXT MODE> <ENCODING DEFAULT>.
ENDTRY.
IF sy-subrc = 0.
LOOP AT lt_xml INTO ls_xml.
TRANSFER ls_xml TO l_file_server.
ENDLOOP.
CLOSE DATASET l_file_server.
ENDIF.
ENDIF.
You need to have the server path defined (look at the paths with tcode AL11) and the file logical name with tcode FILE
Best regards,
Andri -
Internal table in ABAP Server Proxy
Hi Experts,
I have developed a JDBC to ABAP Proxy scenario.
I have a problem. In my ABAP server proxy I have to import the values into an internal table and pass them to a BAPI for GR creation.
I get an error like. OCCURS 0 is not allowed in OO concept.
Can anyone give me examples on declaring internal table in an ABAP Proxy(OO Concept).
Thanks
AKHi
Check this out.
http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
Cheers -
Append one register to internal table in abap oo
DATA: l_fields TYPE STANDARD TABLE OFsval ,
LINEA TYPE sval.
linea-tabname = 'CSKS'.
linea-fieldname = 'KOSTL'.
linea-value = 0.
APPEND linea to l_fields.
i want to do this append, but i have an error because i work in a ABAP Objects
Some suggestions?
ThanksHi!
Could you Copy & Paste the text of the error? If you can it would be good to give the message id (sy-msgid) and number (sy-msgno) also.
I'm assuming that "OFsval" is a typo and in your code it's like "OF sval".
Regards,
Mário Espinheira
Edited by: Mário Espinheira on Dec 20, 2007 9:22 PM
Maybe you are looking for
-
Best Practice for caching global list of objects
Here's my situation, (I'm guessing this is mostly a question about cache synchronization): I have a database with several tables that contain between 10-50 rows of information. The values in these tables CAN be added/edited/deleted, but this happens
-
Hope this is in the right-ish place here... I need to access a pc routinely, which is here in my office as well as the mac. The way which is most convenient is to rdc into it. This works well enough, but I have a couple of frustrating issues when wor
-
Assets upload: Deactivation Date is not available in the Standard Program
Hi, I am trying to use the standard program for Assets upload,RAALTD01. But, the field de-activation date (ANLA-DEAKT) is not available for mapping. This is the only field am missing out of more than 200 fields involved in the upload. What would be t
-
Images are blanked out when forwarding a message....any fix?
When I forward a message with Thunderbird 3.0.6, the images are blank with a red icon in the top left corner. The message is being sent as HTML and Text.
-
Hard drive crash retrieving purchased music
I just recently bought a new computer because my hard drive crashed on the old one how do I retrieve my purchased music from iTunes to reinstall on my new computer