Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to debug a loop with 80K records

Former Member
0 Likes
6,221

Hi,

I am facing an issue with short dump .which is basically ABAP_BCD_OVERFLOW due to data when using MOVE-CORRESPONDING with structures.

How to find the particular record in debug mode...

I see some of the SY fields such as SY-DBCNT and SY-MSGNO information. can i use that ..to find the particular record where it got failed ..

Thanks.

Vishnu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,894

Hi,

PFA for shortdump details.

Category               ABAP Programming Error

Runtime Errors         BCD_FIELD_OVERFLOW

Except.                CX_SY_CONVERSION_OVERFLOW

ABAP Program           /DPM/CL_MON_STOCK=============CP

Application Component  Not Assigned

Date and Time          02.11.2014 19:36:29

Short text

     A calculation field is defined too small.

What happened?

     Error in the ABAP Application Program

     The current ABAP program "/DPM/CL_MON_STOCK=============CP" had to be

      terminated because it has

     come across a statement that unfortunately cannot be executed.

What can you do?

     Note down which actions and inputs caused the error.

     To process the problem further, contact you SAP system

     administrator.

     Using Transaction ST22 for ABAP Dump Analysis, you can look

     at and manage termination messages, and you can also

     keep them for a long time.

Error analysis

     An exception occurred that is explained in detail below.

     The exception, which is assigned to class 'CX_SY_CONVERSION_OVERFLOW', was not

      caught in

     procedure "SELECT_PHYSICAL_STOCK" "(METHOD)", nor was it propagated by a

      RAISING clause.

     Since the caller of the procedure could not have anticipated that the

     exception would occur, the current program is terminated.

     The reason for the exception is:

     A value generated during processing is too large for the

     field "LS_STOCK_MON-QUAN" of the program "/DPM/CL_MON_STOCK=============CP".

SY-SUBRC 4

SY-INDEX 0

SY-TABIX 76377

SY-DBCNT 1

SY-FDPOS 1

SY-LSIND 0

SY-PAGNO 0

SY-LINNO 1

SY-COLNO 1

SY-PFKEY

SY-UCOMM

SY-TITLE Stock Synchronization between EWM and SPICS

SY-MSGTY I

SY-MSGID /LIME/CORE

SY-MSGNO 600

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

SY-MODNO 0

SY-DATUM 20141102

SY-UZEIT 190005

SY-XPROG RSDBRUNT

SY-XFORM INIT_%_INIT

regards

Vishnu

16 REPLIES 16
Read only

Former Member
0 Likes
3,894

Actually this error is in EWM module and MOVE_CORRESPONDING <SOURCE_STRUCT>(31,14 decmials) to <TARGET_STRUCT> ( 13,3decimals)...

But to remove the error i need to find out the particular record for SELECT_PHYSICAL_STOCK in method for QUAN...

regards

Vishnu

Read only

0 Likes
3,894

Hi Vishnu,

You can find the value & sy-tabix in which erroneous record present.  in the DUMP. And I advise do not use move corresponding statement.

provide us Dump for further analysis.

-Srini

Read only

0 Likes
3,894

If dump information gives you any particular msg no or other information try to use a watch point on those values.

or if this is still in ur dev system then add a try catch block and put a breakpoint in catch block

Read only

Former Member
0 Likes
3,895

Hi,

PFA for shortdump details.

Category               ABAP Programming Error

Runtime Errors         BCD_FIELD_OVERFLOW

Except.                CX_SY_CONVERSION_OVERFLOW

ABAP Program           /DPM/CL_MON_STOCK=============CP

Application Component  Not Assigned

Date and Time          02.11.2014 19:36:29

Short text

     A calculation field is defined too small.

What happened?

     Error in the ABAP Application Program

     The current ABAP program "/DPM/CL_MON_STOCK=============CP" had to be

      terminated because it has

     come across a statement that unfortunately cannot be executed.

What can you do?

     Note down which actions and inputs caused the error.

     To process the problem further, contact you SAP system

     administrator.

     Using Transaction ST22 for ABAP Dump Analysis, you can look

     at and manage termination messages, and you can also

     keep them for a long time.

Error analysis

     An exception occurred that is explained in detail below.

     The exception, which is assigned to class 'CX_SY_CONVERSION_OVERFLOW', was not

      caught in

     procedure "SELECT_PHYSICAL_STOCK" "(METHOD)", nor was it propagated by a

      RAISING clause.

     Since the caller of the procedure could not have anticipated that the

     exception would occur, the current program is terminated.

     The reason for the exception is:

     A value generated during processing is too large for the

     field "LS_STOCK_MON-QUAN" of the program "/DPM/CL_MON_STOCK=============CP".

SY-SUBRC 4

SY-INDEX 0

SY-TABIX 76377

SY-DBCNT 1

SY-FDPOS 1

SY-LSIND 0

SY-PAGNO 0

SY-LINNO 1

SY-COLNO 1

SY-PFKEY

SY-UCOMM

SY-TITLE Stock Synchronization between EWM and SPICS

SY-MSGTY I

SY-MSGID /LIME/CORE

SY-MSGNO 600

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

SY-MODNO 0

SY-DATUM 20141102

SY-UZEIT 190005

SY-XPROG RSDBRUNT

SY-XFORM INIT_%_INIT

regards

Vishnu

Read only

0 Likes
3,894

Keep a watchpoint for SY-TABIX with value of the previous record i.e 76376.

The next iteration of loop will be of that erroneous record and you can analyse the same.


Read only

0 Likes
3,894

Hi,

i created a watchpoint with SY-TABIX = 76376 but it is looping for 1st ....after creation

i am surprised..

regards

vishnu

Read only

0 Likes
3,894

I couldn't get it.

Press F8 it should stop at that iteration.

Read only

0 Likes
3,894

I used watchpoint on sy-tabix(76376) , msgno(600) and dbcnt(3) where this record has failed in the loop..

but still it is not going to 76376  record directly ..it is starting at 1..2..3....

Read only

0 Likes
3,894

You just keep Watchpoint for one condition only

i.e

SY-TABIX = 76376.

and check

Read only

0 Likes
3,894

check there is any other brealpoint in your code.

Read only

0 Likes
3,894

yes i kept the break points in same loop to stop...do i need remove it...to keep only watchpoint

Read only

0 Likes
3,894

this is most helpful answer...

If we keep breakpoints when using watchpoints....it doesn't work..

i removed breakpoints to use watchpoints created..it went to particular record.

Thanks,

Vishnu

Read only

VenkatRamesh_V
Active Contributor
0 Likes
3,894

Hi,

Hope you are calculating the quantity, Instead of declaring  actual field declare the field with type 'P'.


Data lv_qty type p decimal 2.



Regards,

Venkat.

Read only

0 Likes
3,894

Hi,

It is not relavent here...i need to findout the record first to see the data and data type with which it is exceeding..

regards

Vishnu

Read only

Former Member
0 Likes
3,894

hi

Use WATCHPOINT to stop the execution at particular record.

enter into loop.

create watchpoint sy-tabix = <index_no>

and pres F8 it will stop at your condition.

regards.

laxman

Read only

Former Member
0 Likes
3,894

Hi,

Since you re aware of the row index (76377), you can delete all the rows before that so that it becomes the first row in the table. To do so, during debugging, double click on the table name ->right click on the table content->change table content->Complete table/Deleteline break->give start row as 1 and end row as 76376.

With this, the row having the problem will become the first row in the internal table and you dont have to wait till the looping reaches the point.

Hope this helps,

~Athreya