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

This is a query in module pool program

Former Member
0 Likes
755

Hi all,

In table control (with wizard) based on checkbox selection,

multiple records has to be deleted. (in Module pool - programs)

Is it possible to do that..?

If yes how..? pl explain.

Thanks & Regards

Nagaraj.B

7 REPLIES 7
Read only

Former Member
0 Likes
716

using wizard u create the table control

after creating the table cotrol

u can find a option in the screen called check box.

click on that and paste it in the table control.

Regards

Anbu

Read only

former_member200872
Active Participant
0 Likes
716

Hi,

Multiple records can be deleted based on the value of checkbox.

But, i need to ask whether the chekbox is inside (within) the table control as a column or

outside the table control ?

Regards,

Wajid Hussain P.

Read only

0 Likes
716

Hi Wajid Hussain,

check box is inside the table control.

& check box is one of the field in RESB table..,

added to RESB table thru structure.

If possible, send coadings.

Regards

Nagaraj.B

Read only

0 Likes
716

Hi,

Convert the relevant field to be checkbox. (using right click option)

In PAI, loop and read TC (move screen field data to program fields).

Use the below statement in a module after loop:

delete it_tc where <field_name> = 'X'.

Regards,

Wajid Hussain P.

Read only

0 Likes
716

Hi,

can u explain it in a little bit elaberated way..?

I'm still unable to delete multiple records at a time based on check box selection..

Regards

Nagaraju.B

Read only

0 Likes
716

Hi,

You may go through the comments and code given below.

Regards,

Wajid Hussain P.

" * * * * * * *

Convert the relevant field to be checkbox. (using right click option).

In PAI, loop and read TC (move screen field data to program fields).

" * * * Top include

TYPES: BEGIN OF ty_itab,

resb TYPE resb,

check TYPE c LENGTH 1,

END OF ty_itab.

DATA: it_resb TYPE TABLE OF ty_itab,

wa_resb TYPE ty_itab.

" * * * PBO

PROCESS BEFORE OUTPUT.

loop at it_resb into wa_resb with control tc .

module show_tc.

endloop.

" * * * PAI

PROCESS AFTER INPUT.

loop at it_resb .

module read_tc.

endloop.

module change_tc_itab.

" -


Modules

" * * *

MODULE READ_TC.

move-corresponding RSEB to wa_resb. " RESB in screen

modify it_resb from wa_resb index tc-current_line.

ENDMODULE.

**

Use the below statement in a module after loop:

delete it_resb where <field_name> = 'X'.

**

MODULE CHANGE_TC_ITAB.

data: lv_lines type i.

delete itab where check = 'X'. " check is a column in itab

describe table itab lines lv_lines.

tc-lines = lv_lines.

ENDMODULE.

MODULE SHOW_TC.

move-corresponding wa_resb to RSEB . " RESB in screen

ENDMODULE.

Read only

Former Member
0 Likes
716

Hi

After

PROCESS AFTER INPUT

LOOP

MODIFY..e.t.c (which will be modify the TC after you put the select the check box)

ENDLOOP

MODULE USER-COMMAND.

Inside the above module

Code Like This

IF SY-UCOMM= 'DELETE' --> (Your Case)

LOOP AT TC1 INTO WA_TC1 WHERE CHECKBOX = 'X'.

DELETE TC1 INDEX SY-TABIX .

ENDLOOP.

ENDIF.

Thanks & Regards

Mallikharjuna Reddy