Scroll Top

Using Operating System Commands in ABAP

The Secret Of Santa’s Supply Chain

TAKE NOTE (Insights into SAP solutions and Emerging Technology)

We’re approaching the time when Santa — founder, chairman, and CEO of Santa Claus Toy Manufacturing and Distribution Corp. — manages to ship billions of toys in a single day, all with guaranteed overnight delivery. Year after year, how does he achieve this feat? By running a live supply chain.

Big Belly, Big Data

It begins with Santa’s unmatched ability to capture and analyze Big Data. His customer base is estimated at 7.4 billion, forecast to reach 11.2 billion by 2100. Surely he manages those records in an in-memory database.

Santa takes an omnichannel approach, harmonizing structured and unstructured data, including customer sentiment and segmentation. Traditionally he leverages high-touch customer interactions, taking a large number of orders in face-to-face meetings as his target customers (children of all ages) sit on his knee in Santa’s Grottos around the world. Another key channel is written orders, through the once-popular national postal systems, that optical character recognition converts to digital orders.

From Elf Floor to Top-Shelf Floor

But Santa can’t silo his data. He needs to share it with elves throughout the enterprise. Santa’s demand forecasting must have him pulling his long white beard, trying to synchronize supply and demand during sales and operations planning (S&OP) meetings. Bear in mind that his demand picture often changes in real time, as many orders are placed (along with milk and cookies) at point of delivery. He also has to manage millions of SKUs that all peak at exactly the same time

Still, these complex challenges require a highly responsive planning system to manage push/pull boundaries in the ultimate of demand-driven, finish-to-order planning and manufacturing processes. Yet he maintains a perfect order rating of 100%, mostly because he fields a best-in-class data scientist (probably Mrs. Claus).

Twelve Days of IoT

There’s no question Santa’s sleigh is tricked out with Internet of Things (IoT) sensors. Weight sensors ensure the sleigh isn’t overloaded or out-of-balance. After all, assuming one product per customer at an average two pounds per product, Santa’s sleigh tips the scales at 7.4 million tons.

Health sensors monitor eight overworked reindeer. Given that a typical reindeer can carry no more than 300 pounds, Santa’s airborne team must do the job of well over 49 million of the nonflying variety. Real-time weather monitoring dictates whether a ninth illuminated reindeer gets added to the fleet.

Performance monitors send back data to Santa’s R&D elves, who continually improve sleighdesign. They also enable preventive maintenance by technician elves, who ensure zero sleigh downtime.

Read more here at Forbes. 

UNDER DEVELOPMENT(Information for ABAP Developers)

Using Operating System Commands in ABAP

Interacting with the HOST OS using ABAP

SAP does such a good job of abstracting its surrounding environment that we rarely take the features of its host operating system into account. The reality is that ABAP isn’t particularly good at solving certain problems. Rather than trying to reinvent the wheel with convoluted solutions, it’s best to solve these problems with the right tool. And sometimes, that tool is sitting on the operating system just waiting to be used.

For instance, at one of our current clients, I was working on their EDW team and needed to archive a file from a “process” directory to an “archive” directory after processing. I was surprised to see a relatively seasoned developer was using ABAP logic to achieve this. They were opening a new file in the “archive” directory, writing the contents, and closing the file and finally deleting the file from the “processing” directory. I changed the code to utilize the UNIX MOVE command. It was much less code and leveraged the existing UNIX Command.

In this blog, I want to show you how to interact with the host operating system of SAP NetWeaver AS ABAP. Specifically, I’ll introduce you to a framework that SAP provides as part of the standard to define external commands in a highly portable manner. After explaining the basics of this framework, we will look at an example of how to define and use the external commands.

Programming in ABAP with External Commands

Unlike other programming interfaces provided in ABAP, there is no built-in language statement that you can use to execute external commands. Instead, you must define these commands within the system so that they can be executed via standard API functions. Let’s begin by exploring how to maintain the external commands.

Maintaining External Commands

OS Host External commands are maintained using Transaction SM69. As you can see from the screen shotbelow, a lot of commands are delivered by SAP in every NetWeaver system; consequently, it’s always a good idea to see if SAP has already configured the command you’re looking to execute instead of creating a new command definition from scratch.

OK, let’s take a deeper look. In order to show you how to configure your own custom external commands, let’s look at one delivered by SAP. The PING command is available on any SAP NetWeaver AS ABAP host. The PING command will determine whether an IP address is reachable on a network.

HOLIDAY MESSAGE(Special message from CEO & President)

I really enjoy this time of the year as it is when Chris and I reflect back on what has been achieved both personally and at ITP. 2016 has been a great year for us and we feel very proud of what has been achieved and very appreciative of all the hard work put in by our employees, consultants, and Partners.
We are continually humbled and honored to be able to work with such outstanding people and companies.
We are very excited about 2017 but, right now, I’m sure many of you are looking forward to recharging your batteries and catching up with family and friends over the next few weeks. So thank you, for your support, your friendship, and your business. From all of us at IT Partners, we wish you all a Merry Christmas, full of cheer, family, fun and warmth and a very prosperous New Year!
Christine Cecchini – CEO
Anthony  Cecchini – President

Pin It on Pinterest

Share This

If you enjoyed this post, why not share it with your friends!