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

FEH implementation issue SAP version 7.01

JPG
Discoverer
885

Hi,

Apologies, this is a long post. Wanted to get the detail down so if someone could help I could get there without leaving out information that would speed up the process.

I've spent quite a bit of time customizing and implementing the FEH framework for inbound asynchronous enterprise services. The problem is that because we're on an older version of SAP I can't find any good how-to guides. I have found two useful, but not complete references, for my purposes:

1. https://archive.sap.com/documents/docs/DOC-34091

2. https://blogs.sap.com/2011/02/24/pixi-forward-error-handling-feh-for-asynchronous-proxy-calls-with-t...

While both of these have been very helpful, neither matches our FEH implementation. For instance the paths to the PPO and ECH customing in SPRO covered in the documents are different in our version of SAP. About halfway through the first document above the maintenance views referenced don't exist in our system.

So I have had to use pieces from both in order to set up FEH. Now I test run an inbound test proxy which creates an error (purposeful so FEH is started). It runs through all my code and the FEH code successfully but does not create an order in PPO. Because I don't have a single document to work from I don't know where the problem is. I did the following to set up FEH, mainly the steps described in the 1st document above.

  • Switched on FEH in ECH following this path

SPRO --> Cross Application Components --> Processes and Tools for Enterprise Applications
--> Enterprise Services --> Error and Conflict Handler --> Activate Error and Conflict Handler

  • Created the component in PPO

SPRO --> Cross Application Components --> General Application Functions --> Postprocessing Office à Software Components --> Define Software Components

  • Define Process data in ECH

SPRO --> Cross Application Components -->Processes and Tools for Business Applications --> Enterprise Services --> Error and Conflict Handler à Define Process Data

  • Assign ECH Business Process to PPO

SPRO --> Cross Application Components à Processes and Tools for Business Applications --> Enterprise Services --> Error and Conflict Handler--> Define Postprocessing

Maintenance view: ECHS_PP_PROCESS

  • Assign Proxy method to FEH Process

Maintenance view – FEHV_PROXY2CMPR

  • Define Object type in PPO

SPRO --> Cross-Application Components à General Application Functions--> Post processing Office --> Object Types --> Define Object Types

  • Define PPO Business Process

SPRO --> Cross-Application Components -->General Application Functions--> Post processing Office --> Business Processes--> Define Business Processes

  • Activation of Creation of PPO

SPRO --> Cross-Application Components --> General Application Functions --> Post processing Office --> Business Processes--> Activate Creation of Post Processing Orders

  • PPO Define Worklist

SPRO --> Cross-Application Components --> General Application Functions--> Postprocessing Office --> Worklist --> Define Worklists

  • PPO Assign Worklist to Business Process

SPRO --> Cross-Application Components à General Application Functions--> Postprocessing Office --> Worklist --> Assign Worklists to Business Processes

  • Custom Implementation

I created an action class which implements the "IF_ECH_ACTION" interface. I then implemented the methods as mentioned in the first reference document above. I call this class in the inbound proxy. I customized the "process" and "execute" methods to call the class which process the inbound payload and in the execute method if there is an error I initialise the FEH class and the call the collect method. In order to debug the PI Consultant created a test inbound proxy. Often when you test from SPROXY the FEH framework doesn't "work" so the PI Consultant created an outbound matching enterprise service. So when I run that I know that the inbound XML comes in through PI. I run the code and everything is successful,I debug and everything looks good. It finds the correct component and process in the "collect" method and ends processing without throwing an error or exception. But when I look in /SAPPO/PP03 there is no PPO order. Really frustrated as I don't know how to move forward without relevant reference documents to know what I am missing.

Any advice would be very much appreciated.

Regards, Juan

  IF gs_main_error-type EQ 'E' .
*   Forward Error Handling - Create instance of CL_FEH_REGISTRATION
    TRY.
        IF lr_fehreg IS INITIAL.
          lr_fehreg = cl_feh_registration=>s_initialize( ).
        ENDIF.
      CATCH cx_ai_system_fault INTO lcx_sys_fault .
*       Error handling here
    ENDTRY.
**********************************************
*   Handle the error for FEH
    IF lr_fehreg IS BOUND .
*     Provide information for FEH
      me->gs_object-objcat  = zif_feh_constants=>gc_obj_cat_1 . "Category is always '1'
      me->gs_object-objtype = gs_feh_config-object_type       . "The object type from ECH coustomizing
      me->gs_object-objkey  = gv_object_key                   . "e.g. Personnel No. set in the processing class
      TRY.
*         Error symptom transferred to the FEH Instance using the collect method
          CALL METHOD lr_fehreg->collect
            EXPORTING
              i_single_bo      = is_input
              i_error_category = zif_feh_constants=>gc_err_cat_pre  "Processing error
              i_main_message   = gs_main_error
              i_messages       = gt_all_error
              i_main_object    = me->gs_object
              i_pre_mapping    = space.
          COMMIT WORK . "I added this recently, it was not present before
        CATCH cx_ai_system_fault INTO lcx_sys_fault .
*         There is error handling here
      ENDTRY.
    ENDIF.
**********************************************
*   set the error text for PI
    CONCATENATE 'The processing of the interface process' 
                gs_ech_process
                'for the object key'
                gs_object-objkey
                'resulted in an error'
                INTO lv_std_fault SEPARATED BY space.
    me->raise_std_fault( lv_std_fault ) .
  ENDIF .
0 REPLIES 0