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

delete row from table in htmlb

Former Member
0 Likes
1,245

Hello,

please help me!

This is my code:

WHEN 'delete'.

IF tv IS NOT INITIAL.

DATA: tv_data1 TYPE REF TO cl_htmlb_event_tableview.

tv_data1 = tv->data.

IF tv_data1->prevselectedrowindex IS NOT INITIAL.

FIELD-SYMBOLS: <row1> LIKE LINE OF LV.

READ TABLE LV INDEX tv_data1->prevselectedrowindex ASSIGNING <row1>.

DELETE FROM ZZ07_LV WHERE LVID = <row1>-LVID.

else.

message = 'Tv is initial!!!'.

navigation->set_parameter( 'message' ).

ENDIF.

navigation->goto_page( 'anzeigen.htm' ).

ENDIF.

Of course i have LV as attribute of tabeltyp and this shall hapend in oninputrocessing. But i have no idea why nothing happen. I can't delete any row!

Please help mee as soon as possible.

YOu can write me as well: merian_z@yahoo.de

Thank you very much

12 REPLIES 12
Read only

athavanraja
Active Contributor
0 Likes
1,212

move this thread to BSP area.

is LVID is the key field of the internal table?

is ZZ07_LV an internal table or DB talbe?

Raja

Read only

0 Likes
1,212

Thank you very much for reply:).

LVID is the key of DB table and ZZ07_LV

is the DB.

I'm really confused and I don't know why is still not working...

.Please help me.

Thank you

Read only

0 Likes
1,212

Hi Raja,

I think that probably the problem is with this <row>. It doesn't realy rcognise the row....

Is there another way or why is like this what do think?

The Error is:

"500 SAP Internal Server Error

Fehlermeldung: Feldsymbol ist noch nicht zugewiesen. ( Abbruchsart: RABAX_STATE )"

This means something like: The field symbol has not been associated

Read only

0 Likes
1,212

change this line

FIELD-SYMBOLS: <row1> LIKE LINE OF LV.

to

FIELD-SYMBOLS: <row1> type any .

place and HTTP break point and analyze which line is causing error.

Regards

Raja

Read only

0 Likes
1,212

Hi Raja,

thank you very much.

I change it and now he tells me that in this case <row1>-LVID. row diesn't have this LVID any more beacuse is missing struktur.

Do you think he doesn't recognize this row and that why I can't delete the row.

Thank you very much

Mariana

WHEN 'delete'.

IF tv IS NOT INITIAL.

message = 'Tv is not initial'.

navigation->set_parameter( 'message' ).

DATA: tv_data1 TYPE REF TO cl_htmlb_event_tableview.

tv_data1 = tv->data.

IF tv_data1->prevselectedrowindex IS NOT INITIAL.

FIELD-SYMBOLS: <row1> type any.

READ TABLE LV INDEX tv_data1->prevselectedrowindex ASSIGNING <row1>.

DELETE FROM ZZ07_LV WHERE LVID = <row1>-LVID.

else.

message = 'Tv is initial!!!'.

navigation->set_parameter( 'message' ).

ENDIF.

navigation->goto_page( 'anzeigen.htm' ).

ENDIF.

Read only

0 Likes
1,212

FIELD-SYMBOLS: <row1> type any ,

<field> type any .

READ TABLE LV INDEX tv_data1->prevselectedrowindex ASSIGNING <row1>.

assign component 'LVID' of structure <row1> to <field> .

if not <field> is initial .

DELETE FROM ZZ07_LV WHERE LVID = <field> .

endif .

Raja

Read only

0 Likes
1,212

Hi RAJA,

I think this is in the right direction, but is still not working. This is my code now. I implement your suggestion:But there is still error: 500 SAP Internal Server Error

Fehlermeldung: Feldsymbol ist noch nicht zugewiesen. ( Abbruchsart: RABAX_STATE )

That's mean that fielssymbol is not correct or something like that. Here is my code again:

WHEN 'delete'.

IF tv IS NOT INITIAL.

message = 'Tv is not initial'.

navigation->set_parameter( 'message' ).

DATA: tv_data1 TYPE REF TO cl_htmlb_event_tableview.

tv_data1 = tv->data.

IF tv_data1->prevselectedrowindex IS NOT INITIAL.

FIELD-SYMBOLS: <row1> type any , <field> type any .

READ TABLE LV INDEX tv_data1->prevselectedrowindex ASSIGNING <row1>.

assign component 'LVID' of structure <row1> to <field> .

IF not <field> is initial .

DELETE FROM ZZ07_LV WHERE LVID = <field> .

ENDIF.

navigation->goto_page( 'anzeigen.htm' ).

ENDIF.

ENDIF.

Read only

0 Likes
1,212

as i said earlier you have to go thru debugger and let me know exactly in which link this problem is happenning.

Raja

Read only

0 Likes
1,212

Hi RAJA,

I tries to debugg, but it is not debugging my code. This code is written in eventhandler in the BSP and it is not reaching it. I tries couple times.

The error is stil the same like it was with the field.

Di you think is beacuase of the row? Probably is not understanding wich row...

Is there another way to delete this row..

Thank a lot for help.

Mariana

Read only

0 Likes
1,212

without debugging you wont find answer for this problem.

in se 80 go to utilities->settings->abap editor->debuggin->activate external debuggin.

now place a external break point at

IF tv_data1->prevselectedrowindex IS NOT INITIAL.

now execute the page and click on "delete button" which triggers the server event. the debugger should start now.

Regards

Raja

Read only

0 Likes
1,212

Hi Raja,

I tried this bit the debugger go into another mehtod ...i realyy don't understand why the debuuger is not showing my code..

Read only

0 Likes
1,212

Is your code activated? If not then also you wont see your latest code in debugger.

Check this thread..

Raja T