Skip to Content
author's profile photo Former Member
Former Member

CHECK

HI GURUS AGAIN I AM NOT DELETE AND INSERT DATA IN MY TABLE THAT IS CREATED BY ME AS ZEMP. PLZ SEND THE CODES FOR IT WILL WORK RIGHT.

tables: zemp.

DATA: itab like table of zemp with header line.

select-options: s_eno for zemp-eno obligatory,

s_ENAME for zemp-ENAME no intervals obligatory,

s_EADDRE for zemp-EADDRESS no intervals obligatory,

s_ESTATE for zemp-ESTATE no intervals obligatory.

parameters: p1 as checkbox,

p2 as checkbox.

start-of-SELECTION.

if p1 = 'X'.

itab-ENO = s_ENO-low.

itab-ENAME = s_ENAME-LOW.

itab-EADDRESS = s_EADDRE-LOW.

itab-ESTATE = s_ESTATE-LOW.

APPEND ITAB.

IF SY-SUBRC 0.

INSERT zemp from table itab.

WRITE: 'SAVED'.

endif.

ENDIF.

if p2 = 'X'.

SELECT ENO ENAME EADDRESS ESTATE FROM zemp into TABLE ITAB

WHERE ENO = s_ENO AND

ENAME = s_ENAME AND

EADDRESS = s_EADDRE AND

ESTATE = s_ESTATE.

DELETE zemp FROM itab.

IF SY-SUBRC = 0.

WRITE:/ 'DELETED'.

ENDIF.

endif.

plz rply.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 09:46 AM

    Use commit work and rollback worl commands once sy-subrc set to 0.

    Reward if useful.

    Thanks,

    Nageswar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.