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

Re: Issue with Concatenate

$
0
0

Here you go. Thanks for interest

DATA: l_string TYPE string.

DATA: l_index TYPE n.

 

TYPES: BEGIN OF t_tab,

   ind TYPE n,

END OF t_tab.

 

DATA: lt_ind TYPE TABLE OF t_tab.

 

DEFINE m_add.

   if not &1 is initial.

     if &2 is initial.

       &2 = &1.

     else.

       &2 = &2 && '/' && &1.

     endif.

   endif.

END-OF-DEFINITION.

 

PERFORM test1.

CLEAR: l_index, l_string.

PERFORM test2.

CLEAR: l_index, l_string.

 

*&---------------------------------------------------------------------*

*&      Form  TEST1

*&---------------------------------------------------------------------*

FORM test1.

 

   DO 100000 TIMES.

     l_index = l_index + 1.

     m_add l_index l_string.

   ENDDO.

 

ENDFORM.                    " TEST1

 

*&---------------------------------------------------------------------*

*&      Form  TEST2

*&---------------------------------------------------------------------*

FORM test2.

 

   DO 100000 TIMES.

     l_index = l_index + 1.

     APPEND l_index TO lt_ind.

   ENDDO.

 

   DELETE lt_ind WHERE ind IS INITIAL.

   CONCATENATE LINES OF lt_ind INTO l_string SEPARATED BY '/'.

 

ENDFORM.                    " TEST2


Viewing all articles
Browse latest Browse all 8807

Trending Articles



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