<?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: FUNCTION MODULE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254096#M145713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there other BAPI function module with similar function as BAPI_CTRACDOCUMENT_CREATE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we post credit GL accounts and debit GL accounts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2009 04:59:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-16T04:59:33Z</dc:date>
    <item>
      <title>FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254080#M145697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello guys i need some help from u&lt;/P&gt;&lt;P&gt;i am having some part of function module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;doc_type = 'ED'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Document Header fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  documentheader-appl_area      = 'P'.&lt;/P&gt;&lt;P&gt;  documentheader-doc_type       = doc_type.&lt;/P&gt;&lt;P&gt;  documentheader-currency       = comp_code_data-waers.&lt;/P&gt;&lt;P&gt;  documentheader-doc_source_key = '01'.&lt;/P&gt;&lt;P&gt;  documentheader-post_date      = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;  documentheader-doc_date       = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;  documentheader-ref_doc_no   = erfpacht-xblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this functionmodule someone hardcoded at the fields ed, p, 01 i have to replace these with variables&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;for this i have to build an internal table with these fields all the fields existing in tfk033d table and i ahve to extarct the data from the data base &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone guide me how to write the things&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i appreciate your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254080#M145697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254081#M145698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;  You can do a single select from the table &amp;amp; pass those values from the header to the fields..&lt;/P&gt;&lt;P&gt;Hi you can do like...&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM tfk033d WHERE &amp;lt;CONDITIONS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phani Kiran Nudurupati&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254081#M145698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254082#M145699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you mail the name of function module which has these lines as part of the source code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:05:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254082#M145699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254083#M145700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not have that table in my system, so I'm writing blind.  &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do a regular select statement, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: itfk033d type table of tfk033d  with header line.

Select * into table itfk033d from tfk033d.

Loop at itfk033d .


