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: 

How to FTP a Dynamic internal table to another server .

Former Member
0 Kudos

Hi Friends,

I need to FTP a dynamic internal table from one server to another server .

The internal table is not tab Delimited.

How to create a tab between two fields in a dynamic internal table.

The traget server wants a file with tab limited .

Please let me know your ideas.

Thanks,

Gokul

1 ACCEPTED SOLUTION

former_member194669
Active Contributor
0 Kudos

Try this way


    
data : i_details1   type abap_compdescr_tab.
data : i_ref_descr1 type ref to cl_abap_structdescr.

" Here <i_dynamic> is dynamic internal table and <wa_dynamic> is the dynamic workarea

i_ref_descr1 ?= cl_abap_tabledescr=>describe_by_data( <wa_dynamic> ).
i_details1[] = i_ref_descr1->components[].

loop at <i_dynamic> into <wa_dynamic>.
    loop at i_details1.
          assign component sy-tabix of structure <wa_dynamic> to <fs>.
          concatenate v_string <fs> CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB into v_string.
    endloop.
    move v_string to i_ftp_send_table.
    clear : v_string
endloop.
" Move i_ftp_send_table to FTP  

3 REPLIES 3

Former Member
0 Kudos

Hi Gokul,

this one is just out of the hat, I haven't tested it.

Have your tried to place the internal table with a line of type string, with the content of the columns separated by the character tab?

regards,

Edgar

uwe_schieferstein
Active Contributor
0 Kudos

Hello Gokul

Have you tried to use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB in order to separate your field contents?

Regards

Uwe

former_member194669
Active Contributor
0 Kudos

Try this way


    
data : i_details1   type abap_compdescr_tab.
data : i_ref_descr1 type ref to cl_abap_structdescr.

" Here <i_dynamic> is dynamic internal table and <wa_dynamic> is the dynamic workarea

i_ref_descr1 ?= cl_abap_tabledescr=>describe_by_data( <wa_dynamic> ).
i_details1[] = i_ref_descr1->components[].

loop at <i_dynamic> into <wa_dynamic>.
    loop at i_details1.
          assign component sy-tabix of structure <wa_dynamic> to <fs>.
          concatenate v_string <fs> CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB into v_string.
    endloop.
    move v_string to i_ftp_send_table.
    clear : v_string
endloop.
" Move i_ftp_send_table to FTP