2015 Jan 19 3:55 PM
Dear All,
I am sending emails using system command and need to catch the exception whether the call system is successful or
not. Any exception available on this?
REgards,
Harsha
My sample code below
CONCATENATE '/home_sap/prdweb/testmail/test.sh' zemail_2_schhead-email INTO w_os SEPARATED BY space.
CONCATENATE 'Purple_data_' to_dt INTO sub.
CONCATENATE w_os sub INTO w_os SEPARATED BY space.
CONCATENATE w_os 'Purple_data.' INTO w_os SEPARATED BY space. .
CONCATENATE w_os '[email protected]' INTO w_os SEPARATED BY space.
CONCATENATE w_os 'helloworld' INTO w_os SEPARATED BY space.
CONCATENATE w_os file_nm INTO w_os SEPARATED BY space.
CONCATENATE w_os zsmtpip-ip INTO w_os SEPARATED BY space.
CALL 'SYSTEM' ID 'COMMAND' FIELD w_os.
WRITE 😕 w_os.
Dear All,
I am sending emails using system command and need to catch the exception whether the call system is successful or
not. Any exception available on this?
REgards,
Harsha
My sample code below
CONCATENATE '/home_sap/prdweb/testmail/test.sh' zemail_2_schhead-email INTO w_os SEPARATED BY space.
CONCATENATE 'Purple_data_' to_dt INTO sub.
CONCATENATE w_os sub INTO w_os SEPARATED BY space.
CONCATENATE w_os 'Purple_data.' INTO w_os SEPARATED BY space. .
CONCATENATE w_os '[email protected]' INTO w_os SEPARATED BY space.
CONCATENATE w_os 'helloworld' INTO w_os SEPARATED BY space.
CONCATENATE w_os file_nm INTO w_os SEPARATED BY space.
CONCATENATE w_os zsmtpip-ip INTO w_os SEPARATED BY space.
CALL 'SYSTEM' ID 'COMMAND' FIELD w_os.
WRITE 😕 w_os.
2015 Jan 20 6:42 AM
Look for sy-subrc along with below exceptions.
Non-Catchable Exceptions
2015 Jan 20 6:49 AM
2015 Jan 30 2:52 PM
Thanks, the exception doesn't suit my requirement.
IS there any way to output system command in abap code?
2015 Feb 02 11:03 AM
Why didn't you use the "official" Function Modules as described In online documentation as Programming with External Commands : Programming Techniques (SXPG_CALL_SYSTEM: Run an External Command (Express Method) , etc.)
Regards,
Raymond