cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[Data hub] Remove field in idoc if empty

Former Member
0 Kudos
410

Hi experts,
I'm working with datahub and I need to remove a field in the output idoc if it has no value, when sending orders from hybris (6.0) -> datahub (6.3) -> SAP FMS.

This is one of my item in saporder-target-datahub-extension.xml:

<item>
             <type>FSHORD01$E1EDP01</type>
             <exportCode>idockeyfield=SALESDOCUMENTIN|sendorder=5</exportCode>
             <description>Sales order item product details of FSHORD01 iDoc type</description>
             <updatable>true</updatable>
             <canonicalItemSource>CanonicalOrderItem</canonicalItemSource>
             <status>ACTIVE</status>
             <attributes>
               <attribute>
                 <name>SALESDOCUMENTIN</name>
                 <localizable>false</localizable>
                 <collection>false</collection>
                 <transformationExpression>orderId</transformationExpression>
                 <exportCode></exportCode>
                 <mandatoryInHeader>true</mandatoryInHeader>
               </attribute>
               <attribute>
                 <name>POSEX</name>
                 <localizable>false</localizable>
                 <collection>false</collection>
                 <transformationExpression>entryNumber</transformationExpression>
                 <exportCode>keyfield=true</exportCode>
                 <mandatoryInHeader>true</mandatoryInHeader>
               </attribute>
               <!-- Attributi validi solo per variant -->
               <attribute>
                 <name>MENGE</name>
                 <localizable>false</localizable>
                 <collection>false</collection>
                 <transformationExpression>quantity</transformationExpression>
                 <exportCode></exportCode>
                 <mandatoryInHeader>true</mandatoryInHeader>
               </attribute>
               <attribute>
                 <name>MENEE</name>
                 <localizable>false</localizable>
                 <collection>false</collection>
                 <transformationExpression>unit</transformationExpression>
                 <exportCode></exportCode>
                 <mandatoryInHeader>true</mandatoryInHeader>
               </attribute>
               <attribute>
                 <name>UEPOS</name>
                 <localizable>false</localizable>
                 <collection>false</collection>
                 <transformationExpression>parentEntryNumber</transformationExpression>
                 <exportCode></exportCode>
                 <mandatoryInHeader>true</mandatoryInHeader>
               </attribute>
               <attribute>
                 <name>LPRIO</name>
                 <localizable>false</localizable>
                 <collection>false</collection>
                 <transformationExpression>
                 'HIGH'.equalsIgnoreCase(itemShippingPriority)?'1':'VERY_HIGH'.equalsIgnoreCase(itemShippingPriority)?'2':''
                 </transformationExpression>
                 <exportCode></exportCode>
                 <mandatoryInHeader>false</mandatoryInHeader>
               </attribute>
             </attributes>
           </item>


The field to be removed if blank is LPRIO. Is that possible?

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Witali,

thank you for your advice!