Skip to Content
-3

How do we generate a TMG using a custom program?

Jan 03 at 10:37 AM

140

avatar image
Former Member

Hi,

Can we achieve TMG recording using BDC? If SE54, then please update me the steps.

I tried recording T-Code se54 but the TMG is not re-generating the view.

Thanks & Regards,

Shan.

10 |10000 characters needed characters left characters exceeded

Please choose a meaningful title, as there are thousands of questions about the table maintenance generator.

Why don't you first try, as it takes only 2 minutes to test (SHDB for recording, then run it).

2
Former Member
Sandra Rossi

Hi Sandra,

Sorry, thank you.

Regards,

Shan.

1
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member
Jan 04 at 05:27 AM
0

Hi,

Check the report program RSVIEWGN for single table/view maintenance generation or RSVIEWMA for mass generation.

Thanks & Regards,

Rakshith Gore

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Wow...superb.

Thanks for sharing this info, Rakshith.

K.Kiran.

0
Former Member

Hi Rakshith,

Thanks for the information. I can see only the status details of the view. How should I use this program to read, delete and re-create the TMG? Thanks.

It will be helpful if you can provide me an example.

Warm Regards,

Shan.

0
Former Member

Create a test Z table

generate TMG using the program RSVIEWGN

check the generated VIEW using SM30.

Now add one more field in your test ztable.

generate TMG using the program RSVIEWGN

check the generated VIEW using SM30 to see if the new field is showing up in the maintenance view.

This will give you more info on how these standard progs actually work and you can call them in your program passing the table name dynamically.

K.Kiran.

0
Former Member
Former Member

Hi,

You can use the report RSVIEWGN. Pass the table/view name in the selection screen and check the FCODE values in the program, based on the condition you can pass the FCODE values in the selection screen.

P.S - This report will only creates/delets or regenerates the structure specific modules and not the entire table maintenance generation.

Thanks & Regards,

Rakshith Gore

0
Former Member
Former Member

Hi,

Yeah, I was noticing the same. I need to regenerate the TMG after addition/deletion of FIELDS in the existing structure.

Thanks & Regards,

Shan.

0
avatar image
Former Member Jan 04 at 10:37 AM
0

I am able to achieve my requirement using the below FMs

VIEW_MAINTENANCE_CALL - to read the TMG of the view,

VIEW_MAINTENANCE_DELETE - to delete the TMG of the view and

VIEW_MAINTENANCE_GENERATE - to generate the TMG for the view.

But,

Now, these FMs are populating the dialog boxes on the front end. My user does not want to see it. Hence, is there a way to hide them and pass the dynamic values through a custom coding. Please help. Thank you.

Warm Regards,

Shan.

Share
10 |10000 characters needed characters left characters exceeded
Kiran K Jan 03 at 10:44 AM
0

BDC on SE54.

Btw, what is the requirement that necessitates to generate TMGs for Custom tables, in mass.

K.Kiran.

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I tried BDC using SE54 already. But, it is not working.

My requirement is using a view name always. Its structure alone changes based on the T-Code we choose. Hence, we need to regenerate the TMG everytime we read this view.

Hope I am clear to you.

May I know if there is any FM to 'read', 'delete' and 'recreate' the TMG. Thanks again.

Warm Regards,

Shan.

0
Former Member

Kindly refer to the reply from Rakshith and see if you are use that program by passing your table name dynamically.

K.Kiran.

0

"My requirement is using a view name always" but why? Also what does "using view name always" even mean? Sorry, it's still not clear what exactly are you trying to achieve with this. What are you trying to solve by this, what business value to add?

It still seems like a very odd idea.

0
Former Member
Jelena Perfiljeva

Hi Ms. Jelena,

I want to generate TMG through a custom program. I need to pass dynamic values to the TMG parameters (such as Auth Grp, Function Grp, Maintenance screen and the package).

This is the scenario that I need to achieve. I believe that I am clear to you now.

Sorry for the typo error. My user wants to achieve auto-generation of TMG using a custom program.

1. I created a maintenance view. I add custom fields to this view through a custom program.

2. Whenever I call this custom program, it will read the view, add the custom fields (according to the user req.) to the view, and activate the view.

3. After activation of the view, I have to re-generate the Table maintenance generator. In order to do this, we need to write a custom program where we will pass the dynamic values to generate TMG.

Thanks & Regards,

Shan.

0
SAPEKSH GUPTA Jan 03 at 01:21 PM
0

Hi,

I would be really interested in knowing the business use case which asked to create a TMG dynamically or through a custom program.

By the way, what is the purpose of a TMG while you can directly update the table using the same custom program.

Regards.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

My requirement is using a view name always. Its structure alone changes based on the T-Code we choose. Hence, we need to regenerate the TMG everytime we read this view.

Hope I am clear to you.

May I know if there is any FM to 'read', 'delete' and 'recreate' the TMG. Thanks again.

Warm Regards,

Shan.

0

Sorry, this just seem very bizarre... "Structure changes based on the T-code"? Are you aware that table maintenance view is a development object? After it's generated, it's not supposed to be changed much. If you change the table itself, you may need to re-generate the view, depending on the changes. Again, the table changes should not happen often either. Why would any of this would be "based on T-code"?

Also TMG stands for Table Maintenance Generator. We never "generate TMG". It seems this term somehow creeped up on SCN but it's inaccurate and confusing. TMG is the tool that generates table maintenance screen(s).

But even if we restate your note as "we need to generate maintenance screen every time we read this view" it still makes no sense whatsoever, sorry. It's not how development is done in SAP (or any computer system, really).

I'd suggest to go back to whoever gave you this requirement and try to understand clearly what they're trying to achieve, rather than just taking such "design" at face value.

0
Former Member
Jelena Perfiljeva

Hi Ms. Jelena,

I have achieved my requirement. Thanks for your kind advice. I will take a note of it and try to avoid using such notes.

The design is that - For an existing View ---> Add a custom field to a view ---> activate it and generate the TMG.

Thank you for your comments.

Regards,

Shan.

0