Can we call a subroutine in a script? If so, how?

Answer Posted / chittidi

YES , WE CAN CALL SUBROUTINES IN SCRIPTS WITH OUT
CHANGING THE STANDARD DRIVER PROGRAM TO FETCH ADDITONAL
DATA TO PRINT IT ON LAYOUT.

WRITE SUBROUTINES IN MAIN PROGRAM AND CALL THE SUBROUTINE
ie PERFORM in page WINDOW OF THE LAYOT.
SYNTAX :
/: PERFORM <FORM>IN PROGRAM <PROG> USING &INVAR1& &INVAR2&
........
........
/: CHANGING &OUTPUT1& &OUTPUT2&.
........

ENDFORM.

FORM <FORM> TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE
ITCSY.
........
ENDFORM.

HERE INVAR1 , INVAR2 ARE VARIABLE SYMBOLS WHICH MAY BE ONE
OF THE FOUR SCRIPT SYMBOL TYPES.

OUTPUT1 , 2 ARE LOCAL TEXT SYMBOLS AND MUST BE CHAR STRINGS.

THE INTERNAL TABLE OUT_TAB CONTAINS 2 FIELDS THAT IS
NAMES AND VALUES OF THE CHANGING PARAMETERS IN THE PERFORM
STATEMENT.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is web dynpro for abap?

775


Define the various contents of technical specifications ?

826


Difference between sy-tabix and sy-index? Where it is used?

698


What are the requirements a dialog program must fulfill?

831


What is the Process to transfer IDOC from Outbound System to Inbound system.

1872


Explain how data is stored in cluster table?

886


Filter badi and multiple used badi? Will the sequence matter of the badi implementation in case of multiple used badi?

1489


Why do we use dynamic where conditions?

1085


hi,i worked mostly in core abap.know iam assigned to XI utility project.can u experts let me know what r the basic things i need to learn to work in XI utility project.i already searched in forum.thanks in advance.

1762


What is database utility? : abap data dictionary

790


how to use the xk01 in realtime.can it apply the others. how it it will goes to first page and next page.

1938


What is a data dictionary? : sap abap data dictionary

734


Where do you create indexes in abap?

837


What are the various events associated with screen programming?

941


How do I find the output type of a table or a program?

770