Application Development 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: 

How to Create a Simple Transformation Programatically

Former Member
0 Kudos

Hi,

I want to Create a Simple Transformation Programatically i.e instead of going to the Repository Browser and creating the ST, If i pass the Code of ST and the name as parameters to some Function Module or a Class Method the ST should be created in the Repository.

Please Give some sample code if any. Thanks in Advance.

Regards,

Vinay.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Raj,

The code which you have given works well in Creating the XSLT Program, but i require similar one for a Simple Transformation Program.

5 REPLIES 5

Former Member
0 Kudos

Hi Vinayaka,

1. Ur requirement is not clear.

by ST do u mean - Standard Text ?

I m sorry if im not aware about it.

Regards,

Amit M.

0 Kudos

ST means Simple Transformation.

0 Kudos

following is the class

CL_O2_API_XSLTDESC

CALL METHOD cl_o2_api_xsltdesc=>create_new           
    EXPORTING                                          
      p_source                = xslt_source            
      p_attr                  = attributes             
    IMPORTING                                          
      p_obj                   = xslt_obj               
    EXCEPTIONS                                         
      object_already_existing = 1                      
      action_cancelled        = 2                      
      not_authorized          = 3                      
      error_occured           = 4                      
      undefined_name          = 5.                     

* save XSLT-description.                     
  CALL METHOD xslt_obj->save                 
    EXCEPTIONS                               
      error_occured         = 1              
      object_not_changeable = 2              
      object_invalid        = 3              
      action_cancelled      = 4              
      permission_failure    = 5.             

but this would prompt for dev class, transport request.

Regards

Raja

Former Member
0 Kudos

Hi Raj,

The code which you have given works well in Creating the XSLT Program, but i require similar one for a Simple Transformation Program.

0 Kudos

this works for both XSLT and ST

Regards

Raja