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: 

Problem in downloading data?

Former Member
0 Kudos

Hi all,

I am developing an interface to download the Payment document data in specified format. The problem is i am unable to separate the data as new line. It is downloading as one line.

Please help me how to solve this problem.

Thanks,

Vamshi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

DATA: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,

c_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.

*---- declare objbin_final as some table

LOOP AT it_marc1.

CONCATENATE it_marc1-matnr it_marc1-werks it_marc1-pstat it_marc1-lvorm

INTO objbin_final SEPARATED BY c_tab.

CONCATENATE c_ret objbin_final INTO objbin_final.

APPEND objbin_final.

ENDLOOP.

Thanks,

Krishna..

7 REPLIES 7

anuj_srivastava
Active Participant
0 Kudos

Hi ,

Declare the internal table as below..

DATA: BEGIN OF zitab1 OCCURS 0,

fld_str(101) TYPE c,

END OF zitab1.

Now append the data from ur internal table into this internal table,

Now try and download the data.

Hope this solves ur problem.

Regards ,

Anuj

0 Kudos

hi anuj,

Thanks for the reply.

If i moved data in my ITAB to this ITAB, it will create new line for every 101 characters Is n't it?

But i can't depend on number of charaters as it is not fixed.

So please specify any other solution ?

Thanks,

Vamshi.

0 Kudos

Hi Vamshi ,

I also did the same thing for a payment program,but in my case none of the field was going to cross that length.

In your case what can be maximum possible length for any of the field ?

Regards,

Anuj

Former Member
0 Kudos

hi !

I HOPE THIS WILL WORK FOR YOU.

SPLIT result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .

former_member203501
Active Contributor
0 Kudos

hi use this ..

CL_ABAP_CHAR_UTILITIES=>NEWLINE

like this

concatenate file CL_ABAP_CHAR_UTILITIES=>NEWLINE open tabla close CL_ABAP_CHAR_UTILITIES=>NEWLINE INTO file.

Former Member
0 Kudos

Hi,

DATA: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,

c_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.

*---- declare objbin_final as some table

LOOP AT it_marc1.

CONCATENATE it_marc1-matnr it_marc1-werks it_marc1-pstat it_marc1-lvorm

INTO objbin_final SEPARATED BY c_tab.

CONCATENATE c_ret objbin_final INTO objbin_final.

APPEND objbin_final.

ENDLOOP.

Thanks,

Krishna..

0 Kudos

hi krishna,

Thanks. Problem solved.

Thanks,

Vamshi.