<?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: Regarding BAPI_ENTRYSHEET_CREATE . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390703#M1044089</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;after calling FM:BAPI_ENTRYSHEET_CREATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call below FM:&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;jana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Aug 2008 11:26:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-20T11:26:33Z</dc:date>
    <item>
      <title>Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390702#M1044088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;We are trying to create Service entry sheet using BAPI_ENTRYSHEET_CREATE using the follwonig code:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: wa_header TYPE bapiessrc,
  i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
  ws_entrysheet_no TYPE bapiessr-sheet_no,
  i_service TYPE bapiesllc OCCURS 0 WITH HEADER LINE,
  i_service_acc TYPE bapiesklc OCCURS 0 WITH HEADER LINE,
  i_service_text TYPE bapieslltx OCCURS 0 WITH HEADER LINE,
  i_account TYPE bapiesknc OCCURS 0 WITH HEADER LINE,
  i_accass TYPE bapiesknc OCCURS 0 WITH HEADER LINE,
  ws_pack_no TYPE packno.


  DATA: ws_po TYPE bapiekko-po_number,
  po_items TYPE bapiekpo OCCURS 0 WITH HEADER LINE,
  po_services TYPE bapiesll OCCURS 0 WITH HEADER LINE,
  po_accass TYPE bapiekkn OCCURS 0 WITH HEADER LINE.

  DATA: BEGIN OF wa_po_header OCCURS 1.
          INCLUDE STRUCTURE bapiekkol.
  DATA: END OF wa_po_header.

  DATA: BEGIN OF bapi_return_po OCCURS 1.
          INCLUDE STRUCTURE bapireturn.
  DATA: END OF bapi_return_po.

  DATA: serial_no LIKE bapiesknc-serial_no,
  line_no LIKE bapiesllc-line_no.

  DATA: bapi_esll LIKE bapiesllc OCCURS 1 WITH HEADER LINE.

  ws_po = '4500146696'.

  CALL FUNCTION 'BAPI_PO_GETDETAIL'
    EXPORTING
      purchaseorder              = ws_po
      items                      = 'X'
      services                   = 'X'
      
    IMPORTING
      po_header                  = wa_po_header
    TABLES
      po_items                   = po_items
      po_item_services           = po_services
      
      return                     = bapi_return_po.

  wa_header-po_number  = po_items-po_number.
  wa_header-po_item    = po_items-po_item.
  wa_header-short_text = 'Sample'.
  wa_header-pckg_no    = 1.
  wa_header-acceptance = 'X'.
  wa_header-doc_date   = '20080819'.
  wa_header-post_date  = '20080819'.

  serial_no = 0.
  line_no = 1.

  bapi_esll-pckg_no    = 1.
  bapi_esll-line_no    = line_no.
  bapi_esll-outl_level = '0'.
  bapi_esll-outl_ind   = 'X'.
  bapi_esll-subpckg_no = 2.
  APPEND bapi_esll.


  LOOP AT po_services WHERE NOT short_text IS INITIAL.
    line_no = line_no + 1.
    CLEAR bapi_esll.
    bapi_esll-pckg_no    = 2.
    bapi_esll-line_no    = line_no.
    bapi_esll-service    = po_services-service.
*    bapi_esll-quantity   = po_services-quantity.
    bapi_esll-quantity   = 1.
    bapi_esll-gr_price   = po_services-gr_price.
    bapi_esll-price_unit = po_services-price_unit.
    APPEND bapi_esll.
  ENDLOOP.
  LOOP AT po_accass .
    i_accass-gl_account = po_accass-g_l_acct.
    i_accass-bus_area = po_accass-bus_area.
    i_accass-costcenter = po_accass-cost_ctr.
    i_accass-co_area = po_accass-co_area.
    APPEND i_accass.
  ENDLOOP.
  CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
    EXPORTING
      entrysheetheader            = wa_header
    IMPORTING
      entrysheet                  = ws_entrysheet_no
    TABLES
      entrysheetservices          = bapi_esll
      entrysheetaccountassignment = i_accass
      return                      = i_return.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In debugging we get a proper value in the parameter ws_entrysheet_no , but when we check in ml81n usig this ws_entrysheet_no&lt;/P&gt;&lt;P&gt;we get the error 'ws_entrysheet_no does not exists'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the reason?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anubhav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 09:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390702#M1044088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-20T09:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390703#M1044089</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;after calling FM:BAPI_ENTRYSHEET_CREATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call below FM:&lt;/P&gt;&lt;P&gt;BAPI_TRANSACTION_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;jana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 11:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390703#M1044089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-20T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390704#M1044090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janardhan,&lt;/P&gt;&lt;P&gt;Even after using BAPI_TRANSACTION_COMMIT  , i am facing the same issue.&lt;/P&gt;&lt;P&gt;But if remove the following code lines from the code in my previous post , i can see the SES in ml81n:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; wa_header-acceptance = 'X'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help,&lt;/P&gt;&lt;P&gt;Anubhav.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anubhav Jain on Aug 22, 2008 7:34 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 04:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390704#M1044090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T04:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390705#M1044091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anubhav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'
     EXPORTING
          ENTRYSHEETHEADER             = BAPI_ESSR
          TESTRUN                       = ' '"this parameter should be there
     TABLES
          ENTRYSHEETACCOUNTASSIGNMENT = BAPI_ESKN
          ENTRYSHEETSERVICES          = BAPI_ESLL
          ENTRYSHEETSRVACCASSVALUES   = BAPI_ESKL
          RETURN                      = BAPI_RETURN.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 05:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390705#M1044091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T05:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390706#M1044092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TESTRUN is an optional parameter with default value as SPACE .&lt;/P&gt;&lt;P&gt;Though we try using it , still it makes no difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anubhav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 05:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390706#M1044092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T05:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390707#M1044093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although it is optional but it should pass by value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however pls take ahelp from OSS 505157,772974,574630,756917&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 05:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390707#M1044093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T05:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding BAPI_ENTRYSHEET_CREATE .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390708#M1044094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;Now we are getting the error '"Delivery note already used by the vendor"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any clue?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anubhav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 06:46:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-bapi-entrysheet-create/m-p/4390708#M1044094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T06:46:52Z</dc:date>
    </item>
  </channel>
</rss>

