Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Several versions of e-Way Bill file were released during last 5 years because of the changes in the legislation. And every time every change forced your customers to upgrade to the specific patch/version. Usually, the changes are not so dramatic and can be easily done by yourselves not waiting special patch from SAP. With this article I want to enforce you to update the file by yourselves using EFM.

First at all you should prepare the XSD scheme according the last changes form the government.  You can add the new component comparing the already existing XSD scheme and save it with different name.

After that you should open EFM and replace the target:


So, you need to move your mouse to the Target and with mouse click choose Update option. In the opened window choose your prepared file.

Two target versions will appear:


and mapping links will be moved to the new target. It can take time, please, be patient:


You need to check the mapping links that were not moved and finish the mapping for the tags that were not mapped automatically and delete the old target version. Please, save your file. I also recommend saving your file after each update not to lose your changes in case of not expected crash.

The new elements should be mapped manually, also some exiting elements might be updated, e.g., Version. You can easily see the not mapped elements in your target: mapped elements have the sign. So, let’s check the most popular Version element:



 

You need navigate to this element and by clicking on it you can see mapping in the right panel. In this picture the mapping is the Constant Value 1.0.0621. Just type the new value provided by government.

In the attached file you can see that there is no value for the element subSupplyDesc. The description should be provided in case  Sub types of Supply is Other. You can map this string with constant value like Version element or map it with specific field from your document. In case you decide with the second option and you know which field contains the relevant information you need to perform following actions:

  • Navigate to the element with mouse, click and choose the Mapping settings in the drop-down menu:





  • Choose the relevant field in the Source panel and drag that (in this example I use Comments) to the element in the target panel:



Make yourselves sure that in the right panel you have the Copy Value From Source Node radio-button ticked on.

You can add condition for this mapping (not depending which mapping you have chosen) like the value should be reported only in case the Sub types of Supply is Other. Then you need to press the ‘+’ sign in this field and choose from the Expression drop-down menu Reference No, then subSupplyType in the next field, mathematical operation (in my example Equals to) and again the values for your condition:


As time to time the string cannot be more than specific number of characters you can also add the function like to return only first 20 characters:


You can find more functions in Help -> Online Help -> Using functions. You can also add validations to specific elements, see how to do that on https://blogs.sap.com/2021/03/15/how-to-add-validations-in-electronic-formats-using-the-electronic-f....

There are more features in EFM, and developer can even create his own scripts. I believe that working with this tool will inspire you to create your own solutions for any other electronic documents.