Dear Friends

i have using script and taking calculated value from sub routing

FORM ZPM_GET_VALUES TABLES IN_P1 STRUCTURE ITCSY OUT_P2 STRUCTURE ITCSY.
DATA : V_VALUE2 TYPE MBEW-VERPR.
DATA : LV_MATNR TYPE MBEW-MATNR.
DATA : LV_WERKS TYPE MBEW-BWKEY.
DATA : LV_VALUE TYPE P DECIMALS 2.
DATA : LV_VERPR TYPE MBEW-VERPR.
DATA : V_VALUE TYPE STRING.
*
READ TABLE IN_P1 WITH KEY 'RESBD-MATNR'.
LV_MATNR = IN_P1-VALUE.
*
READ TABLE IN_P1 WITH KEY 'CAUFVD-VAWRK'.
LV_WERKS = IN_P1-VALUE.
*
READ TABLE IN_P1 WITH KEY 'RESBD-MENGE'.
LV_VALUE = IN_P1-VALUE.
*
SELECT SINGLE VERPR
INTO LV_VERPR
FROM MBEW
WHERE MATNR EQ LV_MATNR
AND BWKEY EQ LV_WERKS.
*
* BREAK ITNR.
V_VALUE2 = LV_VERPR * LV_VALUE.
V_VALUE = V_VALUE2.
CONDENSE V_VALUE.
*
LOOP AT OUT_P2 WHERE NAME EQ 'V_VALUE'.
OUT_P2-VALUE = V_VALUE.
MODIFY OUT_P2.
ENDLOOP.
* BREAK ITNR.
ENDFORM. " ZPM_GET_VALUES

in SCRIPT

* ------------------------------------------------------------------------
/E MATERIAL
/: DEFINE &V_VALUE&=''
/: DEFINE &V_SUM&=&V_VALUE&
/: PERFORM ZPM_GET_VALUES IN PROGRAM ZIW3D_INFO
/: USING &RESBD-MATNR(C)&
/: USING &RESBD-MENGE(C)&
/: USING &CAUFVD-VAWRK&
/: CHANGING &V_VALUE&
/: ENDPERFORM
* &RESBD-MATNR(C)&,, &RESBD-MATXT&,,,,&RESBD-MENGE(C)& &RESBD-EINHEIT&
= ,,,,&V_VALUE&
/* SUMMING &V_VALUE& INTO &V_SUM&
/: V_SUM = V_SUM + &V_VALUE&

but any values didn't take to V_SUM

please help me to solve this issue

Thanks in Advance

## Add comment