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: 

Simple transformation

germain_azambou2
Explorer
0 Kudos

Hi Guys

i have the following sinple transformation

<?sap.transform simple?>

<tt:transform xmlns:tt="http://www.sap.com/transformation-templates" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:def="http://www.sap.com/abapxml/types/defined" xmlns:abc="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">
  <tt:root name="RESPONSE" type="ddic:YSSEPA_GESAMT_STRUKTUR"/>
  <tt:template>
    <SCLSCT:BBkSCFBlkCdtTrf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SCLSCT="urn:BBkSCF:xsd:$BBkSCFBlkCdtTrf" 
    xsi:schemaLocation="urn:BBkSCF:xsd:$BBkSCFBlkCdtTrf BBkSCFBlkCdtTrf.xsd"
xmlns:abc="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">
      <SCLSCT:SndgInst tt:value-ref="RESPONSE.SNDGINST"/>
      <SCLSCT:RcvgInst tt:value-ref="RESPONSE.RCVINST"/>
      <SCLSCT:SrvcId tt:value-ref="RESPONSE.SRVCID"/>
      <SCLSCT:TstCode tt:value-ref="RESPONSE.TSTCODE"/>
     <SCLSCT:FType tt:value-ref="RESPONSE.FTYPE"/>
      <SCLSCT:FileRef tt:value-ref="RESPONSE.FILEREF"/>
      <SCLSCT:RoutingInd tt:value-ref="RESPONSE.ROUTINGIND"/>
      <SCLSCT:FileBusDt tt:value-ref="RESPONSE.FILEBUSDT"/>
      <SCLSCT:FileCycleNo tt:value-ref="RESPONSE.FILECYCLENO"/>
      <SCLSCT:FIToFICstmrCdtTrf>
       <tt:namespace name="abc"/>
        <GrpHdr>

the result look like this

-<SCLSCT:FIToFICstmrCdtTrf xmlns:abc="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">

could somebody tell me how to remove the prefix 'abc' from the namespace?

i need it like this (without prefix)

-<SCLSCT:FIToFICstmrCdtTrf xmlns:"urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">

Thanks in advance

2 REPLIES 2

venkat_aileni
Contributor
0 Kudos

Hi-

Try below code.

DATA: p_string TYPE string,

       p_str1 TYPE string,

       p_str2 TYPE string,

       p_str3 TYPE string.

p_string = '-<SCLSCT:FIToFICstmrCdtTrf xmlns:abc="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">'.

SPLIT p_string AT ':' INTO p_str1 p_str2 p_str3.

IF p_str3 IS NOT INITIAL.

   SHIFT p_str3 UP TO '"' LEFT.

ENDIF.

CLEAR: p_string.

CONCATENATE: p_str1 p_str2 ':' p_str3 INTO p_string.

WRITE: p_string.

Hope this helps!

-Venkat

0 Kudos

Hello Venkat

Thanks for your reply, i'm using the abap simple transformation to solve it and i need a XML command to write it in the Transformation.

Regards

GG