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

write code for following

Former Member
0 Likes
414

please help me to write the code

■ Create a work area of the following fields of 'Z' table(employee/department)-

MANDT CLNT (03),

EMPID CHAR (05),

EMPNM CHAR (15),

EMPDJ CHAR (08),

EMPAD CHAR (30),

EMPPH CHAR (15),

DEPID CHAR (05).

■ Create a selection-screen equivalent of the above work area

■ Also put 'INSERT' 'DELETE' and 'UPDATE' buttons on the selection-screen

■ Using INSERT statement insert selection-screen record into DATABASE TABLE,

when the user presses 'INSERT' button on selection-screen

■ Using UPDATE statement modify record of the DATABASE TABLE,

when the user presses 'UPDATE' button on selection-screen

■ Using DELETE statement delete the corresponding DATABASE TABLE record,

when the user presses 'DELETE' button on selection-screen

2 REPLIES 2
Read only

Former Member
0 Likes
392


SELECTION-SCREEN BEGIN OF BLOCK blk1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON  5(10) b1 USER-COMMAND bu1.
SELECTION-SCREEN PUSHBUTTON  20(10) b2 USER-COMMAND bu2.
SELECTION-SCREEN PUSHBUTTON  35(10) b3 USER-COMMAND bu3.
SELECTION-SCREEN end OF LINE.
SELECTION-SCREEN end OF BLOCK blk1.
 
INITIALIZATION.
 
  MOVE : 'insert' TO b1,
         'delete 2' TO b2,
         'update' TO b3.
 
AT SELECTION-SCREEN OUTPUT.
       LOOP AT SCREEN.
        CASE screen-name.
          WHEN 'B1'.
            "write insert statement  .
        WHEN 'B2'.
 "write delete statement  
         WHEN 'B3'.
 "write update statement 
          
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.
    
Read only

Former Member
0 Likes
392

Types:begin of typ_final, (types)

mandt(03) type clnt,

empid(5) type char,

empnm(15) type char,

empdj(8) type char,

empad(30) type char,

empph(15) type char,

depid(5) type char,

end of typ_final.

data:gt_final type standard table of typ_final.(internal table)

data:gs_final type typ_final.(work area).

for selection-screen.

selection-screen begin of block b1 with frame title text-001.

select-options:s_empid for empid.

---

-


-


-


selection-screen end of block b1.

for creating button DELETE ,Insert and update

you have to include pf-status

set pf-status 'ABC'.

D .click o ABC and define button INSERT,DELETE,UPDATE.

AND you have to write your code in this way

at User-command.

case sy-ucomm.

when 'INSERT'.

-


YOUR CODE

-


WHEN 'UPDATE'

-


YOUR CODE

-


when 'DELETE'

-


YOUR CODE

-


endcase.

REwards plz if this helps you