2006 Jan 30 7:23 AM
Hi All,
How to convert a Data's in a custom table to output in XML format n store in a FTP folder by runnig a report in ABAP. That is each time when a custom report is run the data's which gets populated into a custom table shuld also be generated as output in XML format and get saved in a FTP folder.
Already some of the friends hav given suggestions but i need more information and a clear idea pls don't mistake me.
we are using version mySAP ECC 5.0, n how to use Call transformation and the FM 'HR_EFI_CONVERT_STRING_TO_TABLE'is not avilable in version 4.7 Entprise Edition.
Is there any Function Modules or standard reports avialable for this scenario.Pls do help
Suggestion and Help will be much appreciated.
Thanks & Regds.
Ramesh.
2006 Jan 30 7:30 AM
call transformation:
CALL TRANSFORMATION (`ID`)
SOURCE output = <itab holding the data>[]
RESULT XML xml_out. " (xml_out is type string field which will return the result in XML
HR_EFI_CONVERT_STRING_TO_TABLE
why do you need this? convert string to table?
you can use FM
SOTR_SERV_STRING_TO_TABLE or
SWA_STRING_TO_TABLE
Regards
Raja
2006 Jan 30 7:30 AM
call transformation:
CALL TRANSFORMATION (`ID`)
SOURCE output = <itab holding the data>[]
RESULT XML xml_out. " (xml_out is type string field which will return the result in XML
HR_EFI_CONVERT_STRING_TO_TABLE
why do you need this? convert string to table?
you can use FM
SOTR_SERV_STRING_TO_TABLE or
SWA_STRING_TO_TABLE
Regards
Raja
2006 Jan 30 7:35 AM
Hi Durairaj Athavan Raja,
Its not the String i wanted i want all the data from the custome table into XML format by running the customized Report, but one of the friend in SDN gave a suggestion to use it, thats y i tried with it.
And wher to specify the FTP Destination in that FM.
Thanks & Regds.
Ramesh.
2006 Jan 30 7:42 AM
let me understand.
when you say custom table do you mean a data base table?
check out this code sample of a FM
which takes any DB table name as input along with where conditions and returns the result as xml.
once you get the xml to put it in a FTP server, you can use the code specified in this weblog.
/people/thomas.jung3/blog/2004/11/15/performing-ftp-commands-from-abap
Regards
Raja
2006 Jan 30 7:51 AM
Yes it is from a Customized Database table only and when i run a report the data's from that customized table should be converted into a XML file and shuld b stored in a FTP folder.
I think u hav got my problem rite.
can u suggest me how to do this.
Thanks & Regds.
Ramesh.
2006 Jan 30 7:59 AM
Hi
Refer the following link for converting a internal table to XML format
http://www.sapgenie.com/abap/code/abap27.htm
then use FTP_Connect, FTP_Command to transfer to XML
2006 Jan 30 8:12 AM
check out the code sample link and the weblog link i have given in the previous post.
for example if your table name is say zmytable.
data: itab type standard table of zmytable.
data: xml_out type string .
select * from zmytable ito table itab .
CALL TRANSFORMATION (`ID`)
SOURCE output = itab[]
RESULT XML xml_out.
now the xml_out would hold the result as xml. (table entries of itab in xml format.)
use the weblog i have mentioned to send this xml to the FTP server.
Regards
Raja
2006 Jan 30 8:37 AM
Hi Durairaj Athavan Raja,
Thank U very much for the suggestion, i will sure try it, If i hav any more doubts shall i mail u?.
If ur willing u can reply.
Thanks & Regds.
Ramesh.
2006 Jan 30 8:39 AM
sure, if its urgent and i am not online, you can mail me, but i would suggest you to keep the discussion here, because it would also help others who are searching for solutions.
if your question is answered, mark the thread as answered.
Regards
Raja
2006 Jan 30 9:00 AM