<?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  L_TO_CREATE_SINGLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986328#M1341656</link>
    <description>&lt;P&gt;Great answer, it helped me with the same issue I had, thanks&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 08:39:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-06-06T08:39:45Z</dc:date>
    <item>
      <title>Function module  L_TO_CREATE_SINGLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986325#M1341653</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;I am using L_TO_CREATE_SINGLE function module in loop when the input parameters are correct for this function module its creating to succesfully. but when input parameters are not correct its totally comming out of the program.&lt;/P&gt;&lt;P&gt;my requirement is to skip that error record and process next record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any body help me in this regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 16:38:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986325#M1341653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-19T16:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Function module  L_TO_CREATE_SINGLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986326#M1341654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ramesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It happens because that FM throw error messages. It's the same behaviour of FM  L_TO_CREATE_MULTIPLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solutions: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- prevent all the errors that can occur before calling the FM&lt;/P&gt;&lt;P&gt;- use batch input&lt;/P&gt;&lt;P&gt;- create a ZL_TO_CREATE_SINGLE, replacing error message by bapireturn entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 17:02:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986326#M1341654</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2009-08-19T17:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Function module  L_TO_CREATE_SINGLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986327#M1341655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a very late reply, but this is how I solved this problem. The trick is to add the general exception "error_message", this will handle any messages that are created inside the call, without exiting the program. Then you can read the SY-MSG* system fields to get the actual error message and take the neccessary action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'L_TO_CREATE_SINGLE'
    EXPORTING
      i_lgnum               = iv_lgnum
      i_bwlvs               = '999'
      i_matnr               = iv_matnr
      i_werks               = iv_werks
      i_charg               = iv_charg
      i_anfme               = lv_qty
      i_altme               = lv_unit
      i_vltyp               = iv_vltyp
      i_vlpla               = iv_vlpla
      i_nltyp               = iv_nltyp
      i_nlpla               = iv_nlpla
    IMPORTING
      e_tanum               = ev_tanum
    EXCEPTIONS
      no_to_created         = 1
      bwlvs_wrong           = 2
      betyp_wrong           = 3
      benum_missing         = 4
      betyp_missing         = 5
      foreign_lock          = 6
      vltyp_wrong           = 7
      vlpla_wrong           = 8
      vltyp_missing         = 9
      nltyp_wrong           = 10
      nlpla_wrong           = 11
      nltyp_missing         = 12
      rltyp_wrong           = 13
      rlpla_wrong           = 14
      rltyp_missing         = 15
      squit_forbidden       = 16
      manual_to_forbidden   = 17
      letyp_wrong           = 18
      vlpla_missing         = 19
      nlpla_missing         = 20
      sobkz_wrong           = 21
      sobkz_missing         = 22
      sonum_missing         = 23
      bestq_wrong           = 24
      lgber_wrong           = 25
      xfeld_wrong           = 26
      date_wrong            = 27
      drukz_wrong           = 28
      ldest_wrong           = 29
      update_without_commit = 30
      no_authority          = 31
      material_not_found    = 32
      lenum_wrong           = 33
      error_message         = 34
      OTHERS                = 35.

  IF sy-subrc NE 0.
    IF sy-subrc NE 34.
*    Error message based on exception
      MESSAGE e111(zrf) WITH sy-subrc.
    ELSE.
*     Read error message from SY-MSG* fields
      MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help others with the same issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Leif&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 12:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986327#M1341655</guid>
      <dc:creator>leif_almgren</dc:creator>
      <dc:date>2010-07-14T12:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function module  L_TO_CREATE_SINGLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986328#M1341656</link>
      <description>&lt;P&gt;Great answer, it helped me with the same issue I had, thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 08:39:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-l-to-create-single/m-p/5986328#M1341656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-06-06T08:39:45Z</dc:date>
    </item>
  </channel>
</rss>

