<?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 pricing routine error in code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144174#M115630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u check this code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a routine for calculating condition value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error is at itab-matnr = xvbap-matnr " material no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m trying to catch material no while creating sales order,&lt;/P&gt;&lt;P&gt;depending on that i get the gold weight, which i use to calculate price through the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Routine to Calculate Kitco Price.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: kitrate type KONP-KBETR,&lt;/P&gt;&lt;P&gt;      goldcts type MARA-LABOR,&lt;/P&gt;&lt;P&gt;      finalwt type MARA-NTGEW,&lt;/P&gt;&lt;P&gt;      final_value type konp-kbetr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        kbetr like xkomv-kbetr,&lt;/P&gt;&lt;P&gt;        kunnr like xkomv-kunnr,&lt;/P&gt;&lt;P&gt;        matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;        labor like mara-labor,&lt;/P&gt;&lt;P&gt;        ntgew like mara-ntgew,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-kbetr = xkomv-kbetr.&lt;/P&gt;&lt;P&gt;itab-matnr = xvbap-matnr.   " material no.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  select single labor ntgew from mara into itab-labor itab-ntgew where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  modify itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  kitrate = itab-kbert.&lt;/P&gt;&lt;P&gt;  goldcts = itab-labor.&lt;/P&gt;&lt;P&gt;  finalwt = itab-ntgew.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZKITCO_FORMULA'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    KITRATE               = kitrate&lt;/P&gt;&lt;P&gt;    GOLDCTS               = goldcts&lt;/P&gt;&lt;P&gt;    FINALWT               = finalwt&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   CONDITION_VALUE       = final_value&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   EXCEPTION1            = 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; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&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;asssign final_value to the required field. for output.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;xkwert = final_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Feb 2006 13:39:57 GMT</pubDate>
    <dc:creator>rahulab</dc:creator>
    <dc:date>2006-02-20T13:39:57Z</dc:date>
    <item>
      <title>pricing routine error in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144174#M115630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u check this code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a routine for calculating condition value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error is at itab-matnr = xvbap-matnr " material no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m trying to catch material no while creating sales order,&lt;/P&gt;&lt;P&gt;depending on that i get the gold weight, which i use to calculate price through the function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Routine to Calculate Kitco Price.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: kitrate type KONP-KBETR,&lt;/P&gt;&lt;P&gt;      goldcts type MARA-LABOR,&lt;/P&gt;&lt;P&gt;      finalwt type MARA-NTGEW,&lt;/P&gt;&lt;P&gt;      final_value type konp-kbetr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;        kbetr like xkomv-kbetr,&lt;/P&gt;&lt;P&gt;        kunnr like xkomv-kunnr,&lt;/P&gt;&lt;P&gt;        matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;        labor like mara-labor,&lt;/P&gt;&lt;P&gt;        ntgew like mara-ntgew,&lt;/P&gt;&lt;P&gt;      end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-kbetr = xkomv-kbetr.&lt;/P&gt;&lt;P&gt;itab-matnr = xvbap-matnr.   " material no.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  select single labor ntgew from mara into itab-labor itab-ntgew where matnr = itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  modify itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  kitrate = itab-kbert.&lt;/P&gt;&lt;P&gt;  goldcts = itab-labor.&lt;/P&gt;&lt;P&gt;  finalwt = itab-ntgew.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZKITCO_FORMULA'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    KITRATE               = kitrate&lt;/P&gt;&lt;P&gt;    GOLDCTS               = goldcts&lt;/P&gt;&lt;P&gt;    FINALWT               = finalwt&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   CONDITION_VALUE       = final_value&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   EXCEPTION1            = 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; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&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;asssign final_value to the required field. for output.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;xkwert = final_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2006 13:39:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144174#M115630</guid>
      <dc:creator>rahulab</dc:creator>
      <dc:date>2006-02-20T13:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: pricing routine error in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144175#M115631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are u sure that the data is available in xvbap or vbap. What u could do is set break point in this routine and in debug mode check in call stack which is the parent routine which has called in this form routine and check for the required field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2006 13:54:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144175#M115631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-20T13:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: pricing routine error in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144176#M115632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;  i think Abhijit is right.&lt;/P&gt;&lt;P&gt;Also consider that xvbap is an internal table. Maybe a read table is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2006 14:05:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144176#M115632</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2006-02-20T14:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: pricing routine error in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144177#M115633</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;Check data type of xvbap-matnr and itan-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you pls. mention the structure of xvbap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Venkat Ramanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Feb 2006 14:16:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pricing-routine-error-in-code/m-p/1144177#M115633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-20T14:16:24Z</dc:date>
    </item>
  </channel>
</rss>

