Simplify Your ABAP Data Access to Planning Applications

  • by Alfred Ho, SAP Technical Specialist, Husky Energy
  • January 1, 2007
Use the ABAP code in this article to enhance standard function modules in Strategic Enterprise Management Business Planning and Simulation so that you do not have to worry about externally formatted values.
Key Concept

SAP provides function modules in a function group called UPC_API such as API_SEMBPS_GETDATA and API_SEMBPS_SETDATA to read and write to InfoCubes using Strategic Enterprise Management Business Planning and Simulation (SEM-BPS) customized definitions. BPS function modules require the technical IDs of the planning area, planning level, and planning package as import parameters to determine the specifications for processing. Data returned from API_SEMBPS_GETDATA includes a set of internal tables containing the layout information and transactional data.

The format of these internal tables is difficult for ABAP developers to use because it’s not tabular. The returned data’s layout depends on your template’s layout. For example, if you designed your BPS layouts based on rows with hard-coded row values, then the data contains hard-coded values. The code in this article provides raw data rather than cryptic, coded selections.

Custom applications using Strategic Enterprise Management Business Planning and Simulation (SEM-BPS) often require ABAP development. For example, some companies require a Controlling (CO) planning application with a sophisticated user interface that the standard BPS business content does not provide. However, standard BPS function modules could retrieve template data that adheres to rigid formatting rules. This data makes it difficult to convert fields such as dates or decimals into the type of data that ABAP coding uses.

For example, Figure 1 shows a date in YYYY.MM.DD format. ABAP needs this date format in YYYYMMDD format with no decimals or slashes. I wrote ABAP code that converts this format for you. Another type of conversion that works with this logic is alpha conversion such as front-padded numbers (e.g., change 3 to 00003 or vice versa).

Alfred Ho

Alfred Ho graduated from the University of Calgary with a BS degree in computer science. He has been working as a dedicated programmer for the last five years in SAP ABAP, Java, C/C++, C#, .NET, and Web technologies.

See more by this author


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.