cancel
Showing results for 
Search instead for 
Did you mean: 

delete single selected row in screen layout from ztable

Former Member
0 Kudos

Hello,

I have created one screen for FBT tax.in table control i want to delete a selected single row which is created for tax code and percentage.when i hit the pushbutton delete, data for specific row should be deleted from internal table as wel from ztable.

how to do it in program and screen layout.

Its most urgent.

Waiting

Thanks

Suchita

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

with in delete button event u can use

DELETE keyword with WHERE (give primary key of ur select row).

Former Member
0 Kudos

Hello,

In your PAI logic you need to create a module which calls a Form similar to:

FORM F_BUTTON_DELETE_ROW .

DATA: L_WA_Z37_MM_E_ROP01 TYPE Z37_MM_E_ROP01.

"Getting the identifier of the selected row

LOOP AT G_T_MAT_CREAR INTO L_WA_Z37_MM_E_ROP01.

"If this row is selected

IF L_WA_Z37_MM_E_ROP01-INDICADOR = 'X'.

"Delete it from the table control

DELETE G_T_MAT_CREAR INDEX SY-TABIX.

"Get the identifier for this row and then using DELETE statement delete it from ZTABLE in

"database.

ENDIF.

ENDLOOP.

ENDFORM.

I hope it will help you, don't forget to reward points for all useful answers.

Former Member
0 Kudos

Hello,

I have tried it but not working.

shall i provide you complete program so u will get an idea?

Reply

Tk cre