Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Maintenance View : Same text table for 2 fields

alexandreourth
Active Participant

Hello experts,

Problem :

We can't have a table reference twice in the "Tables" section of the maintenance view.

I have checked this topic : SAP Thread

For me, it's on 2 fields of type FKBER which i have to display the description (TFKBT) during SM30. In the thread they implement Events of type AA, AB & AC.

=> But i can't believe SAP didn't think about that with a better standard way...

So i'm asking here now in 2019 to know if someone know how to do that in a "clean" way.

Potential workaround :

I thought about creating 2 views. The first one for the first description & the next description in the second view but it's ugly... EDIT : This doesn't work!

I don't know if it's possible to create Alias in maintenance view or something else.

Thanks a lot for your help

Regards,

Alexandre

1 ACCEPTED SOLUTION

alexandreourth
Active Participant
0 Kudos

It's decided i quit doing this in a "clean" way...

For everyone looking to implement this behaviour in a maintenance view, use the events AA, AC & AD as explained in the topic "SAP Thread" in my first message. It's not pretty but it will do the job.

Curse you Maintenance View ^^

8 REPLIES 8

rgore
Advisor
Advisor
0 Kudos

Hi Alexandre,

I checked the old SAP thread where the data representation as below.

MTART1 ¦ Text-MTART1 ¦ MTART2 ¦ Text-MTART2 ¦

For me, it is a very strange requirement. As both the columns which refer to same table will display the same data.

Thanks & Regards,

Rakshith Gore

matt
Active Contributor
0 Kudos

You comment under your own question.

alexandreourth
Active Participant
0 Kudos

Thanks for answering Rakshtih,

No no the need is not strange, we have several transcodification tables like :

DATA_BEFORE TYPE type1

DATA_AFTER TYPE type1

They are customizing tables & to ease the reading of the datas, business wants to have the description of each elements.

If i had to write a code i would do :

SELECT a~fbktx b~fkbtx
FROM tfkbt as a
JOIN tfkbt as b ON b~fkber = p_fkber2 
WHERE a~fkber = p_fkber1
//I know there is no SPRAS but to it's to understand the logic i want to reuse in the Maintenance View

Any solutions please?

Mathew_S72
Participant
0 Kudos

Hello Alex,

try to create a database view for TFKBT e.g. "ZTFKBT" containing 1:1 the original table. Now you have an alias for the same object.

Then you can add your master table containing the two fields of FKBER and the two tables TFKBT and ZTFKBT in the SE11 maintenance view joining with the two different fields each.

Best regards,
Matthias

0 Kudos

Hello Matthias,

Thanks for your time.

It is not possible to add the reference of ZTFKBT in my maintenance view from my main Z* Table. Tables must be linked through a foreign key and this newly created view is not linked to neither of my tables.

So i can't do that...

Edit : I tried to change my foreign key of one of my FKBER in my Z table by ZTFKBT (Instead of FKBT). I can activate the database table but still the view is not accessible in the Maintenance view...

Mathew_S72
Participant
0 Kudos

Hello Alex,

hmm, you're right. The domain in the alias is one problem … even with a new zdomain to get correct foreing key it's not working ... besides that ... DB views cannot be used in other views in SE11

You said, 2 maintenance views are not working. I tried this …

And a maintenance view like this for the OLD_FKBER and equivalent for NEW_FKBER

In SM30 OLD is maintainable:

And after saving, NEW is maintainable

Is's ugly but both fields can be maintained.

Maybe you can split the ZFI1 table in 2 tables with old as key (+values) and another table with old+new (+values) as key and create a viewcluster to bind the maintenance together and avoid 2 "Independent" views …

Best regards,
Matthias

0 Kudos

Hello Matthias,

Thanks again for trying and taking some of your time to solve my problem. I appreciate it!

For now i have this in SM30 with my maintenance view :

I can edit both OLD & NEW Fun Area and descriptions are coming up when i press Enter or Save. But to do that, i had to implement some EVENTS. And i have to maintain now the MODIFY (which i didn't found yet) because when i change my NEW Area, the description of the OLD area is changing too with the NEW's one.

NB: My three description fields are not in my Z* table, they are declared in my ZV* Maintenance View linked to SAKT and TFKBT (Read only mode).

Maybe your solution with 2 tables would work, one with OLD area & the other one with the NEW area. But again, i'm scared that within the maintenance view, i would only be able to add just one reference of table TFBKT (either for the first table or the other one). But to be honnest, i don't want to maintain 2 tables (it's too much ^^)

Maybe this is a SAP Bug in the Maintenance View processing, i should raise an incident for that perhaps. I mean it should be easy to have the descriptions (Text table) of fields with the same type inside one table...

alexandreourth
Active Participant
0 Kudos

It's decided i quit doing this in a "clean" way...

For everyone looking to implement this behaviour in a maintenance view, use the events AA, AC & AD as explained in the topic "SAP Thread" in my first message. It's not pretty but it will do the job.

Curse you Maintenance View ^^