‎2009 Jun 22 7:23 AM
Hi Experts..
I am working in scripts.
I want to read HEADER TEXT of delivery, by using the function module READ_TEXT.
But in this case I want to handle the exception.
ie. if driver program doesn't find any ID for function module, it should not give the error.
now it is giving error as 'delivery 0080011752 id 0001 not found'.
Can anybody tell me "how to handle this exception?"
Thanks..
‎2009 Jun 22 7:28 AM
‎2009 Jun 22 9:06 AM
HI,
Once you have read the data using FM,then check for sub-rc. If sub-rc is not equal to zero then skip the error and write the code you want.
NOTE: Handle the data in sub rc.
Hope this helps.
‎2009 Jun 22 9:21 AM
Hi,
This is not best practice to do
but i had face same problem and solve this problem by
Just comment exeption and message part like
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id =
language =
name =
object =
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
tables
lines =
* EXCEPTIONS
* ID = 1
* LANGUAGE = 2
* NAME = 3
* NOT_FOUND = 4
* OBJECT = 5
* REFERENCE_CHECK = 6
* WRONG_ACCESS_TO_ARCHIVE = 7
* OTHERS = 8
.
*IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
Regards,
Alpesh