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: 

DELETE BUTTON

Former Member
0 Kudos

HELLO,

i have to delete the name when i display it will display the name of the and the same i have to delete from table what to write the delete condition.

Also only one name is displaying when i am clicking again in display it not shows other name the same name is repeating, what i have to do in dipslay the next name and so.

please let me know i already tried. it not deleting, the code which i have used is.

&----


*& Report ZGOM1

*&

&----


*&

*&

&----


REPORT ZGOM1.

CALL SCREEN 200.

&----


*& Module USER_COMMAND_0200 INPUT

&----


  • text

----


MODULE USER_COMMAND_0200 INPUT.

tables : ZPERSONAL.

data : begin of itab occurs 0,

NAME LIKE ZPERSONAL-NAME,

ADDRESS LIKE ZPERSONAL-ADDRESS,

TELNO LIKE ZPERSONAL-TELNO,

MOBILENO LIKE ZPERSONAL-MOBILENO,

COUNTRY LIKE ZPERSONAL-COUNTRY,

end of itab.

case sy-ucomm.

when 'DISP'.

  • select NAME ADDRESS TELNO MOBILENO COUNTRY FROM ZPERSONAL INTO TABLE ITAB

*

select * FROM ZPERSONAL INTO corresponding fields of ITAB.

loop at itab.

move itab to zpersonal.

endloop.

endselect.

when 'EXIT'.

LEAVE PROGRAM.

when 'CLEAR'.

CLEAR ITAB.

WHEN 'RESET'.

CLEAR ITAB.

WHEN 'DELETE'.

delete FROM ZPERSONAL WHERE NAME = ITAB-NAME.

*

*

  • ENDCASE.

when 'DISP'.

select NAME ADDRESS TELNO MOBILENO COUNTRY FROM ZPERSONAL INTO TABLE ITAB.

move-corresponding itab to zpersonal.

append itab.

loop at itab.

move-corresponding itab to ZPERSONAL.

endloop.

*endselect.

endcase.

ENDMODULE. " USER_COMMAND_0200 INPUT

&----


*& Module STATUS_0200 OUTPUT

&----


  • text

----


MODULE STATUS_0200 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

move-corresponding itab to ZPERSONAL.

ENDMODULE. " STATUS_0200 OUTPUT

3 REPLIES 3

Former Member
0 Kudos

Hi Sujatha,

You seem to check WHEN 'DISP' twice in the same CASE statement. what r u exactly trying to achieve.

Please explain much clearly of what u exactly require.

Reward points if u feel this helps,

Kiran

ak_upadhyay
Contributor
0 Kudos

Hi,

Write....


WHEN 'DELETE'.

DELETE ZPERSONAL.

Reward points if useful.....

Regards

AK

Former Member
0 Kudos

WHEN 'DELETE'

DELETE ZPERSONAL where name = nam1.

commit work.

Than and only than changes will gets reflected to database.

reward if it helps.