Skip to Content
0
Former Member
May 15, 2007 at 07:07 AM

Subtotal in scripts::::very urgent please help

12 Views

Hi all

i need to calculate the subtotal of &BSEG-WRBTR& in SCRIPTS...please give me the code in the driver program and the sap script...please dont mention the code that am mentioning below...please help me urgently....useful answers will be rewrded

/: DEFINE &TOT_PRICE&

/: PERFORM F_GET_PRICE IN PROGRAM <subroutine prog name> /:USING &KOMVD-KBERT& /:CHANGING &TOT_PRICE& /:ENDPERFORM

Then write the variable where ever you want it to be printed (mostly it will be in footer window)

Then create subroutine pool program and you have to write the code.

FORM F_GET_PRICE tables int_cond structure itcsy

outt_cond structure itcsy. data : value type kbert.

statics value1 type kbert.

Read int_cond table index 1.

value = int_cond-value.

value1 = value1 + value.

Read outt_cond table index 1.

outt_cond-value = value1.

Modify outt_cond index 1.

ENDFORM.

with regards

vijay