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

Calling ABAP Subroutines: PERFORM example

Former Member
0 Likes
2,366

hi friends,

Can any one give me an example on Calling ABAP Subroutines: PERFORM or provide any links for that example already posted in sdn ...

points will be awarded

regards and thanks

Vijaya

hi friends,

Can any one give me an example on Calling ABAP Subroutines: PERFORM or provide any links for that example already posted in sdn ...

points will be awarded

regards and thanks

Vijaya

6 REPLIES 6
Read only

Former Member
0 Likes
1,455

hi

With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).

You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.

Internal Subroutine Calls

To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:

PERFORM <subr> http://USING ... <pi>...

http://CHANGING. <pi>... .

The internal subroutine can access all of the global data of the calling program.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm

reward point if helpful.

thanks

Read only

0 Likes
1,455

sorry,

how to Calling ABAP Subroutines: PERFORM in SAp Script form ? can any one give example or links that already posted in sdn

Read only

0 Likes
1,455

hi

perform <subroutine name> in program<prgnam> using &var& using &var& using &var&.

like above

Regards

Nagesh.Paruchuri

Read only

Former Member
0 Likes
1,455

hi vijaya.,

use perform stmt to call subroutine.

ex: perform create_session.

and write the logic in between the form and endform.

ex:

form create_session .

*Create the Session

call function 'BDC_OPEN_GROUP'

exporting

client = sy-mandt

group = v_sessn

keep = c_x

user = sy-uname.

endform.

Chandra

Read only

Former Member
0 Likes
1,455

first u need to write a perform in se71 in the edito. after that u need to create the subroutine pool program. it that u can write the definition... using itcsy structure.

Read only

Former Member
0 Likes
1,455

hi vijaya,

to have subroutine in smartform, the below data may help you

Using SUBROUTINE IN SMARTFORMS.

In the global definitions of the smart form:

click at the initialization tab.

Write like:

PERFORM

SUBROUTINE_NAME(REPORT_NAME_WHERE_THIS_SUBROUTINE_IS_THERE).

If some tables are used,write:

PERFORM

SUBROUTINE_NAME(REPORT_NAME_WHERE_THIS_SUBROUTINE_IS_THERE)

TABLES ITAB1 ITAB2...

This is the dynamic calling of the subroutines in smartforms.