You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is rarely used, but occasionally the OLE2_OBJECT is used to call the interface to Microsoft products.
DATA: lr_outlook TYPE ole2_object,
lr_mail TYPE ole2_object,
lr_ole_attachment TYPE ole2_object.
...
" Create handler for outlook
CREATE OBJECT lr_outlook 'Outlook.Application' NO FLUSH.
" Create new mail
CALL METHOD OF
lr_outlook
'CreateItem' = lr_mail
EXPORTING
#1 = 0.
The ABAP cleaner converts these lines as follows:
" Create handler for outlook
lr_outlook = NEW #( 'Outlook.Application' NO FLUSH ).
" Create new mail
OF(
lr_outlook
'CreateItem' = lr_mail
EXPORTING #1 = 0 ).
This, of course, gives us a syntax error. The rules that intervene here are:
Hi!
I think this is rarely used, but occasionally the OLE2_OBJECT is used to call the interface to Microsoft products.
The ABAP cleaner converts these lines as follows:
This, of course, gives us a syntax error. The rules that intervene here are:
Replace CREATE OBJECT with NEW constructor
Replace CALL METHOD with functional call
Perhaps it is possible to recognise that the data type is OLE2_OBJECT, and in that case exclude the coding from the rule?
Kind Regards,
Jürgen
The text was updated successfully, but these errors were encountered: