Executing Excel Macro from SAP ABAP

I am populating data in excel sheet using OLE. This excel document contains Macro.

Is there any way I can start execution of Macro as soon as data is populated in Excel sheet.

If you are using OLE to populate the Excel Sheet then, then yes you can run a macro.

  CALL METHOD OF OBJ_EX_APP 'Run'
       EXPORTING #1 = MACROSTR.
 

Adding a Field Exit

To add a field exit first find the data element that is linked to the screen field- the screen number and program

Run program RSMODPRF. You will need to create two function modules one FIELD_EXIT_MEPO_VENDOR and

FIELD_EXIT_MEPO_VENDOR_A

FIELD_EXIT_MEPO_VENDOR should have code simply of input = ouput.

FIELD_EXIT_MEPO_VENDOR_A should have the code for whatever the functionality is required

Go back to RSMODPRF and run the program without parameters. Use the push buttons to assign the screen, 'A' and program. Use the drop down to activate the field list.

This should now work, but there is no way of debugging. For further information look at OSS 29377

program zzdirlist.

* for AIX this method also works.

DATA: BEGIN OF TABL OCCURS 0,
      TEXT(80) TYPE C,
      END OF TABL.

DATA: COMMAND(256) TYPE C.

COMMAND = 'ls'.
CALL FUNCTION 'RFC_REMOTE_PIPE' DESTINATION 'SERVER_EXEC'
EXPORTING COMMAND = COMMAND
READ = 'X'
TABLES PIPEDATA = TABL.
LOOP AT TABL.
   WRITE:/ TABL-text.
ENDLOOP.
 
Beam Back -> ABAP Cafe for Abapers