<?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: the create function does not working by using (business API) in RAP application in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13630909#M2027005</link>
    <description>&lt;P&gt;i already typed this code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_0-1709800415737.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/77014i0D5BA7169E2413C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_0-1709800415737.png" alt="K1mo130_0-1709800415737.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and i got this error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_1-1709800523472.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/77021i9A9B9D755022092E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_1-1709800523472.png" alt="K1mo130_1-1709800523472.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is that has to do with the "Behavior Definition" or "Metadata Extentions"?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 08:36:51 GMT</pubDate>
    <dc:creator>K1mo130</dc:creator>
    <dc:date>2024-03-07T08:36:51Z</dc:date>
    <item>
      <title>the create function does not working by using (business API) in RAP application</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13629447#M2026979</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm trying to use&amp;nbsp;BAPI_ALM_NOTIF_CREATE to implement the create function but it doesn't work for me, i tried this code in "Behavior Implementation":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_0-1709715550387.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/76278i1AC4BA2347F9A0F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_0-1709715550387.png" alt="K1mo130_0-1709715550387.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and here's the code on file "zcl_09_call_bapi_k" to call the BAPIs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_2-1709715704520.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/76283iF208548F36A9BD4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_2-1709715704520.png" alt="K1mo130_2-1709715704520.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and i already added the field by using the UI annotations but i when i create a data then i got an empty data field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermafbeelding 2024-03-05 134248.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/76284i18F3E7A7541B3A2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Schermafbeelding 2024-03-05 134248.png" alt="Schermafbeelding 2024-03-05 134248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;did i missed something on the code?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 09:07:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13629447#M2026979</guid>
      <dc:creator>K1mo130</dc:creator>
      <dc:date>2024-03-06T09:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: the create function does not working by using (business API) in RAP application</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13630112#M2026999</link>
      <description>&lt;P&gt;After the call of the BAPI, you have to loop at the RETURN table looking for 'E' Error or 'A' Abort type message, if none found it's okay else an error was triggerred -&amp;nbsp;&lt;A href="https://help.sap.com/docs/search?q=Calling%20BAPIs%20from%20ABAP&amp;amp;locale=en-US&amp;amp;format=standard,html,pdf,others" target="_self"&gt;&lt;SPAN class=""&gt;Calling BAPIs from ABAP&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:33:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13630112#M2026999</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2024-03-06T15:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: the create function does not working by using (business API) in RAP application</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13630909#M2027005</link>
      <description>&lt;P&gt;i already typed this code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_0-1709800415737.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/77014i0D5BA7169E2413C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_0-1709800415737.png" alt="K1mo130_0-1709800415737.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and i got this error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_1-1709800523472.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/77021i9A9B9D755022092E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_1-1709800523472.png" alt="K1mo130_1-1709800523472.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is that has to do with the "Behavior Definition" or "Metadata Extentions"?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13630909#M2027005</guid>
      <dc:creator>K1mo130</dc:creator>
      <dc:date>2024-03-07T08:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: the create function does not working by using (business API) in RAP application</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13631274#M2027015</link>
      <description>&lt;P&gt;You forgot to pass some mandatory field values (here notification type)&lt;/P&gt;&lt;P&gt;Also note that&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In case of success message (type S) or even warning message (type W) then RETURN is not empty but the call was correct. (if you receive a temporary notification number, then the call was correct)&lt;BR /&gt;BAPI_ALM_NOTIF_SAVE can also fill the RETURN table.&lt;/LI&gt;&lt;LI&gt;Read also&amp;nbsp;&lt;A title="When you use the Notification BAPI &amp;quot;BAPI_ALM_NOTIF_CREATE&amp;quot; to create a notification, BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT are called as suggested. However, you failed to find out which notification number was created. " href="https://me.sap.com/notes/604300/E" target="_self"&gt;3379615 - BAPI_ALM_NOTIF_SAVE doesn't return notification number&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So, correct your code&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In case of Success or Warning message, you don't look for Error or Abort Message and don't map the temporary notification number.&lt;/LI&gt;&lt;LI&gt;In case of Error or Abort message, you continue with the next call.&lt;/LI&gt;&lt;LI&gt;You didn' check RETURN parameter after the second BAPI call.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 13:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13631274#M2027015</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2024-03-12T13:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: the create function does not working by using (business API) in RAP application</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13634112#M2027068</link>
      <description>&lt;P&gt;well it finally works, here what i did:&lt;/P&gt;&lt;P&gt;CLASS zcl_09_call_bapi_k DEFINITION&lt;BR /&gt;PUBLIC&lt;BR /&gt;FINAL&lt;BR /&gt;CREATE PUBLIC .&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;BR /&gt;METHODS call_bapi.&lt;/P&gt;&lt;P&gt;PROTECTED SECTION.&lt;BR /&gt;PRIVATE SECTION.&lt;BR /&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;CLASS zcl_09_call_bapi_k IMPLEMENTATION.&lt;BR /&gt;METHOD call_bapi.&lt;BR /&gt;DATA: ls_notifheader TYPE bapi2080_nothdri,&lt;BR /&gt;lt_return TYPE TABLE OF bapiret2,&lt;BR /&gt;lt_notitem TYPE TABLE OF bapi2080_notitemi,&lt;BR /&gt;lv_notif_type TYPE qmart,&lt;BR /&gt;lv_notification_key TYPE qmnum. " Add this variable&lt;BR /&gt;* lt_number TYPE qmnum.&lt;/P&gt;&lt;P&gt;* ls_notifheader-notif_date = 'Q1'. " Notification types&lt;BR /&gt;* ls_notifheader-short_text = 'Test notification'. " Short text for the notification&lt;BR /&gt;* ls_notifheader-funct_loc = '1000'. " Functional location&lt;BR /&gt;*&lt;BR /&gt;lv_notif_type = 'Y8'.&lt;BR /&gt;DATA:ls_new_notification_header type bapi2080_nothdre.&lt;BR /&gt;TRY.&lt;BR /&gt;CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'&lt;BR /&gt;EXPORTING&lt;BR /&gt;notifheader = ls_notifheader&lt;BR /&gt;notif_type = lv_notif_type&lt;BR /&gt;IMPORTING&lt;BR /&gt;notifheader_export = ls_new_notification_header&lt;BR /&gt;TABLES&lt;BR /&gt;notitem = lt_notitem&lt;BR /&gt;return = lt_return.&lt;/P&gt;&lt;P&gt;IF lt_return IS INITIAL.&lt;BR /&gt;WRITE: / 'Notification created successfully.'.&lt;BR /&gt;" Save the notification data&lt;BR /&gt;CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'&lt;BR /&gt;EXPORTING&lt;BR /&gt;number = ls_new_notification_header-notif_no&lt;BR /&gt;IMPORTING&lt;BR /&gt;notifheader = ls_new_notification_header&lt;BR /&gt;TABLES&lt;BR /&gt;return = lt_return.&lt;BR /&gt;&lt;BR /&gt;" Store the notification key&lt;BR /&gt;lv_notification_key = ls_new_notification_header-notif_no.&lt;BR /&gt;WRITE: / 'Notification key:', lv_notification_key.&lt;BR /&gt;&lt;BR /&gt;ELSE.&lt;BR /&gt;LOOP AT lt_return INTO DATA(ls_message).&lt;BR /&gt;IF ls_message-type = 'E' OR ls_message-type = 'A'.&lt;BR /&gt;" Handle error or abort message&lt;BR /&gt;WRITE: / 'Error type:', ls_message-type, ', Error:', ls_message-message.&lt;BR /&gt;ENDIF.&lt;BR /&gt;ENDLOOP.&lt;BR /&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CATCH cx_sy_dyn_call_param_missing INTO DATA(lx_param_missing).&lt;BR /&gt;" Handle the exception&lt;BR /&gt;WRITE: / 'Exception raised:', lx_param_missing-&amp;gt;get_text( ).&lt;/P&gt;&lt;P&gt;CATCH cx_sy_itab_duplicate_key INTO DATA(lx_duplicate_KEY).&lt;BR /&gt;" Handle the exception&lt;BR /&gt;WRITE: / 'Exception raised:', lx_duplicate_KEY-&amp;gt;get_text( ).&lt;/P&gt;&lt;P&gt;CATCH cx_sy_no_handler INTO DATA(lx_no_handler).&lt;BR /&gt;" Handle the exception&lt;BR /&gt;WRITE: / 'Exception raised:', lx_no_handler-&amp;gt;get_text( ).&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but right now if i create a new data then i got an empty key:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_0-1710161626559.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/78562i726C7425C714A4DD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_0-1710161626559.png" alt="K1mo130_0-1710161626559.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is there any way that i could fill this empty key with unique value?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 12:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13634112#M2027068</guid>
      <dc:creator>K1mo130</dc:creator>
      <dc:date>2024-03-11T12:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: the create function does not working by using (business API) in RAP application</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13634122#M2027070</link>
      <description>&lt;P&gt;here what i did on the "Behavior Definitions" for "ZR_NOTIFICATION_KTP":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_1-1710161744725.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/78564iD8A8057D9EA6CC9C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_1-1710161744725.png" alt="K1mo130_1-1710161744725.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and i made another "Behavior Definitions" for the actual create "ZC_NOTIFICATION_KTP":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="K1mo130_2-1710161788832.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/78565i27AD6D9DBABD7112/image-size/medium?v=v2&amp;amp;px=400" role="button" title="K1mo130_2-1710161788832.png" alt="K1mo130_2-1710161788832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 12:57:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/the-create-function-does-not-working-by-using-business-api-in-rap/m-p/13634122#M2027070</guid>
      <dc:creator>K1mo130</dc:creator>
      <dc:date>2024-03-11T12:57:37Z</dc:date>
    </item>
  </channel>
</rss>

