I need to code for a subroutine in a smartform, I need to go for form routines option to declare it and call it in INITIALIZATIOB TAB by perform keyword. The syntax for subroutine is exactly given below as per requirements.
perform sub1 using &mara-matnr& &mara-mtart& changing &var1&.
Can anyone say how provide import and export parameters in initialization tab regarding this subroutine and also in FORM ROUTINES by a sample example like above.
Marcin Pciak replied
In FORM ROUTINES tab just create your desired subroutine, like normally in ABAP.
FORM sub1 USING mara-matnr type "give a type here mara-mtart type "and here changing var1 type ".... ... ENDFORM.
Then in INITIALIZATION tab just invoke your subroutine.
PERFORM sub1 USING ...
I hope it will help you