‎2007 Sep 03 7:25 AM
what is the procedure,syntax to decare and a subroutine in scripts as well as in smarrtforms.
‎2007 Sep 03 7:38 AM
Hi,
<b>
Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/
/ &BARCODE&
<b>SUBROUTINE IN SMARTFORM</b>
There is no need to call subroutines in SMARTFORMS, use program lines.. instead of calling external subroutines.
Still you want to use internal sub-routines.
PERFORM <SUBROUTINE NAME>
FORM <SUBROUTINE NAME>
ENDPERFORM. (Everything in Program lines or initialization)
Regards,
Priyanka.
‎2007 Sep 03 7:27 AM
‎2007 Sep 03 7:38 AM
Hi,
<b>
Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/
/ &BARCODE&
<b>SUBROUTINE IN SMARTFORM</b>
There is no need to call subroutines in SMARTFORMS, use program lines.. instead of calling external subroutines.
Still you want to use internal sub-routines.
PERFORM <SUBROUTINE NAME>
FORM <SUBROUTINE NAME>
ENDPERFORM. (Everything in Program lines or initialization)
Regards,
Priyanka.
‎2007 Sep 03 7:42 AM
Hi,
Just to add.. when you will create the same subroutine in the driver or subroutine pool program.. it should be declared as:
FORM <form name> USING in_tab TYPE ITCSY
CHANGIN out_tab TYPE ITCSY.
READ TABLE in_tab INDEX 1....n..
It will give you the parameters..
and READ TABLE out_tab INDEX n.
out_tab-VALUE = <new value>.
MODIFY out_tab INDEX n.
This is how you export the parameters..
Thanks and Best Regards,
Vikas Bittera.