Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting update function module to OO class method?

Former Member
0 Likes
1,149

Hi all experts,

I have encountered a problem when attempting to convert a function module to OO style class method.

I want to replicate an update module i.e one which runs in a background work process; to a class method but cannot find any option to enable the method to run as a background process.

the situation is that i am converting a function group Z_BSP_SHOP

to a class ZCL_BSP_SHOP

and the individual function modules i.e. Z_SHOP_CREATE_ORDER

to static class methods i.e ZCL_SHOP_CREATE_ORDER.

any help would be much appreciated,

damian.

4 REPLIES 4
Read only

uwe_schieferstein
Active Contributor
0 Likes
806

Hello Damian

I am not sure if it is possible to execute methods calls in background (perhaps in release >= 700).

Thus, you have execute your method call within another program object that works in background like a normal report.

Regards

Uwe

Read only

0 Likes
806

Thanks Uwe

Lets hope more functionality added in future releases but for now i appreciate the workaround

cheers,

damian.

Read only

0 Likes
806

Hello Damian

For sure SAP will continue to surprise us. If you are working on 6.20 (or higher releases) display any class in SE24 and display the tabstrip "Properties" and have a look at the possible categories:

Class/Interface category

    This field cannot be maintained explicitly, but is assigned to special
    types of classes. Currently these are:

    o   01: Exit classes, that is classes of a BAdI (Business Add-In) of
        associated generated adapter classes

    o   10: Persistent classes in terms of Object Services

    o   11: Factory for persistent classes

    o   12: Status classes for persistent classes

    o   20: View classes (for later use)

    o   30: Proxy classes for remote interfaces (for later use)

    o   40: Exceptions, that is a class in terms of the new ABAP Object
        Exception Handling

...

For now we cannot use these categories but they let us glimpse into the (near) future. I think the most exciting prospect are <b>Proxy classes for remote interfaces</b>.

Regards

Uwe

Read only

0 Likes
806

Uwe,

some very interesting developments indeed, i am lucky enough to be using 6.40 and the categories you mentioned do appear to be something for the future.

One approach to OO i am seriously considering is the use of MVC in future web projects and i am hoping to start having a look at model and controller classes when workload allows!

I really hope these areas are something that SAP are really going to push in future releases and hopefully some exciting literature will come out alongside these developments.

many thanks again, and seasons greetings to all SDN'ers

Damian