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

Pack and Integer type in ALV grid

Former Member
0 Likes
1,800

Hello,

Can anyone give a small example of how to display fields of type I and P in an ALV grid. Using the alv grid FM and manually filling the fieldcatalog.

Thanks for your help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,163

Hi Moussa,

What problem are you encountering while using integer type values in ALV...?

If it is like you want to learn ALV grid using Function Modules, you can go through this document.

http://esnips.com/doc/4c4b7308-db7f-4c27-a153-71fbd9419568/ABAP_List_Viewer....doc

Regards,

SP.

Hello,

Can anyone give a small example of how to display fields of type I and P in an ALV grid. Using the alv grid FM and manually filling the fieldcatalog.

Thanks for your help.

6 REPLIES 6
Read only

Former Member
0 Likes
1,163

Hai,

Change the field type to character type and display it in alv. Always quantity or price fields should be taken in a character field and it should be displayed.

Reward if useful.

regards,

Umasankar

Read only

Former Member
0 Likes
1,164

Hi Moussa,

What problem are you encountering while using integer type values in ALV...?

If it is like you want to learn ALV grid using Function Modules, you can go through this document.

http://esnips.com/doc/4c4b7308-db7f-4c27-a153-71fbd9419568/ABAP_List_Viewer....doc

Regards,

SP.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,163

When building your field catalog, make sure you use the datatype = 'QUAN'.

fc_tmp-datatype = 'QUAN'.
fc_tmp-do_sum   = 'X'.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,163

Hi Moussa Khelifi ,

u can manually fill fieldcatalog like this..

form manual_filling_fieldcatalog.

X_FIELDCAT-FIELDNAME = 'ATWRT'.

X_FIELDCAT-TABNAME = 'TB_FINAL'.

X_FIELDCAT-SELTEXT_L = 'Source of Supply'(001).

X_FIELDCAT-DDICTXT = L_DDICTXT.

X_FIELDCAT-FIELDNAME = 'MATNR'.

X_FIELDCAT-TABNAME = 'TB_FINAL'.

X_FIELDCAT-SELTEXT_L = 'MATERIAL'(002).

X_FIELDCAT-DDICTXT = L_DDICTXT.

APPEND X_FIELDCAT TO TB_FIELDCAT .

endform.

u can directly pass the table to 'REUSE_ALV_GRID_DISPLAY'

regardless of type p or i fields in it.

Regards,

kiran B

Read only

Former Member
0 Likes
1,163

Thanks for the responses.

I have tried using a QUAN type but it still doesn't work.

My issue is:

I have an itab with the following columns,

MATNR, ARKTX, formula1, formula2, formula3, formula4, formula5.

and my alv output looks like this.

MATNR, ARKTX, ARKTX, ARKTX, ARKTX, ARKTX, ARKTX.

For some reason when it get's to the first formula "TYPE P", it does not take the content of my itab but instead keep using the content of the last column "in this case ARKTX".

I'm not sure why it's behaving this, it's like the FM module recognizes only DDIC types.

Thx

MK

Read only

Former Member
0 Likes
1,163

fyi,

It was because the fomulas in the fieldcatalog were in lowercase.

Thanks for your answers.

MK