Skip to Content

Requirement: After downloading two equipment with parent and children relationship via the steps in Step by step to download equipments from ERP with hierarchy, customer needs to remove the relationship between parent equipment ( ZJERRY0903P1) from Object structure IBASE ( 112254 ).


/wp-content/uploads/2014/09/clipboard1_533381.png

The relationship between them are modeled and maintained via relationship type “PRDIB”. It could be removed via function module COM_IL_API_DELETE. Then a report could be developed to remove the relationship. The complete source code could be found from attachment.

When the report is executed, there is a runtime exception occurred:

/wp-content/uploads/2014/09/clipboard2_533382.png

The error is caused because the data type of <wa_db_h> is not compatible with the line type of internal table <il_db_h>:

/wp-content/uploads/2014/09/clipboard3_533383.png

Both <wa_db_h> and <il_db_h> are defined as general table type, and their dedicated data type are determined via the corresponding entries in configuration table comc_il_struc:

/wp-content/uploads/2014/09/clipboard4_533384.png

In this case, the data type for <wa_db_h> comes from the value of field BASE_H, in SAP standard delivery, the field for relationship type PRDIB is empty, so the fallback type ‘COMM_IL_PRDIB’ is used, which is not compatible to the line type of COMT_IL_PRDIB_H_TAB.

/wp-content/uploads/2014/09/clipboard5_533385.png

So the solution is to add the correct data type COMM_IL_PRDIB_H to field BASE_H:

/wp-content/uploads/2014/09/clipboard6_533386.png

After that the relationship could be removed successfully. The parent equipment ZJERRY0903P1 does not appear in the object structure IBASE any more.

/wp-content/uploads/2014/09/clipboard7_533387.png

Now it is free to be assigned to any other IBASE:

/wp-content/uploads/2014/09/clipboard8_533388.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply