on 02-07-2013 4:51 PM
Component information:
BW 730 Patch 005
SAP ECC 6.0
Hello All,
I am facing issues trying to load 0COSTELMNT_0102_HIER with intervals from ECC 6.0 to BW 730
The datasource 0COSTELMNT_0102_HIER has been migrated. I am able to load PSA with data. But during DTP I am recieving the following error.
Interval node with the ID 4: The from-value is larger than the to-value
Message no. RH214
Diagnosis
The "from" value is larger than the "to" value for the interval node with ID 4 and node name .
Procedure
By swapping the "from" and "to" values you can get a valid hierarchy structure.
In my transformation is as follows..
hierarchy cost element header mapping is
HIENM > 0H_HIENM
OBJECTID > 0OBJECTID
HEADER TEXTS
SIMPLE 1 > 1 MAPPING
HIERARCHY NODES
ONE TO ONE MAPPING AND
NODEID > 0COSTELMNT WITH ROUTINE
DATA wa_seg_5 TYPE ty_seg_5.
DATA flag.
WHILE flag EQ space. ENDWHILE.
READ TABLE t_seg_5 INTO wa_seg_5
WITH KEY nodeid = SOURCE_FIELDS_3-nodeid.
IF sy-subrc EQ 0.
RESULT = wa_seg_5-leaffrom+4(10).
ENDIF.
NODEID > 0CO_AREA WITH ROUTINE
DATA wa_seg_5 TYPE ty_seg_5.
READ TABLE t_seg_5 INTO wa_seg_5
WITH KEY nodeid = SOURCE_FIELDS_3-nodeid.
IF sy-subrc EQ 0.
RESULT = wa_seg_5-leaffrom(4).
ENDIF.
NODE TEXTS ONE TO ONE MAPPING
INTERVALS
NODEID > 0H_NODEID
LEAFFRMOM >
LEAFTO > 0COSTELMNT WITH ROUTINE
RESULT = SOURCE_FIELDS_5-leafto+4(10).
LEAFTO > 0CO_AREA WITH ROUTINE
RESULT = SOURCE_FIELDS_5-leafto(4).
OBJECTID > OBJECTID
Please can anyome advise how the mapping should be done or any routines I need to include
Thanks
Hi Forhad,
Any particular reason why you have migrated to 7.x flow. Although 7.3 supports transformation and dtps in hierarchy loads I suggest to keep it in 3.x if you don't have a special reason for it.
If you wish to use 7.x flow then you need to use routines to be able to convert the data to right format.
Sap documentation
http://help.sap.com/saphelp_nw73/helpdata/en/ba/45db1795cd41ae83230ae01e882500/frameset.htm
Some more threads
https://scn.sap.com/thread/2127868
http://scn.sap.com/thread/3251605
Regards,
Sujit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I open the start-routine there is no default coding.
The documentation says:
The corresponding function call is created by default as a comment in a new start routine.
When I create the transformation I get a start routine automatically but there is no function call in the comments.
What is the exact coding needed here?
When I open the start-routine there is no default coding.
The documentation says:
The corresponding function call is created by default as a comment in a new start routine.
When I create the transformation I get a start routine automatically but there is no function call in the comments.
What is the exact coding needed here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CALL METHOD cl_rstran_gen_step_hier_split=>reset_interval_nodes
EXPORTING
i_iobjnm = '0COSTELMNT'
i_t_intervals = SOURCE_PACKAGE_5
CHANGING
c_t_nodes = SOURCE_PACKAGE_3.
I_T_INTERVALS TYPE ANY TABLE
I_IOBJNM TYPE STRING
C_T_NODES TYPE ANY TABLE
METHOD reset_interval_nodes.
CONSTANTS: l_c_nodeid TYPE string VALUE 'NODEID'.
FIELD-SYMBOLS: <l_s_nodes> TYPE any,
<l_s_intervals> TYPE any,
<l_nodeid> TYPE any,
<l_iobjnm> TYPE any,
<l_nodename> TYPE any,
<l_leaffrom> TYPE any.
LOOP AT i_t_intervals ASSIGNING <l_s_intervals>.
UNASSIGN: <l_s_nodes>, <l_nodeid>, <l_iobjnm>, <l_nodename>,
<l_leaffrom>.
* Assign relevant fields
* If any of the relevant fields can't be assigned => skip this record
ASSIGN COMPONENT 'NODEID' OF STRUCTURE <l_s_intervals> TO <l_nodeid>.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
READ TABLE c_t_nodes ASSIGNING <l_s_nodes>
WITH KEY (l_c_nodeid) = <l_nodeid>.
IF sy-subrc = 0.
ASSIGN COMPONENT 'IOBJNM' OF STRUCTURE <l_s_nodes> TO <l_iobjnm>.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
ASSIGN COMPONENT 'NODENAME' OF STRUCTURE <l_s_nodes> TO <l_nodename>.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
ASSIGN COMPONENT 'LEAFFROM' OF STRUCTURE <l_s_intervals> TO <l_leaffrom>.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
* If all relevant fields could be assigned
* => Overwrite:
* 1. IOBJNM with given source system hierarchy infoobject name
* 2. NODENAME with LEAFFROM
<l_iobjnm> = i_iobjnm.
<l_nodename> = <l_leaffrom>.
ENDIF.
ENDLOOP.
ENDMETHOD.
Hi Pha,
the problem was, that the initially generated start routine was buggy. The workaround was:
- delete the start routine
- activate the transformation
- create a new start routine (no changes are needed!)
- activate the transformation again
The new generated start routine looks like this for a hierarchy with intervals:
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS_1> TYPE _ty_s_SC_1,
<SOURCE_FIELDS_2> TYPE _ty_s_SC_2,
<SOURCE_FIELDS_3> TYPE _ty_s_SC_3,
<SOURCE_FIELDS_4> TYPE _ty_s_SC_4,
<SOURCE_FIELDS_5> TYPE _ty_s_SC_5.
DATA:
MONITOR_REC TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line *-*
... "insert your code here
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
* raise exception type CX_RSROUT_ABORT.
*-- prepare the node table for correct handling of interval from values
*(from value has to be stored in the nodename of the node).
*-- please make sure that the to value is passed correctly in the interv
*al segment.
CALL METHOD cl_rstran_gen_step_hier_split=>reset_interval_nodes
EXPORTING
i_iobjnm = 'ACAUFNR'
i_t_intervals = SOURCE_PACKAGE_5
CHANGING
c_t_nodes = SOURCE_PACKAGE_3.
*-- Remove above code if required
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "start_routine
Hope that helps.
Best regards
Michael
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.