2014 Jan 16 6:08 AM
Dear all,
i have created an internal table variable - it_table with header line,
It has a field named amount typed - OIUH_CURR22_2 - Length 22
I am using the collect statement as follows :
collect it_table.
The report generates a dump when there is a large amount of data.
but i am sure that the amount field does not exceed 22 digits
and only this field is generating the dump.
The error description and code for your analysis :
loop at lt_bset into ls_bset.
if ls_bset-shkzg = 'H'.
ls_bset-FWSTE = - ls_bset-FWSTE.
endif.
* if ls_bset-mwskz <> 'V0' and ls_bset-FWBAS <> '9227.00'.
ls_bset-KBETR = ls_bset-kbetr / 10.
read table it_table with key docnum = ls_bset-belnr year = ls_bset-gjahr category = 'Domestic'.
if sy-subrc = 0.
case ls_bset-KSCHL.
when 'JMOP' or 'JMIP'.
it_table-tot_basic = it_table-tot_basic + ls_bset-FWBAS.
it_table-exc_duty = ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
when 'JEON' or 'JE1P' or 'JEC1'.
it_table-tot_basic = it_table-tot_basic + ls_bset-FWBAS.
it_table-he = it_table-he + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
when 'JSH1' or 'JSH2' or 'JSEP'.
it_table-tot_basic = it_table-tot_basic + ls_bset-FWBAS.
it_table-she = it_table-she + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
when 'JIP2' or 'JIP5' or 'JIP1' or 'ZIP1' or 'JIPC'.
it_table-tot_basic = it_table-tot_basic + ls_bset-FWBAS.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
if ls_bset-KBETR = '12.5' .
it_table-VAT_125 = it_table-VAT_125 + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
elseif ls_bset-KBETR = '8.00' .
it_table-VAT_8 = it_table-VAT_8 + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
elseif ls_bset-KBETR = '5.00'.
it_table-VAT_5 = it_table-VAT_5 + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
elseif ls_bset-KBETR = '4.00'.
it_table-VAT_4 = it_table-VAT_4 + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
elseif ls_bset-KBETR = '2.00'.
it_table-CST_2 = it_table-CST_2 + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
endif.
when 'ZSUR' or 'ZSU2'.
it_table-tot_basic = it_table-tot_basic + ls_bset-FWBAS.
it_table-surcharge = it_table-surcharge + ls_bset-FWSTE.
it_table-tax_code = ls_bset-mwskz.
* it_table-tot_amt = it_table-tot_amt + ls_bset-FWSTE.
endcase.
if ls_bset-FWBAS = '9227.00' .
* if ls_bset-mwskz = 'VA'.
it_table-amount_rdc = '9227.00'.
* if ls_bset-fwste = '9227.00'.
it_table-tot_basic = 0.
* lv_mwskz = ''.
* endif.
endif.
* it_table-dele = 'X'.
* it_table-tot_amt = it_table-tot_amt + it_table-tot_basic.
collect it_table.
lv_mwskz = ls_bset-mwskz.
clear it_table.
else.
it_table-dele = 'Y'.
MODIFY it_table TRANSPORTING DELE WHERE docnum = ls_bset-belnr and year = ls_bset-gjahr.
endif.
* if ls_bset-FWBAS = '9227.00'.
* if ls_bset-mwskz = 'V0'.
* LOOP at it_table where docnum = ls_bset-belnr and year = ls_bset-gjahr.
* it_table-amount_rdc = '9227.00'.
** it_table-tot_amt = it_table-tot_amt + it_table-tot_amt.
* modify it_table TRANSPORTING amount_rdc.
* clear it_table.
* endloop.
* endif.
* endif.
ENDLOOP.
Please provide a solution to overcome this dump.
2014 Jan 16 6:17 AM
Hi,
As per the dump it is refering to field AMOUNT, just see how the AMOUNT field is defined. It seems it is defined as TYPE P.
Thanks & Regards
Bala Krishna
2014 Jan 16 6:22 AM
Hello Bala Krishna ,
amount typed as- OIUH_CURR22_2 - data element.
2014 Jan 16 6:28 AM
Can you try declare the typ P up to 16 bytes and decimal may be 6.
2014 Jan 16 6:38 AM
Hello Jay,
Have check the by changing the Data element of amount.
So change the data element from OIUH_CURR22_2 to J_1BTPRICE
J_1BTPRICE data element with length 25 and decimal 2
Try this.
2014 Jan 16 6:43 AM
Hello Kiran,
I have already declared amount with a data element whose length is 22 and decimal places 2.
Are you suggesting to declare it as
amount type p length 16 decimals 06 ?
2014 Jan 16 6:44 AM
2014 Jan 16 6:46 AM
2014 Jan 16 6:58 AM
Hi,
If madhu's suggested data element does not work, try declaring all the amount fields with SRMCURR data element.
Thanks & Regards
Bala Krishna