Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask question.

Login

Register Now

APPSeCONNECT community provides a new way for integration super heros connect the external world. Join hands together to build a community of people to help each other, solve problems or share knowledge.

Use Case : Amazon Shipment Events to Journal Entry in SAP B1

While working with integration projects, it is not always true that we will find all the projects having same kind of requirement. Sometimes the requirements are quite straight forward while sometimes the requirements are completely different from what people do. Here is an example of an use case where the customer wanted to create a Journal Entry with all the shipment events generated in Amazon.

Problem Statement

Create a Journal Entry with all the Shipments successfully made in Amazon.

Solution

To create a Journal Entry in SAP B1, we will use the oJournalEntry object. This object will allow us to create a journal entry. So to create a Post node in ProcessFlow, we will just

  1. Open ProcessFlow
  2. Create a Start Node by dragging from the Toolbar.
  3. Create a SAP B1 Post node with oJournalEntry in Schema.
    node config
    Here we have chosen the oJournalEntry in Schema and “to add the journal entry”, in Action node, which is the post action for SAP B1’s Journal Entry.
  4. As we have created the SAP B1 post node, we would also want to get the data from Amazon. To do this, we drag an Amazon Prepackaged node from the toolbar and configure it for ShipmentEventList. The ShipmentEventList is the schema which will allow you to map shipment event objects.
    shipmenteventlist
    Now here the Shipment list will be retrieved from the Amazon Finance API.
  5. To retrieve the data, we call ListFinancialEvents with PostedAfter date, and also passing the NextToken. If you know how to retrieve differential data, you might already know how to use it in Action filter.

    Now here you can see the variable cdate is used to get differential data and NextToken is used to get data from next token passed.
  6. Now this will get us the data only once. But for Journal, the customer asked for all the data present in Amazon. To do such an operation, we need a self loop.
  7. But self loop will post multiple Journal entries, which we do not want. To merge all the data coming from Self loop, we also need a merger.

    So here in the ProcessFlow, we have used a Self Loop on Amazon node and a Merger to merge all the data coming from Amazon. Then the Mapper will ensure we map all the values to finally post it to SAP B1.

 

This way the ProcessFlow processes all the entries of Shipment and post only one Journal Entry in SAP B1.

 

Conclusion

With ProcessFlow we give a bunch of data manipulation nodes which helps in manipulation of data and orchestration of data transfer over the processflow pipeline. In the above case, we have shown an uncommon requirement, which might help you to implement your own use case based on the example.

I hope this will help. Feel free to comment.

Thanks

About Abhishek SurVerifiedExpert

VP, Products at InSync Abhishek Sur has been a Microsoft MVP since 2011. He is currently working as a Product Head with Insync Tech-Fin Solutions Pvt Ltd. He has profound theoretical insight and years of hands-on experience in different .NET products and languages. Over the years, he has helped developers throughout the world with his experience and knowledge. He owns a Microsoft User Group in Kolkata named Kolkata Geeks and regularly organizes events and seminars in various places to spread .NET awareness. A renowned public speaker, voracious reader, and technology buff, Abhishek's main interest lies in exploring the new realms of .NET technology and coming up with priceless write-ups on the unexplored domains of .NET. He is associated with Microsoft's Insider list on WPF and C# and stays in touch with Product Group teams. He holds a Master's degree in Computer Application along with various other certificates to his credit. Abhishek is a freelance content producer, developer, and site administrator. His website www.abhisheksur.com guides both budding and experienced developers in understanding the details of languages and latest technologies. He has a huge fan following on social networks. You can reach him at books@abhisheksur.com, get online updates from his Facebook account, or follow him on Twitter @abhi2434.

Follow Me

Leave a reply

Share via
Copy link
Powered by Social Snap