Skip to Content
Jul 03, 2019 at 04:26 PM

Issue with SM30 table maintenance



I have a scenario wherein, we have a custom table for which a TMG is there. This table was there from longtime and still is in use. This custom table is predominantly associated with Functional location (PM area) and few other related key fields. So this key field 'TPLNR' (fun. location) is associated to check table IFLOT-TPLNR. A search help from IFLM table is also added to this.

Now we have a case where some entries in check table against TPLNR has been deleted(in master table). The domain for TPLNR (Fun. location) doesnt hold these values any more. So every time we open SM30 (whether to view, edit or delete); it will pop an error message saying 'Functional location XXXXXX doesn't exist'. Basically, the values those were maintained previously in custom table is causing the error in check. Even if I delete the check table in foreign key relationship, it will throw an error, as it is validating against the domain entries. It throws an error even while trying to delete the unwanted entries. So all together this TMG is now useless.

Considering this scenario, and a possible issue in production system in future; business needs a solution to bypass this error 'Functional location XXXXXX doesnt exist' even when it is wrong, so that the unwanted entries in the custom table could be deleted or processed.

so my query here is, how should this be Achieved.?

1. i have tried replacing the check table - it doesnt work as the domain holds values against the standard data element.

2. Replacing the TPLNR with a custom data element (of domain type char30 ) is seemingly a better option, but would the conversion routine cause a hit, as we are not mentioning the conversion routine TPLNR. We would also be required to change the output length to 40 in that case.

Request your advise.