Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

script

Former Member
0 Kudos

what is the procedure,syntax to decare and a subroutine in scripts as well as in smarrtforms.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

Former Member
0 Kudos

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.

0 Kudos

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.