<?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: Error message return in RH_INSERT_INFTY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050482#M1611734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the thing is that when the exceptions are returned the system fields are not populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jul 2011 08:51:41 GMT</pubDate>
    <dc:creator>john_wayne</dc:creator>
    <dc:date>2011-07-12T08:51:41Z</dc:date>
    <item>
      <title>Error message return in RH_INSERT_INFTY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050478#M1611730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any idea on how to return error messages from FM RH_INSERT_INFTY? im looking for something similar to HR_INFOTYPE_OPERATION bapi return 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 02:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050478#M1611730</guid>
      <dc:creator>john_wayne</dc:creator>
      <dc:date>2011-07-12T02:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error message return in RH_INSERT_INFTY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050479#M1611731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just handling its Exceptions should be enough as it does not have any RETURN tables like the other ones. This is how I did it sometimes ago, you might find it helpful to refer to the below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM update_pd_infty  USING    pt_old_pnnnn TYPE piq_p1001_t
                               ps_new_pnnnn TYPE p1001
                      CHANGING pv_ok        TYPE boole_d.

  DATA:
    wplog_record       TYPE wplog,
    wplog_record_tab   TYPE wplog_tab.

  FIELD-SYMBOLS:
    &amp;lt;ls_old_pnnnn&amp;gt;     TYPE p1001.

* check the old &amp;amp; new infotype records are not passed blank
  CHECK:
     pt_old_pnnnn IS NOT INITIAL,
     ps_new_pnnnn IS NOT INITIAL.

* convert the Old PNNNN structure to WPLOG structure
  LOOP AT pt_old_pnnnn ASSIGNING &amp;lt;ls_old_pnnnn&amp;gt;.
    CALL METHOD cl_hrrcf_infotype=&amp;gt;pnnnn_to_wplog
      EXPORTING
        pnnnn = &amp;lt;ls_old_pnnnn&amp;gt;
      IMPORTING
        wplog = wplog_record.

    APPEND wplog_record TO wplog_record_tab.
  ENDLOOP.

* delete the existing records (at buffer level only at this stage)
  CALL FUNCTION 'RH_DELETE_INFTY'
    EXPORTING
      vtask               = 'B'
      authy               = abap_false
    TABLES
      innnn               = wplog_record_tab
    EXCEPTIONS
      error_during_delete = 1
      no_authorization    = 2
      delete_first_record = 3
      corr_exit           = 4
      OTHERS              = 5.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    RETURN.
  ENDIF.

  CLEAR:
    wplog_record,
    wplog_record_tab.

* convert the New PNNNN structure to WPLOG structure
  CALL METHOD cl_hrrcf_infotype=&amp;gt;pnnnn_to_wplog
    EXPORTING
      pnnnn = ps_new_pnnnn
    IMPORTING
      wplog = wplog_record.

  APPEND wplog_record TO wplog_record_tab.

* insert/create the new record (at buffer level only at this stage)
  CALL FUNCTION 'RH_INSERT_INFTY'
    EXPORTING
      vtask               = 'B'
      authy               = abap_false
    TABLES
      innnn               = wplog_record_tab
    EXCEPTIONS
      no_authorization    = 1
      error_during_insert = 2
      repid_form_initial  = 3
      corr_exit           = 4
      begda_greater_endda = 5
      OTHERS              = 6.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    RETURN.
  ENDIF.

* update the database now for all buffer changes above
  CALL FUNCTION 'RH_UPDATE_DATABASE'
    EXPORTING
      vtask     = 'D'
    EXCEPTIONS
      corr_exit = 1
      OTHERS    = 2.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    RETURN.
  ENDIF.

  pv_ok = abap_true.

ENDFORM.                    " UPDATE_PD_INFTY
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sougata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 04:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050479#M1611731</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2011-07-12T04:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error message return in RH_INSERT_INFTY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050480#M1611732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;all i see is that the exception is being returned. what im looking for is how to get the error message means if its exception is 1 then should have message so and so. if not then do i have to hardcode the message?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 08:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050480#M1611732</guid>
      <dc:creator>john_wayne</dc:creator>
      <dc:date>2011-07-12T08:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error message return in RH_INSERT_INFTY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050481#M1611733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When exception is returned, you can actually have the values in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt; SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use 'BAPI_MESSAGE_GETDETAIL'  or &lt;/P&gt;&lt;P&gt;'BALW_BAPIRETURN_GET2' to get the messages by pushing the above values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ssm on Jul 12, 2011 2:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 08:22:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050481#M1611733</guid>
      <dc:creator>Shahid</dc:creator>
      <dc:date>2011-07-12T08:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error message return in RH_INSERT_INFTY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050482#M1611734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the thing is that when the exceptions are returned the system fields are not populated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2011 08:51:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-return-in-rh-insert-infty/m-p/8050482#M1611734</guid>
      <dc:creator>john_wayne</dc:creator>
      <dc:date>2011-07-12T08:51:41Z</dc:date>
    </item>
  </channel>
</rss>