* Do whatever

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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:06:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254083#M145700</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-03-09T15:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254084#M145701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey &lt;/P&gt;&lt;P&gt;the function module name is z_fica_document_create&lt;/P&gt;&lt;P&gt;this is the functin v r using&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:07:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254084#M145701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254085#M145702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen, &lt;/P&gt;&lt;P&gt;  Things look pretty straight forward by your description of the problem.&lt;/P&gt;&lt;P&gt;Just declare an internal table with variables of the same type (in the LHS side)&lt;/P&gt;&lt;P&gt;for doc_type ,appl_area and source_key say,&lt;/P&gt;&lt;P&gt;v_doc_type, v_appl_area and v_source_key.&lt;/P&gt;&lt;P&gt;get the data from the database(U should know the table name) using a select statement.&lt;/P&gt;&lt;P&gt;and then use these variables in place of the constants.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;doc_type = itab-v_doc_type.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Document Header fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;documentheader-appl_area = itab-v_appl_area.&lt;/P&gt;&lt;P&gt;documentheader-doc_type = doc_type.&lt;/P&gt;&lt;P&gt;documentheader-currency = comp_code_data-waers.&lt;/P&gt;&lt;P&gt;documentheader-doc_source_key = itab-v_source_key.&lt;/P&gt;&lt;P&gt;documentheader-post_date = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;documentheader-doc_date = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;documentheader-ref_doc_no = erfpacht-xblnr.&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;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254085#M145702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254086#M145703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have that table in my system but you can write a selet on this table and get details instead of hardcoding. Else pass these entries as import parameters. As it belongs to header table - i believe there is only one header record so you can pass it as a structure and remove the hardcoding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254086#M145703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254087#M145704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello rich,&lt;/P&gt;&lt;P&gt;here i am giving the fields that to be changed in that code &lt;/P&gt;&lt;P&gt;doc-type is tfk033d-key05,&lt;/P&gt;&lt;P&gt;in place of p is that is application area ie tfk003d-applk,&lt;/P&gt;&lt;P&gt;in plafe of '01'  filed is tfk003d-key06   this is document origin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these values i have to change in the above can u more specific about this answer&lt;/P&gt;&lt;P&gt;i appreciate your help &lt;/P&gt;&lt;P&gt;please help me in this regard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:14:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254087#M145704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254088#M145705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;  Just do like this..&lt;/P&gt;&lt;P&gt;tables: tfk003d.&lt;/P&gt;&lt;P&gt; SELECT SINGLE * FROM TFK003D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; documentheader-doc-type = tfk033d-key05.&lt;/P&gt;&lt;P&gt; documentheader-appl_area = tfk003d-applk.&lt;/P&gt;&lt;P&gt; documentheader-doc_source_key = tfk003d-key06.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you do your rest of coding..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:18:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254088#M145705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254089#M145706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for more info i am pasting the total code in the function module here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION z_fica_document_create.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(ERFPACHT) TYPE  ZST_ERFPACHT&lt;/P&gt;&lt;P&gt;*"     REFERENCE(TESTRUN) TYPE  BAPIFLAG OPTIONAL&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(RETURN) TYPE  BAPIRET2&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: documentheader     TYPE bapidfkkko,&lt;/P&gt;&lt;P&gt;        partnerposition    TYPE bapidfkkop,&lt;/P&gt;&lt;P&gt;        genledgerposition  TYPE bapidfkkopk,&lt;/P&gt;&lt;P&gt;        partnerpositions   TYPE TABLE OF bapidfkkop,&lt;/P&gt;&lt;P&gt;        genledgerpositions TYPE TABLE OF bapidfkkopk,&lt;/P&gt;&lt;P&gt;        comp_code          TYPE bukrs,&lt;/P&gt;&lt;P&gt;        comp_code_data     TYPE t001,&lt;/P&gt;&lt;P&gt;        cont_acct_data     TYPE fkkvkp,&lt;/P&gt;&lt;P&gt;        acct_determination TYPE tfk033d,&lt;/P&gt;&lt;P&gt;        doc_type           TYPE blart_kk,&lt;/P&gt;&lt;P&gt;t100 TYPE t100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES: tfk001g, tfk033d.&lt;/P&gt;&lt;P&gt;  REFRESH: partnerpositions, genledgerpositions.&lt;/P&gt;&lt;P&gt;clear: documentheader, partnerposition, genledgerposition, comp_code, comp_code_data,cont_acct_data,&lt;/P&gt;&lt;P&gt;       acct_determination, doc_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Data From Contract Account - Partner Specific&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT SINGLE * FROM  fkkvkp&lt;/P&gt;&lt;P&gt;                  INTO  cont_acct_data&lt;/P&gt;&lt;P&gt;                  WHERE gpart = erfpacht-partner.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                   AND vkont = assessment-cont_acct.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Standard Company Code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF cont_acct_data-stdbk IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    comp_code = cont_acct_data-stdbk.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Paying Company Code from Company Code Group&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT SINGLE pybuk FROM  tfk001g&lt;/P&gt;&lt;P&gt;                        INTO  comp_code&lt;/P&gt;&lt;P&gt;                        WHERE opbuk = cont_acct_data-opbuk.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      return-type       = 'E'.&lt;/P&gt;&lt;P&gt;      return-id         = 'ZTRM'.&lt;/P&gt;&lt;P&gt;      return-number     = '003'.&lt;/P&gt;&lt;P&gt;      return-message_v1 = cont_acct_data-opbuk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT SINGLE * FROM  t100 INTO t100&lt;/P&gt;&lt;P&gt;             WHERE  sprsl  = sy-langu&lt;/P&gt;&lt;P&gt;             AND    arbgb  = return-id&lt;/P&gt;&lt;P&gt;             AND    msgnr  = return-number.&lt;/P&gt;&lt;P&gt;      return-message = t100-text.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Currency and Chart of Accounts&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'COMPANY_CODE_READ'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_bukrs           = comp_code&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_t001            = comp_code_data&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      country_not_found = 1&lt;/P&gt;&lt;P&gt;      no_such_code      = 2&lt;/P&gt;&lt;P&gt;      space_input       = 3&lt;/P&gt;&lt;P&gt;      wrong_kkber       = 4&lt;/P&gt;&lt;P&gt;      OTHERS            = 5.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    return-type       = sy-msgty.&lt;/P&gt;&lt;P&gt;    return-id         = sy-msgid.&lt;/P&gt;&lt;P&gt;    return-number     = sy-msgno.&lt;/P&gt;&lt;P&gt;    return-message_v1 = sy-msgv1.&lt;/P&gt;&lt;P&gt;    return-message_v2 = sy-msgv2.&lt;/P&gt;&lt;P&gt;    return-message_v3 = sy-msgv3.&lt;/P&gt;&lt;P&gt;    return-message_v4 = sy-msgv4.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM  t100 INTO t100&lt;/P&gt;&lt;P&gt;           WHERE  sprsl  = sy-langu&lt;/P&gt;&lt;P&gt;           AND    arbgb  = sy-msgid&lt;/P&gt;&lt;P&gt;           AND    msgnr  = sy-msgno.&lt;/P&gt;&lt;P&gt;    return-message = t100-text.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  doc_type = 'ED'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Document Header fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  documentheader-appl_area      = 'P'.&lt;/P&gt;&lt;P&gt;  documentheader-doc_type       = doc_type.&lt;/P&gt;&lt;P&gt;  documentheader-currency       = comp_code_data-waers.&lt;/P&gt;&lt;P&gt;  documentheader-doc_source_key = '01'.&lt;/P&gt;&lt;P&gt;  documentheader-post_date      = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;  documentheader-doc_date       = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;  documentheader-ref_doc_no   = erfpacht-xblnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Reconciliation Key&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE documentheader-post_date+2(6) '-TXRET'&lt;/P&gt;&lt;P&gt;         INTO documentheader-fikey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FKK_FIKEY_CHECK'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_fikey               = documentheader-fikey&lt;/P&gt;&lt;P&gt;      i_open_without_dialog = 'X'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      non_existing          = 1&lt;/P&gt;&lt;P&gt;      OTHERS                = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    return-type       = sy-msgty.&lt;/P&gt;&lt;P&gt;    return-id         = sy-msgid.&lt;/P&gt;&lt;P&gt;    return-number     = sy-msgno.&lt;/P&gt;&lt;P&gt;    return-message_v1 = sy-msgv1.&lt;/P&gt;&lt;P&gt;    return-message_v2 = sy-msgv2.&lt;/P&gt;&lt;P&gt;    return-message_v3 = sy-msgv3.&lt;/P&gt;&lt;P&gt;    return-message_v4 = sy-msgv4.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM  t100&lt;/P&gt;&lt;P&gt;           WHERE  sprsl  = sy-langu&lt;/P&gt;&lt;P&gt;           AND    arbgb  = sy-msgid&lt;/P&gt;&lt;P&gt;           AND    msgnr  = sy-msgno.&lt;/P&gt;&lt;P&gt;    return-message = t100-text.&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;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    return-type       = 'E'.&lt;/P&gt;&lt;P&gt;    return-id         = 'ZTRM'.&lt;/P&gt;&lt;P&gt;    return-number     = '002'.&lt;/P&gt;&lt;P&gt;    return-message_v1 = erfpacht-psobtyp.                   "AC01+-&lt;/P&gt;&lt;P&gt;    SELECT SINGLE * FROM  t100&lt;/P&gt;&lt;P&gt;           WHERE  sprsl  = sy-langu&lt;/P&gt;&lt;P&gt;           AND    arbgb  = return-id&lt;/P&gt;&lt;P&gt;           AND    msgnr  = return-number.&lt;/P&gt;&lt;P&gt;    return-message = t100-text.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  partnerposition-item       = '0001'.&lt;/P&gt;&lt;P&gt;  partnerposition-comp_code  = comp_code.&lt;/P&gt;&lt;P&gt;  partnerposition-buspartner = erfpacht-partner.&lt;/P&gt;&lt;P&gt;  partnerposition-cont_acct  = erfpacht-cont_acct.&lt;/P&gt;&lt;P&gt;  partnerposition-contract   = erfpacht-contract.&lt;/P&gt;&lt;P&gt;  partnerposition-appl_area  = 'P'.&lt;/P&gt;&lt;P&gt;  partnerposition-main_trans = erfpacht-main.&lt;/P&gt;&lt;P&gt;  partnerposition-sub_trans  = erfpacht-sub.&lt;/P&gt;&lt;P&gt;  partnerposition-doc_date   = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;  partnerposition-post_date  = erfpacht-bldat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'Z_DUE_DATE_DETERMINE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      I_BLART       = doc_type&lt;/P&gt;&lt;P&gt;      I_BLDAT       = erfpacht-bldat&lt;/P&gt;&lt;P&gt;      I_BUDAT       = erfpacht-bldat&lt;/P&gt;&lt;P&gt;      I_CPUDT       = erfpacht-bldat&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      E_FAEDN       = partnerposition-net_date&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      ERROR_MESSAGE = 1&lt;/P&gt;&lt;P&gt;      OTHERS        = 2.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; partnerposition-net_date   = erfpacht-bldat.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; partnerposition-disc_due   = erfpacht-bldat.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  partnerposition-amount     = erfpacht-amount.&lt;/P&gt;&lt;P&gt;  partnerposition-period_key = erfpacht-persl.&lt;/P&gt;&lt;P&gt;  partnerposition-paymnt_grp = erfpacht-bldat+2(2).&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Account Determination - Receivables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR acct_determination.&lt;/P&gt;&lt;P&gt;  acct_determination-applk   = 'P'.&lt;/P&gt;&lt;P&gt;  acct_determination-buber   = 'P000'.                "Receivables&lt;/P&gt;&lt;P&gt;  acct_determination-ktopl   = comp_code_data-ktopl.&lt;/P&gt;&lt;P&gt;  acct_determination-key01   = comp_code.&lt;/P&gt;&lt;P&gt;  acct_determination-key02   = 'EB'.            "AC01+-&lt;/P&gt;&lt;P&gt;  acct_determination-key03   = erfpacht-main.&lt;/P&gt;&lt;P&gt;  acct_determination-key04   = erfpacht-sub.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FKK_ACCOUNT_DETERMINE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_tfk033d           = acct_determination&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_tfk033d           = acct_determination&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      error_in_input_data = 1&lt;/P&gt;&lt;P&gt;      nothing_found       = 2&lt;/P&gt;&lt;P&gt;      OTHERS              = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  partnerposition-g_l_acct  = acct_determination-fun01.&lt;/P&gt;&lt;P&gt;  APPEND partnerposition TO partnerpositions.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Offset Item Fields&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  genledgerposition-item       = '0001'.&lt;/P&gt;&lt;P&gt;  genledgerposition-comp_code  = comp_code.&lt;/P&gt;&lt;P&gt;  genledgerposition-amount     = partnerposition-amount * -1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Account Determination - Revenue&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR acct_determination.&lt;/P&gt;&lt;P&gt;  acct_determination-applk   = 'P'.&lt;/P&gt;&lt;P&gt;  acct_determination-buber   = 'P001'.                "Revenue&lt;/P&gt;&lt;P&gt;  acct_determination-ktopl   = comp_code_data-ktopl.&lt;/P&gt;&lt;P&gt;  acct_determination-key01   = comp_code.&lt;/P&gt;&lt;P&gt;  acct_determination-key02   = 'EB'.            "AC01+-&lt;/P&gt;&lt;P&gt;  acct_determination-key03   = erfpacht-main.&lt;/P&gt;&lt;P&gt;  acct_determination-key04   = erfpacht-sub.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'FKK_ACCOUNT_DETERMINE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_tfk033d           = acct_determination&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_tfk033d           = acct_determination&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      error_in_input_data = 1&lt;/P&gt;&lt;P&gt;      nothing_found       = 2&lt;/P&gt;&lt;P&gt;      OTHERS              = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  genledgerposition-g_l_acct = acct_determination-fun01.&lt;/P&gt;&lt;P&gt;  APPEND genledgerposition TO genledgerpositions.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BAPI Call&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_CTRACDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      testrun            = testrun&lt;/P&gt;&lt;P&gt;      documentheader     = documentheader&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      return             = return&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      partnerpositions   = partnerpositions&lt;/P&gt;&lt;P&gt;      genledgerpositions = genledgerpositions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254089#M145706</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254090#M145707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi naveen,&lt;/P&gt;&lt;P&gt;  I dont find tfk033d in my system,so i cant really tell you the where condition.But you can do a SELECT SINGLE on the table tfk033d &amp;amp; pass the data as required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254090#M145707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254091#M145708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically you have to select the values from TFK003D as Rich mentioned and then loop at that internal table and prepare your BAPI data and call the BAPI. Here is how&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT i_tfk003d.
  CLEAR: doc_type, documentheader,
         partnerposition, partnerpositions[],
         genledgerposition, genledgerpositions[].

  doc_type = 'ED'.
