<?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 Return message capture issue while using API_RE_CN_CHANGE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-message-capture-issue-while-using-api-re-cn-change/m-p/2203724#M471140</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue in capturing return messages while using API_RE_CN_CHANGE to alter a real estate contract.follows is the problem description - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;API_RE_CN_CHANGE is called to change a realestate contract(insert a condition) with key to identify the contract as "Object instance of the contract". In this case, the return message form the API is empty. this is how i use the API function module - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cf_recn_contract=&amp;gt;find&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;id_bukrs = bukrs&lt;/P&gt;&lt;P&gt;id_recnnr = recnnr&lt;/P&gt;&lt;P&gt;id_activity = reca1_activity-change " Change mode&lt;/P&gt;&lt;P&gt;if_auth_check = abap_false&lt;/P&gt;&lt;P&gt;if_enqueue = abap_true " LOck the contract&lt;/P&gt;&lt;P&gt;RECEIVING&lt;/P&gt;&lt;P&gt;ro_instance = lo_contract " getting the contract object instance&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'API_RE_CN_CHANGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;id_bukrs = g_t_contracts-bukrs " Not using this field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;id_recnnr = g_t_contracts-recnnr " Not using this field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;io_object = lo_contract&lt;/P&gt;&lt;P&gt;it_term_sr_sales = lt_term_sr_sl_intc&lt;/P&gt;&lt;P&gt;it_condition = lt_condition_intc&lt;/P&gt;&lt;P&gt;if_test_run = g_testrun_flg&lt;/P&gt;&lt;P&gt;if_msglist_instead_of_exc = 'X'&lt;/P&gt;&lt;P&gt;io_msglist = lo_msglist_t " Error messages list&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EF_STORED = ef_stored&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;ERROR = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;convert messages to bapi return list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD lo_msglist_t-&amp;gt;get_list_as_bapiret&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;et_list = g_t_return[]. " Read the messages in internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the method does not give the return message as import parameter. but all these stuff works if i call API_RE_CN_CHANGE using company code(BUKRS) &amp;amp; Contract number(RECNNR). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody suggest a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mukundhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Apr 2007 18:50:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-25T18:50:22Z</dc:date>
    <item>
      <title>Return message capture issue while using API_RE_CN_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-message-capture-issue-while-using-api-re-cn-change/m-p/2203724#M471140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue in capturing return messages while using API_RE_CN_CHANGE to alter a real estate contract.follows is the problem description - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;API_RE_CN_CHANGE is called to change a realestate contract(insert a condition) with key to identify the contract as "Object instance of the contract". In this case, the return message form the API is empty. this is how i use the API function module - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cf_recn_contract=&amp;gt;find&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;id_bukrs = bukrs&lt;/P&gt;&lt;P&gt;id_recnnr = recnnr&lt;/P&gt;&lt;P&gt;id_activity = reca1_activity-change " Change mode&lt;/P&gt;&lt;P&gt;if_auth_check = abap_false&lt;/P&gt;&lt;P&gt;if_enqueue = abap_true " LOck the contract&lt;/P&gt;&lt;P&gt;RECEIVING&lt;/P&gt;&lt;P&gt;ro_instance = lo_contract " getting the contract object instance&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'API_RE_CN_CHANGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;id_bukrs = g_t_contracts-bukrs " Not using this field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;id_recnnr = g_t_contracts-recnnr " Not using this field&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;io_object = lo_contract&lt;/P&gt;&lt;P&gt;it_term_sr_sales = lt_term_sr_sl_intc&lt;/P&gt;&lt;P&gt;it_condition = lt_condition_intc&lt;/P&gt;&lt;P&gt;if_test_run = g_testrun_flg&lt;/P&gt;&lt;P&gt;if_msglist_instead_of_exc = 'X'&lt;/P&gt;&lt;P&gt;io_msglist = lo_msglist_t " Error messages list&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;EF_STORED = ef_stored&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;ERROR = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;convert messages to bapi return list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD lo_msglist_t-&amp;gt;get_list_as_bapiret&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;et_list = g_t_return[]. " Read the messages in internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the method does not give the return message as import parameter. but all these stuff works if i call API_RE_CN_CHANGE using company code(BUKRS) &amp;amp; Contract number(RECNNR). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody suggest a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mukundhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 18:50:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-message-capture-issue-while-using-api-re-cn-change/m-p/2203724#M471140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T18:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Return message capture issue while using API_RE_CN_CHANGE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-message-capture-issue-while-using-api-re-cn-change/m-p/2203725#M471141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mukundhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While function module API_RE_CN_CHANGE may work this is not the way how I would change a contract condition. Since you are obviously working with RE-FX and dealing with a contract instance (IF_RECN_CONTRACT) I would apply the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  lo_contract              TYPE REF TO if_recn_contract,
  lo_condition_Mngr    TYPE REF TO if_recd_condition_manager,
  lo_condition             TYPE REF TO if_recd_condition.


" Create contract instance
  CALL METHOD cf_recn_contract=&amp;gt;find
    EXPORTING
      ...
    RECEIVING
      ro_instance = lo_contract
   EXCEPTIONS
     others = 1.

" Get condition manager from contract
  lo_condition_mngr = 
        lo_contract-&amp;gt;IF_RECD_HAS_CONDITION~GET_CONDITION_MNGR( ).


" Insert a new condition
   CALL METHOD lo_condition_mngr-&amp;gt;insert_condition
     EXPORTING
       ...
    RECEIVING
      ro_condition = lo_condition.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 19:57:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-message-capture-issue-while-using-api-re-cn-change/m-p/2203725#M471141</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-04-25T19:57:20Z</dc:date>
    </item>
  </channel>
</rss>

