Quantcast
Channel: SCN : Discussion List - Business Server Pages (BSP)
Viewing all articles
Browse latest Browse all 237

Problem with CRM-BSP - CX_OS_OBJECT_NOT_FOUND

$
0
0

Hello,

 

i got a function module to trigger an ppf-action via function module in SAP GUI.

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

 

  Data: EV_CONTEXT  TYPE REF TO CL_DOC_CONTEXT_CRM_ORDER.

  Data: ET_CONTEXT  TYPE  CRMT_ACTION_DOC_CONTEXT_T.

  Data: CL_MANAGER_PPF type ref to CL_MANAGER_PPF.

  Data: CL_CONTEXT_PPF type ref to CL_CONTEXT_PPF.

  Data: CL_TRIGGER_PPF type ref to CL_TRIGGER_PPF.

  Data: RP_STATUS type PPFDTSTAT.

 

*Context erzeugen (Aktionsprofil zum Beleg)

  CALL FUNCTION 'CRM_ACTION_CONTEXT_CREATE'

    EXPORTING

      IV_HEADER_GUID                       = GUID

      IV_OBJECT_GUID                       = GUID

  •   IV_PPFDCNTXT                         =

  •   IV_ITEM_TYPE                         =

  •   IS_ORDERADM_I_WRK                    =

    IMPORTING

      EV_CONTEXT                           = EV_CONTEXT

      ET_CONTEXT                           = ET_CONTEXT

   EXCEPTIONS

     NO_ACTIONPROFILE_FOR_PROC_TYPE       = 1

     NO_ACTIONPROFILE_FOR_ITEM_TYPE       = 2

     ORDER_READ_FAILED                    = 3

     OTHERS                               = 4.

 

  If sy-subrc NE 0 or EV_CONTEXT is initial.

    raise NO_ACTIONPROFILE.

  Endif.

 

 

 

  • Erzeugen eines Triggers

  CL_CONTEXT_PPF ?= EV_CONTEXT.

 

  CL_MANAGER_PPF = CL_MANAGER_PPF=>GET_INSTANCE( ).

 

  CL_MANAGER_PPF->EXECUTION_MODE = 1.

 

  CL_TRIGGER_PPF = CL_MANAGER_PPF->CREATE_TRIGGER( IP_MANUAL = 'X'

                                                   IP_TTYPE_NAME = ACTION

                                                   IO_CONTEXT = CL_CONTEXT_PPF ).

 

*Container lesen

  call method CL_TRIGGER_PPF->IF_ACTION_PPF~GET_PROCESSING

    IMPORTING

      EI_PROCESSING = IF_MEDIUM_PPF.

 

*Aktion ausführen

  call method CL_TRIGGER_PPF->IF_ACTION_PPF~EXECUTE

    IMPORTING

      RP_STATUS = RP_STATUS.

 

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

 

In the SAP GUI the function module works fine :).

 

But when i implement this function module in a business server page there occurs the following problem.

 

When i start to process a ppf-action for the first time everything works fine. When i call a second ppf-action in the same session for the same order-guid there appears the following BSP error:

 

CX_OS_OBJECT_NOT_FOUND

 

Program: CL_METHODCALL_PPF

Method: IF_OS_STATE~HANDLE_EXCEPTION

 

When i process a second ppf-action with a different guid than the first processing everything works fine. I think there must be a problem with refreshing the GUID or something like this.

 

Does anybody have an idea how to solve the problem??

 

Best regards

Jens

 


Viewing all articles
Browse latest Browse all 237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>