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: 

Need to update table from Maintenance view (Very Urgent !!!)

Former Member
0 Kudos

Hi Abap Guru's,

I got a requirement where in I need to create a new Zprog so that it shld give a call to view v_abc and thru this view I need to update the table abc if any duplicate entries are entered then I shld popup a message.

Cld u plz help me out how to go further with this requirement and any suggestions...

if we create a table maintenance generator for the table abc then it will check for the duplicate entries are not ? if it checks for the duplicate entries then my job is done esaily but how to assign the zt-code to the table maintenance ?

awaiting for u r answer's and realyy appreciated with lots of points.

Regards,

Ravi V Ganji

6 REPLIES 6

Former Member
0 Kudos

why do you need to complicate the issue. do it in two simple ways.

1. in your prog, first try to find the value u are inserting. if not found insert. else popout messsage or update the value.

2. declare the fields as primary keys in the table so that when u attempt to insert a duplicate, sy-subrc will be 4. so you can popout the message.

Duplicate entries are checked at database level only if they are defined as unique columns for some specific purpose. This requires the design of table schema. Pl check this carefully. otherwise you can go to my way of achieving the result

regards,

Sandeep Josyula

*Mark helpful answers

0 Kudos

Hi,

i need to create a zprog this shld call the view v_rf07(maintenance view) and here the user enters the field values and the values shld be updated in the table rf07.

for the above requirement how to further proceed ..

Regards,

Ravi Ganji

former_member215542
Active Participant
0 Kudos

Hi,

The table maintanence will check for duplicate entries, but only for the primary keys.

http://sap-img.com/abap/create-a-table-maintance-program-for-a-z-table.htm

Check the following link on how to assign a tcode to a ztable.

Hope this helps.

Pulkit

Former Member
0 Kudos

Hi,

table generator will check duplicate entries as any

other table .

table maintanance Generator is used to manually

input values using transaction sm30

follow below steps

1) go to se11 check table maintanance check box under

attributes tab

2) utilities-table maintanance Generator->

create function group and assign it under

function group input box.

also assign authorization group default &NC& .

3)

select standard recording routine radio in table

table mainitainence generator to move table

contents to quality and production by assigning

it to request.

4) select maintaience type as single step.

5) maintainence screen as system generated numbers

this dialog box appears when you click on create

button

6) save and activate table

using sm30 you can create entries manually.

also check below thread to assign transaction code to

table generator

create transaction use se93

select parameter transaction and give below attributes

Transaction code ZTX1

Transaction text Maintain View ZSDCZTVIEW

Transaction SM30 Screen 0

From module pool

Name of screen field Value

VIEWNAME ZSDCZTVIEW

UPDATE X

Former Member
0 Kudos

if u have table maintanence

u can assign at code..

like...

1.goto -> se93-> click create

2.select (last radio button) transaction with parameters(parameter transaction). & enter short discription -> press 'ENTER'.

3. in Transaction field pass 'SM30' & check checkbox Skip initial screen.

4.check 3 checkboxes in GUI support (SAP GUI support for HTML,SAP GUI for java,SAP gui for windows).

5.In the default values table

Name of the screen field Value

-


-


VIEWNAME ZTABLE(d ztable name)

UPDATE X

6.save.

now TCode is creted for ur table...

u can check that TCOde.

ok

Regards,

Ramesh.

Former Member
0 Kudos

Hi,

use call transaction ztest from se38 to navigate

to table maintainence.

when duplicate entries are entered system implicitly gives error message .

Regards

amole