2008 Jul 15 10:42 AM
Hi,
My requirement is to convert internal table data into XML format and after that transfer it to Application server. Can any of you send me the sample code for the requirement or any step by step approach.
Regards,
Mukesh Kumar
Hi,
My requirement is to convert internal table data into XML format and after that transfer it to Application server. Can any of you send me the sample code for the requirement or any step by step approach.
Regards,
Mukesh Kumar
2008 Jul 15 10:46 AM
2008 Jul 15 10:48 AM
hi
for convert data into xml format
i am giving samle code to you
u try to understand the logic and do,
it is very easy one,
2. for sending to application server
u use open dataset .
it will solve your problems,
ztest
perform get_filename using filename 'S'.
CHECK NOT rlgrap-filename IS INITIAL.
concatenate rlgrap-filename extn into pathname
separated by separator.
ftype = rlgrap-filetype.
ftype = 'ASC'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = pathname
FILETYPE = ftype
WRITE_FIELD_SEPARATOR = 'X'
TRUNC_TRAILING_BLANKS = 'X'
TABLES
DATA_TAB = disp_tab2
EXCEPTIONS
FILE_WRITE_ERROR = 1.
2008 Jul 15 10:55 AM
1st convert the internal table data to XML by using call transformation
like:
DATA:
lt_t005 TYPE STANDARD TABLE OF t005.
TYPES:
xmlline(1024) TYPE x.
DATA:
lt_xml TYPE STANDARD TABLE OF xmlline.
SELECT * FROM t005 INTO TABLE lt_t005.
CALL TRANSFORMATION id
SOURCE data_node = lt_t005
RESULT XML lt_xml.
Now create an file in application server using open dataset statement and then transfer the table (lt_xml) content to the file..
Regards,
JOy.
2008 Jul 15 10:56 AM
HI mukesh,
to do that you need to do a CALL TRANSFORMATION ,to convert data into XML format from ABAP and then use GUI_download to deposit the file in the application server.
the t-code to create the transformation in STRANS.
hope it helps,
regards,
babu
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |