cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug ABAP mapping

rohit_goel
Participant
0 Kudos

Hi ,

How can i debug the code of ABAP mapping ?

Thanks,

Rohit

Accepted Solutions (1)

Accepted Solutions (1)

former_member206760
Active Contributor
0 Kudos

Dear Rohit,

Just hardcode Break-point in your code where you want the breakpoint.

Then go ou of the tcode sxi_mapping_test...This is ver imp...if you have any sessions of sxi_mapping_test open...after putting the breakpoint...open a fresh session by typing /nsxi_mapping_test.

I tries this today and it has worked..

Giving points is another way to say thanks

Former Member
0 Kudos

>>Giving points is another way to say thanks

And asking points like this is against the Rules of Engagement!!!

Answers (5)

Answers (5)

Former Member
0 Kudos

Go through this.

/people/sameer.shadab/blog/2005/09/29/testing-abap-mapping

Secondly to set External Break-Point in you proxy program go to:

Utilities ->settings-> debugging, then tick the checkbox. After this put your cursor where you wnat to have the break point. Now when you press the break point button it will show an option to chose the external break point, select that option.

One more thing while debugging you must have an open session of your proxy program, otherwise you will not get the break point at runtime.

Regards,

Sarvesh

Former Member
0 Kudos

can't you put external break point in the generated ABAP mapping class

Former Member
0 Kudos

Hi ,

Please use tcode: SXI_MAPPING_TEST for debugging the ABAP mapping.

Set trace on line where you want to debug.

I hope this will help you to find problems in your program.

regards

Ashwin Kumar Dhakne

aashish_sinha
Active Contributor
0 Kudos

Hi,

Using transaction 'sxi_mapping_test' you need to set trace after every line for which you feel there could be problem and in target message go through the trace generated

Regards

Aashish Sinha

rohit_goel
Participant
0 Kudos

Can you please give me an example how to write the code for trace and where can we see the results?

I tried this but could not see anything?

thanks,

rohit

aashish_sinha
Active Contributor
0 Kudos

Hi,

have a look into this weblog.

/people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility

Regards

Aashish Sinha

Former Member
0 Kudos

Hi rohit ,

Put the external breakpoint in your ABAP class code and then execute your sceanrio.

After getting executed it will get stop at the line where you have kept the breakpoint at runtime.

It is important to put breakpoink where exactly it could help you to get the problem resolved.

Regards

Ashwin Kumar Dhakne

rohit_goel
Participant
0 Kudos

I have set the break point in the mapping code even then i am not able to debug mapping.

I am getting CX_SY_REF_IS_INITIAL exception.

<?xml version="1.0" encoding="utf-8" ?>

- <asx:abap version="1.0" xmlns:asx="http://www.sap.com/abapxml">

- <asx:values>

<ERROR href="#o280" />

</asx:values>

- <asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary">

- <cls:CX_SY_NO_HANDLER id="o280">

- <CX_ROOT>

<TEXTID>1F09B73915F6B645E10000000A11447B</TEXTID>

<PREVIOUS href="#o285" />

<KERNEL_ERRID>UNCAUGHT_EXCEPTION</KERNEL_ERRID>

<IS_RESUMABLE />

- <INTERNAL_SOURCE_POS>

<PROGID>110</PROGID>

<CONTID>5162</CONTID>

</INTERNAL_SOURCE_POS>

</CX_ROOT>

<CX_NO_CHECK />

- <CX_SY_NO_HANDLER>

<CLASSNAME>CX_SY_REF_IS_INITIAL</CLASSNAME>

</CX_SY_NO_HANDLER>

</cls:CX_SY_NO_HANDLER>

- <cls:CX_SY_REF_IS_INITIAL id="o285">

- <CX_ROOT>

<TEXTID>2B0BB8396F051547E10000000A11447B</TEXTID>

<PREVIOUS />

<KERNEL_ERRID />

<IS_RESUMABLE />

- <INTERNAL_SOURCE_POS>

<PROGID>110</PROGID>

<CONTID>5168</CONTID>

</INTERNAL_SOURCE_POS>

</CX_ROOT>

<CX_DYNAMIC_CHECK />

<CX_SY_REF_IS_INITIAL />

</cls:CX_SY_REF_IS_INITIAL>

</asx:heap>

</asx:abap>

Please let me know what to do .

Thanks

Former Member
0 Kudos

Hi!

Write this code in your ABAP mapping BEFORE the point you want to check:

data: int type i value 0.

while int = 0.

int = 0.

endwhile.

This endless loop will execute. Go into transaction code SM50, mark the line of your process and go to Program/Session -> Program -> Debugging -> Yes.

Change the value of variable "int" to 1 and start debugging...

regards Ole

prateek
Active Contributor
0 Kudos

Use transaction sxi_mapping_test. Set the trace there.

Regards,

Prateek