cancel
Showing results for 
Search instead for 
Did you mean: 

Have anyone worked on "EXIT_SAPLRSAP_004"

Former Member
0 Kudos

Hi Experts,

Have anyone worked on EXIT_SAPLRSAP_004 in SOURCE SYSTEM.Please see sample code below to delete hierarchy nodes with DATETO NE '99991231'.

It looks like the related tables in EXIT_SAPLRSAP_004 should be deleted for that corresponding Hier Node and index.

**************************************************

DATA : L_HIER_STRUCT LIKE C_T_HIENODE.

DATA : L_TABIX TYPE SY-TABIX.

CASE I_DATASOURCE.

WHEN '0ORGUNIT_HR01_HIER'.

SORT C_T_HIENODE.

LOOP AT C_T_HIENODE INTO L_HIER_STRUCT.

L_TABIX = SY-TABIX.

IF L_HIER_STRUCT-DATETO NE '99991231'.

DELETE C_T_HIENODE INDEX L_TABIX.

ENDIF.

CLEAR L_HIER_STRUCT.

ENDLOOP.

ENDCASE.

**************************************************

I am getting the following error " The structure of the hierarchy contains errors"

Valuable ideas will be rewarded.

Thank you

Arun

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bill,

I wrote this code to delete the Node that does not have End Date - 12/31/9999

I understand that there are some relational tables but there is no good documentation regarding this data flow.

Thank you

Arun

Former Member
0 Kudos

Hi Arun,

Have you tired updating the row and not deleting it? I wonder if this will give you the same error. There could be an issue with the hierarchy, and the only when you do a delete does the error show up.

Cheers! Bill

Former Member
0 Kudos

Hi Arun,

It looks like you are making the hierarchy invalid because of the delete. Are you sure you removing the nodes in the correct order?

Just a guess, since I have not used this user-exit yet. Cheers! Bill