Application Development and Automation 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: 
Read only

script

Former Member
0 Likes
543

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

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
Read only

Former Member
0 Likes
524

Read only

Former Member
0 Likes
526

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.

Read only

0 Likes
524

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.