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

RUNTIME ERROR IN GENERATED PROGRAM. Overflow converting ''

harsha_s
Advisor
Advisor
0 Likes
711

Hi,

While executing the below code i am getting the error

" RUNTIME ERROR IN GENERATED PROGRAM. Overflow converting ' ' am new to ABAP , can anyone kindly help me where i have went wrong ? .

IF ( V_DO_CDS_NAME_MAIN <> '' ).

ABAP.

DATA: ref_it_tab TYPE REF TO data,

ref_wa TYPE REF TO data.

FIELD-SYMBOLS: <fs_itab> TYPE ANY TABLE.

FIELD-SYMBOLS: <fs_wa> TYPE ANY.

FIELD-SYMBOLS: <fs_field> TYPE ANY.

CREATE DATA ref_it_tab TYPE STANDARD TABLE OF (V_DO_CDS_NAME_MAIN) WITH NON-UNIQUE DEFAULT KEY.

ASSIGN ref_it_tab->* TO <fs_itab>.

SELECT * FROM (V_DO_CDS_NAME_MAIN) INTO TABLE <fs_itab> where C1 = V_WORK_ITEM_ID_MAIN.

CREATE DATA ref_wa LIKE LINE OF <fs_itab>.

ASSIGN ref_wa->* TO <fs_wa>.

loop at <fs_itab> assigning <fs_wa>.

assign component 'CLIENT' of structure <fs_wa> to <fs_field>.

V_CLIENT = <fs_field>.

assign component 'C0' of structure <fs_wa> to <fs_field>.

V_C0 = <fs_field>.

assign component 'C1' of structure <fs_wa> to <fs_field>.

V_C1 = <fs_field>.

assign component 'C2' of structure <fs_wa> to <fs_field>.

V_C2 = <fs_field>.

assign component 'C3' of structure <fs_wa> to <fs_field>.

V_C3 = <fs_field>.

assign component 'C4' of structure <fs_wa> to <fs_field>.

V_C4 = <fs_field>.

assign component 'C5' of structure <fs_wa> to <fs_field>.

V_C5 = <fs_field>.

assign component 'C6' of structure <fs_wa> to <fs_field>.

V_C6 = <fs_field>.

assign component 'C7' of structure <fs_wa> to <fs_field>.

V_C7 = <fs_field>.

assign component 'C8' of structure <fs_wa> to <fs_field>.

V_C8 = <fs_field>.

assign component 'MESSAGE_ID' of structure <fs_wa> to <fs_field>.

V_MESSAGE_ID = <fs_field>.

assign component 'TIMESTAMP' of structure <fs_wa> to <fs_field>.

V_TIMESTAMP = <fs_field>.

assign component 'EXTRACTKEY' of structure <fs_wa> to <fs_field>.

V_EXTRACTKEY = <fs_field>.

assign component 'STATEID' of structure <fs_wa> to <fs_field>.

V_STATEID = <fs_field>.

assign component 'DEVICE_ID' of structure <fs_wa> to <fs_field>.

V_DEVICE_ID = <fs_field>.

ENDLOOP.

ENDABAP.

ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
665

Hi Harsha,

If you see the short dump, it will point you the location of error.

You can either execute your program to see short dump or you can go to ST22.

Look for these symbols >>>.

If you can send ST22 screen shot of your program then probably I can tell you what went wrong.

Mubeen

Read only

Former Member
0 Likes
665

Harsha,

It looks like problem is in the IF statement.

You didn't write the conditional statement correctly.

IF ( V_DO_CDS_NAME_MAIN '' ).

it does not make sense, that is why you got short dump.

There is no conditional operator ( my apologies if the term is wrong) like AND, OR, GT, GE, LT, LE...

Please correct it and let me know if it does not help you.

Mubeen

Read only

0 Likes
665

Hi Mubeen,

While Copying the cotes have come closer otherwise its working fine , i was able to find the error .

There are ten predefined ABAP data types. There are 100 possible type combinations between these elementary data types. ABAP supports automatic type conversion and length adjustment for all of them except type D (date) and type T (time) fields which cannot be converted into each other.

I commented the TimeStamp part where i had given the ABAP Type as D and it started working .

But now i want to display the content of "TimeStamp" field but i am not able to do so .

This is the format in which it has to be displayed 2009.011.915.3353.

Which ABAPTYPE i need to use ?.

i am able to display in this format 20090119153353

regards

Harsha

Read only

0 Likes
665

Hi Harsha,

You said, you were able to display date and time in this format 20090119153353.

What data type did you use?

Anyways, if you have this value I guess you can change the format using WRITE and FORMAT statement.

I don't remember exactly but if you do F1 on WRITE you can find out.

Mubeen

Read only

0 Likes
665

Hi ,

As i am using eCATT ( testing tool ) and i am using ABAP code inside eCATT editor .

let me try with WRITE Command .

But eCATT does not provide the command called WRITE and Format.

regards

Harsha