Application Development 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: 

DYNAMIC APPENDING....

Former Member
0 Kudos

Hi, guys!.

I've got a little technical doubt....

I've got to internal tables I_SEGMENTOS, which holds the names of the segments it's being used

E1EDK01

E1EDK02

E1EDK03...

2.- I_SALIDA, with the following structure

SEGMENTO, CAMPO, VALOR.

-

-


E1EDK01, CURCY, EUR

-

-


E1EDK02, NETWR, 10000

-

-


What I pretend is to fill dynamically the internal table.

I mean:

loop at i_segmentos.

loop at i_salida where segmento = i_segmentos-segmento.

and, with every step of the loop, will procedure as follows...

I_.

Does anybody have an easy clue for it to be done with field symbols???

Thank you so much!!!

Raú

4 REPLIES 4

Former Member
0 Kudos

Raul

I have a program related to dynamic internal tables using fieldsymbols where it is implemented in ALV. Hope the program could help you. Give your mail id , i can send it to you.

Regards,

Sailaja

0 Kudos

Thank you so much, Sailaja!!!.

Here's my mail address: raul_daimiel@hotmail.com

Thanks again.

Raú

0 Kudos

Hi Rahul,

Ans also look at the demp program :

<b>BCALV_TABLE_CREATE</b>.

Thanks & Regards,

Siri.

Former Member
0 Kudos

FIELD-SYMBOLS : <it_final> TYPE STANDARD TABLE,

<wa_final> TYPE ANY,

<w_field> TYPE ANY.

wa_fieldcatalog-fieldname = 'FIELD1'.

wa_fieldcatalog-ref_table = 'E070'.

wa_fieldcatalog-outputlen = '13'.

wa_fieldcatalog-reptext = 'Created On'.

wa_fieldcatalog-seltext = 'Created On'.

APPEND wa_fieldcatalog TO it_fieldcatalog.

CLEAR wa_fieldcatalog.

etc etc...it_fiedlcatalog: contains the fields of the internal table

      • CALL the following method to CREATE DYNAMIC TABLE

CALL METHOD cl_alv_table_create=>create_dynamic_table

EXPORTING

it_fieldcatalog = it_fieldcatalog

IMPORTING

ep_table = new_table

EXCEPTIONS

generate_subpool_dir_full = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ASSIGN new_table->* TO <it_final>.

Try this out it may solve your problem....

Thanks,

Suman