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: 

maintainence view data getting duplicated

suba14
Explorer
0 Kudos

i have a requirement that i need to edit some table field values through mainatainence view.

While achiving that the data is getting duplicated

27 REPLIES 27

former_member1716
Active Contributor

Hello suba R,

Can you explain your requirement more clear.

What do you mean by Duplicated? A standard table can never hold entries that are same?

Did you check the combination of Key fields, there must be a difference.

Regards!

gdey_geminius
Contributor
0 Kudos

Hi suba R,

May be all the fields in the maintenance view is considered as key. Go to SE11 and check that.

You have to select the key fields of all the table involved first before selecting any non-key field. Else, entire field list will be considered as key.

For example, if you are creating a view on VBAK and VBAP, then you have to select the key of VBAK which is VBELN and then you have to include the key fields of VBAP which is POSNR(as VBELN is already include). Then only proceed for selecting of non-key field of VBAK and VBAP.

Hope this helps. Cheers!

Thanks,

Gourab

0 Kudos

i am creating for single ztable

suba14
Explorer
0 Kudos

it is a ztable

gdey_geminius
Contributor

Why are you creating maintenance view on single Z-table. Simply you can create a "TMG" on the table.

0 Kudos

my requirement is like for some users i need to give Provide a authorization to edit the value of few fields alone.i need to Provide a sepate t-code for them.

0 Kudos

Please check the field list in the view. Select the key field first(including MANDT). Once you have selected key field, click "OK". Then again select the non-key fields. You are mentioning duplicate entry. It may be due to the "MANDT" field if you have multiple client in Dev system. Include the "MANDT" in the field list.

Thanks,

Gourab

0 Kudos

Hi Gourab,i am creating a selection screen for maintainence view to maintain few fields .in maintainenece view(se11) i have included mandt.

in sm30 i am not able see mandt..and also if i edit a field the value is getting duplicated like old value and new value

0 Kudos

Hi Suba,

Please share the screenshot of the tab "View Fields" of the maintain view. Also attached the screenshot of the duplicate values.

Thanks,

Gourab

0 Kudos

In SM30 you normally never see the MANDT field since it will be filled by the system for the client your working in.

0 Kudos

i need to give write access for few fields only for a particular user alone

0 Kudos

Is there any way to write a code in PAI

Jelena
Active Contributor
0 Kudos

What is the question? I'm confused...

It's impossible to create duplicate records with the same key fields. And SM30 (assuming that's what you used) won't allow duplicates.

Please provide more detailed information, including the table structure and data affected, as well as clarify what exactly is the question.

suba14
Explorer
0 Kudos

There is one ztable with 30 fields . for a particular user i need to give access to edit 4 fields alone..i have created a selection Screen to get the particular value in sm30, so that he can edit the particular number. i have created a maintenance view,but while editing the value is getting duplicated.Instead of updation the old value remains additionally my new edited value is also present

Sandra_Rossi
Active Contributor
0 Kudos

Can you explain "value is getting duplicated.Instead of updation the old value remains additionally my new edited value is also present"?

I think it's better that you share screenshots before and after, so that to support what you say.

suba14
Explorer
0 Kudos

1.png2.png3.png

Please find the attached Screen shots

suba14
Explorer
0 Kudos

Hi Sathish i have included all the key fields

Sandra_Rossi
Active Contributor

Thank you. It looks like as you said, a duplicate line, which is normally impossible. So, you did something weird, but I can't say what it can be.

Either your table, maintenance view or generated table maintenance dialog are not "aligned" (example: you have done everything and then you added a column to the table without regenerating everything), or you have hidden key fields with a GUID or something like that.

If you want us to help you, you should show every concerned object. If you want to find by yourself, I advise you to recreate/regenerate all objects from scratch, except the table.

DoanManhQuynh
Active Contributor

May you check if any of your key field have conversion routine too.

suba14
Explorer
0 Kudos

Hi Sandra could you please help me with the step by step procedure please

Jelena
Active Contributor
0 Kudos

"Purchas..." column is not shown in full in the screenshot. It could have different values. Or, as Sandra noted, there could be an additional field hidden. The screenshots don't show the actual table definition (=fields), so we don't know what fields form the key exactly.

The database management software will not allow to create duplicate records. Even if SAP doesn't catch a duplicate programmatically, you'd get a short dump.

suba14
Explorer
0 Kudos

Is there any way to write a code in PAI module of TMG for this issue

0 Kudos

Before writing code in PAI module, check if there is any event which is suitable for you.

https://wiki.scn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS

If you still need to create a PAI module, you can do by following below path in the TMG.

Environment --> Modification --> Maintenance Screen

Note: These PAI module will be deleted from the screen every time you regenerate the TMG. So, after generation, you have to go to the Screen by following above path and to include the PAI module again.

Thanks,

Gourab

Sandra_Rossi
Active Contributor
0 Kudos

suba R People won't receive any notification if you don't copy/paste their hyperlinked name (corresponds to @ in many applications).

Sandra_Rossi
Active Contributor
0 Kudos

suba R There are many blog posts. Search: create table maintenance dialog sap

suba14
Explorer
0 Kudos

HI Sandra ,could your please help me with the entry updation without duplication in TMG PAI.

thanga_prakash
Active Contributor
0 Kudos

@suba R It is impossible that SM30 allows duplicate data to be entered.

Check below options.

1) Is there any other field hidden in the view which has different values of both entries.

2) Is there any Events already defined in TMG which is causing this duplication

3) Double click on the screen number in TMG, check in the flow logic for any modification which allows duplication