Skip to Content
avatar image
Former Member

Start Routine for 0COSTELMNT_0102_HIER

Hi everyone,

i load the Cost element Hierarchy into BW and i got an Error: The "from" value is larger than the "to" value for the interval node with ID XX and XY and node name.

On SCN Forum, i understand the Reason for the Problem : 'Intervals in IDOC format: The interval segment in IDoc format is not compatible with the interval segment of the target structure.Therefore you need to create a start routine that writes the From value of the interval to the node structure segment. The corresponding function call is created by default as a comment in a new start routine. You simply have to remove the comments and enter the correct source field of the hierarchy basis characteristic. In the interval segment you assign the LEAFTO field to the corresponding target InfoObjects.

Creating a Transformation for a Hierarchy - Modeling - SAP Library

i found that there is a difference betwen the interval of Field 'Leafto' and interval of target '0COSTELMNT' and '0CO_AREA' so i write this Code on Start routine :

CALL METHOD cl_rstran_gen_step_hier_split=>reset_interval_nodes
EXPORTING
i_iobjnm      = ('0COSTELMNT','0CO_AREA')
i_t_intervals = SOURCE_PACKAGE_5
CHANGING
c_t_nodes     = SOURCE_PACKAGE_3.


But this Code doesn't work. Can you please help me how to fix this Code?.

Thanks



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 24, 2016 at 03:57 PM

    No clue where you got the above code and how you think that will solve your issue, but your issue is due to the fact that 0COSTELMNT is compounded with 0CO_AREA and your SOURCE_FIELDS_3-NODENAME contains both (concatenated)... so you cannot use a 1-1 mapping.

    I suggest you get together with a developer and debug a small load to see how & when you should "split" up this concatenated field.

    Add comment
    10|10000 characters needed characters exceeded

    • After the start routine put a statement

      " BREAK-POINT . "

      Run  the DTP in Dialog Mode for Debugging ( Execute Tab )  .  It will stop at the break point .  Double click on any of the source package , like source_package_5.  You would see the content .

      As per your error message, Node Number 314 has problem.  Please check the same in PSA or Debugging .

      You can also modify the routine I provided to be used for SOURCE_PACKAGE_5 . Something like below

      DATA TEMP  TYPE C LENGTH 52.

      LOOP AT SOURCE_PACKAGE_5 ASSIGNING <SOURCE_FIELDS_5>  .

        IF <SOURCE_FIELDS_5>-LEAFFROM GT   <SOURCE_FIELDS_5>-LEAFTO .

          TEMP = <SOURCE_FIELDS_5>-LEAFTO .

         <SOURCE_FIELDS_5>-LEAFTO = <SOURCE_FIELDS_5>-LEAFFROM .

         <SOURCE_FIELDS_5>-LEAFFROM = TEMP .

         CLEAR TEMP .

        ENDIF .

      ENDLOOP..

      If we can see what is causing problem, it would be easier to provide a solution, but in this case, I cannot see which record is creating problem.

      Regards

      Anindya