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

Defining Dynamic Internal Table

Former Member
0 Likes
864

Hi everybody,

I would like to create a dynamic internal table without knowing its structure. I have stored the DDIC field elements that have to be used in a customizing table. I would like to create the internal table depending on the field elements order. The goal is to be able to pass this internal table to an Adobe Forms.

For example, in some cases I might have to print fieldu2019s content 1, 2, 3, and 4 but in other cases I might have to print fields 3, 1, 4 and 2. I do not know in which order the fields have to be printed.

I am struggling with the techniques I should use to create my internal table. I do not know if I should use Field Symbols or else.

Could you provide any coding examples?

Thanks in advance for your help.

Best regards,

Sylvain

6 REPLIES 6
Read only

Former Member
0 Likes
757

Hi,

Below links may help:

[Filling dynamic internal table |]

and

[Create a dynamic internal table|http://www.divulgesap.com/blog.php?p=MjE=]

Read only

0 Likes
757

Hi,

Thank you for the answer but I do not know how to use the field's content of my customizing table.

For example, in my customizing table I have YFIELD1, YFIELD2, YFIELD3 and YFIELD4.

YFIELD1 = BUKRS

YFIELD2 = VBELN

YFIELD3 = FKDAT

YFIELD4 = MATNR

How can I use field YFIELD1 content BUKRS to create my <FS>?

I hope my further explanation helps to understand my issue.

Thanks,

Sylvain.

Read only

0 Likes
757

Hi,

does this solve your problem?


DATA:
  lt_fieldcatalog TYPE lvc_t_fcat,
  ls_fieldcatalog LIKE LINE OF lt_fieldcatalog,
  lt_table        TYPE REF TO data.

FIELD-SYMBOLS:
  <lt_table>      TYPE table.


ls_fieldcatalog-fieldname = 'FIELD1'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.
ls_fieldcatalog-fieldname = 'FIELD2'.
APPEND ls_fieldcatalog TO lt_fieldcatalog.

cl_alv_table_create=>create_dynamic_table(
  EXPORTING
    it_fieldcatalog           = lt_fieldcatalog
  IMPORTING
    ep_table                  = lt_table
  EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS                    = 2 ).

ASSIGN lt_table->* TO <lt_table>.

Best regards,

Oliver

Read only

0 Likes
757

Hi guys,

Thank you very much for your answers I was able to solve my problem with the <FS> technique.

Best regards,

Sylvain

Read only

0 Likes
757

Hi Sylvain

I have the same requirement to pass the internal table with varying number of columns in the adobe form and the same should be display in the form.,

i have passed the dynamic internal table from the abap code to the adobe interface and checked teh same value are passed.

Tried the below solution:

1)Defined the field symbol of the type Standard table(beacuse the structure for table is not fixed) in the adobe Interface.

2)Assign the values of the internal table into the field symbol by:

READ TABLE im_t_output INTO ls_output INDEX 1.

ASSIGN ls_output-ZALVTAB->* TO <GT_T_OUTPUT>.

Already checked , the values are coming into the <GT_T_OUTPUT> field symbols.

3) Drag the field symbol <GT_T_OUTPUT> from the adobe interface to the data context of the form.

when i am running the program its giving dump with the following error.

"You attempted to move one data object to another.

This is not possible here because the conversion of a data object

of type "h" to type "g" is not supported."

I think that is beacuse in the form it ia taking the field symbol as the text value not the internal table .

As you have already solved the problem to pass the internal table of varying number of columns in the adobe for.

Request you to provide me the code or some guidelines so that i can achieve the same and also request to share hoe you have read the values of the internal table in the adobe form through the adove form language.

Thanks in advance.

Regards,

Sourabh Makhija

Read only

Former Member
0 Likes
757

Hi,

Can anyone tell how to pass this <fs> to the Adobe Form?

How can I declare in interface this <fs> and put it on the context on the form as a table?

Thanks