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

Create, Modify and Delete entries dynamically from any custom table by classical report.Thanks in advance

Former Member
0 Likes
1,585

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,186

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

Read only

0 Likes
1,186

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

Read only

former_member186055
Active Participant
0 Likes
1,186

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

Read only

ThomasZloch
Active Contributor
0 Likes
1,186

Moderator message: please do more research before posting.