I have been following along the lastest howto document for custom process types (BI 7.0):
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
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.
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'
18 POPUP_TITLE = 'Process Chain to Check'
20 FIELDS = L_T_TABLE.
22 * ... Check selected process chain
23 READ TABLE L_T_TABLE INTO L_S_TABLE INDEX 1.
>> CALL FUNCTION 'RSPC_GET_CHAIN'
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
31 E_T_CHAIN_IDS = L_T_CHAINID
32 E_T_CHAINT = L_T_CHAINT
Does anyone know how to fix this?