Simple Data Type Transfer through RFC

  • by George Chen, SAP Consultant, Lynk, Inc.
  • December 1, 2017
Before sending data across systems you need to ensure both systems are on the same page regarding the data type. If it is a unique composite data type from the called system, then you first need to send the definition of this data type to the calling system and have it recreated. Then when you send the data over, there is no surprise or dump.
Learning Objectives

Reading this article, you will: 

  • Understand this generic approach for getting a data definition for any structure
  • Learn how to create data based on the data definition
  • Learn how to invoke a dynamic method with dynamic parameter tables
Key Concept

A Remote Function Call (RFC)-enabled function module is an SAP program that can be called by RFC from another system. Generic programming is a style of computer programming in which algorithms are written in terms of types to be specified later that are then instantiated when needed for specific types provided as parameters. Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object to be able to recreate it when needed. The reverse process is called deserialization.

In system integration development, you make a Remote Function Call (RFC) to a generic function module of another system, execute some functions, and then possibly get the results back to the calling system. If the result is a generic type, such as a string or a table of strings, you can just pass the data with the mutually agreed-upon, mutually understood data type of a string or a table of strings between the calling system and callee system without a problem.

It is easy to build the same data structure definition statically in the calling system to receive the data. However, what if you have tens of thousands of different data structures to be used in data transfer? You end up creating tens of thousands of different data structures one by one. That’s tedious.

I describe a composite data structure and show you how to recreate in a generic method the data structure based on a definition that you can apply to many different data structures. Simple data type means one flat composite structure of generic data types, not a nested structure that includes another structure or another table. This article is about a generic approach to create a data structure in the calling system.

George Chen

George Chen is the owner of Lynk, Inc. An SAP consultant, he has worked on SAP Netweaver ABAP/HANA/BPC/BW/IP/TPM/CRM for the past 17 years. He specializes in process integration, performance tuning, and introducing advanced ABAP design patterns in development. He has worked with SAP America many times to conduct ABAP performance tuning and troubleshooting. His focuses are ABAP for HANA and ABAP OO in SAP NetWeaver.

See more by this author


Comments

No comments have been submitted on this article. 


Please log in to post a comment.

To learn more about subscription access to premium content, click here.