<?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: How do I use module K_COSTELEM_SELECT, in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803020#M344717</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The output returned by the function module is an internal table of generic type. Its structure would be based on what it returns; which again would be dependent upon how it is called.&lt;/P&gt;&lt;P&gt;For example you can have a program that returns back vendor or customer master records (LFA1 or KNA1) based on how it is called. The program can have just one output parameter, i.e. internal table of type generic, which would contain internal table of LFA1 if it was called to get vendor master record; or would contain internal table of type KNA1 if it is called to get customer master record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is same scenario with the function module that you are trying to call. You can store its results in an internal table, say MY_TEMP_TBL, which should be defined in your program as:&lt;/P&gt;&lt;P&gt;DATA: MY_TEMP_TBL OCCURS 0.&lt;/P&gt;&lt;P&gt;Use this as parameter to receive IT_RESULT parameter of your function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can store its results in variable L_RESULT, which should be defined as&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Nov 2006 17:22:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-30T17:22:09Z</dc:date>
    <item>
      <title>How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803015#M344712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use FM K_COSTELEM_SELECT and I see it doens't have any exports but it has a talbe.  How can i get at the data in the talbe if it doens't export anything out of the FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 16:59:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803015#M344712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T16:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803016#M344713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be u have to pass some data into the table and it will return the final data within the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803016#M344713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803017#M344714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes i pass data in but is that data going to be avaible to me in code if it doesn't export back out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:08:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803017#M344714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803018#M344715</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;It will return you the populated internal table back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code in the FM K_COSTELEM_BAPI_GETLIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This function module is calling this function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Ramakrishna Ramisetti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:12:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803018#M344715</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-11-30T17:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803019#M344716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh even if there isnt an export statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:21:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803019#M344716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803020#M344717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The output returned by the function module is an internal table of generic type. Its structure would be based on what it returns; which again would be dependent upon how it is called.&lt;/P&gt;&lt;P&gt;For example you can have a program that returns back vendor or customer master records (LFA1 or KNA1) based on how it is called. The program can have just one output parameter, i.e. internal table of type generic, which would contain internal table of LFA1 if it was called to get vendor master record; or would contain internal table of type KNA1 if it is called to get customer master record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is same scenario with the function module that you are trying to call. You can store its results in an internal table, say MY_TEMP_TBL, which should be defined in your program as:&lt;/P&gt;&lt;P&gt;DATA: MY_TEMP_TBL OCCURS 0.&lt;/P&gt;&lt;P&gt;Use this as parameter to receive IT_RESULT parameter of your function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can store its results in variable L_RESULT, which should be defined as&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:22:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803020#M344717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803021#M344718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ignore last line in my previous reply. Forgot to delete it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803021#M344718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803022#M344719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so shoud I use the bapi or the FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803022#M344719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803023#M344720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the same function module that you are using.&lt;/P&gt;&lt;P&gt;Get the export parameter in the temporary field defined in your program (as described in my previous note).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:35:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803023#M344720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803024#M344721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use same function module K_COSTELEM_SELECT. No need to change your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 17:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803024#M344721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T17:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803025#M344722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks.  SO do I just you a read or append statment to load into the table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 18:42:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803025#M344722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T18:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803026#M344723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. First, execute/debug your program to see whether the table is really getting populated after the function call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then you can read the table in your program by simple internal-table READ statement or loop through it to get the records. You may have to first assign the received parameter to a FIELD-SYMBOL variable before you read it. Field-symbol documentation is available at:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helped to resolve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chetan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 18:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803026#M344723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T18:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use module K_COSTELEM_SELECT,</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803027#M344724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did what you said and when I debug it has data whne it is in the function module but when it comes back to the program the table,lt_cskb_ex, is empty.   here is the code, pretty easy but it is empty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work areas                                                          *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : WA_TPI3K TYPE TPIK3,&lt;/P&gt;&lt;P&gt;       WA_TPIR2T TYPE TPIR2T.&lt;/P&gt;&lt;P&gt;DATA: MY_TEMP_TBL TYPE cskb_ex OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;lt_cskb_ex TYPE cskb_ex OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;START-OF-SELECTION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; PERFORM GET_PM_COST_CAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; read table lt_cskb_ex into MY_TEMP_TBL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_PM_COST_CAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'K_COSTELEM_SELECT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              kokrs           = '1000'&lt;/P&gt;&lt;P&gt;              ce_group        = 'PMSERVICES'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           date_from       = date&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             date_to         = dateto&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         TABLES&lt;/P&gt;&lt;P&gt;              it_result       = lt_cskb_ex&lt;/P&gt;&lt;P&gt;         EXCEPTIONS&lt;/P&gt;&lt;P&gt;              no_record_found = 1&lt;/P&gt;&lt;P&gt;              group_not_found = 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2006 19:22:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-use-module-k-costelem-select/m-p/1803027#M344724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-30T19:22:28Z</dc:date>
    </item>
  </channel>
</rss>

