09-08-2008 11:49 PM
Hello
Im just starting with ABAP and I've come to a silly problem. I want to use the SY-SUBRC into a log line and I don't know how to use it in a CONCATENATE sentece.
Im trying this:
IF SY-SUBRC <> 0.
CONCATENATE 'Error(' SY-SUBRC ')creating HTTP CLIENT for URL' LW_URI INTO LW_AuxStr.
me->log->logerror_string( LW_AuxStr ).
RAISE EXCEPTION TYPE ZCX_HTTP_ERROR.
ENDIF.
But it wont work because of this error: SY-SUBRC must be a character-type data object....
How can I convert an Integer type into a String type?
Thanks!
09-08-2008 11:57 PM
You could declare a character or string variable and just do
var = sy-subrc.
09-08-2008 11:57 PM
You could declare a character or string variable and just do
var = sy-subrc.
09-09-2008 5:20 AM
Hi,
data: temp type c.
temp = sy-subrc.
IF SY-SUBRC 0.
CONCATENATE 'Error' temp 'creating HTTP CLIENT for URL' LW_URI INTO LW_AuxStr.
me->log->logerror_string( LW_AuxStr ).
RAISE EXCEPTION TYPE ZCX_HTTP_ERROR.
ENDIF.
I hope it will help.
regards
Natasha Garg
09-09-2008 2:27 PM