‎2020 Feb 24 11:33 AM
Hi All,
I am working transformations (XTRANS) in sap and getting some exceptions. My Requirement is read XML data and pass it to RFC FM to execute in SAP.
XML is having same as RFC input parameters.
XML file Looks like below:

And Transformation code is like below and getting exception:
System expected element 'IT_P1_DATA'. Please suggest me how to avoid exceptions in SAP.
SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L1S33 {
color: #009300;
}
<IT_P1_DATA>
<tt:loop ref="ZRI_TTY_CHANGE.IT_P1_DATA">
<ZT_P1_DAT>
<MANDT tt:value-ref="MANDT"/>
<VTGNR tt:value-ref="VTGNR"/>
<BESTNR tt:value-ref="BESTNR"/>
<VTGJJ tt:value-ref="VTGJJ"/>
<PREM_REP_AS tt:value-ref="PREM_REP_AS"/>
<ADJ_DUE_DATE tt:value-ref="ADJ_DUE_DATE"/>
<PREMIUM_TEXT tt:value-ref="PREMIUM_TEXT"/>
</ZT_P1_DAT>
</tt:loop>
</IT_P1_DATA>
‎2020 Feb 24 12:33 PM
The issue is probably because PREMIUM_TEXT is missing in your XML. Optional elements must be conditioned (tt:cond).
‎2020 Feb 24 2:47 PM
Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.
If you do a comment under a question/answer and you want to target someone else than the question/answer' author, the only solution is to copy/paste their hyperlinked name so that the person receives a warning (NB: @ doesn't work)
‎2020 Feb 24 2:51 PM
I realize that the problem comes from something that you didn't provide. IT_P1_DATA is expected in the XML but is not found, so you should post the XML before IT_P1_DATA, not after, and also the corresponding transformation code.
Please post the code as text instead of image, so that one can easily answer by modifying portions of your code.
‎2020 Feb 24 2:57 PM
Rossi,
Thanks for your suggestion and attached the note pad with complete code.
Regards,
Sandeep K
‎2020 Feb 24 3:11 PM
The elements ZTRI_POLARIS_DAT and its children have a default namespace assigned. Check again without the namespace.