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

Re: Internal Table to xls Attachment cl bcs?

$
0
0

Every line except first one is starting with tab character. This needs to be taken care of.

Basically, for first field of every line, you need to ensure that only value is concatenated, not the tab character.

Try changing the IF block after ASSIGN statement to this.

  1. ASSIGNCOMPONENT sy-indexOFSTRUCTURE ls_kdmat TO<lv_field>.
  2. IF sy-subrc EQ0.
  3.   IF lv_string ISINITIAL.
  4.     WRITE<lv_field> TO lv_string_field.
  5.     lv_string = lv_string_field.
  6. *  ELSE.
  7.   ELSEIF sy-indexEQ1.
  8.     WRITE<lv_field> TO lv_string_field.
  9.     CONCATENATE lv_string lv_string_field INTO lv_string.
  10.   ELSE.
  11.     WRITE<lv_field> TO lv_string_field.
  12.     CONCATENATE lv_string gc_tab lv_string_field INTO lv_string.
  13.   ENDIF.
  14. ELSE.
  15.   CONCATENATE lv_string gc_crlf INTO lv_string.
  16.   EXIT.
  17. ENDIF.

/.


Viewing all articles
Browse latest Browse all 9146

Trending Articles



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