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 off cycle payroll run

1949


hi to all abap interview guys please notify this .. first if u have any doubts please go through google search or else please do debugging with some sample programs . but don't post even silly questions too. thanking you.

1550


What are the types of data types in the sap abap?

481


What are the differences between the table and the structure in the data dictionary in the sap abap?

592


How to create any functions? How to go about it?

585






Can you give the Example for the structure of an ABAP program? REPORT... NODES: SPFLI, SFLIGHT. DATA:... INITIALIZATION. AT SELECTION-SCREEN. START-OF-SELECTION. GET SPFLI... GET SFLIGHT... GET SPFLI LATE. END-OF-SELECTION. FORM... ENDFORM.

606


How many types of data classes are there in sap?

582


What are the functional modules used in sequence in bdc? : abap hr

597


how to create view in bdc..??

2331


GUYS any one please can u post questions in sap a bap webdynpro questions.. please i need to know some technical questions regarding webdynpro and ADOBE forms ?

1439


What is difference between dialog program and a report?

595


What is partner selection?

616


How can we send data to external programs?

621


How do you activate a function exit?

568


Program for Prime numbers and Matrix plz explain me the procedural method with steps

2257