Application Development 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: 

Dump

Former Member
0 Kudos
89

Hi

CHAR(22).

ASSIGN (CHAR) TO <FS>.

I_MPRICE = <FS>.

Why iam getting dump when iam moving to i_mprice??Please tell me onn this

Thanks

6 REPLIES 6

0 Kudos
64

Hi,

The reason can be that the type of data that your FIELD-SYMBOL has is not type compatiable with that of I_MPRICE.

What is the type of <FS> and I_MPRICE?

Regards,

Sesh

Former Member
0 Kudos
64

Hi

Analyse the Dump Analysis? what's wrong it displays. See ST22 for dump.

see the doc on field symbols

Syntax

FIELD-SYMBOLS <fs> { typing | STRUCTURE struc DEFAULT dobj }.

Extras:

1. ... typing

2. ... STRUCTURE struc DEFAULT dobj

Effect

The FIELD-SYMBOLS statement declares a field symbol <fs>. The naming conventions apply to the name fs. The angle brackets of the field symbols indicate the difference to data objects and are obligatory. You can declare field symbols in any procedure and in the global declaration section of an ABAP program, but not in the declaration section of a class or an interface. You can use a field symbol in any operand position in which it is visible and which match the typing defined using typing.

After its declaration, a field symbol is initial - that is, it does not reference a memory area. You have to assign a memory area to it (normally using the ASSIGN statement) before you can use it as an operand. Otherwise an exception will be triggered.

Addition 1

... typing

Effect

You can use the addition typing to type the field symbol. The syntax of typing is described under Syntax of Typing. The typing specifies which memory areas can be assigned to the field symbol (see Checking the Typing) and in which operand positions it can be used.

Note

You can omit the addition typing outside of methods. In this case, the field symbol has the complete generic type any and is implicitly assigned the predefined constant space during the declaration.

Addition 2

... STRUCTURE struc DEFAULT dobj

Effect

If you specify the addition STRUCTURE instead of typing for a field symbol, and struc is a local program structure (a data object, not a data type) or a flat structure from the ABAP Dictionary, this structure is cast for the field symbol <fs>. You have to specify a data object dobj that is initially assigned to the field symbol.

The field symbol copies the technical attributes of structure struc as if it were completely typed. When you assign a data object using the addition DEFAULT, or later using ASSIGN, its complete data type is not checked in non- Unicode programs. Instead, the system merely checks whether it has at least the length of the structure and its alignment.

In Unicode programs, we differentiate between structured and elementary data objects. For a structured data object dobj, its Unicode fragment view has to match the one of struc. In the case of an elementary data object, the object must be character-type and flat, and struc must be purely character-type. The same applies to assignments of data objects to field symbols typed using STRUCTURE when using the ASSIGN statement.

Note

Field symbols declared using the addition STRUCTURE are a mixture of typed field symbols and a utility for casting structured data types. You should use the additions TYPE or LIKE for the FIELD-SYMBOLS statement to type field symbols, while the addition CASTING of the ASSIGN statement is used for casting.

Example

The first example shows the obsolete usage of the addition STRUCTURE.

DATA wa1 TYPE c LENGTH 512.

FIELD-SYMBOLS <scarr1> STRUCTURE scarr DEFAULT wa1.

<scarr1>-carrid = '...'.

The second example shows the replacement of STRUCTURE with the additions TYPE and CASTING.

DATA wa2 TYPE c LENGTH 512.

FIELD-SYMBOLS <scarr2> TYPE scarr.

ASSIGN wa2 TO <scarr2> CASTING.

<scarr2>-carrid = '...'.

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos
64

HI,

Change the parameter name CHAR. I thing Its reserved one.

what is the Data type of I_MPRICE.

Thanks.

Former Member
0 Kudos
64

Hi

DATA : I_MPRICE TYPE PMCO_EXT.

FIELD-SYMBOLS : <FS> type any.

Thanks

0 Kudos
64

Hi,

DATA : I_MPRICE TYPE PMCO_EXT.

FIELD-SYMBOLS : <FS> type any.

Use

ASSIGN CHAR TO <FS> CASTING TYPE PMCO_EXT.

I_MPRICE = <FS>.

Regards,

Sesh

Former Member
0 Kudos
64

hi

good

go through this example and use like that

TYPES: BEGIN OF line,

col1 TYPE c,

col2 TYPE c,

END OF line.

DATA: wa TYPE line,

itab TYPE HASHED TABLE OF line WITH UNIQUE KEY col1,

key(4) TYPE c VALUE 'COL1'.

FIELD-SYMBOLS <fs> TYPE ANY TABLE.

ASSIGN itab TO <fs>.

thanks

mrutyun^