‎2006 Jul 19 4:03 PM
hi
my code
element = l_document->find_from_name( name = period ).
str = element->get_attribute( name = dechu ).and i don't have the field dechu so i have a dump with OBJECTS_OBJREF_NOT_ASSIGNED_NO
CX_SY_REF_IS_INITIAL
how i can catch this exception ?
thanks
serge
‎2006 Jul 19 11:14 PM
Hi
Declare a reference variable for the exception class.
data : lref_excep type ref to to CX_SY_REF_IS_INITIAL.
try.
element = l_document->find_from_name( name = period ).
str = element->get_attribute( name = dechu ).
catch CX_SY_REF_IS_INITIAL into lref_execp.
l_msg = lref_execp->get_text().
now display the error message l_msg.
endtry.
click the below link for detailed documentation...
http://help.sap.com/saphelp_47x200/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
Regards,
Vara
‎2006 Jul 19 11:01 PM
example
try.
element = l_document->find_from_name( name = period ).
catch CX_SY_REF_IS_INITIAL.
.. code with what you want to do goes here ..
endtry.
try.
str = element->get_attribute( name = dechu ).
catch CX_SY_REF_IS_INITIAL.
.. code with what you want to do goes here ..
endtry.
‎2006 Jul 19 11:14 PM
Hi
Declare a reference variable for the exception class.
data : lref_excep type ref to to CX_SY_REF_IS_INITIAL.
try.
element = l_document->find_from_name( name = period ).
str = element->get_attribute( name = dechu ).
catch CX_SY_REF_IS_INITIAL into lref_execp.
l_msg = lref_execp->get_text().
now display the error message l_msg.
endtry.
click the below link for detailed documentation...
http://help.sap.com/saphelp_47x200/helpdata/en/a9/b8eef8fe9411d4b2ee0050dadfb92b/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
Regards,
Vara