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

Debugging ABAP Object

former_member431874
Participant
0 Likes
2,499

First of all, I have to admit that i'm not familiar with ABAP Object at all.

While debugging, I arrived at IF_EX_AT_CONS_PROCESSING~SET_POSTAB_CONS_ORDER.

In there, there is a variable (GT_BSART_TYPES) the value of which i'd like to know how it comes from.

When I first entered the method, the variable already has the value which means the value has been passed from somewhere else.

I can see the variable name 'GT_BSART_TYPES' in SE24, tab Attribute.

The question is how the variable gets the value?

I'd like debug it by putting a breakpoint somewhere but i have no idea where I should put it.

Any suggestion would be appreciated.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
1,280

Well, if it is a static variable it can be initialized in static constructor. Also this can happen in normal constructor (in case it is an instance attribute), so please check them both.

Regards

Marcin

8 REPLIES 8
Read only

Former Member
0 Likes
1,280

In the debugger , there is an option to create watch point for the variables . You should create a watch point for that variable . So whenever the variable value changes , it will hit the watch point

Regards

Arshad

Read only

0 Likes
1,280

>

> In the debugger , there is an option to create watch point for the variables . You should create a watch point for that variable . So whenever the variable value changes , it will hit the watch point

>

>

> Regards

> Arshad

Hello Arshad. Thanks for answering.

But I can't do that. Here is the reason:

When debugging, before I enter the method SET_POSTAB_CONS_ORDER, I can't see the variable, so I can't create a watch point. Only when in the method, I can see it. However, at the moment I enter the method, it already has a value assigned.

What I what to know is how the variable got its value.

Any idea would be appreciated.

Read only

Former Member
0 Likes
1,280

Hi ,

could you pelase tell the transaction that you are debugging??

Cheers,

Ravi.

Read only

0 Likes
1,280

Hello Ravi,

It's WA08 (a transaction in IS-Retail).

Read only

MarcinPciak
Active Contributor
0 Likes
1,281

Well, if it is a static variable it can be initialized in static constructor. Also this can happen in normal constructor (in case it is an instance attribute), so please check them both.

Regards

Marcin

Read only

0 Likes
1,280

>

> Well, if it is a static variable it can be initialized in static constructor. Also this can happen in normal constructor (in case it is an instance attribute), so please check them both.

>

> Regards

> Marcin

Thanks Marcin. That's interesting.

Where can I see the static and normal constructor?

Read only

0 Likes
1,280

Check the class which implements this interface.

Also I checked the interface and there is no attribute GT_BSART_TYPES which implies that this comes from the class metioned above.

Regards

Marcin

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,280

Hello,

Looks like you've run into a BAdI implementation. Perform "where-used" for the attriburte GT_BSART_TYPES & you'll find where exactly the value is getting populated.

In our ISU system we've a std. BAdI implementation CL_IM_AT_CONS_PROCESSING. Inside the method SET_POSTAB_CONS_ORDER, the table GT_BSART_TYPES is getting populated.

READ TABLE gt_bsart_types INTO l_bsart_types_line
                              WITH KEY bsart = im_aubsi-bsart.

    IF sy-subrc <> 0.
      .........
      APPEND l_bsart_types_line TO gt_bsart_types.
    ENDIF.

BR,

Suhas