Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: open dataset space at the end of the character

$
0
0

Hi,

 

See if this is helpful:

 

Note the use of LENGTH .


REPORT  y_r_eitan_test_04_09.

 

TYPE-POOLS: abap .

 

PARAMETERS: p_path TYPE localfile OBLIGATORY   .

 

START-OF-SELECTION .

  PERFORM at_start_of_selection

    USING

      p_path .

 

*----------------------------------------------------------------------*

FORM at_start_of_selection

  USING

    p_path TYPE localfile .

 

  DATA: mess TYPE string .

  DATA: dataset_name TYPE string .

 

  dataset_name = p_path .

 

  OPEN DATASET dataset_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE mess .

 

  CONSTANTS: c_field TYPE string VALUE 'HI1111ABC        ' .

 

  DO 10 TIMES .

    TRANSFER c_field TO dataset_name LENGTH 17 .

  ENDDO .

 

  DO 10 TIMES .

    TRANSFER c_field TO dataset_name LENGTH 17 NO END OF LINE .

  ENDDO .

 

  TRANSFER space TO dataset_name .

 

  CLOSE DATASET dataset_name .

 

ENDFORM .                    "at_start_of_selection

 

regards.

 

screenshot_02.png

 

The dots are spaces.

 

regards.


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>