I want to configure print program for smartform. I have done with layout and print program. But in order to trigger smartform when a purchase order is created, i searched in previous posts and i understand that i need a subroutine in my print program which will use nast-objky to trigger my smartform. I want to modify my print program into sub routine pool from executable one and want to add a subroutine "FORM entry_xyz USING ent_retco TYPE any ent_screen TYPE any". In this subroutine i want to use nast-objky in my select condition to populate the internal table which will be passed to smartform.
I need suggestions on my plan.