on 05-06-2008 11:19 AM
Hi i have written following subroutine for script.
FORM WITHHOLD TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
data: a_SKFBT TYPE REGUP-SKFBT,
A_DMBTR TYPE REGUP-DMBTR,
W_TAX1(18) TYPE REGUP-SKFBT.
read table in_tab WITH KEY NAME = 'REGUP-SKFBT'.
read table in_tab INDEX 1.
check sy-subrc = 0.
a_SKFBT = in_tab-value.
read table in_tab WITH KEY NAME = 'REGUP-DMBTR'.
read table in_tab INDEX 2.
check sy-subrc = 0.
a_DMBTR = in_tab-value.
W_TAX = ( a_SKFBT - a_DMBTR ).
read table out_tab with key name = 'W_TAX1'.
IF SY-SUBRC = 0.
out_tab-value = W_TAX1.
modify out_tab INDEX 1.
ENDIF.
ENDIF.
endform.
above program is giving dump .
while deduction values in w_tax .
what type of variables i shold take here..
Hi Venkat,
Your declaration for the tax variable is wrong. When you have specified a table field there is not any need to mention the number of characters for that variable.
Simply declare as W_TAX type REGUP-SKFBT and
W_TAX1(16) type c.
After computing W_TAX, Move W_TAX to W_TAX1.
Regards,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
Your declaration for W_TAX1 is wrong. correct it as follows.
1) data: W_TAX1 TYPE REGUP-SKFBT.
2) Your statement W_TAX = ( a_SKFBT - a_DMBTR ) is wrong, this should be as follows..since you haven't declared W_TAX.
W_TAX1 = ( a_SKFBT - a_DMBTR ).
TRY THIS.
thanks & regards
Kishore Kumar Maram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.