Could please suggest me or send me the related links to achieve below requirements.
As soon as any process order gets created or updated in S/4 Could. The ODATA service should get called and send the sales order details to CPI.
1. How to implement the Artifact in SAP CPI in order to get the data from ODATA API, and finally file should be created file and sent to SFTP ?
2. How to develop the API in S4 Hana side.
Hard to tell from your limited description, but are you using a third-party MES to process the orders?
In this case, check out the best practice for 3W3 or 4DN if it is for DCM.
Alternatively, you can start with consuming the Process Order events using the Event Mesh and then react with a side-by-side application.
If you are in a 3SL system, you could check out Developer Extensiibility: https://help.sap.com/docs/SAP_S4HANA_CLOUD/6aa39f1ac05441e5a23f484f31e477e7/e1059ff581854a699f157340...