Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8695

EXECUTE_MACRO of I_OI_DOCUMENT_PROXY - giving Dump

$
0
0

Hi All,

 

I was trying to execute a simple excel macro from SAP.

My idea is to open excel file using "In Pace" method and execute a macro when a button is selected on screen. I was able to create a container and open excel document in side the container successfully.

When button on screen is pressed, i'm calling EXECUTE_MACRO method of I_OI_DOCUMENT_PROXY. I tried to call method as below

 

Declared g_document as  I_OI_DOCUMENT_PROXY.

 

CALL METHOD g_document->execute_macro

         EXPORTING

           macro_string = 'Module4.Macro3'   " Module and Macro.

           no_flush     = 'X' 

         IMPORTING

           error        = it_errors

           retcode      = g_retcode .

 

or

 

CALL METHOD g_document->execute_macro

         EXPORTING

           macro_string = 'Macro3'    "Macro Name only

           no_flush     = 'X' 

         IMPORTING

           error        = it_errors

           retcode      = g_retcode .

 

I don't have to pass any parameters to this macro, it is just a test macro to fill some cells randomly. This macro is working fine when i run it on excel file. I tried several others ways of calling this method, like passing script names as OKADIS, passing changing parameters, with and without no_flush, none of them worked. The error I'm getting is short dump is in attached screen shot.

 

If anybody had ever faced such issue and was able to resolve it, please guide me on how to do this.

 

 

Any help is highly appreciated.

 

Thanks in Advance.


Viewing all articles
Browse latest Browse all 8695

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>