Data is passed from ABAP "Print Program" to SAPscript via the FM's OPEN_FORM, WRITE_FORM and CLOSE_FORM.
The print program "opens" the SAPscript" with the OPEN_FORM FM. Each Element is printed using the WRITE_FORM FM. When the data has all been passed, the print program calls FM CLOSE_FORM.
Look at the doco in SE37 for these FM's for more info.
Hope this helps.