Google Search - Blog...........

SAP ABAP: Insert, Delete & Update ZTABLE From Workarea.

*--hi create a zdatabase table with 2 entries name(10) and age(2) .

report ztest .

tables:ZZZ00000.

data: begin of itab occurs 0,
name(10) type c,
age type i,
end of itab .
selection-screen begin of line .
parameters:p_wa(100) type c .
selection-screen end of line .
selection-screen skip 2.
selection-screen begin of line .
SELECTION-SCREEN:
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 15(20) but2 USER-COMMAND cli2 ,
PUSHBUTTON 40(20) but3 USER-COMMAND cli3 visible length 5 .

selection-screen end of line .

at selection-screen .

case sy-ucomm .

when 'CLI1'.
ZZZ00000-name = p_wa+0(10) .
ZZZ00000-age = p_wa+11(2).
insert ZZZ00000.

when 'CLI2'.
delete from ZZZ00000 where name = p_wa+0(10)..

when 'CLI3'.
update ZZZ00000 from p_wa .

endcase .


RETURN TO MAIN INDEX:

- Sample Programs On Uploading & Downloading Files.

- Sample Programs On HR ABAP.

- Sample Report Programs On ALV List/ Grid Display.

- Sample Programs On Selection Screen.

- Sample Programs On BDC.

.....Back To MAIN INDEX.

No comments:

Post a Comment