cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with SM30 table maintenance

former_member563268
Participant

Hello,

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.

Regards,

J..

Sandra_Rossi
Active Contributor
0 Kudos

I have a doubt when you say "whether to view" : if you only display the contents, the checks should not be done, so I suspect that your TMD implemented some events (i.e. custom ABAP code).

PS: if no event is implemented at all (and program not modified directly), only the input fields shown on the screen are checked against foreign keys.

DoanManhQuynh
Active Contributor
0 Kudos

you should check if is there any custom check event.i dont think this could be your case but you might be should check the function group of that view also...

DoanManhQuynh
Active Contributor
0 Kudos

or is there any change that maintain view is based on join between those table?

Accepted Solutions (0)

Answers (2)

Answers (2)

Sandra_Rossi
Active Contributor
0 Kudos

I just did a test by creating a maintenance view over table SFLIGHT, generating a dialog for the view, and forcing a wrong value in the table for the column "Plane Type", i.e. "747-444".

In the overview screen, the foreign key check only occurs if I enter in edit mode, AND if I enter something in the field "Plane Type" (here I retype "747-444"):

From the overview screen, I could delete the line and save the deletion to database.

Only from the detail screen, the deletion was impossible because of the foreign key check, even if I don't enter anything in the field "Plane Type".

Solution: delete the line(s) via the overview screen.

former_member563268
Participant
0 Kudos

I dont think, we have delete option from overview screen unless you enter edit in overview. Could you please share screenshot of how you deleted from overview without moving to edit mode.

Again, its the key field which is throwing the error in my case. So there is no option to edit in maintenance, as its greyed out.

Regards,

J

Sandra_Rossi
Active Contributor
0 Kudos

No problem to delete if it's a key field too (both the values "AA" and "747-444" don't exist in the respective foreign tables).

But you should try yourself the same test as I did, you'd get the answer faster than asking (or ask a developer if you're not one).

kmoore007
Active Contributor
0 Kudos

(1) Get an ABAP'er with temporary Debug and Replace authorization to debug and stop at the error message. He can bypass the error message which will allow you to delete the erroneous data in the table. Not the optimal solution, but I've had to do this a few times in the past.

(2) Get an ABAP'er to write a small program to delete the entries in the table with errors.

former_member563268
Participant
0 Kudos

Thanks for the note. But we are expecting this in production too, where in ABAP team doesn't have authorisation. So it should be a permanent solution(Amendment to particular TMG) to be developed in dev system and to be transported to production.

@ Sandra Rossi

Yes. It is reffering to foreign key/domain values and hence it throws the error even in display and maintenence mode. So basically, it keeps throwing error until the value is deleted which in direct method is not possible as it throws an error from check on deletion too...

But again, theresnt any custom code written.

Regards,

J