* Document Header fields
  documentheader-appl_area = 'P'.
  documentheader-doc_type = doc_type.
  documentheader-currency = comp_code_data-waers.
  documentheader-doc_source_key = '01'.
  documentheader-post_date = erfpacht-bldat.
  documentheader-doc_date = erfpacht-bldat.
  documentheader-ref_doc_no = erfpacht-xblnr.
* Reconciliation Key
  CONCATENATE documentheader-post_date+2(6) '-TXRET'
  INTO documentheader-fikey.

  CALL FUNCTION 'FKK_FIKEY_CHECK'
    EXPORTING
      i_fikey               = documentheader-fikey
      i_open_without_dialog = 'X'
    EXCEPTIONS
      non_existing          = 1
      OTHERS                = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    return-type = sy-msgty.
    return-id = sy-msgid.
    return-number = sy-msgno.
    return-message_v1 = sy-msgv1.
    return-message_v2 = sy-msgv2.
    return-message_v3 = sy-msgv3.
    return-message_v4 = sy-msgv4.
    SELECT SINGLE * FROM t100
                   WHERE sprsl = sy-langu
                     AND arbgb = sy-msgid
                     AND msgnr = sy-msgno.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      return-type = 'E'.
      return-id = 'ZTRM'.
      return-number = '002'.
      return-message_v1 = erfpacht-psobtyp.                 "AC01+-
      SELECT SINGLE * FROM t100
                     WHERE sprsl = sy-langu
                       AND arbgb = return-id
                       AND msgnr = return-number.
    ENDIF.
    return-message = t100-text.
  ENDIF.
  partnerposition-item = '0001'.
  partnerposition-comp_code = comp_code.
  partnerposition-buspartner = erfpacht-partner.
  partnerposition-cont_acct = erfpacht-cont_acct.
  partnerposition-contract = erfpacht-contract.
  partnerposition-appl_area = 'P'.
  partnerposition-main_trans = erfpacht-main.
  partnerposition-sub_trans = erfpacht-sub.
  partnerposition-doc_date = erfpacht-bldat.
  partnerposition-post_date = erfpacht-bldat.

  CALL FUNCTION 'Z_DUE_DATE_DETERMINE'
    EXPORTING
      i_blart       = doc_type
      i_bldat       = erfpacht-bldat
      i_budat       = erfpacht-bldat
      i_cpudt       = erfpacht-bldat
    IMPORTING
      e_faedn       = partnerposition-net_date
    EXCEPTIONS
      error_message = 1
      OTHERS        = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

