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

data type mismatch

Former Member
0 Likes
762

Hello,

Problem is The data type of E1FISEG and IT_ACCIT for the filed MENGE (quantity) is different and is shown below

MOVE-CORRESPONDING E1FISEG TO IT_ACCIT.

Here the data type of E1FISEG-menge is char and having the value as 1.0

when this is moved to IT_ACCIT-menge and the data type of menge packed(len 17) decimal 3 and having the value of menge is converted to 0.010.

and the same value gets displayed in Fi posting documnt as 0.010 in quantity field.

I have written following piece of code.

*Begin of modification by Ravi Kumar

DATA : lv_menge TYPE MENGE_D.

DATA : wa_idoc_data TYPE edidd.

DATA : wa_accit TYPE accit.

DATA : lv_index TYPE sy-index VALUE '1'.

DATA : wa_e1fiseg TYPE e1fiseg.

LOOP AT idoc_data INTO wa_idoc_data WHERE segnam = 'E1FISEG'.

READ TABLE t_accit INTO wa_accit INDEX lv_index.

IF sy-subrc = 0.

wa_e1fiseg = wa_idoc_data-sdata.

lv_menge = wa_e1fiseg-menge.

wa_accit-menge = lv_menge.

MODIFY t_accit INDEX lv_index FROM wa_accit.

ENDIF.

+lv_index = lv_index + 1.+

ENDLOOP.

*End of modification by Ravi Kumar

and after these changes the quantity value in fi document is 1 but customer needs 1.0.

in debugging i have seen all the values for the field menge is 1.000 in all the following areas

t_accit

wa_e1fiseg

lv_menge

wa_accit-menge

but this value is not getting updated in fi document.

suggest me what has to be done.

thank you

6 REPLIES 6
Read only

Former Member
0 Likes
664

Hi,

Rather than assigning it directly

lv_menge = lv_char

use move statement

move lv_char to lv_menge.

if above doesnt work then simply multiply the 100 or required value.

Best regards,

Prashant

Read only

Former Member
0 Likes
664

Hi,

I think you should declare the display field with type CHAR.

Try with WRITE var1 to var2 statement.

Regards,

Sunil

Edited by: Sunil Reddy Sibbala on Jan 15, 2009 1:14 PM

Read only

Former Member
0 Likes
664

Hi,

I tried this and worked in my system


DATA : wa_e1fiseg TYPE e1fiseg.
DATA : wa_accit TYPE accit.

wa_e1fiseg-menge = '1.0'.

MOVE wa_e1fiseg-menge TO wa_accit-menge.

WRITE wa_e1fiseg-menge.

The result

wa_e1fiseg-menge 1.0

wa_accit-menge 1.000

regards,

Advait

Read only

0 Likes
664

Hello,

Thanks for your answer,

I have written that code but it is not working

code written by me is also correct and the required data gets populated into the internal table t_accit for the field menge.

some where in posting program IDOC_INPUT_FIDCC2 of the idoc is not updaing the value 1.000 in fi document.

it is realted to idoc.

this does not displays any 1.000 value in output screen but it displays the same value in fi document which is created by incoming idoc.

So kindly suggest according to this.

thank you

Read only

Former Member
0 Likes
664

hi,

use the statement PACK.

it will work fine.

Read only

0 Likes
664

This message was moderated.