Category Archive Tips’n trick

How to debug a background job ?

In SM37, type JDBG (like Job Debug in Background).

Read More

Activate conditions and formulas for pricing

Use program RV80HGEN.

Sometimes the standard automatically add this report in transport request (TR).
If not done automatically, you can add it manually in your workbench TR :
Display the object list of your transport request or task. Switch to Change mode, insert row :

R3TR | XPRA | RV80HGEN

Read More

Get text symbols from another program

In theory, you can’t access the text symbols of one program into another program.
They are program dependent.

Nevertheless, if you need to do that, there is the following statement in ABAP.


DATA : li_textpool TYPE TABLE OF textpool.
READ TEXTPOOL 'SAPLLCPP' INTO li_textpool LANGUAGE sy-langu.

Read More

Program to fill entries in SFLIGHT, SBOOK, SPFLI

To use main of SAP demo programs, it is useful to have data in flights management tables.

You can use program SAPBC_DATA_GENERATOR to fill tables SFLIGHT, SBOOK, SPFLI.

Read More

How to edit table content in SE16n

Notice that this tip must only be used on specific tables, only when concerned table is not maintained through SM30 transaction.

Check if you have authorization to do it by clicking on Maintain entries (working according table configuration).

If this tick box is greyed, write &sap_edit on transaction field and press enter.

Read More

Debug code executed in update task with infinite loop.

Even with an external break-point, it is not always possible to trigger the debugger for update task.

The tip is to use infinite loop in your code executed in update task, to prevent the code to be debugged from execution, and then, trigger the debugger from SM50.

Infinite loop :


  " ==========================================================
  " Infinite LOOP to retrieve debug in SM50 (background tasks)
  " ----------------------------------------------------------
  DATA lw_x TYPE char1.
  IF sy-uname = 'USERNAME'. " <== Not not lock everybody
    WHILE lw_x IS INITIAL.
    ENDWHILE.
  ENDIF.
  " ==========================================================

Read More

Import/Export SAP-SCRIPT objects

Use program : RSTXSCRP.