* partnerposition-net_date = erfpacht-bldat.
* partnerposition-disc_due = erfpacht-bldat.
  partnerposition-amount = erfpacht-amount.
  partnerposition-period_key = erfpacht-persl.
  partnerposition-paymnt_grp = erfpacht-bldat+2(2).
* Account Determination - Receivables
  CLEAR acct_determination.
  acct_determination-applk = 'P'.
  acct_determination-buber = 'P000'. "Receivables
  acct_determination-ktopl = comp_code_data-ktopl.
  acct_determination-key01 = comp_code.
  acct_determination-key02 = 'EB'.                          "AC01+-
  acct_determination-key03 = erfpacht-main.
  acct_determination-key04 = erfpacht-sub.
  CALL FUNCTION 'FKK_ACCOUNT_DETERMINE'
    EXPORTING
      i_tfk033d           = acct_determination
    IMPORTING
      e_tfk033d           = acct_determination
    EXCEPTIONS
      error_in_input_data = 1
      nothing_found       = 2
      OTHERS              = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    EXIT.
  ENDIF.
  partnerposition-g_l_acct = acct_determination-fun01.
  APPEND partnerposition TO partnerpositions.
* Offset Item Fields
  genledgerposition-item = '0001'.
  genledgerposition-comp_code = comp_code.
  genledgerposition-amount = partnerposition-amount * -1.
