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

Dynamic line type creation in 620

Former Member
0 Likes
551

I was able to create a dynamic line type for a structure using code from link:

/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap

The problem is fucntion

  • Create dynamic internal table and assign to field symbol

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = ifc

IMPORTING

ep_table = dyn_table.

creates columns defined as P(9) as P(5). The P(9) specification is set in code:

xfc-fieldname = wa_comp-name.

xfc-datatype = wa_comp-type_kind.

xfc-inttype = wa_comp-type_kind.

xfc-intlen = wa_comp-length.

xfc-decimals = wa_comp-decimals.

APPEND xfc TO ifc.

ENDLOOP.

Is there another setting I must set?

I was able to create a dynamic line type for a structure using code from link:

/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap

The problem is fucntion

  • Create dynamic internal table and assign to field symbol

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = ifc

IMPORTING

ep_table = dyn_table.

creates columns defined as P(9) as P(5). The P(9) specification is set in code:

xfc-fieldname = wa_comp-name.

xfc-datatype = wa_comp-type_kind.

xfc-inttype = wa_comp-type_kind.

xfc-intlen = wa_comp-length.

xfc-decimals = wa_comp-decimals.

APPEND xfc TO ifc.

ENDLOOP.

Is there another setting I must set?

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
524

I believe that the max length for type P is 8(but really it has a length of 16).

Regards,

Rich Heilman

Read only

Former Member
0 Likes
524

xfc-intlen = 2(wa_comp-length - 1)