<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: copy internal table from standard program into custom program and modify to in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384230#M1403654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;y dont u create a enhancement spot for that standard program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2009 01:25:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-20T01:25:14Z</dc:date>
    <item>
      <title>copy internal table from standard program into custom program and modify to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384229#M1403653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Can you please help me with this, I need to modify stansard ALV report ( transaction TPM13) and add G/L account to it, &lt;/P&gt;&lt;P&gt;but I am not able to copy internal table from standard program into my custom program. Then I need to add G/L account and display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT RTPM_TRL_SHOW_FLOWS&lt;/P&gt;&lt;P&gt;      USING SELECTION-SET GS_VARIANT&lt;/P&gt;&lt;P&gt;      EXPORTING LIST TO MEMORY AND RETURN.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            listobject = listobject&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            not_found  = 1&lt;/P&gt;&lt;P&gt;            OTHERS     = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*LIST_INDEX = SY-LSIND.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'LIST_TO_ASCI'&lt;/P&gt;&lt;P&gt;*EXPORTING&lt;/P&gt;&lt;P&gt;*LIST_INDEX         = -1&lt;/P&gt;&lt;P&gt;*WITH_LINE_BREAK = 'X'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;LISTASCI           = o_list&lt;/P&gt;&lt;P&gt;LISTOBJECT         = LISTOBJECT&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;LIST_INDEX_INVALID = 1&lt;/P&gt;&lt;P&gt;OTHERS             = 2.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE I162(00) WITH 'Error -- the list index was invalid.'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT O_LIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-tabix &amp;gt; 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPLIT o_LIST-fields AT '|' INTO FINAL_ITAB-COMP_CODE FINAL_ITAB-GLACCT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*FINAL_ITAB-COMP_CODE = c_bukrs.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FINAL_ITAB-GLACCT = g_glacct.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;append final_itab.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WRITE_LIST'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            listobject = LISTOBJECT&lt;/P&gt;&lt;P&gt;            EXCEPTIONS&lt;/P&gt;&lt;P&gt;            empty_list = 1&lt;/P&gt;&lt;P&gt;            OTHERS     = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell me how to split? can I split in to internal table fields directly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease help me with this. Thank you so much for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thanvi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 23:26:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384229#M1403653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-19T23:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: copy internal table from standard program into custom program and modify to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384230#M1403654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;y dont u create a enhancement spot for that standard program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 01:25:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384230#M1403654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-20T01:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: copy internal table from standard program into custom program and modify to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384231#M1403655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prabhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Can you please tell me about Enhancement spot and how to do it with example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 01:46:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384231#M1403655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-20T01:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: copy internal table from standard program into custom program and modify to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384232#M1403656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 03:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384232#M1403656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-20T03:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: copy internal table from standard program into custom program and modify to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384233#M1403657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of creating enhancement spots, why dont you find an user-exit in that stadard program and export required table to memory? then in your program you can import it from memory and use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gouri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 06:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384233#M1403657</guid>
      <dc:creator>former_member215917</dc:creator>
      <dc:date>2009-11-20T06:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: copy internal table from standard program into custom program and modify to</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384234#M1403658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see this code  for  getting the standard program  data into  internal table of your  program and also splitting data  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SUBMIT RM07DOCS using SELECTION-SCREEN '1000'
WITH matnr = S_MATNR
WITH werks = S_WERKS
WITH charg = S_CHARG
WITH budat-low = S_BUDAT-low
WITH budat-high = S_BUDAT-high EXPORTING LIST TO MEMORY AND RETURN .
 
 
EXPORTING LIST TO MEMORY AND RETURN .
 
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
 listobject = listtab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
 
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
 
ENDIF.
 
* List tab contains data in hexa format.
 
DESCRIBE TABLE listtab LINES n .
 
DATA: BEGIN OF LIST_tab OCCURS 0,
*fiedls1(1024) TYPE c,
fields1(2048) type c,
END OF LIST_tab.
 
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
WITH_LINE_BREAK = 'X'
TABLES
LISTASCI = LIST_tab
LISTOBJECT = LISTTAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
 
*Table list_tab contains the output in a single field fields1. all the fields are separated by a '|'
  
loop at list_tab.
  if sy-tabix &amp;gt;= 7.
*Using the split you can split the data into  separate field data and  move into internal table or  variables* 
   split list_tab-fields1 at '|' into v_non 
                                          v_werks
                                          v_matnr 
                                          v_maktx 
                                          v_charg
                                          v_stock.
*move variables to your output internal table.
endloop
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Loganathan girishkumar on Nov 20, 2009 5:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2009 16:57:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-internal-table-from-standard-program-into-custom-program-and-modify-to/m-p/6384234#M1403658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-20T16:57:43Z</dc:date>
    </item>
  </channel>
</rss>

