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

Short dump

Former Member
0 Likes
831

Hi All,

i am using following code

TYPES : BEGIN OF ty_txt_file,

date(11) TYPE c,

actual(16) TYPE c,

nominal(12) TYPE c,

deviat(12) TYPE c,

uptol(10) TYPE c,

lowtol(12) TYPE c,

END OF ty_txt_file.

DATA: it_txt_file TYPE STANDARD TABLE OF ty_txt_file INITIAL SIZE 0,

TYPES : BEGIN OF ty_actual,

slno TYPE sy-index,

actual TYPE p DECIMALS 4,

END OF ty_actual.

DATA:it_actual TYPE STANDARD TABLE OF ty_actual INITIAL SIZE 0,

DATA: wa_actual TYPE ty_actual,

DATA: wa_txt_file TYPE ty_txt_file,

Throwing short dump at the following statement.

wa_actual-actual = wa_txt_file-actual.

help Pls..

Regards,

Sai Prasad

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
813

Hi,

You are trying to pass character value to a packed variable.

Use <b>Pack</b> statement to do it instead of directly assigning.

 DATA C_FIELD(4) TYPE C VALUE '0103', 
     P_FIELD(2) TYPE P. 
PACK C_FIELD TO P_FIELD. 

Note : C_field can be up to 16 characters.

Regards

Sailaja.

7 REPLIES 7
Read only

athavanraja
Active Contributor
0 Likes
813

increase the size of

wa_txt_file-actual from 16 to 21

Raja

Read only

alex_m
Active Contributor
0 Likes
813

Both the staructure not compatable to assign, if you want copy from one structure to another both should be same content.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
813

Hi sai

increase the size of wa_txt_file-actual and check once.

Regards,

Sreeram

Read only

Former Member
0 Likes
813

hey sai...

can u giv the full code

--Sreejesh

Read only

Former Member
0 Likes
813

Hi,

The type declaration of the field 'actual' is different in the internal tables. Maintain the declaration same in both the internal tables.

Read only

Former Member
0 Likes
813

hi,

actual(16) TYPE c is 16 char length.

But

actual TYPE p DECIMALS 4 => type P.

Not possible to assign. Thats y getting dump.

Rgds

Reshma

Read only

Former Member
0 Likes
814

Hi,

You are trying to pass character value to a packed variable.

Use <b>Pack</b> statement to do it instead of directly assigning.

 DATA C_FIELD(4) TYPE C VALUE '0103', 
     P_FIELD(2) TYPE P. 
PACK C_FIELD TO P_FIELD. 

Note : C_field can be up to 16 characters.

Regards

Sailaja.