I'm planning to automatize a couple SAP t-codes with java for one of my project.
Actually I'm able to open word like this :
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.LibraryLoader;
import com.jacob.com.Variant;
import java.io.FileNotFoundException;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
try {
LibraryLoader.loadJacobLibrary();
ActiveXComponent oWord = new ActiveXComponent("Word.Application");
oWord.setProperty("Visible", new Variant(true));
} catch (Throwable th) {
th.printStackTrace(new java.io.PrintWriter("out.word"));
}
}
}
Which is works well.
As you can see, I'm using com.jacob.activeX.ActiveXComponent this is the doc.
I'm using the constructor which require a string. I think it's the easiest one to use. Now the question (probably silly) is, how/where find this string for SAP?
With the command bellow, I can start SAP GUI.
C:\Program` Files` `(x86`)\SAP\FrontEnd\SAPgui\sapshcut.exe -user='****' -pw='*****' -system='AAA' -client='444'