Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP to XML

Srdjan
Product and Topic Expert
Product and Topic Expert
0 Likes
983

Hi,

I have a following problem. I need to convert one ABAP table into XML, using a CALL TRANSFORMATION, but with some corrections.

Each table field should be transformed into XML without changes, except in case that it has a value of, let's say 'ABC'. If the field has this value, than resulting XML should not contain 'ABC', but result of CL_ENCRYPT=>ENCODE('ABC') method call.

Is it possible to solve this with a simple transformation, and if not, how to solve it with the "normal" transformation ? This is my first XSL transformation , so any help/advice/template is very welcome

Thanks, Srdjan

Hi,

I have a following problem. I need to convert one ABAP table into XML, using a CALL TRANSFORMATION, but with some corrections.

Each table field should be transformed into XML without changes, except in case that it has a value of, let's say 'ABC'. If the field has this value, than resulting XML should not contain 'ABC', but result of CL_ENCRYPT=>ENCODE('ABC') method call.

Is it possible to solve this with a simple transformation, and if not, how to solve it with the "normal" transformation ? This is my first XSL transformation , so any help/advice/template is very welcome

Thanks, Srdjan

4 REPLIES 4
Read only

sergey_korolev
Active Contributor
0 Likes
894

Hello

SAP XSLT engine has some extensions with which you can call ABAP class method. See here - <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/7f/b7463c32a3fe13e10000000a114084/frameset.htm">Additional SAP Statements</a>.

Sorry, I have not tries it myself.

Read only

0 Likes
894

the best and easy option would be convert the itab field value to the desired format before using the call transformation to convert it to xml. otherwise you have to write your own XSLT program to handle this.

Regards

Raja

Read only

Former Member
0 Likes
894

simple transformations can not call any method of ABAP. XSLT can do it. But I think the simplest solution is do this in ABAP, and passed the finalized ABAP data structure to simple transformations

Read only

Srdjan
Product and Topic Expert
Product and Topic Expert
0 Likes
894

thanks. It is the simplest, but unfortunately not possible because of the nature of the application, so because of that I try to do this using transformation ,...