* Account Determination - Revenue
  CLEAR acct_determination.
  acct_determination-applk = 'P'.
  acct_determination-buber = 'P001'. "Revenue
  acct_determination-ktopl = comp_code_data-ktopl.
  acct_determination-key01 = comp_code.
  acct_determination-key02 = 'EB'.                          "AC01+-
  acct_determination-key03 = erfpacht-main.
  acct_determination-key04 = erfpacht-sub.
  CALL FUNCTION 'FKK_ACCOUNT_DETERMINE'
    EXPORTING
      i_tfk033d           = acct_determination
    IMPORTING
      e_tfk033d           = acct_determination
    EXCEPTIONS
      error_in_input_data = 1
      nothing_found       = 2
      OTHERS              = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    EXIT.
  ENDIF.
  genledgerposition-g_l_acct = acct_determination-fun01.
  APPEND genledgerposition TO genledgerpositions.
* BAPI Call
  CALL FUNCTION 'BAPI_CTRACDOCUMENT_CREATE'
    EXPORTING
      testrun            = testrun
      documentheader     = documentheader
    IMPORTING
      return             = return
    TABLES
      partnerpositions   = partnerpositions
      genledgerpositions = genledgerpositions.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:39:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254091#M145708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254092#M145709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey srinivas thanks alot for u r directions&lt;/P&gt;&lt;P&gt;but don't need this stuff&lt;/P&gt;&lt;P&gt;what i need is to put the variables in place of the hardcoded values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i have to build an internal table and i have to retreive the data from the datebase table ie tfk033d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if u can help please i need the help to build the internal table and select statement with condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inthis table primary key field is ''applk'' ie applicatin area&lt;/P&gt;&lt;P&gt;i appreciate ur help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 15:50:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254092#M145709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T15:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254093#M145710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't what you have that you can use in the where clause for this table. I don't know this table because it is not there in my version of R/3. Assuming you need all the values from this table, here is code. If you need to restrict which records need to be selected from this table, you need to add the WHERE clause to the select statement for your conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: i_tfk033d TYPE TABLE OF tfk033d  WITH HEADER LINE.

