<?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 behaving abnormally in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948557#M695196</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;Please give 01 instead of just 1 in the STLAL field.I think the error is because of this.Just chek once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2007 14:36:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-19T14:36:06Z</dc:date>
    <item>
      <title>function module behaving abnormally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948553#M695192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please help me in this issue. function module is not working.&lt;/P&gt;&lt;P&gt;Here i am passing a material to this function module , then it will return its subcomponents ie sub materials and their bom usage.&lt;/P&gt;&lt;P&gt;The fun module is working fine for all the materials except some materials for example say material 1000000001. But i went to se37 and executed the fun module with the same parameters as given here  and passed the material 1000000001. Here the output is comming ie sub materials are comming. But in the program for this material it is not comming. the sy-subrc value after this function module is 1. please tell me why it is not comming in the program but working fine in se37. &lt;/P&gt;&lt;P&gt;my coding and parameters are like this.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt; LOOP AT  itab_final .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        capid                           = 'PP01'&lt;/P&gt;&lt;P&gt;        datuv                           = sy-datum&lt;/P&gt;&lt;P&gt;        EMENG                       =  1&lt;/P&gt;&lt;P&gt;        mktls                            = 'X'&lt;/P&gt;&lt;P&gt;        mehrs                          = 'X'&lt;/P&gt;&lt;P&gt;        mtnrv                            = itab_final-matnr&lt;/P&gt;&lt;P&gt;        stlal                              = '1'&lt;/P&gt;&lt;P&gt;        stlan                              = '1'&lt;/P&gt;&lt;P&gt;        stpst                              =  0&lt;/P&gt;&lt;P&gt;        svwvo                             = 'X'&lt;/P&gt;&lt;P&gt;        werks                            = plant_werks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      VERID                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        vrsvo                               = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      TOPMAT                      =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      DSTST                       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        stb                                   = itab_return&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      MATCAT                      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       alt_not_found               = 1&lt;/P&gt;&lt;P&gt;       call_invalid                     = 2&lt;/P&gt;&lt;P&gt;       material_not_found          = 3&lt;/P&gt;&lt;P&gt;       missing_authorization       = 4&lt;/P&gt;&lt;P&gt;       no_bom_found                = 5&lt;/P&gt;&lt;P&gt;       no_plant_data               = 6&lt;/P&gt;&lt;P&gt;       no_suitable_bom_found       = 7&lt;/P&gt;&lt;P&gt;       conversion_error            = 8&lt;/P&gt;&lt;P&gt;       OTHERS                      = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.       //// here subrc value is 1 for the above material.&lt;/P&gt;&lt;P&gt;      LOOP AT itab_return.&lt;/P&gt;&lt;P&gt;          ///// here i have some coding&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 19:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948553#M695192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-18T19:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: function module behaving abnormally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948554#M695193</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;Please use FM CONVERSION_EXIT_MATN1_INPUT to convert material from internal table ITAB_FINAL prior to call FM CS_BOM_EXPL_MAT_V2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: wa_matnr LIKE mara-matnr.

LOOP AT itab_final.
  wa_matnr = itab_final -matnr. 

  CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
    EXPORTING
      input  = wa_matnr 
    IMPORTING
      output = wa_matnr.
    
  CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
    EXPORTING
      capid = 'PP01'
      datuv = sy-datum
      EMENG = 1
      mktls = 'X'
      mehrs = 'X'
      mtnrv = wa_matnr                 "Change here
      stlal = '1'
      stlan = '1'
      stpst = 0
      svwvo = 'X'
      werks = plant_werks
*     VERID = ' '
      vrsvo = 'X'
*   IMPORTING
*     TOPMAT =
*     DSTST  =
    TABLES
      stb = itab_return
*     MATCAT =
    EXCEPTIONS
      alt_not_found = 1
      call_invalid = 2
      material_not_found = 3
      missing_authorization = 4
      no_bom_found = 5
      no_plant_data = 6
      no_suitable_bom_found = 7
      conversion_error = 8
      OTHERS = 9.

...
&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2007 19:30:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948554#M695193</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-18T19:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: function module behaving abnormally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948555#M695194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ferry for the reply. But I am still getting the same problem , sy-subrc is 1. only for that material .But it is executing in se37, there I am getting the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for ur reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 14:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948555#M695194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T14:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: function module behaving abnormally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948556#M695195</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;Please check and ensure that you pass the same parameters for FM CS_BOM_EXPL_MAT_V2 as you did in SE37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it only for a material or all material?&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 14:31:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948556#M695195</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-19T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: function module behaving abnormally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948557#M695196</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;Please give 01 instead of just 1 in the STLAL field.I think the error is because of this.Just chek once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it works.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 14:36:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948557#M695196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T14:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: function module behaving abnormally</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948558#M695197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep , I am very much grateful to you . My Problem has been solved by your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Oct 2007 19:03:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-behaving-abnormally/m-p/2948558#M695197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-20T19:03:47Z</dc:date>
    </item>
  </channel>
</rss>

