2012 Jul 14 2:16 PM
hi experts,
how to Create, Modify and Delete entries dynamically from any custom table by classical report,there are three push button on the selection screen with the name create, modify and delete. Pressing create button should allow me to add data into the ztable, similarly modifying and deleting through modify and delete button respectively.
waiting in anticipation for the reply.
Thanks in advance.
Moderator message: please do more research before posting.
Message was edited by: Thomas Zloch
hi experts,
how to Create, Modify and Delete entries dynamically from any custom table by classical report,there are three push button on the selection screen with the name create, modify and delete. Pressing create button should allow me to add data into the ztable, similarly modifying and deleting through modify and delete button respectively.
waiting in anticipation for the reply.
Thanks in advance.
Moderator message: please do more research before posting.
Message was edited by: Thomas Zloch
2012 Jul 14 3:12 PM
hi,
I feel if you want to get this requirement....
you can use module pools... which will help you navigate screens and then you can either enter a new record and say create to update your table or get some value from your table and change it and update the custom table.
Hope this helps.
Regards,
Sandeep
2012 Jul 14 4:53 PM
Thanks Sandeep,
the above requirement is fulfilled through module pool but I'll feel glad if you can tell me how to do it simply with classical report without using module pool.
Thanks in advance,
Regards
Amit
2012 Jul 14 4:56 PM
Hi Amit,
Please Check below code,
TABLES:
sscrfields.
DATA:
gt_exclude TYPE TABLE OF rsexfcode,
gfs_exclude TYPE rsexfcode.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE comm1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) comm2 .
PARAMETER p_temp TYPE c MODIF ID mg1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN FUNCTION KEY 1. "Will have a function code of 'FC01'
SELECTION-SCREEN FUNCTION KEY 2. "Will have a function code of 'FC02'
SELECTION-SCREEN FUNCTION KEY 3.
SELECTION-SCREEN END OF BLOCK block1.
INITIALIZATION.
* Add displayed text string to buttons
MOVE 'Create' TO sscrfields-functxt_01.
MOVE 'Modify' TO sscrfields-functxt_02.
MOVE 'Delete' TO sscrfields-functxt_03.
* Delete EXECUTE button
gfs_exclude-fcode = 'ONLI'.
APPEND gfs_exclude TO gt_exclude.
AT SELECTION-SCREEN.
IF sscrfields-ucomm = 'FC01'.
* Perform your code to Insert records into database table...
ELSEIF sscrfields-ucomm = 'FC02'.
* Perform your code to Modify records of database table...
ELSEIF sscrfields-ucomm = 'FC03'.
* Perform your code to Delete records from database table...
ENDIF.
AT SELECTION-SCREEN OUTPUT.
* Selection screen Texts...
comm1 ='Selection Screen'.
comm2 ='Click on resective Push Button Action'.
* Delete EXECUTE button
CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = '%_00'
p_program = 'RSSYSTDB'
TABLES
p_exclude = gt_exclude.
* Display selection screen and Hide selection parameters...
LOOP AT SCREEN.
IF screen-group1 = 'MG1'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards,
SuryaPraveen
2012 Jul 14 10:55 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |