Skip to Content
avatar image
Former Member

0COSTELMNT_0102_HIER with intervals

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 08, 2013 at 03:46 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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?

  • avatar image
    Former Member
    Sep 03, 2014 at 09:00 AM

    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?

    Add comment
    10|10000 characters needed characters exceeded

    • 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