‎2011 Mar 14 5:19 PM
I have a SAP script and within that i have the following code written:
/: IF &CHOICE& = '1'
/: PERFORM GET_FINAL IN PROGRAM ZTEST
/: USING &RPBEN_DA-PERNR&
/: USING &RPBEN_DA-TCCST&:
/: CHANGING &FINAL&
/: ENDPERFORMnow I want to modify the value of &FINAL&... I need to some calculation and based on that I want to set the values for ex:
I want to do something like this :
/: v_num = 2.
/: V_test = FINAL * V_num.But when I debug v_test is coming out to be zero and FINAL does have a value in it. can you please tell me what I might be doing wrong here.
‎2011 Mar 14 6:10 PM
SAPScript standard process: In your subroutine for the perform, you must read your input table of type itcsy....calculate all your values in the subroutine......
like:
form GET_FINAL tables in_par structure itcsy
out_par structure itcsy.
read table in_par index 1.
lv_pernr = in_par-value. "first USING
read table in_par index 2.
lv_TCCST = in_par-value. "2nd USING value
* do your stuff.
read table out_par index 1.
out_par-value = some_field. "first changing value FINAL
modify out_par index 1.
read table out_par index 2. "your VTEST becomes a changing parameter
out_par-value = your other calculations
modify out_par index 2.
endform.Edited by: BreakPoint on Mar 14, 2011 7:11 PM
‎2011 Mar 14 6:10 PM
SAPScript standard process: In your subroutine for the perform, you must read your input table of type itcsy....calculate all your values in the subroutine......
like:
form GET_FINAL tables in_par structure itcsy
out_par structure itcsy.
read table in_par index 1.
lv_pernr = in_par-value. "first USING
read table in_par index 2.
lv_TCCST = in_par-value. "2nd USING value
* do your stuff.
read table out_par index 1.
out_par-value = some_field. "first changing value FINAL
modify out_par index 1.
read table out_par index 2. "your VTEST becomes a changing parameter
out_par-value = your other calculations
modify out_par index 2.
endform.Edited by: BreakPoint on Mar 14, 2011 7:11 PM