Application Development and Automation 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: 
Read only

Update Ztable in database

Former Member
0 Likes
840

hai,

i want to update the database of a ztable with one condition.wht i need to do now.

regards,

Max

1 ACCEPTED SOLUTION
Read only

former_member508729
Active Participant
0 Likes
819

Hi,

you can update ur z table like

update ztable

set fields to be updated

where ur condition

Regards

Ashutosh

Reward points if helpful

Message was edited by:

ashutosh ambekar

8 REPLIES 8
Read only

Former Member
0 Likes
819

Use

IF <DATA> EQ <CONDITION>.

UPDATE <TABLE> FROM <WAREA>.

ENDIF.

or UPDATE proj SET txtsp = sy-langu WHERE pspid = wa_project-pspid.

Please post your code for better response.

Regards

Kathirvel

Read only

Former Member
0 Likes
819

just write a program ,demo is -

update ztable set field1 = '123' where field2 = '2' and

field3 = '3' .

Read only

0 Likes
819
loop at itab.
update ztable set field1 = value1
where field2 = itab-value2 .
endloop.
Read only

Former Member
0 Likes
819

Hi,

Write a program and using UPDATE the field with the condition.

UPDATE <filed> where <condition>

regards

Sabu

Read only

former_member508729
Active Participant
0 Likes
820

Hi,

you can update ur z table like

update ztable

set fields to be updated

where ur condition

Regards

Ashutosh

Reward points if helpful

Message was edited by:

ashutosh ambekar

Read only

Former Member
0 Likes
819
UPDATE sflight SET   seatsocc = seatsocc + 3 
               WHERE carrid   = 'LH'   AND 
                     connid   = '0400' AND 
                     fldate   = '20010228'.
Read only

Former Member
0 Likes
819

HI Raju,

welcome to SDN.

just have a button ,so when u press the button ,hav the screen fields like ur screen and statement like

_______________________

tables Ztable.

case sy-ucomm.

when 'button1'.

INSERT ZTABLE .

endcase.

_______________________

regards,

siva

Read only

0 Likes
819

write a code for that condition, if success update the table.

Alex