05-06-2013 8:39 AM
Hi Experts ,
i have one doubt ,
suppose i have one internal table data retrieved from mara table . so my table contain 10 lines with some fields in table .
now want to convert this table into string type table
Example
lt_mara table contains 10 lines .
fields in table matnr, maktl ,so ext
matnr maktl
10 x1
11 x2
12 x3
so on ..
now my string table should contain 10 lines and data no heading , it should come line string format with space .
10 x1
11 x2
12 x3
is there any best way to do in performance wise .
Thankts ...
05-06-2013 8:49 AM
Hi,
Please check the FM SOTR_SERV_TABLE_TO_STRING. Hope this helps.
Cheers,
Arindam
05-06-2013 11:53 AM
Hi Suvarna,
1. Make all the fields of your work area lines into a single string.
2. Append each of these string lines into a final itab.
Thanks.
05-06-2013 12:06 PM
Hi Suvarna,
You can use the FM SAP_CONVERT_TO_TXT_FORMAT to convert an internal table to string.
Jay
05-06-2013 12:13 PM
Hi Former Member
there are two options i think so,
one is you can use "concatenate"statement inside the loop.
another one is FM 'SOTR_SERV_TABLE_TO_STRING' which already mentioned by Arindam Mondal
Check the below thread for your reference.
https://scn.sap.com/thread/574871
Regards,
Bastin.G