<?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: help with code in customer exit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814750#M917547</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we are modifing the table to total the lines that are created for the batch split process. the totals are added to the main line and the batch split lines are removed from the table. this way, the billing document only has the main lines and not the lines containing the batch split information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try your suggestion and let you know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the info&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2008 20:11:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-23T20:11:09Z</dc:date>
    <item>
      <title>help with code in customer exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814746#M917543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with the code below. we have implemented a customer exit V50PSTAT and the function exit EXIT_SAPLV50P_001. the code deals with intercompany billing documents and batch split records. the description of the code is listed in the exit. the problem is that the detail lines for the billing are not getting created in the VBRP table. I am not sure why they are not getting created. I would like if someone could  please take a look at this code and let me know if there is something that is missing or coded incorrectly.  thank you in advance for any help  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;  Include           ZXV50U07&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Title        : Batch Split items for inter-company billing document  *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Author/Userid: Sumit Prasad/SPARASD                                  *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Date         : 05/19/2008                                            *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SAP Release  : ECC 5.0                                               *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Heat Ticket  : 79664                                                 *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Description  : This Userexit is implemented and gets executed from   *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               VF01 or VF04 for inter-company billing document(NLCC).*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               It gets executed for each line item on billing document&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               It adds the quantity, Net Value and cost for billing  *&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               document when there is batch split to the main item.  *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Revision History:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Ver No.| Date       | Author   | Tr No.     | Description            *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;00001  | 05/19/2008 | SPRASAD  | C1DK906152 | Initial Coding         *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CONSTANTS: c_vf01(4) TYPE c VALUE 'VF01',&lt;/P&gt;&lt;P&gt;           c_vf04(4) TYPE c VALUE 'VF04',&lt;/P&gt;&lt;P&gt;           c_nlcc(4) TYPE c VALUE 'NLCC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: v_lin TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_xvbrp LIKE vbrp,&lt;/P&gt;&lt;P&gt;      wa_vbrp LIKE vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: t_vbrp TYPE vbrp OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_xvbrp&amp;gt; TYPE ANY TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check to see&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CHECK ( sy-tcode EQ c_vf01 OR&lt;/P&gt;&lt;P&gt;       sy-tcode EQ c_vf04 ) AND&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     sy-uname EQ 'SPRASAD' AND&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      is_likp-lfart EQ c_nlcc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*break sprasad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get internal table from upper program SAPLV60A&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ASSIGN ('(SAPLV60A)xvbrp[]') TO &amp;lt;fs_xvbrp&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check to make sure above assignment was sucessfull else do not execute logic in this Userexit&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move field symbol to local internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  t_vbrp[] = &amp;lt;fs_xvbrp&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get last row of the internal table into work area wa_vbrp&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT t_vbrp INTO wa_vbrp.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check if the last row has batch split item&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF wa_vbrp-vgpos CP '9*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Loop though each item in the table to add quantity to main item&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    LOOP AT t_vbrp INTO wa_xvbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check to see Bath item belongs to which main item&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IF wa_xvbrp-vbeln = wa_vbrp-vbeln AND&lt;/P&gt;&lt;P&gt;         wa_xvbrp-posnr = wa_vbrp-aupos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add Quantity, New Value and Cost&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        wa_xvbrp-fkimg = wa_xvbrp-fkimg + wa_vbrp-fkimg.&lt;/P&gt;&lt;P&gt;        wa_xvbrp-netwr = wa_xvbrp-netwr + wa_vbrp-netwr.&lt;/P&gt;&lt;P&gt;        wa_xvbrp-wavwr = wa_xvbrp-wavwr + wa_vbrp-wavwr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modify the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        MODIFY TABLE t_vbrp FROM wa_xvbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ELSEIF  wa_xvbrp-vgpos CP '9*'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If current row in loop is batch split item remove from the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        DELETE t_vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Overwrite the field symbol with the local internal table&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; which will overwrite the sap's internal table for Billing document.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    &amp;lt;fs_xvbrp&amp;gt; = t_vbrp[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 16:12:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814746#M917543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T16:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: help with code in customer exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814747#M917544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Check out if the enhancement is assigned to a project and is activated or not ... for that go to MODACT table and pass the enhancement name in the member to get the project ... go to CMOD and activate the project giving the project name in it  ..now place a break point in the include program to know what went wrong in the debug mode ...&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;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 16:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814747#M917544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T16:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: help with code in customer exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814748#M917545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have ran thru the debugger all the way until it displays the billing document. the billing document displays all of the line items. when I clicked on one of the fields on the line item and do the technical display, it shows that the field is coming from the VBRP table. when I save the record, the line items disappear. when I check the VBRP table, the line item records are not there. when I go to display the saved billing document, all that is displayed it the header record. none of the line items are displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone have any ideas on why this would happen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 19:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814748#M917545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T19:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: help with code in customer exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814749#M917546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the exit is implemented for each line, then why are you modifying a table?&lt;/P&gt;&lt;P&gt;That would mean it modifies it a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, check what happens if you comment this parts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
wa_xvbrp-fkimg = wa_xvbrp-fkimg + wa_vbrp-fkimg.
wa_xvbrp-netwr = wa_xvbrp-netwr + wa_vbrp-netwr.
wa_xvbrp-wavwr = wa_xvbrp-wavwr + wa_vbrp-wavwr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Maybe the changes are messing with the standard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 19:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814749#M917546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T19:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: help with code in customer exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814750#M917547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we are modifing the table to total the lines that are created for the batch split process. the totals are added to the main line and the batch split lines are removed from the table. this way, the billing document only has the main lines and not the lines containing the batch split information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try your suggestion and let you know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the info&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 20:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814750#M917547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T20:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: help with code in customer exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814751#M917548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have found out that the path we were taking was not correct. the condition tab of the billing document was not getting populated after coding the fix. we are looking into other wasys to handle this and also checking for OSS notes that address this issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for all of the help on this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 15:23:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-code-in-customer-exit/m-p/3814751#M917548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T15:23:39Z</dc:date>
    </item>
  </channel>
</rss>

