Skip to Content
avatar image
Former Member

Flat file issue in extract program

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 10, 2006 at 03:00 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 10, 2006 at 02:35 AM

    Hi Pavan,

    Please try this code.

    MOVE SPACES TO V_RECORD+33(80).

    Hope this will help.

    Regards,

    Ferry Lianto

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ferry...

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

      No results.... 😔

      Is there any alternative...???

      Pavan

  • Apr 10, 2006 at 03:26 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 10, 2006 at 05:00 AM

    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

    Add comment
    10|10000 characters needed characters exceeded