09-30-2008 4:42 AM
Hi All...
Iam transfering the data string to the application server by using the TRANSFER statement.
How can i disply the scusses or failure message after transfering the data string.
for example Due to some network problems the string was not transfered..in this case how can i popup the message?
Regards,
Mahesh
09-30-2008 4:44 AM
Hi Mahesh,
check sy-subrc = 0 after the transfer statement, if <> 0 exit from the loop and give error message..
Thanks.
Regards,
Jey
09-30-2008 4:45 AM
09-30-2008 4:48 AM
Hi Mahesh,
Check the SY-SUBRC condition after the TRANSFER Statement. If it is not successful then give an error message.
Check this:
TRANSFER w_data TO f_name.
if sy-subrc ne 0.
message 'transfer failure' type 'I'.
endif.
Regards,
Chandra Sekhar
09-30-2008 5:03 AM
Hi Chandra ..
Thanks for reply.
But in the ABAP TRANSFER is the only statement that not return the subrc value.
09-30-2008 5:23 AM
Hi Mahesh
Transfer doesnt have sy-subrc
U can use Autnority_check_dataset function module
Or U can use the table SPTH
here is the sample code
TYPE-POOLS SABC.
.....
CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING PROGRAM = SY-REPID
ACTIVITY = SABC_ACT_READ
FILENAME = '/tmp/sapv01'
EXCEPTIONS NO_AUTHORITY = 1
ACTIVITY_UNKNOWN = 2.
Regards
Devanand
09-30-2008 5:56 AM
checking the authority check is the only alternative...
after open dataset if you can check the sy-subrc its assured that transfer statement that follows it.. is done.. unfortunately transfer is the only statement which doesnot return subrc.
09-30-2008 6:10 AM
Hi Jay.
Thanks for your reply.
Can you plz send me the sample.
But imagine one situation..
for example iam transfering 400 records to the file...
Error occured in the network after transfering 200 records at that time how to raise the error message .