Application Development 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: 

How to delete table entries with SE16 in debugging mode?

Former Member

We are trying to delete some table entries which cause our InfoPackage short dumps in BW system. The problem is that we can only see the Display menu item with SE16 and the Delete menu item is dimmed that we are unable to conduct the deletion. SAP Support suggest to use debug with SE16 to do the deletion, but we can't figure out how!

Anyone's idea is greatly appreciated!

1 ACCEPTED SOLUTION

Former Member

Hi

In se16 when records displayed

select the record to delete then enter into debug mode with /h then in debugging screen

create breakpoint in the subroutine 'SET_STATUS_VAL'

in program 'SAPLSETB'. Now press f8.

Now modify the 'code' variables value to DELE and click pencil icon.

now delete button appears and it worked for me.

reagrds

austin

22 REPLIES 22

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Try creating table maintenace generator in SE11 for that table using Utilities->Table Maintenance Generator->Create[Enter appropriate function group and authorisation].

Then use SM30 to do the deletion.

Former Member
0 Kudos

Hi Kevin,

In debugging mode you have to change the value of variable CODE to DEL and then execute it.

later you will get the option to delete the selected entry.

Regards,

Raghavendra

vinod_gunaware2
Active Contributor
0 Kudos

1. Display record entries for desired table via SE16 or SE11. 2. Select record which requires updating by highlighting it and pressing the display icon (glasses, F7).

3. Type /h in command box and press enter.

4. Now press enter again and you should enter debugging mode

5. Change the value of code from 'SHOW' to 'EDIT', remember to press the 'change field contents'

icon (pencil) in-order to store new value.

6. Press F8 (execute) to leave debug. 7. You should now have change access to the selected record.

8. Hit 'SAVE' to save any changes.

9. Remember there is a reason why you can't do this without debugging it, one reason being that it could

introduce inconsistencies in the table data.

regard

vinod

0 Kudos

hi Vijay and Vinod,

I know how to get to the debugging mode, but still confused on how to get to the code thing. On debug screen, I can see tabs of 'Fields', 'Table', 'Breakpoints', 'Watchpoints', 'Calls', 'Overview', and 'Settings', but not code though!

Please elaborate it!

Thanks

0 Kudos

click on fields tab.

now enter code

then it will show the code value as <b>SHOW</b>

change it to<b> DELE</b>, and click on (pencil). which is available right side the code (pencil).

Regards

vijay

former_member188685
Active Contributor
0 Kudos

Hi,

in SE16, after display entires,

1. slect the record and double click

2. /h

3. now enter

4. CODE = 'DISP' change CODE value to 'DELE' in bugging mode. then F8

5. now it will show the delete button.

6.click it, and then it will ask you to delete ,say ok .

Regards

vijay

Former Member
0 Kudos

Hi Kevin,

I feel the idea of deleting table entries during debugging is not the right way.

I would rather suggest you to use some FM for the same.

If you could tell me the table from which you are trying to delete the entries I could find a FM which would solve your purpose.

Hope it helps...

Lokesh

pls. reward appropriate points

0 Kudos

hi Lokesh,

One of the table is called ROOSPRMSC in BW system. BTW, we would be appreciated if you can also tell us the tricks to find a FM to solve the problem as well.

Thanks

0 Kudos

Hi,

these are the FM's using <b>ROOSPRMSC</b>

BWFI2T_RESET_TIMESTAMPS       
BWFI3T_RESET_TIMESTAMPS       
BWFIT_RESET_TIMESTAMPS        
BWOMC_GET_CO_AREA_ATTR        
BWOMT_RESET_TIMESTAMPS        
CTBW_RESETDELTA               
PSBE_RESET_DATESTAMPS         
PSBE_UPDATE_DATESTAMPS        
PSBW_GET_ACTIVITY             
PSBW_GET_ACTIVITY_ELEMENT     
PSBW_GET_COMPONENT            
PSBW_GET_MILESTONE            
PSBW_GET_NETWORK              
PSBW_GET_PROJECT_DEFINITION   
PSBW_GET_TEXT_ACTIVITY        
PSBW_GET_TEXT_ACTIVITY_ELEMENT
PSBW_GET_TEXT_COMPONENT       
PSBW_GET_TEXT_MILESTONE       
PSBW_GET_TEXT_NETWORK         
PSBW_GET_TEXT_PROJECT         
PSBW_GET_TEXT_WBS_ELEMENT     
PSBW_GET_WBS_ELEMENT

Regards

vijay

0 Kudos

Do as the others have suggested, once in debug mode, you will see a 4 lines at the bottom of the screen where you can enter values. On the first line, enter the word "CODE" an hit enter. You are displaying this variable from the program. Notice the value is "SHOW". Change the value "SHOW" to "DELE" and click the pencil to the right. Now hit F8 to continue. You should now have a delete button on the application toolbar.

REgards,

Rich Heilman

