on 09-05-2008 1:50 PM
Dear Fellows,
I'm not able to rebuild an infocube, adding one additional characteristics using remodelling tool and user_exit.
I found these documents, so far so good, they look very promising:
I have following scenario -> select from DSO one characteristics and insert it into InfoCube as new characteristics.
(Cube-referenceDocumentNumber + Cube-ReferenceDocumentPosition = DSO-BillNumber + DSO-BillPosition)
When I execute my exit ZREMOD_ZCONKEY_EXIT, it ends with dump -> i_r_old is initial. !!
ASSIGN c_r_newfield->* TO <l_newfield>.
ASSIGN i_r_old->* TO <l_s_old>.
What should be in the variable: I_CNVTABNM ??
How I_R_OLD and C_R_NEWFIELD should be filled??
Please try to help me to find the right way.
Thank you
Standa
Here is my code.
METHOD if_rscnv_exit~exit.
FIELD-SYMBOLS: <l_s_old> TYPE ANY,
<l_fill_bel> TYPE ANY,
<l_fill_pos> TYPE ANY,
<l_newfield> TYPE ANY.
DATA: l_refbel TYPE rschavl,
l_refpos TYPE rschavl,
l_zconfkey TYPE rschavl,
l_attr TYPE string.
ASSIGN '/BIC/FZCICDIVI' to <l_s_old>.
assign '/BIC/SZCPA0016-SID' to <l_newfield>.
BREAK-POINT.
ASSIGN c_r_newfield->* TO <l_newfield>.
ASSIGN i_r_old->* TO <l_s_old>.
ASSIGN COMPONENT 'ZCPA0015' OF STRUCTURE <l_s_old> TO <l_fill_bel>.
ASSIGN COMPONENT '/BIC/SZCPA0016-SID' OF STRUCTURE <l_s_old> TO <l_fill_pos>.
*if not i_r_old is INITIAL.
CALL FUNCTION 'RRSI_SID_VAL_SINGLE_CONVERT'
EXPORTING
i_iobjnm = 'zcpa0015'
I_S_COB_PRO =
i_sid = <l_fill_bel>
IMPORTING
e_chavl = l_refbel
E_S_NODESID =
E_S_NODESID_ASO =
EXCEPTIONS
no_value_for_sid = 1
x_message = 2
OTHERS = 3.
IF sy-subrc <> 0.
l_attr = text-001.
RAISE EXCEPTION TYPE cx_rscnv_exception
EXPORTING
attr1 = 'CL_RSCNV_USER_EXIT_SAMPLE'
attr2 = 'EXIT-1'
attr3 = l_attr.
ENDIF.
CALL FUNCTION 'RRSI_SID_VAL_SINGLE_CONVERT'
EXPORTING
i_iobjnm = 'zcpa0016'
I_S_COB_PRO =
i_sid = <l_fill_pos>
IMPORTING
e_chavl = l_refpos
E_S_NODESID =
E_S_NODESID_ASO =
EXCEPTIONS
no_value_for_sid = 1
x_message = 2
OTHERS = 3.
IF sy-subrc <> 0.
l_attr = text-001.
RAISE EXCEPTION TYPE cx_rscnv_exception
EXPORTING
attr1 = 'CL_RSCNV_USER_EXIT_SAMPLE'
attr2 = 'EXIT-1'
attr3 = l_attr.
ENDIF.
SELECT SINGLE au_confkey
FROM /bic/azsdvditm00
INTO l_zconfkey
WHERE bill_num = l_refbel
AND bill_item = l_refpos.
CALL FUNCTION 'RRSI_VAL_SID_SINGLE_CONVERT'
EXPORTING
i_iobjnm = 'ZCONFKEY'
i_chavl = l_zconfkey
I_S_COB_PRO =
I_CHECKFL = RS_C_FALSE
I_WRITEFL = RRSI_C_WRITEFL-NO
I_MASTERDATA_CREATE = RS_C_TRUE
I_RNSID =
I_NEW_VALUES = RS_C_FALSE
IMPORTING
e_sid = <l_newfield>
EXCEPTIONS
no_sid = 1
chavl_not_allowed = 2
chavl_not_figure = 3
chavl_not_plausible = 4
x_message = 5
interval_not_found = 6
foreign_lock = 7
inherited_error = 8
OTHERS = 9
.
IF sy-subrc <> 0.
l_attr = text-002.
RAISE EXCEPTION TYPE cx_rscnv_exception
EXPORTING
attr1 = 'CL_RSCNV_USER_EXIT_SAMPLE'
attr2 = 'EXIT-2'
attr3 = l_attr.
ENDIF.
*endif.
ENDMETHOD.
Hi,
take a look: [Remodeling Infocubes - FAQ's|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/remodeling]
I_CNVTABNM
Name of the remodeled table. You require this parameter if you want to use the same customer exit for more than one remodeling rule.
I_R_OLD
Structure of the table before remodeling
C_R_NEWFIELD
Result of the routine, which is assigned to the new field
Here is some sample code:
Regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.