Archive for March, 2014

Howto Search for BAdi’s in programs

Searching for a Classic BAdi within a program

Search for the keyword GET_INSTANCE in the program.
Double click on the reference variable to navigate to the variable
Double click on the BAdi interface to navigate to the interface
Use the where-used list in classes

Searching for a new BAdi within a program

Search for the keyword GET_BADI in the program
Double click on the reference variable to navigate to the variable
Double click on the BAdi name to navigate to the corresponding enhancement spot

21

03 2014

&SAP_EDIT not working?

Depending on your SAP version you might have possibility to use &SAP_EDIT command in SE16 or not.
For those who have not heard about this command earlier we can say that is like a secret option which lets you to directly edit/delete/insert the data of a table.
Of course under normal circumstances this is something which you should never do on a production system.
Because this may lead to data inconsistencies and cause serious damage to your system.
Having informed you about the danger if you still would like to see here is how you can do it by debugging.

in order to use &SAP_EDIT in breakpoint on LSE16NI01 perform fill_sap_edit
or better in LSE16NF10 / if ld_on <> true. and set ld_on = true
later continue with debug and set sy-subrc to 0 whenever necessary

Of course the prerequisite is that you should have the authorization to debug.

Probably the better way to do this rather than debugging everytime is to reactivate the &SAP_EDIT option.
For more detailed information on how and why SAP deactivated this you can consult the below SAP Notes.

1420281 – CO-OM tools: SE16N: Deactivating &SAP_EDIT
1446530 – CO-OM tools: SE16N: Technical enhancement

21

03 2014

How to generate VOFM routines

It is required to run report RV80HGEN to regenerate the pricing routines after transport to the production system.
This is usually unknown or forgotten by the ABAP’ers. This leads to errors in the production system.
The best way to do this is to let SAP do this automatically for you by including a program execution command into your transport request.
Include the below into the object list of your request
R3TR XPRA RV80HGEN
This will execute the program RV80HGEN after the transport is imported into the target system.

21

03 2014

How to unlock a SAP Query

If you receive the message that an SAP Query is locked for changes here is how you can open it.

1. Go to SQ02 transaction
2. Select the Infoset of the query which is locked.
3. From the menu Go to –> Query Directory
4. Select the Query you would want to unlock.
5. Click on Cancel Edit lock button

Now you can go back to SQ01 transaction again and edit the query.

21

03 2014