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 with subroutine

Former Member
0 Kudos

hi all,

i am trying for a script .

i have to use a subroutine in that.

plz can any one give the how to use the it.plz give any sugg

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi..

Call this perform in your script ...

 /:perform <formname> program<programname>
              /:using &invar1&
              /:using &invar1&
              /:changing &outvar1&

create the program in Abap editor .. giving <program name> as above nd write the code in form<formname>....

4 REPLIES 4

Former Member
0 Kudos

Hi,

/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
......
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
......
/: ENDPERFORM

check this link

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRFORM/BCSRVSCRFORM.pdf

regards

sarves

Former Member
0 Kudos

Hi,



The example defines a subroutine FORM CALLED_FROM_SAPSCRIPT 
in the ABAP ZDEMO_SAPSCRIPT_PERFORM . This subroutine is 
called from the SapScript form when the respective element

/E PERFORM_ABAP 
is executed. The syntax of the call is like

/: PERFORM CALLED_FROM_SAPSCRIPT IN PROGRAM zsapscriptexits
/: USING &invar1& 
/: USING &invar2& 
... 
/: CHANGING &outvar1& 
/: CHANGING &outvar2& 
... 
/: ENDPERFORM 

The subroutine must be defined in the ABAP/4 report as 
follows:      
                                                      
FORM form TABLES IN_TAB STRUCTURE ITCSY               
                 OUT_TAB STRUCTURE ITCSY.             
...                                                   
ENDFORM.

Thanks

Arun

Edited by: Arun Kayal on Mar 6, 2009 12:28 PM

Former Member
0 Kudos

Hi..

Call this perform in your script ...

 /:perform <formname> program<programname>
              /:using &invar1&
              /:using &invar1&
              /:changing &outvar1&

create the program in Abap editor .. giving <program name> as above nd write the code in form<formname>....

Former Member
0 Kudos

Hi Sravanthi,

Kindly go through this link below:

Hope it solves your problem.

Regrds

Mansi