cancel
Showing results for 
Search instead for 
Did you mean: 

Addition in script

former_member305388
Active Contributor
0 Kudos

Hi All,

I need to add EKPO-NETPR and KOMVD-KWERT and pass it to EKPO-NETWR.

/: &EKPO-NETWR& = &EKPO-NETPR& + &KOMVD-KWERT&

This is not working. Please help me out by giving the way how to add these.

Thanks a lot.

Regards,

Seenu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try to add in driver program and pass it to script.

With regards

Nikunj Shah

Answers (4)

Answers (4)

former_member305388
Active Contributor
0 Kudos

Closed

Former Member
0 Kudos

You have to do addition in perform.

use code in script.

perform add in programm zform using a b

changing c.

where Zfrom is subroutine pool.

ORM add TABLES it_input STRUCTURE itcsy

it_output STRUCTURE itcsy.

DATA :a type vbap-netpr.

data : b type vbap-netpr.

data : c type vbap-netpr.

data : str type string.

  • note : decalre a,b, and c with reuired type.

READ TABLE it_input INDEX 1.

a = it_input-value.

READ TABLE it_input INDEX 2.

b = it_input-value.

c= a + b.

READ TABLE it_output INDEX 1.

str = C.

MOVE str TO it_output-value .

MODIFY it_output INDEX 1.

ENDFORM. " add

Edited by: Anil Mane on Aug 6, 2008 9:46 AM

Former Member
0 Kudos

Use a PERFORM command to call a abap subroutine in your script.

refer to the links for sample code:

http://sapient.wordpress.com/2007/10/21/sample-abap-code-how-to-call-perform-from-sapscript/

http://www.sapfans.com/sapfans/forum/r2all/messages/345.html

With luck,

Pritam.

former_member181995
Active Contributor
0 Kudos

Sri,

can you not subroutine pools for same.useing perform statement.

Amit.