cancel
Showing results for 
Search instead for 
Did you mean: 

Flat file issue in extract program

Former Member
0 Kudos

Hi All

I have developed an extract program, which downloads the data from SAP and dump it in a flat file, in desired format.

Flat file contains various rows.

In one row, i want to keep 80 charecter length blank at the end.

Ex:

HDR2345 c 20060125 0r42z1005.5USD

Now after "USD", i want to keep 80 char length as Blank spaces.

If i code it as v_record+33(80) = ' '.. it won't work out...

Please suggest me...

Regards

Pavan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Declare one character field having length 80.

Let say p_data(80) type c.

HDR2345 c 20060125 0r42z1005.5USD

After USD field, display the empty p_data field.

Automatically, 80 characters will be appended after USD.

hope this helps.

Regards,

Tarun

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Just declare a variable of type C length 80 and append it to the row to which you want to appned spaces.

Hope it helps.

Regards,

Shashank

ferry_lianto
Active Contributor
0 Kudos

Hi Pavan,

Please try this code.


DATA: L_SPACE TYPE X VALUE '20'.

MOVE L_SPACE TO V_RECORD+33(80) 
OR
MOVE L_SPACE TO V_RECORD+79(80).

This should work.

Regards,

Ferry Lianto

ferry_lianto
Active Contributor
0 Kudos

Hi Pavan,

Please try this code.

MOVE SPACES TO V_RECORD+33(80).

Hope this will help.

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi Ferry...

I have used your suggested code line as move space to v_record+33(80.

No results....

Is there any alternative...???

Pavan