cancel
Showing results for 
Search instead for 
Did you mean: 

Structure type conflict

jogeswararao_kavala
Active Contributor
0 Kudos
197

Dear Experts,

My smartform gives dump due to identified reason.

That is

Type conflict of one field in the structure.

The data type of this filed READG is declared as p decimals 2

I am not clear how to define this field (as predefined) in the structure.

I have tried different types like DEC, NUMC which are not accepted and smartform gives dump.

I know that a proper data type declaration in the structure for field READG (P DECIMALS 2) would solve my problem.

Kindly help

kind Regards

Jogeswaraa Rao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You did not write about field length.

If You create structure, You can choose 'Predefined Type' button and specify length and decimal places.

Alternatively You can create domain and data element and use data element.

Regards,

--

Przemysław

jogeswararao_kavala
Active Contributor
0 Kudos

Thank you Prominski,

My filed length is 10 with decimal places 2.

1. Is it OK to declare it as 'P DECIMALS 2' in the abap code?

2. How to declare this in the Predefined type of structure. (Is it necessary to create Domain and data Element)

Please guide.

kind regards

Jogeswara Rao

Edited by: K Jogeswara Rao on Mar 2, 2012 7:49 PM

Former Member
0 Kudos

Hi,

no, You are still missing length in declaration.

Correct will be:

DATA lv_readg(10) TYPE p DECIMALS 2.

If You create structure in ABAP code, use above statement.

If You are creating structure in SE11, there is 'Predefined type' button.

You do not need to create domain and data element,

but sometimes it is better then declaring type.

You can also find other matching data element.

Regards,

--

Przemysław

jogeswararao_kavala
Active Contributor
0 Kudos

OK Przemysław,

I understood,

Please tell one more thing.

In the predefined type whcih data type of Dictionary I should use. Is it 'DEC' or something else?

kind regards

Jogeswara Rao

Former Member
0 Kudos

Hi,

DEC is correct.

Regards,

--

Przemysław

jogeswararao_kavala
Active Contributor
0 Kudos

Finally the problem is solved by creating Domain and Data element.

Thank you Przemysław

Answers (0)