0 Kudos

Here is another nice solution:

1. Goto Transaction se16N

2. Enter the Name of the Table

3 Enter the OK-Code: &sap_edit ,Press Enter

You get the message:"SAP Editormode activated"

4. Enter your selection fields,F8

-> Now you can edit the whole table via ALV_GRID

Regards

Frank

0 Kudos

Another way to achieve the same thing...

Goto SE16..Give table name and click Enter. In the selection screen give "/H" and then execute(F8).

Once you are ain debugging, set a break point at the ABAP statment "SET PF-STATUS"...and hit return...

you will stop at a statment "set pf-status 'TAB_LIS4' excluding excl_tab"....

keep the cursor on the "excl_tab", internal table and remove the function codes from inside....hit return...

this will activate the functions like "Delete" Delete All" etc....in the SE16 List display...

Thanks,

Renjith

0 Kudos

hi Rich,

I followed what you instructed, enter 'Code' in the 1st line of the 'Field names' column, but after hit Enter, the 'exclamation' label shows up before the 'Code'.

Any idea?

Thanks

0 Kudos

Hi Kevin,

enter it Properly, it should be code , even if you enter wrongly it will show like that only.

it should be CODE, after you press enter

-


CODE | SHOW (Pencil)

-


change it to

-


CODE | DELE (Pencil)

-


Regards

vijay

0 Kudos

Then you are not at the right place. Lets start at the begining.

Go to SE16.

Enter table name.

Hit F7.

Enter selection criteria.

hit F8.

Double click the specific record that you want to delete.

In the transaction code field at the top, enter "/H" and hit enter. Debug is switch on.

Now hit enter again.

You should now be in debug and you should see this code..



form set_status_val tables ntab structure x031l            
                    using code name next for_lines.        
  field-symbols: <field>.                                                                                
refresh exclude_tab.                                     
  if code = 'SHOW'.                                        
    set titlebar 'TAB' with name 'anzeigen'(100).          
  elseif code = 'EDIT'.                                    
    set titlebar 'TAB' with name 'ändern'(101).            
  elseif code = 'INSR'.                                    
    set titlebar 'TAB' with name 'einfügen'(102).          
  elseif code = 'ANVO'.                                    
    set titlebar 'TAB' with name 'einfügen'(102).          
  elseif code = 'DELE'.                                    
    set titlebar 'TAB' with name 'löschen'(103).           



Notice that there is a field called CODE in the IF statement.

Now enter the word "CODE" in the field names list, change the value to DELE and click the pencil. Hit F8. Now you can delete the entry.

Regards,

Rich Heilman

0 Kudos

This process will be done by user(s) so using the debugger might be too complicated.

Is there a way to return a group of records and then select which ones they want to be deleted?

Former Member

Hi

In se16 when records displayed

select the record to delete then enter into debug mode with /h then in debugging screen

create breakpoint in the subroutine 'SET_STATUS_VAL'

in program 'SAPLSETB'. Now press f8.

Now modify the 'code' variables value to DELE and click pencil icon.

now delete button appears and it worked for me.

reagrds

austin

Former Member

as said,

use only caps are to be used in there.

dont hit enter just convert the text of code to DELE , press the change i.e right side of line and press f8.

it leads u to the entry and u can delete from there.

Former Member
0 Kudos

Maybe I don´t get your problem correctly, anyway this is what I do.

Depending on your release there is also a transaction calles se16n.

If so enter your table name, press enter and before you go to your listing, enter &sap_edit in the command field at the top and press enter.

If you now go into the listing, the delete options should be active.

Hope to help.

Ute

Former Member
0 Kudos

Dear Kevin,

Almost all info is in the thread however one important note was forgotten: Use the SE16 Standard list ( so not the ALV LIST or ALV Grid).

You can set this using the menu>> Settings>> User Parameters>>SE16 Standard list.

0. Use the SE16 standard list

1. Display record entries for desired table via SE16 or SE11.

2. Select record which requires updating by highlighting it and pressing the display icon (glasses,

F7).

3. Type /h in command box and press enter.

4. Now double click on the record you want to delete

5. set breakpoint at Subroutine: 'SET_STATUS_VAL' Programm 'SAPLSETB' by pressing

SHIFT+F6 (or right click)

6. press F8

7. Change the value of CODE from 'SHOW' to 'EDIT', remember to press the 'change field contents'

icon (pencil) in-order to store new value.

8. Press F8 (execute) to leave debug.

9. A 'Delete Entry' button appears

10. Hit 'SAVE' to save any changes.

Former Member
0 Kudos

All this information is great and works fine, but let's assume I need to delete 20,000 records. I am not going to click Delete Entry for each record.

How can I unlock a Delete All Selected option in SE16 (our release doesn't have SE16N). Thanks!

former_member194669
Active Contributor
0 Kudos

Check for fm STC1_FULLSCREEN_TABLE_CONTROL

aRs