Tuesday, December 28, 2010
REPORT ztest_notepad. DATA: BEGIN OF it_file OCCURS 0, data TYPE c LENGTH 255, END OF it_file. DATA str TYPE string. DATA g_len TYPE i. DATA g_off TYPE i. DATA g_loops TYPE i. CONCATENATE '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890x' '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890y' '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890z' '12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789m' INTO str SEPARATED BY space. g_len = STRLEN( str ). g_loops = g_len / 255. g_off = 1. DO g_loops TIMES. IF g_loops NE sy-index. IF sy-index EQ 1. it_file-data = str+0(255). ELSE. it_file-data = str+g_off(255). ENDIF. APPEND it_file. CLEAR it_file. g_off = sy-index * 255. ELSE. g_len = g_len - g_off. it_file-data = str+g_off(g_len). APPEND it_file. CLEAR it_file. ENDIF. ENDDO. LOOP AT it_file. WRITE:/ it_file-data. ENDLOOP.
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Sending email with pdf attachment
- ABAP - Step by step tutorial on Smart Forms - Template Node
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
0 comments:
Post a Comment
Your useful comments, suggestions are appreciated.Your comments are moderated.