I have custom Tcode which is filled and submitted by an associate and this goes for an approval process through workflow.
Once approved i.e when 'APPROVE' icon is clicked in the custom screen, a program with the below logic is executed.
- The submitted form which is in PDF is stored in the application server.
- The path in the app server where the file is stored is passed to the function module BAPI_DOCUMENT_CREATE2 which returns a document number.
Now the issue faced here is ,
If the above mentioned approval is done through R/3 i.e SBWP tcode, the FM BAPI_DOCUMENT_CREATE2 is returning a document number .
If the approval is being done through PORTAL ( which is the actual process ) the FM is not returning a document number.For this I have placed an external break-point and observed that once the function module is executed the debugger is closing and portal is showing a popup 'I/O ERROR' message.
When the program is executed after a particular action from portal, why is the program not able to access the application server but is closing is program execution on executing this function module.