<?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 Function module Prob with kostl in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836079#M1472361</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,good day guys.&lt;/P&gt;&lt;P&gt;Iam using K_ORDER_SRULE_ADD for settelment rules. In this other function module  for read the fields one whic is K_DEFAULT_RULE_READ.. This is k_order_srule_add f.m source code as below as.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
.default rule table TKB2C is maintained as 'I_SRULES' therefore
*.....aditional work area is needed.
      i_srules = srules.
*.....fill COBL to find KONTY
      cobl-kokrs        = ld_kokrs.
      cobl-gsber        = srules-bus_area.
      cobl-bukrs        = srules-comp_code.
      cobl-saknr        = srules-gl_account.
      cobl-prctr        = srules-profit_ctr.
      cobl-kostl        = srules-costcenter.                     "here iam getting the cost center value
      cobl-aufnr        = srules-orderid.
      CALL FUNCTION 'CJPN_EXTERN_TO_INTERN_CONV'
        EXPORTING
          ext_num       = srules-wbs_element
        IMPORTING
          int_num       = cobl-ps_psp_pnr
        EXCEPTIONS
          error_message = 2
          OTHERS        = 1.
        EXIT.
      ENDIF.
      cobl-anln1        = srules-asset_no.
      cobl-anln2        = srules-sub_number.
      cobl-nplnr        = srules-network.
      cobl-vornr        = srules-activity.
      cobl-kdauf        = srules-sales_ord.
      cobl-kdpos        = srules-s_ord_item.
      cobl-kstrg        = srules-cost_obj.
      cobl-prznr        = srules-co_busproc.
*.....get ASSIGN information in IT_DFTAB
      CLEAR konty.
      CALL FUNCTION 'K_DEFAULT_RULE_READ'        "this FM reads the fields and assining to the lt_dftab
        EXPORTING
          dfreg         = 'BAP'
          obart         = 'OR'
          i_cobl        = cobl
        IMPORTING
          e_konty       = konty
        TABLES
          dftab         = it_dftab                                           "iam not getting the costcenter[kostl] field..
        EXCEPTIONS
          error_message = 2
          OTHERS        = 1.
      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
                RAISING error_occurred.
        flg_leave = 'X'.
        EXIT.
      ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Based on lt_dftab fields. K_POSTING_RULE_INSERT f.m willbe insert the values.prob with costcenter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: balaji kiran on Apr 14, 2010 7:55 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: balaji kiran on Apr 14, 2010 7:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Apr 2010 05:41:09 GMT</pubDate>
    <dc:creator>former_member251546</dc:creator>
    <dc:date>2010-04-14T05:41:09Z</dc:date>
    <item>
      <title>Function module Prob with kostl</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836079#M1472361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,good day guys.&lt;/P&gt;&lt;P&gt;Iam using K_ORDER_SRULE_ADD for settelment rules. In this other function module  for read the fields one whic is K_DEFAULT_RULE_READ.. This is k_order_srule_add f.m source code as below as.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
.default rule table TKB2C is maintained as 'I_SRULES' therefore
*.....aditional work area is needed.
      i_srules = srules.
*.....fill COBL to find KONTY
      cobl-kokrs        = ld_kokrs.
      cobl-gsber        = srules-bus_area.
      cobl-bukrs        = srules-comp_code.
      cobl-saknr        = srules-gl_account.
      cobl-prctr        = srules-profit_ctr.
      cobl-kostl        = srules-costcenter.                     "here iam getting the cost center value
      cobl-aufnr        = srules-orderid.
      CALL FUNCTION 'CJPN_EXTERN_TO_INTERN_CONV'
        EXPORTING
          ext_num       = srules-wbs_element
        IMPORTING
          int_num       = cobl-ps_psp_pnr
        EXCEPTIONS
          error_message = 2
          OTHERS        = 1.
        EXIT.
      ENDIF.
      cobl-anln1        = srules-asset_no.
      cobl-anln2        = srules-sub_number.
      cobl-nplnr        = srules-network.
      cobl-vornr        = srules-activity.
      cobl-kdauf        = srules-sales_ord.
      cobl-kdpos        = srules-s_ord_item.
      cobl-kstrg        = srules-cost_obj.
      cobl-prznr        = srules-co_busproc.
*.....get ASSIGN information in IT_DFTAB
      CLEAR konty.
      CALL FUNCTION 'K_DEFAULT_RULE_READ'        "this FM reads the fields and assining to the lt_dftab
        EXPORTING
          dfreg         = 'BAP'
          obart         = 'OR'
          i_cobl        = cobl
        IMPORTING
          e_konty       = konty
        TABLES
          dftab         = it_dftab                                           "iam not getting the costcenter[kostl] field..
        EXCEPTIONS
          error_message = 2
          OTHERS        = 1.
      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
                RAISING error_occurred.
        flg_leave = 'X'.
        EXIT.
      ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Based on lt_dftab fields. K_POSTING_RULE_INSERT f.m willbe insert the values.prob with costcenter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: balaji kiran on Apr 14, 2010 7:55 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: balaji kiran on Apr 14, 2010 7:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 05:41:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836079#M1472361</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-04-14T05:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function module Prob with kostl</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836080#M1472362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ive solved the problem . jsut ive maintained the TK2bc table..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 07:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836080#M1472362</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-04-14T07:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Function module Prob with kostl</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836081#M1472363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thankyou.. i did it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 08:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836081#M1472363</guid>
      <dc:creator>former_member251546</dc:creator>
      <dc:date>2010-04-15T08:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function module Prob with kostl</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836082#M1472364</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;Could you explain how you did it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 21:12:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-prob-with-kostl/m-p/6836082#M1472364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-21T21:12:41Z</dc:date>
    </item>
  </channel>
</rss>

