14.01.2020 Views

ABAP_to_the_Future

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Backend Tasks: Creating the Model Using SAP Gateway 13.3

Green checkmark time again, and then your association is complete. When you

look at your monster project again (Figure 13.10), you’ll see that the system has

added a few more nodes to your tree st ructure and chained together the header

and item.

Figure 13.10 Creating an Association: 3 of 3

At this point, if you expand the node called Service Implementation, then you

will see the CRUD operations: Create, Read, Update, and Delete. It makes me

want to cry that whoever invented the OData design decided to call the read operations

GET, thus turning CRUD into CGUD. There are two read operations: GETEN-

TITY (Read), which returns either a single object or an error, and GETENTITYSET

(Query), which returns between zero and mu ltiple objects. However, would it

have hurt the OData inventor (I think his name was Seamus O’Data) so much to

go with the industry standard? Obviously, yes.

Anyway, you cannot perform any of those operations without some sort of ABAP

coding, and for that you need the system to generate some ABAP classes, which

will form a service.

Creating the Service and Classes for Your Monster Project

Now that you’re done with defining everything, the data is in a form in which

you can let the system generate classes and a related service based upon that data.

Do this by clicking the red and white cr ash test dummy icon at the top of the

SEGW screen (you can see it at the top of the screen in Figure 13.11, behind the

pop-up box) with the hover text Generate Runtime Objects. When you click this

button, the pop-up box shown in Figure 13.11 appears.

573

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!