cancel
Showing results for 
Search instead for 
Did you mean: 

Optional Tag in XML using Simple Transformation

06-27-2020 12:56 PM
3817 views 5 comments
0 Likes
SAP Managed Tags
Subscribe

Dear Experts,

I am using simple transformation for multiple XML to update table type in abap.

sample code: <ID> <Othr> are optional tags in XML files:

  • <Id> --> *need to make it optional.
  • <OrgId> --> *need to make it optional.
  • <Othr>
  • <Id tt:value-ref="ID.ORGID.OTHR.ID"/>
  • <tt:d-cond check="not-initial(Id.OrgId.Othr.AddtlInf)">
  • <AddtlInf tt:value-ref="Id.OrgId.Othr.AddtlInf"/>
  • </tt:d-cond>
  • </Othr>
  • </OrgId>
  • </Id>

please advise how to make above attributes to optional ?

thanks,

sanjeev

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

Hi sandra.rossi.

Thanks for the quick reply. I am looking for Transformation logic to make optional tag for ex: Orgid * Othr tags and have created SE11 table type with deep structures to fill from XML data.

XML file format is like below:

In XML file2 there is no <Othr> TAG hence ST is giving error.

so want to make, those Tags are Optional in transformation logic. kindly advise.

Thanks and appreciate your time.

Regards,

sanjeev

Sandra_Rossi
Active Contributor

Please use COMMENT to add details. The button ANSWER is only to propose solutions.

I thought I had understood what you initially meant, my complement was only there to propose data for helping people reproduce, but now I am not sure anymore.