You need to write a Java service that creates an IDOC object and its constituent IDOCControl and IDOCSegment objects. You need to populate the values for the necessary keys as per the type of IDoc you want to generate. The SAP Adapter documentation has a detailed example on how to create this java service. If your IDoc type is different from that in the example, you need to find out the corresponding property names and populate the values for those accordingly.
Once the IDoc is created, you can send the IDoc to the SAP server by invoking the “pub.sap.client:invokeTransaction” service, passing in your exports and tables. (Follow the SAP Adapter guide for more details)