<?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 for function location in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503848#M1258920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kumar ,&lt;/P&gt;&lt;P&gt;           You need to first go to transaction SE11 and then select the option lock.And in the tables option you need to place the table on to which the lock should be placed.While creating the lock you need to begin with the letter EZ which is the convention.Then while using it in the program you should call the lock as a FM - starting with ENQUEUE_LOCKNAME and DEQUEUE_FMNAME.&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;                      Regards,&lt;/P&gt;&lt;P&gt;                                   varghese&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: varghese oommen on Apr 28, 2009 6:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2009 12:42:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-28T12:42:20Z</dc:date>
    <item>
      <title>function module for function location</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503847#M1258919</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 want to implement locking concept in a report where I need to lock the function location (IL02), can any one please help me in getting the ENQUEUE AND DEQUEUE Function module .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shaw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 12:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503847#M1258919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-28T12:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: function module for function location</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503848#M1258920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kumar ,&lt;/P&gt;&lt;P&gt;           You need to first go to transaction SE11 and then select the option lock.And in the tables option you need to place the table on to which the lock should be placed.While creating the lock you need to begin with the letter EZ which is the convention.Then while using it in the program you should call the lock as a FM - starting with ENQUEUE_LOCKNAME and DEQUEUE_FMNAME.&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;                      Regards,&lt;/P&gt;&lt;P&gt;                                   varghese&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: varghese oommen on Apr 28, 2009 6:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 12:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503848#M1258920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-28T12:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: function module for function location</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503849#M1258921</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;Refer below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORM sub_update_database  USING    gt_hdrlog TYPE ty_t_monitor&lt;/P&gt;&lt;P&gt;                                   gt_itmlog TYPE ty_t_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Local data declaration&lt;/P&gt;&lt;P&gt;  DATA : ls_errormsg TYPE zapt_ar_error,   "Error Table&lt;/P&gt;&lt;P&gt;         ls_monitor  TYPE zapt_ar_monitor. "Monitor table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Local Constant declaration&lt;/P&gt;&lt;P&gt;  CONSTANTS : lc_x TYPE c VALUE 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Sort table by idoc number and legacy vendor&lt;/P&gt;&lt;P&gt;  SORT gt_hdrlog BY doc_num altkn.&lt;/P&gt;&lt;P&gt;*--Delete Duplicate values from Header log internal table&lt;/P&gt;&lt;P&gt;  DELETE ADJACENT DUPLICATES FROM gt_hdrlog COMPARING doc_num altkn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Check if monitor table is initial&lt;/P&gt;&lt;P&gt;  IF NOT gt_hdrlog[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT gt_hdrlog INTO ls_monitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Lock the DB table ZAPT_AR_MONITOR before updation&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EZAPT_AR_MONITOR'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_zapt_ar_monitor = lc_x                 "Check&lt;/P&gt;&lt;P&gt;          mandt                = sy-mandt             "Cient&lt;/P&gt;&lt;P&gt;          doc_num              = ls_monitor-doc_num   "IDOC number&lt;/P&gt;&lt;P&gt;          x_doc_num            = lc_x                 "Check&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          foreign_lock         = 1&lt;/P&gt;&lt;P&gt;          system_failure       = 2&lt;/P&gt;&lt;P&gt;          OTHERS               = 3.&lt;/P&gt;&lt;P&gt;      IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;        WAIT UP TO 1 SECONDS.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;*--If DB table is locked then insert data into custom table&lt;/P&gt;&lt;P&gt;        INSERT into zapt_ar_monitor values ls_monitor.&lt;/P&gt;&lt;P&gt;        IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;*--Update custom table&lt;/P&gt;&lt;P&gt;          UPDATE zapt_ar_monitor FROM ls_monitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Unlock the table after updation&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_EZAPT_AR_MONITOR'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_zapt_ar_monitor = lc_x                 "Check&lt;/P&gt;&lt;P&gt;          mandt                = sy-mandt             "Client&lt;/P&gt;&lt;P&gt;          doc_num              = ls_monitor-doc_num   "IDOC Number&lt;/P&gt;&lt;P&gt;          x_doc_num            = lc_x.                "Check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Clear the work areas&lt;/P&gt;&lt;P&gt;      CLEAR : ls_monitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Check if the internal table for error messages is initial&lt;/P&gt;&lt;P&gt;  IF NOT gt_itmlog[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    LOOP AT gt_itmlog INTO ls_errormsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Lock the DB table ZAPT_AR_ERROR before updation&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EZAPT_AR_ERROR'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_zapt_ar_error = lc_x                  "Check&lt;/P&gt;&lt;P&gt;          mandt              = sy-mandt              "Client&lt;/P&gt;&lt;P&gt;          idoc               = ls_errormsg-idoc      "IDOC Number&lt;/P&gt;&lt;P&gt;          line_nbr           = ls_errormsg-line_nbr  "Line Number&lt;/P&gt;&lt;P&gt;          err_nbr            = ls_errormsg-err_nbr   "error Number&lt;/P&gt;&lt;P&gt;          x_idoc             = lc_x                  "Check&lt;/P&gt;&lt;P&gt;          x_line_nbr         = lc_x                  "Check&lt;/P&gt;&lt;P&gt;          x_err_nbr          = lc_x                  "Check&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          foreign_lock       = 1&lt;/P&gt;&lt;P&gt;          system_failure     = 2&lt;/P&gt;&lt;P&gt;          OTHERS             = 3.&lt;/P&gt;&lt;P&gt;      IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;        WAIT UP TO 1 SECONDS.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--If DB table is locked then modify the table&lt;/P&gt;&lt;P&gt;        INSERT into zapt_ar_error values ls_errormsg.&lt;/P&gt;&lt;P&gt;        IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;*--Update custom table&lt;/P&gt;&lt;P&gt;          UPDATE zapt_ar_error FROM ls_errormsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Unlock the table after modification&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_EZAPT_AR_ERROR'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          mode_zapt_ar_error = lc_x                 "Check&lt;/P&gt;&lt;P&gt;          mandt              = sy-mandt             "Client&lt;/P&gt;&lt;P&gt;          idoc               = ls_errormsg-idoc     "IDOC Number&lt;/P&gt;&lt;P&gt;          line_nbr           = ls_errormsg-line_nbr "Line Number&lt;/P&gt;&lt;P&gt;          err_nbr            = ls_errormsg-err_nbr  "Error Number&lt;/P&gt;&lt;P&gt;          x_idoc             = lc_x                 "Check&lt;/P&gt;&lt;P&gt;          x_line_nbr         = lc_x                 "Check&lt;/P&gt;&lt;P&gt;          x_err_nbr          = lc_x.                "Check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Clear the work areas&lt;/P&gt;&lt;P&gt;      CLEAR : ls_errormsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&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;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 12:43:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503849#M1258921</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2009-04-28T12:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: function module for function location</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503850#M1258922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having just one confusion that, Is it be correct to implement customize lock object in the report.&lt;/P&gt;&lt;P&gt;I am just pointing this because in the existing report there is standard function module like&lt;/P&gt;&lt;P&gt;ENQUEUE_EIQMEL, DEQUEUE_EIQMEL for notification number.&lt;/P&gt;&lt;P&gt;Please Help me in this confusion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;shaw&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2009 13:25:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-function-location/m-p/5503850#M1258922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-28T13:25:33Z</dc:date>
    </item>
  </channel>
</rss>

