I am working on the scenario like File-Bapi-Idoc
1) Getting the file from external system, in the file
If the Sonumber is populated then need trigger an Bapi_change
and after getting the response flag as 1 from Bapi then have to send all those file fields through IDOC-.
2)If the Sonumber is not populated from the file then need to trigger a Bapi_Createfromdat to create the sales order and receive the salesorder number as response from Bapi then
have to send all those file fields and Bapi response sales ordernumber through the same IDOC which is mentioned in the point 1.
Please provide the solution for this.
Is BPM required for this,if so provide the steps.
Thanks in advance,