cancel
Showing results for 
Search instead for 
Did you mean: 

Case-Management: Providing Data to Document using FUNCTION_GET_FORM_DATA

Former Member
0 Kudos

Hello,

I try to provide data to a RM-Document using a function defined in the connection parameter FUNCTION_GET_FORM_DATA of an element of service provider type SCMG_SP_DOCUMENT.

The importing/exporting parameters are

FUNCTION Z_RM_BDV_GET_DATA.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(IM_DOC_PROPS) TYPE  SRMGS_PROPERTY_TAB OPTIONAL
*"     VALUE(IM_CONTEX_PROPS) TYPE  SRMGS_PROPERTY_TAB OPTIONAL
*"     VALUE(IM_DOC_TEMPLATE_ID) TYPE  STRING OPTIONAL
*"     VALUE(IM_DOC_PROXY) TYPE REF TO  I_OI_DOCUMENT_PROXY OPTIONAL
*"  EXPORTING
*"     REFERENCE(EX_FORM_DATA) TYPE  SOI_FORM_LIST
*"----------------------------------------------------------------------

Inside this function module I'm using the CASE-API to get additional data from the case where the document is linked to. The CASE_GUID is part of the provided parameter im_contex_props

+CALL METHOD cl_scmg_case_api=>if_scmg_case_api~open_case+
    +EXPORTING+
      +im_case_guid    = p_case_guid+
  +RECEIVING+
      +re_case         = pif_case_api+
 +.....  some more case_api methods ...
 + pif_case_api->close_case() .

Now my problem starts.

After saving the RM-Document and working in the case again there are some obscurenesses.

Sometimes I will loose case attributes after saving the case.

Sometimes the case won't be saved even if there are some parts changed. (e.g. the document which was inserted into the linked objects will disappear after saving the case.)

Some additional miracles:

If I leave the document without saving. I will be prompted to save the changes. ==> everythin ok.

If I save the document and then leave it. The storage of the case will fail.

I NEED SOME HELP PLEASE !!!!!!

Regards

Jochen

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jochen,

You need to create an element type cppying the element type "SCMG_SPS_DOCUMENT" and enter the values for the following parameters in Classification and Connection Parameters.

o DOCUMENT_CLASS

o FUNCTION_GET_FORM_DATA (function module defined by the customer for form data, optional)

o TEMPLATE_ID (reference to Office document template, optional, value can be assigned more than once)

o RMS_ID

I think, now you will be able to do.

Please check.

Regards,

Eswari.

Former Member
0 Kudos

Hi Eswari,

thanks for your answer but that's not my problem ;-(((

The element type was set and the function modul exists.

I have an internal SAP problem using the case api inside this function module.

I you are using cl_scmg_case_api->open_case() inside the function module you will loose data. The case will not be saved correctly.

> After saving the RM-Document and working in the case again there are some obscurenesses.

> Sometimes I will loose case attributes after saving the case.

> Sometimes the case won't be saved even if there are some parts changed. (e.g. the document which > was inserted into the linked objects will disappear after saving the case.)

I have now found a workaround (but that is not the solution ;-((():

Whenever I want to access the overlaying case I removed "cl_scmg_case_api->open_case()" and tried to use the case backend to get an entry point to the overlaying case.

If I could not get the case backend I will open the case using the case api (and hopefully won't get the error.)

If anyone has an other solution please forward it to this newsboard.

Thanks

Jochen