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

codes

Former Member
0 Likes
432

Suppose i want to add two numbers by passing their value and store the result in a variable.Then can anybody send the program code for the above requirement independantly by MEANS OF METHOD IN A LOCAL CLASS,ALSO BY MEANS OF SUBRUOUTINE,AS WELL AS BY MEANS OF FUNCTION MODULE AND THE SYNTAX FOR CALLING THAT PARTICULAR FUNCTION MODULE IN OUR PROGRAM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
409

Hi Sandeep,

You are looking like a beginner to ABAP. Better you refer ABAP Help.

This site is not to train people but to provide the solutions for critical issues.

2 REPLIES 2
Read only

Former Member
0 Likes
410

Hi Sandeep,

You are looking like a beginner to ABAP. Better you refer ABAP Help.

This site is not to train people but to provide the solutions for critical issues.

Read only

Former Member
0 Likes
409

hi,

Chk this simple example.

DATA : c1 TYPE i, c2 TYPE i, res TYPE i.
c1 = 1.
c2 = 2.
data: subroutinename(3) VALUE 'SUM'.

PERFORM (subroutinename) IN PROGRAM Y_JJTEST1USING c1 c2 CHANGING res.

*WRITE:/ res.

*&---------------------------------------------------------------------
*
*& Form sum
*&---------------------------------------------------------------------
*
* text
*----------------------------------------------------------------------
form sum using p_c1 p_c2 changing value(p_res).
p_res = p_c1 + p_c2.
endform. " sum

This link will clear all your Doubts reagrding Perform Statement.

Have a look:

http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm

rgds

Reshma