<?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: Locking Issue while creating Measurement Document by Call Transaction in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808375#M346803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you not SORT your file and update measuring point details for every measuring point one-time only? Currently, i think you are updating measuring point for each and every record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other option could be to check lock before starting BDC for that particular MP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Dec 2006 13:36:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-07T13:36:00Z</dc:date>
    <item>
      <title>Locking Issue while creating Measurement Document by Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808374#M346802</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;&lt;/P&gt;&lt;P&gt;i am writing a BDC program using call transaction for transaction IK11 to create measurement documents. The input file contains measurement readings for the same measurement point at different times. The problem i face is that sporadically it is skipping say 1 in 10 records giving a message that the measuring point is locked. It seems that the system locks were not getting released by the time the next loop pass came along. so to get past this issue, i did an explicit release of the lock object for measuring points followed by an explicit commit work. However this hasnt been enough the frequency of records skipped has just reduced to 1 of 30.&lt;/P&gt;&lt;P&gt;Can anyone help?&lt;/P&gt;&lt;P&gt;The code snippet is pasted below, which shows what i have done to get past the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Loop for all records&lt;/P&gt;&lt;P&gt;  LOOP AT it_struc1 INTO x_struc1.&lt;/P&gt;&lt;P&gt;    v_linno = v_linno + 1.&lt;/P&gt;&lt;P&gt;*-----Filling bdcdata&lt;/P&gt;&lt;P&gt;    PERFORM bdc_dynpro USING: 'SAPLIMR0'    '1210'.&lt;/P&gt;&lt;P&gt;    PERFORM bdc_field  USING: 'BDC_OKCODE'  '=GDDO',&lt;/P&gt;&lt;P&gt;                              'IMRG-POINT'  x_struc1-point,&lt;/P&gt;&lt;P&gt;                              'RIMR0-DFTIM' x_struc1-dftim,&lt;/P&gt;&lt;P&gt;                              'RIMR0-DFDAT' x_struc1-dfdat,&lt;/P&gt;&lt;P&gt;                              'RIMR0-DFRDR' x_struc1-dfrdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM bdc_dynpro USING: 'SAPLIMR0'    '5210'.&lt;/P&gt;&lt;P&gt;    PERFORM bdc_field  USING: 'BDC_OKCODE'  '=BU',&lt;/P&gt;&lt;P&gt;                              'IMRG-ITIME'  x_struc1-dftim,&lt;/P&gt;&lt;P&gt;                              'IMRG-IDATE'  x_struc1-dfdat,&lt;/P&gt;&lt;P&gt;                              'RIMR0-CNTRC' x_struc1-cntrc,&lt;/P&gt;&lt;P&gt;                              'IMRG-READR'  x_struc1-dfrdr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Create Internal format for Point&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        input  = x_struc1-point&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        output = x_struc1-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Start new transaction according to parameters&lt;/P&gt;&lt;P&gt;    PERFORM bdc_transaction USING 'IK11'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Release Locks&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'DEQUEUE_EIMPTT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        mode_imptt = 'X'&lt;/P&gt;&lt;P&gt;        mandt      = sy-mandt&lt;/P&gt;&lt;P&gt;        point      = x_struc1-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Do Explicit Commit Work&lt;/P&gt;&lt;P&gt;    COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-----Clear BDC Table&lt;/P&gt;&lt;P&gt;    REFRESH it_bdcdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 13:28:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808374#M346802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Locking Issue while creating Measurement Document by Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808375#M346803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you not SORT your file and update measuring point details for every measuring point one-time only? Currently, i think you are updating measuring point for each and every record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other option could be to check lock before starting BDC for that particular MP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 13:36:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808375#M346803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T13:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Locking Issue while creating Measurement Document by Call Transaction</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808376#M346804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried releasing the lock before the BDC, but that did not help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot sort it and upload for one measuring point one time only, as each record is a reading for a particular meas point as a recorded at a certain time, so an input file will contain say 100+ records for a single measuring point only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 15:21:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-issue-while-creating-measurement-document-by-call-transaction/m-p/1808376#M346804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T15:21:16Z</dc:date>
    </item>
  </channel>
</rss>

