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 conversion

Former Member
0 Likes
558

Hi Friends ,

In my ALV report i want to do <b>sum</b> for a field that is of numeric character data type . In my field catalog for that particular field i entered as

wa_fcat-do_sum = 'X' .

But it is not working . Can anybody tell me how to overcome this issue .

Points will be rewarded .

Thanks ,

Senthil

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
532

also add this..

wa_fcat-datatype = 'CURR'.     " or 'QUAN'

4 REPLIES 4
Read only

Former Member
0 Likes
533

also add this..

wa_fcat-datatype = 'CURR'.     " or 'QUAN'

Read only

Former Member
0 Likes
532

Hi,

In ALV what ever ur passing the value its correct definatly u will get SUM.

any way i am sending sample code.

NTGEW LIKE LIKP-NTGEW, "NET WEIGHT

I_FIELDCAT1-FIELDNAME = 'NTGEW'.

I_FIELDCAT1-SELTEXT_M = 'NET WEIGHT'.

I_FIELDCAT1-DO_SUM = 'X'.

APPEND I_FIELDCAT1 TO I_FIELDCAT1.

CLEAR I_FIELDCAT1.

If it is use full answer please reward me a points.

Read only

Former Member
0 Likes
532

Hi Chandrasekar ,

Thanks a lot . Problem solved .

Thanks and Regards ,

Senthil Kumar R

Read only

Former Member
0 Likes
532

hi,

Once put break point near the appending of field catalogue and cheak whether the dta is getting appended correctly in fieldcat internal table..

It should work properly..

rewards if so,

regards,

nazeer