<?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: delete the record in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012866#M411038</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Global variables inthe program&lt;/P&gt;&lt;P&gt;DATA : RETURN LIKE BAPIRETURN1.&lt;/P&gt;&lt;P&gt;DATA : KEY LIKE BAPIPAKEY.&lt;/P&gt;&lt;P&gt;DATA : RETURNE LIKE BAPIRETURN1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;            employee(8),&lt;/P&gt;&lt;P&gt;            reason_type(2),&lt;/P&gt;&lt;P&gt;            reason_code(2),&lt;/P&gt;&lt;P&gt;            return_date like sy-datum,&lt;/P&gt;&lt;P&gt;end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read the data into the internal table from an external text file, then I upload the record(RLOA) into actions infotype using BDC session, then I need to delete the record for the same employee in 0019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I am missing the RECORD parameter, hwo can i get that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** check to see whether there is a RLOA record for the employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select single * from pa0000 where pernr = itab1-employee and&lt;/P&gt;&lt;P&gt;       massn = 'z7' and begda = itab1-return_date.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      error-employee = itab1-employee.&lt;/P&gt;&lt;P&gt;      error-reason = 'RLOA exists for the employee'.&lt;/P&gt;&lt;P&gt;      append error.&lt;/P&gt;&lt;P&gt;      continue.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;    clear bdcdata.&lt;/P&gt;&lt;P&gt;    refresh bdcdata.&lt;/P&gt;&lt;P&gt;    perform load_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="9" type="ul"&gt;&lt;P&gt;If the RLOA record is created in Actions infotype delete&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;the record in monitoring of tasks record in IT0019&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;     if g_monitoringflag = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="5" type="ul"&gt;&lt;P&gt;format the date to mm/dd/yyyy&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;        v_returndate = itab1-return_date.&lt;/P&gt;&lt;P&gt;        concatenate v_returndate&lt;EM&gt;0(2) '/' v_returndate&lt;/EM&gt;2(2) '/'&lt;/P&gt;&lt;P&gt;        v_returndate+4(4) into v_formatdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;        NUMBER = itab1-employee&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = RETURNE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         INFTY = '0019'&lt;/P&gt;&lt;P&gt;         NUMBER = itab1-employee&lt;/P&gt;&lt;P&gt;         SUBTYPE = 'Z9'&lt;/P&gt;&lt;P&gt;         VALIDITYEND = itab1-return_date&lt;/P&gt;&lt;P&gt;         VALIDITYBEGIN = itab1-return_date&lt;/P&gt;&lt;P&gt;         TMART ='Z9'&lt;/P&gt;&lt;P&gt;         TERMN = itab1-return_date&lt;/P&gt;&lt;P&gt;         OPERATION = 'DEL'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        TCLAS = 'A'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         DIALOG_MODE = '0'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = RETURN&lt;/P&gt;&lt;P&gt;        KEY = KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IF RETURN IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;       WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Error Occurred'.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;       NUMBER = itab1-employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           clear:g_monitoringflag, v_formatdate.&lt;/P&gt;&lt;P&gt;           else.&lt;/P&gt;&lt;P&gt;          error-employee = itab1-employee.&lt;/P&gt;&lt;P&gt;          error-reason = 'No record created for RLOA'.&lt;/P&gt;&lt;P&gt;          clear:v_formatdate.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2007 15:34:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-23T15:34:29Z</dc:date>
    <item>
      <title>delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012860#M411032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to delete a record from pa0019. Of course I am not deleting the record directly but copying the existing record into the workarea and deletingit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, query of selecting the record from table is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: pa0019.&lt;/P&gt;&lt;P&gt;data: wa_pa0019 like pa0019 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single * from pa0019 into wa_pa0019 where pernr = 'v_pernr'&lt;/P&gt;&lt;P&gt;and tmart = 'Z9' and termn = '07/07/2005'.&lt;/P&gt;&lt;P&gt; delete pa0019 from wa_pa0019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see a record for this employeeid in the table pa0019. why is not retrieving any record?  Am I missing something here? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is simple, and have done this before too, but not able to recall what is the problem here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts, &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 13:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012860#M411032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T13:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012861#M411033</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;select single * from pa0019 into wa_pa0019 where pernr = 'v_pernr'&lt;/P&gt;&lt;P&gt;and tmart = 'Z9' and termn = '07/07/2005'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using this u can select only one record.&lt;/P&gt;&lt;P&gt;that will be deleted from ur code.but there may be some other record in uthat table which satisfy the same where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 14:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012861#M411033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T14:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012862#M411034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be using PA30 or the function call to HR_INFOTYPE_OPERATION to delete an Infotype record. Deleting directly from the database might affect data integrity/consistency as the validations that go with the Business Logic are not accounted for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 14:13:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012862#M411034</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2007-03-23T14:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012863#M411035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi skmysore ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In select statement u mentioned termn = '07/07/2005' ,where as it should be like '20050707'. And also u have declared wa_pa0019  as internal instead of workarea. Plz check  it out .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 14:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012863#M411035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T14:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012864#M411036</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 the function module to delete the records, however I am getting an error&lt;/P&gt;&lt;P&gt;Here is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;        NUMBER = itab1-employee&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = RETURNE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         INFTY = '0019'&lt;/P&gt;&lt;P&gt;         NUMBER = itab1-employee&lt;/P&gt;&lt;P&gt;         SUBTYPE = 'Z9'&lt;/P&gt;&lt;P&gt;         VALIDITYEND = itab1-return_date (yyyymmdd)&lt;/P&gt;&lt;P&gt;         VALIDITYBEGIN = itab1-return_date&lt;/P&gt;&lt;P&gt;         TMART ='Z9'&lt;/P&gt;&lt;P&gt;         TERMN = itab1-return_date&lt;/P&gt;&lt;P&gt;         OPERATION = 'DEL'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        TCLAS = 'A'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         DIALOG_MODE = '0'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = RETURN&lt;/P&gt;&lt;P&gt;        KEY = KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF RETURN IS NOT INITIAL.  **** error here&lt;/P&gt;&lt;P&gt;Incorrect logical expression: Comparison/SELECT-OPTION can only be followed by  'AND', 'OR'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Error Occurred'.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;       NUMBER = itab1-employee.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not using any selection option I am uploading the file intot he internal table and entering new records using BDC and deleting the record from 0019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what is wrong here?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 15:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012864#M411036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T15:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012865#M411037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you paste your complete code?Your function call doesn't look correct. Are you sure you are passing the RECORD parameter? It would help, if you can paste the code as is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 15:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012865#M411037</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2007-03-23T15:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012866#M411038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Global variables inthe program&lt;/P&gt;&lt;P&gt;DATA : RETURN LIKE BAPIRETURN1.&lt;/P&gt;&lt;P&gt;DATA : KEY LIKE BAPIPAKEY.&lt;/P&gt;&lt;P&gt;DATA : RETURNE LIKE BAPIRETURN1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab1 occurs 0,&lt;/P&gt;&lt;P&gt;            employee(8),&lt;/P&gt;&lt;P&gt;            reason_type(2),&lt;/P&gt;&lt;P&gt;            reason_code(2),&lt;/P&gt;&lt;P&gt;            return_date like sy-datum,&lt;/P&gt;&lt;P&gt;end of itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read the data into the internal table from an external text file, then I upload the record(RLOA) into actions infotype using BDC session, then I need to delete the record for the same employee in 0019.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I am missing the RECORD parameter, hwo can i get that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** check to see whether there is a RLOA record for the employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  select single * from pa0000 where pernr = itab1-employee and&lt;/P&gt;&lt;P&gt;       massn = 'z7' and begda = itab1-return_date.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      error-employee = itab1-employee.&lt;/P&gt;&lt;P&gt;      error-reason = 'RLOA exists for the employee'.&lt;/P&gt;&lt;P&gt;      append error.&lt;/P&gt;&lt;P&gt;      continue.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;    clear bdcdata.&lt;/P&gt;&lt;P&gt;    refresh bdcdata.&lt;/P&gt;&lt;P&gt;    perform load_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="9" type="ul"&gt;&lt;P&gt;If the RLOA record is created in Actions infotype delete&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;LI level="4" type="ul"&gt;&lt;P&gt;the record in monitoring of tasks record in IT0019&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;     if g_monitoringflag = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="5" type="ul"&gt;&lt;P&gt;format the date to mm/dd/yyyy&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;        v_returndate = itab1-return_date.&lt;/P&gt;&lt;P&gt;        concatenate v_returndate&lt;EM&gt;0(2) '/' v_returndate&lt;/EM&gt;2(2) '/'&lt;/P&gt;&lt;P&gt;        v_returndate+4(4) into v_formatdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;        NUMBER = itab1-employee&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = RETURNE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'HR_INFOTYPE_OPERATION'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         INFTY = '0019'&lt;/P&gt;&lt;P&gt;         NUMBER = itab1-employee&lt;/P&gt;&lt;P&gt;         SUBTYPE = 'Z9'&lt;/P&gt;&lt;P&gt;         VALIDITYEND = itab1-return_date&lt;/P&gt;&lt;P&gt;         VALIDITYBEGIN = itab1-return_date&lt;/P&gt;&lt;P&gt;         TMART ='Z9'&lt;/P&gt;&lt;P&gt;         TERMN = itab1-return_date&lt;/P&gt;&lt;P&gt;         OPERATION = 'DEL'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        TCLAS = 'A'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         DIALOG_MODE = '0'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;        RETURN = RETURN&lt;/P&gt;&lt;P&gt;        KEY = KEY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     IF RETURN IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;       WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'Error Occurred'.&lt;/P&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;       NUMBER = itab1-employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           clear:g_monitoringflag, v_formatdate.&lt;/P&gt;&lt;P&gt;           else.&lt;/P&gt;&lt;P&gt;          error-employee = itab1-employee.&lt;/P&gt;&lt;P&gt;          error-reason = 'No record created for RLOA'.&lt;/P&gt;&lt;P&gt;          clear:v_formatdate.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;SK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 15:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012866#M411038</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T15:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: delete the record</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012867#M411039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi skmysore,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the documentation of this FM says&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                                                        &lt;/P&gt;&lt;P&gt;This function module enables you to maintain master data for employees  &lt;/P&gt;&lt;P&gt;and applicants. You can transfer one data record. All validation checks &lt;/P&gt;&lt;P&gt;take place that would take place in the individual maintenance screens  &lt;/P&gt;&lt;P&gt;in the dialog. If necessary, the module returns an error message. &amp;lt;b&amp;gt;The   &lt;/P&gt;&lt;P&gt;error messages are the same as the error messages in the dialog,&amp;lt;/b&amp;gt; that   &lt;/P&gt;&lt;P&gt;is, the individual maintenance screen error messages are transferred    &lt;/P&gt;&lt;P&gt;rather than interpreted by this module.                                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you should try this first in dialog. If this works fine, you have to debug the process. You can set a breakpoint on statement MESSAGE and/or check where (and why) the BAPIRETURN table is filled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestion: A good method for testing BAPI results is to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL REUSE_ALV_GRID_DIPLAY
    exporting
       I_STRUCTURE_NAME = 'BAPIRET1' for this FM, usually BAPITET2
    TABLES
      t_outtab                           = RETURN
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This enables you to study, save, copy easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 15:40:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-the-record/m-p/2012867#M411039</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-03-23T15:40:43Z</dc:date>
    </item>
  </channel>
</rss>

