I am sharing my new development scenario.
Multiple documents are being printed at the Shipment Complete step. This process happens many times a day and for more than 1 Shipment at a time. If all these documents print at the same time, a user will need to sort through all the documents and figure out which print goes with which shipment.
For this issue four FM’s are used.
- Read spool data using RSPO_RETURN_SPOOLJOB which takes spool job id as input and gives data in table which is type of SOLI (SAPoffice: line, length 255) and append these records to final table which contains merged data which is type of ITCOO OTF Structure.
- Create one new spool using FM RSPO_SR_OPEN by passing printing parameters and it’s create one new spool id and handle no.
- Write merged data into newly created spool job using RSPO_SR_TABLE_WRITE by passing handle no as input and merged data of type OTF.
- Close the spool job after writing data into it by using FM RSPO_SR_CLOSE.