SELECT * INTO TABLE i_tfk033d FROM tfk033d.

LOOP AT i_tfk003d.

  CLEAR: doc_type, documentheader,
         partnerposition, partnerpositions[],
         genledgerposition, genledgerpositions[].
* document header fields
  documentheader-appl_area = i_tfk003d-applk.
  documentheader-doc_type = i_tfk033d-key05.
  documentheader-doc_source_key = i_tfk003d-key06.

*--- do the rest needed for the BAPI call
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2006 20:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254093#M145710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-09T20:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254094#M145711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the reason you don't have the table in your systems is because it is not a table. I think tfk003d is 'n structure defined local to the FM or program and tfk003 is the corresponding table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Naveen, if you do a select off tfk003 to extract the relevant data you can plug it into the code as describe by others in this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Corné&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 22:30:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254094#M145711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T22:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254095#M145712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your issue is still not resolved, please look below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to retrieve the data from table TFK033D, you need to know the business logic for accessing this table. So whatever fields you want to use in the WHERE clause of the SELECT statement on TFK033D, you can add as IMPORT parameters of your Z function module and then get the data from this table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table TFK033D has a composite Primary Kay (consisting of 11 fields). I would suggest that you get the data for ALL the KEY fields of TFK033D if possible as that would return you exactly one row from this table which you can then use in your function module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 01:24:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254095#M145712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T01:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: FUNCTION MODULE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254096#M145713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there other BAPI function module with similar function as BAPI_CTRACDOCUMENT_CREATE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we post credit GL accounts and debit GL accounts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2009 04:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module/m-p/1254096#M145713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-16T04:59:33Z</dc:date>
    </item>
  </channel>
</rss>

