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

Inserting Spaces?

Former Member
0 Likes
665

Hi Guys,

I am downloading data from SAP database.For ex consider BKPF table.Before transferring the data into a Text file in Application Server.Can anybody tell how to insert spaces in the internal table for all the fileds with no value

for ex : if a field has length of 15 and i was able to fill only tha value upto 10 length and how to fill the remaining 5 length with spaces like that for all the fileds in an Internal Table?

Thanks,

Gopi.

5 REPLIES 5
Read only

Former Member
0 Likes
634

    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                = FILENAME
        FILETYPE                = 'ASC'
        WRITE_FIELD_SEPARATOR   = 'X'
        TRUNC_TRAILING_BLANKS   = 'X'

Greetings,

Blag.

Read only

0 Likes
634

Hi Alvaro,

I have to download the data into Application Server , so can u tell me for Application Server is there any FM for inserting spaces into null values and also for fields whose length is not completely used?

Thanks,

Gopi.

Read only

0 Likes
634

I think that the answer from Vinod Bokade is correct -:)

Greetings,

Blag.

Read only

0 Likes
634

Hi alvaro,

I had done like that only i declared character type internaltable but alos same result.

can u tell me how to insert spaces in to a character filed of length 20.

suppose if it get filled only upto 10 how to fill the other 10 with Spaces?

Thanks,

Gopi.

Read only

Former Member
0 Likes
634

define a new internal table with all char fields like

Data: Begin of ITAB_NEW occurs 0,

f1(10),

f2(15),

f3(20),

End Of ITAB_NEW.

pass the value to this ITAB_NEW and use this ITAB to download the data to application server

this ll solve your space problem

Thanks & regards

vinsee