<?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 Error in Asset Acquisition Interface in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-asset-acquisition-interface/m-p/6471674#M1417384</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;We have an Interface which creates an Improvement asset &amp;amp; acquires it. When we see the asset details in AS03, on the Depreciation areas tab, depreciation key was getting blank. This whole process happens using three jobs in sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last job actually acquires the asset. When I debugged the job, I found that the error was coming from a function module exit. The part of the code which was pdating blank posting key is as below :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-tcode = 'ABZON' OR
       sy-tcode = 'ABZO'  OR                                   
       sy-tcode = 'ABNA'  OR                                
       sy-tcode = 'AB01'  OR                                          

      lv_ddate = p_rbzdat.

    ENDIF.

 IF lv_flag = c_x.

    SELECT SINGLE  asset_class
                   fromdate
                   to_date
                   depr_key
           INTO    lwa_zfi_aatimesrs FROM zfi_aatimesrs
           WHERE  asset_class EQ p_anlkl   AND
                  fromdate    LE lv_ddate  AND
                  to_date     GE lv_ddate  AND
                  depr_area   EQ c_15.

    UPDATE anlb
    SET   afasl = lwa_zfi_aatimesrs-depr_key
    WHERE bukrs = p_bukrs
    AND   anln1 = p_anln1
    AND   anln2 = p_anln2
    AND   afabe = c_15.
  ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the LV_DATE was not getting populated &amp;amp;  SELECT query was getting getting failed &amp;amp; the update statement was updating a blank depreciation key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I cant put a sy-subrc check as the job will get cancelled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here there is no sy-tcode because we are using a File on Unix for the third job to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One strange thing, I have just put a condition as &lt;STRONG&gt;sy-tcode = ' '&lt;/STRONG&gt; &amp;amp; it is populating the LV_DATE &amp;amp; also the depriciation key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my doubt is since this user exit might have been used in many other objects it will have an impact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also what will be the SY-TCODE??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody please suggest a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2010 11:49:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-07T11:49:20Z</dc:date>
    <item>
      <title>Error in Asset Acquisition Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-asset-acquisition-interface/m-p/6471674#M1417384</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;We have an Interface which creates an Improvement asset &amp;amp; acquires it. When we see the asset details in AS03, on the Depreciation areas tab, depreciation key was getting blank. This whole process happens using three jobs in sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last job actually acquires the asset. When I debugged the job, I found that the error was coming from a function module exit. The part of the code which was pdating blank posting key is as below :-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-tcode = 'ABZON' OR
       sy-tcode = 'ABZO'  OR                                   
       sy-tcode = 'ABNA'  OR                                
       sy-tcode = 'AB01'  OR                                          

      lv_ddate = p_rbzdat.

    ENDIF.

 IF lv_flag = c_x.

    SELECT SINGLE  asset_class
                   fromdate
                   to_date
                   depr_key
           INTO    lwa_zfi_aatimesrs FROM zfi_aatimesrs
           WHERE  asset_class EQ p_anlkl   AND
                  fromdate    LE lv_ddate  AND
                  to_date     GE lv_ddate  AND
                  depr_area   EQ c_15.

    UPDATE anlb
    SET   afasl = lwa_zfi_aatimesrs-depr_key
    WHERE bukrs = p_bukrs
    AND   anln1 = p_anln1
    AND   anln2 = p_anln2
    AND   afabe = c_15.
  ENDIF. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the LV_DATE was not getting populated &amp;amp;  SELECT query was getting getting failed &amp;amp; the update statement was updating a blank depreciation key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I cant put a sy-subrc check as the job will get cancelled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here there is no sy-tcode because we are using a File on Unix for the third job to run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One strange thing, I have just put a condition as &lt;STRONG&gt;sy-tcode = ' '&lt;/STRONG&gt; &amp;amp; it is populating the LV_DATE &amp;amp; also the depriciation key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my doubt is since this user exit might have been used in many other objects it will have an impact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also what will be the SY-TCODE??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody please suggest a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Abhii&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 11:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-asset-acquisition-interface/m-p/6471674#M1417384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T11:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Asset Acquisition Interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-asset-acquisition-interface/m-p/6471675#M1417385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;As i understood this, you are using an interface and not a particualr T-Code for this and that's the reason for the problem, as T-Code is initial.&lt;/P&gt;&lt;P&gt;As an alternative, check if you can set any not-used field (ex: text field) with a parameter to recognize the source of the Acquisition something like interface number or name. This field should be accessable in your exit.&lt;/P&gt;&lt;P&gt;If you can find something like this, then in your exit, when SY-TCODE is initial, check for this parameter value and if this value is as expected by you, then, you can use the same logic to populate ANLB.&lt;/P&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;Regards,&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2010 12:17:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-asset-acquisition-interface/m-p/6471675#M1417385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-07T12:17:30Z</dc:date>
    </item>
  </channel>
</rss>

