<?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: Need some help with ABAP code ... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523767#M1262372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you may be writing routine in wrong place. just check value of  PRFTCTR in runtime by hard coding break point with in the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_transform IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD compute_0PROFIT_CTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;MONITOR_REC TYPE rsmonitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA PRFTCTR(6) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT PROFIT_CTR&lt;/P&gt;&lt;P&gt;INTO PRFTCTR&lt;/P&gt;&lt;P&gt;FROM /BI0/PMAT_PLANT&lt;/P&gt;&lt;P&gt;WHERE MAT_PLANT = SOURCE_FIELDS-MAT_PLANT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--if you are getting value of PRFTCTR, check structure of RESULT prameter. i think RESULT parametr having select option structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT = PRFTCTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD. "compute_0PROFIT_CTR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Apr 2009 02:54:28 GMT</pubDate>
    <dc:creator>Peranandam</dc:creator>
    <dc:date>2009-04-15T02:54:28Z</dc:date>
    <item>
      <title>Need some help with ABAP code ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523765#M1262370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do a lookup in a BI transformation routine to get a value for PROFIT_CTR via the MATERIAL data that I have coming from my DataSource.  The field association I need doesn't exist except as an attribute on the MAT_PLANT InfoObject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my non-working code ... could somebody tell me what I am missing or doing wrong?  Any insights are really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_transform IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD compute_0PROFIT_CTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    request     type rsrequest&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    datapackid  type rsdatapid&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    SOURCE_FIELDS-MAT_PLANT TYPE /BI0/OIMAT_PLANT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     RESULT type &lt;U&gt;ty&lt;/U&gt;s_TG_1-PROFIT_CTR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DATA:&lt;/P&gt;&lt;P&gt;      MONITOR_REC    TYPE rsmonitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$&lt;/STRONG&gt;$ begin of routine - insert your code only below this line        &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;... "insert your code here&lt;/P&gt;&lt;P&gt;*--  fill table "MONITOR" with values of structure "MONITOR_REC"&lt;/P&gt;&lt;P&gt;*-   to make monitor entries&lt;/P&gt;&lt;P&gt;... "to cancel the update process&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   raise exception type CX_RSROUT_ABORT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;... "to skip a record&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   raise exception type CX_RSROUT_SKIP_RECORD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;... "to clear target fields&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   raise exception type CX_RSROUT_SKIP_VAL.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA  PRFTCTR(6)  TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT PROFIT_CTR&lt;/P&gt;&lt;P&gt;        INTO  PRFTCTR&lt;/P&gt;&lt;P&gt;        FROM  /BI0/PMAT_PLANT&lt;/P&gt;&lt;P&gt;        WHERE MAT_PLANT = SOURCE_FIELDS-MAT_PLANT.&lt;/P&gt;&lt;P&gt;        ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     RESULT = PRFTCTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$&lt;/STRONG&gt;$ end of routine - insert your code only before this line         &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;  ENDMETHOD.                    "compute_0PROFIT_CTR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2009 22:06:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523765#M1262370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-14T22:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with ABAP code ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523766#M1262371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vipul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you change the your code from:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT PROFIT_CTR
INTO PRFTCTR
FROM /BI0/PMAT_PLANT
WHERE MAT_PLANT = SOURCE_FIELDS-MAT_PLANT.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT PROFIT_CTR
INTO PRFTCTR
FROM /BI0/PMAT_PLANT UP TO 1 ROWS
WHERE MAT_PLANT = SOURCE_FIELDS-MAT_PLANT.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And...&lt;/P&gt;&lt;P&gt;Have you checked the table content that it really has value for the selected material plant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lim...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ruslim Chang on Apr 15, 2009 4:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 01:59:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523766#M1262371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T01:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with ABAP code ...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523767#M1262372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you may be writing routine in wrong place. just check value of  PRFTCTR in runtime by hard coding break point with in the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_transform IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD compute_0PROFIT_CTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;MONITOR_REC TYPE rsmonitor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA PRFTCTR(6) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT PROFIT_CTR&lt;/P&gt;&lt;P&gt;INTO PRFTCTR&lt;/P&gt;&lt;P&gt;FROM /BI0/PMAT_PLANT&lt;/P&gt;&lt;P&gt;WHERE MAT_PLANT = SOURCE_FIELDS-MAT_PLANT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--if you are getting value of PRFTCTR, check structure of RESULT prameter. i think RESULT parametr having select option structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT = PRFTCTR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD. "compute_0PROFIT_CTR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 02:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-some-help-with-abap-code/m-p/5523767#M1262372</guid>
      <dc:creator>Peranandam</dc:creator>
      <dc:date>2009-04-15T02:54:28Z</dc:date>
    </item>
  </channel>
</rss>

