Skip to Content
author's profile photo
Former Member

Error in Custom Process Type Howto

I have been following along the lastest howto document for custom process types (BI 7.0):

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/509f3ae6-e36e-2910-48a8-ab43dc167dd9

I copied its code and everthing compiles fine, but when executed, the program crashes when you click on the green arrow to confirm the selected variant. The method call to RSPC_GET_CHAIN seems to be wrong:

Type conflict when calling a function module.

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was

not caught in

procedure "IF_RSPC_GET_VARIANT~GET_VARIANT" "(METHOD)", nor was it propagated

by a RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

The call to the function module "RSPC_GET_CHAIN" is incorrect:

The function module interface allows you to specify only

fields of a particular type under "I_CHAIN".

The field "L_S_TABLE-VALUE" specified here is a different

field type

1 METHOD IF_RSPC_GET_VARIANT~GET_VARIANT.

2 DATA: L_T_CHAINID TYPE RSPC_T_CHAINID,

3 L_S_CHAINID TYPE RSPC_S_CHAINID,

4 L_T_CHAINT TYPE RSPC_T_CHAINT,

5 L_S_CHAINT TYPE RSPCCHAINT,

6 L_S_CHAIN TYPE RSPC_S_CHAIN,

7 L_T_TABLE TYPE TABLE OF SVAL,

8 L_S_TABLE LIKE LINE OF L_T_TABLE.

9

10 * ... Read Process chains from control table an

11 READ TABLE I_T_CHAIN INTO L_S_CHAIN INDEX 1.

12 L_S_TABLE-TABNAME = 'ZPROCESS_CONTROL'.

13 L_S_TABLE-FIELDNAME = 'ZCHAIN_ID'.

14 L_S_TABLE-VALUE = '*'.

15 APPEND L_S_TABLE TO L_T_TABLE.

16 CALL FUNCTION 'POPUP_GET_VALUES'

17 EXPORTING

18 POPUP_TITLE = 'Process Chain to Check'

19 TABLES

20 FIELDS = L_T_TABLE.

21

22 * ... Check selected process chain

23 READ TABLE L_T_TABLE INTO L_S_TABLE INDEX 1.

>> CALL FUNCTION 'RSPC_GET_CHAIN'

25 EXPORTING

26 I_CHAIN = L_S_TABLE-VALUE

27 I_OBJVERS = 'A'

28 I_WITH_DIALOG = RS_C_TRUE

29 I_ONE_NO_DIALOG = RS_C_TRUE

30 IMPORTING

31 E_T_CHAIN_IDS = L_T_CHAINID

32 E_T_CHAINT = L_T_CHAINT

Does anyone know how to fix this?

Thanks,

Dennis

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 08:26 PM

    I was able to fix it myself:

    CALL FUNCTION 'RSPC_GET_CHAIN'

    EXPORTING

    I_CHAIN = L_S_TABLE-VALUE(25) " <- this is the fix

    I_OBJVERS = 'A'

    I_WITH_DIALOG = RS_C_TRUE

    I_ONE_NO_DIALOG = RS_C_TRUE

    IMPORTING

    E_T_CHAIN_IDS = L_T_CHAINID

    E_T_CHAINT = L_T_CHAINT

    Add comment
    10|10000 characters needed characters exceeded