Skip to Content
Technical Articles
Author's profile photo Andre Fischer

Missed openSAP week 2 ? Generate your RAP object

For whom did I wrote this class?

If you have not been able to attend week 2 of the openSAP course but you want to continue with week 3 this blog is for you.

Another target group might be those participants whose RAP business object does not work as expected.

What do you have to do?

  1. Create two new packages
    • ZRAP_#### within ZLOCAL
    • ZRAP_TRAVEL_#### as a sub package of ZRAP_####
  2. Create a class zcl_generate_week2_#### within the package ZRAP_TRAVEL_####
  3. Replace the source code of the template with the source code that you can find on our github repository

  4. Replace all occurrences of #### with an own unique number or unique combination of numbers and characters (for example AF88)
    (You will find #### in line 1, 13, 14 and 45)

  5. Run the class as a console application using F9

 

Result

The class does the following:

  1. It creates two tables ZRAP_ATRAV_#### and ZRAP_ABOOK_####
  2. It creates all objects that have been created in week 2

 

What is left to do

  1. Fill the tables with data using the class ZCL_GENERATE_DEMO_DATA_####
  2. Add the following statement to your service definition
    expose /DMO/I_Airport as Airport;​
  3. Activate the service binding

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.