Skip to Content

display content of any variable (especially CX_ROOT subclass instance)


Do you know any FM or method to display the content of any variable? (elementary, deep structure, instance, ...) I can't know its type, except that it's an instance that is a subclass of CX_ROOT.

In fact, this question is related directly to my workflow question : when a class-based exception occurs, I serialize it into an XML string, and I'd like to display it on request (via business object methods) so that to help technicians. Of course, I know how to display any XML, but I'd prefer to use a specialized API.

Hope it's clear!



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jun 23, 2010 at 09:15 AM

    Hi Sandra,

    I am not sure if this helps. But even if you are not aware of the subclass you can cast it (rather narrow cast) to the super class which in this case is CX_ROOT.



    Add comment
    10|10000 characters needed characters exceeded

    • Hello Suhas,

      handling/catching exceptions is not the issue. Here is an example what happens: one of the possible exceptions is CX_SWF_RUN_WIM_DEF_FAILED.

      I know I can get the short exception text (and the long text if it exists), but it often doesn't give many details. For example:

      Exception CX_SWF_RUN_WIM_DEF_FAILED survenue (programme : CL_SWF_RUN_WIM_FACTORY========CP, include : CL_SWF_RUN_WIM_FACTORY========CM004, ligne : 239)

      I'd like to display its attributes, which could be (debugger view):

                CX_ROOT	16AA9A3937A9BB56E10000000A11447B
                TEXTID	16AA9A3937A9BB56E10000000A11447B
                INTERNAL_SOURCE_POS	Structure: flat & not charlike
                TIMESTAMP	0.0000000
                T100_MSG	WL    820E000000000003   WS90000001
                LOG_CONTEXT	Structure: deep
                EXCP_TAB	Standard Table[0x1(8)]
                WI_ID	                     000000000003
                RETURN	Structure: flat & not charlike
                LOG_HANDLE	{O:25*\CLASS=CL_SWF_RUN_WIM_LOG}
                OBJECT_PRP	Structure: flat & charlike

      They are very interesting because we see the true error message WL820 for example, which means: Work item 000000000003: Task WS90000001 cannot be read.

      Of course, there are many exception classes, it's why it should be dynamic.