cancel
Showing results for 
Search instead for 
Did you mean: 

Include program for script dump error in data type

Former Member
0 Kudos

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..

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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