Skip to Content
avatar image
Former Member

Set a Break-point at particular word in Z program programatically.

Hello Everyone,

I have a requirement to set break-point in zprogram at a particular FM or keyword (say "REUSE_ALV_GRID_DISPLAY" in "ZANY_PROGRAM" program) programatically.

I am aware of below code to set breakpoint in any program at particular line number.

  wa_breakpoints-program = sy-repid.
  wa_breakpoints-line    = 3.
  APPEND wa_breakpoints TO breakpoints.
  CALL METHOD cl_abap_debugger=>save_breakpoints
    EXPORTING
      main_program = sy-repid     "Program name
      breakpoints  = breakpoints.

However cannot figure out a way to get line number from the keyword.

Any help will be appreciated. Thank you

Add comment
10|10000 characters needed characters exceeded

  • Chetan,

    May I know the objective of this exercise ?

    Just curious :-)

    K.Kiran.

  • Former Member Kiran K

    Hello Kiran,

    We have multiple print program each triggering multiple smart form in our project. It becomes extremely time consuming at times to find the correct print program triggering the smart form. The above logic might help to set breakpoints in all print program's 'SSF_FUNCTION_MODULE_NAME' thus saving time finding the right program.

    Thanks and Regards,

    Chetan Shah

  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 10, 2017 at 04:16 PM

    You may use the statement READ REPORT to read the source code.

    Add comment
    10|10000 characters needed characters exceeded