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

How to test abap program?

Former Member
0 Likes
1,274

Hi, all,

Is there any body can tell me how I can test my abap program for just some of lines? For example, the program has total 3000 lines. But I only want to test portion from line 100 to line 500. How I can do that?

Thanks!

Marea

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
807

hi,

Keep break point at 100 line and execute the program. It can be set by placing cursor on the required line and press STOP button (red color button) on application toolbar. The control comes and stops at 100 line. Press F5 to execute line by line.

Regards,

Sailaja.

6 REPLIES 6
Read only

Former Member
0 Likes
807

hi Yang,

Put a break point at that section of code and give the test data which makes it to take you to that point and there by you can test it...

For example


  DATA:
    wa_selopt LIKE jobname,
    t_selopt  LIKE TABLE OF jobname WITH DEFAULT KEY.

  LOOP AT jobname INTO wa_selopt.
    APPEND wa_selopt TO t_selopt.
  ENDLOOP.

  PERFORM prepare_selection_32 TABLES t_selopt selection_jobname.

if i wnat to stop at Loop statement then i will put a break point here and execute the code with a valid date that fetches me to that place...

Regards,

santosh

Message was edited by: Santosh Kumar P

Read only

Former Member
0 Likes
808

hi,

Keep break point at 100 line and execute the program. It can be set by placing cursor on the required line and press STOP button (red color button) on application toolbar. The control comes and stops at 100 line. Press F5 to execute line by line.

Regards,

Sailaja.

Read only

Former Member
0 Likes
807

Hi,

in the debug mode,

as you know the line numbers form where you want to test give the line number in the space right side, there is a space with up and down arrow matks, and click enter

it will take you to that line and test from there

Regards,

Sowjanya

Read only

Former Member
0 Likes
807

Hi Marea Yang,

Why and what exactly u want to test the abap program?

However if u want the functionality for part of program u can test it with debugging on.U can download Internal tables data and check it.

Also If its a report program writing to the output screen then u can test the output with debugging on u get an option in the tool bar which directs to screen output specfying what was written till that part of program.

Thanks and Regards,

Swaroop Patri.

Read only

Former Member
0 Likes
807

Hi Marea,

To add to the above posts, If you keep a break point at line 100 and 500, you cannot avoid the lines 1-100 from being executed.

By default the execution will start from line 1.

Regards,

Ravi

Read only

0 Likes
807

Thanks everybody for the answer!

Marea