Supply Chain Management Blogs by SAP
Expand your SAP SCM knowledge and stay informed about supply chain management technology and solutions with blog posts by SAP. Follow and stay connected.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member186731
Active Contributor

Asking yourself how to adjust standard TM processes to match a certain customer requirement? Stumbled over the process controller already?

The Process Controller Framework (PCF) is a concept going beyond BAdIs. With a BAdI you can manipulate a very specific function, while the PCF is meant to enable combining SAP standard functions with customer specific modules in a very generic way by defining strategies for a process. Such a stratgies makes it much more transparent, which enhancements have been done and which modules are used in comparisson to a simple BAdI implementation. The PCF has been used from the very beginning of the SAP TM development in planning, but grew into different areas (GIS integration, Copy Controll, Change Controll, Dangerous Goods handling, Incompatibilities, and so on). The basic idea is to pass all input / output data in a generic request object from one method to the other. Usually this is done in a very unrestricted way, but all OO concepts of information hiding could be applied, too.

From the perspective of a customer project having the need to create a new module, I think the definition of strategies, methods and the strategy - method assignment is well documented in the standard application help. The tricky part is here:

In the method defintion you need to point to an implementing class and method, which fullfills the signature (I guess the maintenance should check the compliance):

Within the method, you then need to access the request object:

METHOD your_functionality.

  DATA: lo_request            TYPE REF TO /sctm/cl_request,
        lo_[PROCESS]_request  TYPE REF TO [YOUR REQUEST OBJECT].


  LOOP AT it_request INTO lo_request.

    lo_[PROCESS]_request = cast_request( lo_request ).
    CHECK lo_[PROCESS]_request IS NOT INITIAL.

#################################################

Execute your process here; take request data out

of lo_[PROCESS]_request and put in result

#################################################

  ENDLOOP.

ENDMETHOD.

Usually the input table IT_REQUEST holds only 1 object. The cast is required to get the process specific request object. In case you get a dump here when testing, you have probably tried to cast for a wrong service.

That's all! 🙂

Cheers,

Marcus

4 Comments