cancel
Showing results for 
Search instead for 
Did you mean: 

Debug ABAP code used for ABAP mapping

Former Member
0 Kudos

Hi Experts,

I have worked on Abap mapping. I have executed the code in SE24 to acheive desired mapping and the desired output is also generated.

attached below is a part of the code i have used:

method IF_MAPPING~EXECUTE.
* initialize iXML
  TYPE-POOLS: ixml.

  CLASS cl_ixml DEFINITION LOAD.
* create main factory
  DATA: ixmlfactory TYPE REF TO if_ixml.
  ixmlfactory = cl_ixml=>create( ).

* create stream factory
  DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
  streamfactory = ixmlfactory->create_stream_factory( ).

* create input stream
  DATA: istream TYPE REF TO if_ixml_istream.
  istream = streamfactory->create_istream_xstring( source ).

* parse input document =================================================
* initialize input document
  DATA: idocument TYPE REF TO if_ixml_document.
  idocument = ixmlfactory->create_document( ).

* parse input document
  DATA: iparser  TYPE REF TO if_ixml_parser.

  iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                        istream        = istream
                                        document       = idocument ).
  iparser->parse( ).

I just want to debug and see if an input is provided how does each of these methods make a difference to it.

I tried to input some value in the SOURCE parameter on executing the code but it is not working fine.

Could you please suggest hiw i should go about so that i can see the exact way the input Xstring is affected by each of these methods in the debugger.

Help will be appreciated.

Many thanks,

Neha

Edited by: Neha Nagrani on Jul 7, 2008 11:46 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Neha,

Write a Small Report as Folows:

1. Create your XMl payload of Type xSTRING.

2. Call the method EXECUTE

Place a Breakpoint on the method. and then keep debugging inside.

the SetParamter method is obviously called from inside.

This is the Simplesrt Solution.

Reward points if useful

Regards,

Abhishek

Answers (1)

Answers (1)

Former Member
0 Kudos

Testing ABAP Mapping

regards

kummari

Former Member
0 Kudos

Thanks Kummari,

But i dont want to test my abap class

its working fine.