<?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: Function Module Issues in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301831#M1222708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION ZCALCULATE_TAX_PO_ITEM.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(W_EBELN) TYPE  EBELN
*"     REFERENCE(W_EBELP) TYPE  EBELP
*"  TABLES
*"      PC_KOMV STRUCTURE  KOMV
*"  EXCEPTIONS
*"      PO_EBELN
*"      PO_EBELP
*"      PO_NOT_FOUND
*"----------------------------------------------------------------------


  CLEAR:ekko,
        ekpo.

  CALL FUNCTION 'REFRESH_TAX_TABLES'
    EXCEPTIONS
      OTHERS = 1.

* Refresh the table
  REFRESH:pc_komv.
  IF w_ebeln IS INITIAL.
    RAISE po_ebeln.
  ENDIF.

  IF w_ebelp IS INITIAL.
    RAISE po_ebelp.
  ENDIF.

  SELECT SINGLE * FROM ekko
         WHERE ebeln = w_ebeln.

* Error Message
  IF sy-subrc NE 0.
    RAISE po_not_found.
  ENDIF.

  SELECT SINGLE * FROM ekpo
          WHERE ebeln = ekko-ebeln
            AND ebelp = w_ebelp .
* Error Message
  IF sy-subrc NE 0.
    RAISE po_not_found.
  ENDIF.

  taxcom-bukrs = ekpo-bukrs.
  taxcom-budat = ekko-bedat.
  taxcom-waers = ekko-waers.
  taxcom-kposn = ekpo-ebelp.
  taxcom-mwskz = ekpo-mwskz.
  taxcom-txjcd = ekpo-txjcd.
  taxcom-shkzg = 'H'.
  taxcom-xmwst = 'X'.
  IF ekko-bstyp EQ 'F'.
    taxcom-wrbtr = ekpo-netwr.
  ELSE.
    taxcom-wrbtr = ekpo-zwert.
  ENDIF.
  taxcom-lifnr = ekko-lifnr.
  taxcom-land1 = ekko-lands.                              "WIA
  taxcom-ekorg = ekko-ekorg.
  taxcom-hwaer = ekko-waers.
  taxcom-llief = ekko-llief.
  taxcom-bldat = ekko-bedat.
  taxcom-matnr = ekpo-matnr.         "HTN-Abwicklung
  taxcom-werks = ekpo-werks.
  taxcom-bwtar = ekpo-bwtar.
  taxcom-matkl = ekpo-matkl.
  taxcom-meins = ekpo-meins.
*- Mengen richtig fuellen ---------------------------------------------*
  IF ekko-bstyp EQ 'F'.
    taxcom-mglme = ekpo-menge.
  ELSE.
    IF ekko-bstyp EQ 'K' AND ekpo-abmng GT 0.
      taxcom-mglme = ekpo-abmng.
    ELSE.
      taxcom-mglme = ekpo-ktmng.
    ENDIF.
  ENDIF.
  IF taxcom-mglme EQ 0.  "falls keine Menge gesetzt --&amp;gt; auf 1 setzen
    taxcom-mglme = 1000.  "z.B. bestellte Banf nochmal bestellt
  ENDIF.

  taxcom-mtart = ekpo-mtart.
  IF NOT ekko-llief IS INITIAL.
    taxcom-lifnr = ekko-llief.
  ENDIF.

  CALL FUNCTION 'CALCULATE_TAX_ITEM'
    EXPORTING
      i_taxcom     = taxcom
      display_only = 'X'
      dialog       = ' '
    IMPORTING
      e_taxcom     = taxcom
*    nav_anteil   = hwert
  TABLES
     t_xkomv      = pc_komv
  EXCEPTIONS
      OTHERS       = 01.

  IF sy-subrc NE 0.
    RAISE po_not_found.
  ENDIF.
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2009 11:28:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-13T11:28:16Z</dc:date>
    <item>
      <title>Function Module Issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301830#M1222707</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;Am trying to create one report in that previously they are using one functional module&lt;/P&gt;&lt;P&gt;ZCALCULATE_TAX_PO_ITEM&lt;/P&gt;&lt;P&gt;but the issue is tht fn module not existed in my server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to get is there any fn modules like this to use..&lt;/P&gt;&lt;P&gt;in tht fn module..&lt;/P&gt;&lt;P&gt;my  i/p is : ebeln ebelp&lt;/P&gt;&lt;P&gt;tables:komv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl guide me.. waitng for reply...&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;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 11:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301830#M1222707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T11:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module Issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301831#M1222708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION ZCALCULATE_TAX_PO_ITEM.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(W_EBELN) TYPE  EBELN
*"     REFERENCE(W_EBELP) TYPE  EBELP
*"  TABLES
*"      PC_KOMV STRUCTURE  KOMV
*"  EXCEPTIONS
*"      PO_EBELN
*"      PO_EBELP
*"      PO_NOT_FOUND
*"----------------------------------------------------------------------


  CLEAR:ekko,
        ekpo.

  CALL FUNCTION 'REFRESH_TAX_TABLES'
    EXCEPTIONS
      OTHERS = 1.

* Refresh the table
  REFRESH:pc_komv.
  IF w_ebeln IS INITIAL.
    RAISE po_ebeln.
  ENDIF.

  IF w_ebelp IS INITIAL.
    RAISE po_ebelp.
  ENDIF.

  SELECT SINGLE * FROM ekko
         WHERE ebeln = w_ebeln.

* Error Message
  IF sy-subrc NE 0.
    RAISE po_not_found.
  ENDIF.

  SELECT SINGLE * FROM ekpo
          WHERE ebeln = ekko-ebeln
            AND ebelp = w_ebelp .
* Error Message
  IF sy-subrc NE 0.
    RAISE po_not_found.
  ENDIF.

  taxcom-bukrs = ekpo-bukrs.
  taxcom-budat = ekko-bedat.
  taxcom-waers = ekko-waers.
  taxcom-kposn = ekpo-ebelp.
  taxcom-mwskz = ekpo-mwskz.
  taxcom-txjcd = ekpo-txjcd.
  taxcom-shkzg = 'H'.
  taxcom-xmwst = 'X'.
  IF ekko-bstyp EQ 'F'.
    taxcom-wrbtr = ekpo-netwr.
  ELSE.
    taxcom-wrbtr = ekpo-zwert.
  ENDIF.
  taxcom-lifnr = ekko-lifnr.
  taxcom-land1 = ekko-lands.                              "WIA
  taxcom-ekorg = ekko-ekorg.
  taxcom-hwaer = ekko-waers.
  taxcom-llief = ekko-llief.
  taxcom-bldat = ekko-bedat.
  taxcom-matnr = ekpo-matnr.         "HTN-Abwicklung
  taxcom-werks = ekpo-werks.
  taxcom-bwtar = ekpo-bwtar.
  taxcom-matkl = ekpo-matkl.
  taxcom-meins = ekpo-meins.
*- Mengen richtig fuellen ---------------------------------------------*
  IF ekko-bstyp EQ 'F'.
    taxcom-mglme = ekpo-menge.
  ELSE.
    IF ekko-bstyp EQ 'K' AND ekpo-abmng GT 0.
      taxcom-mglme = ekpo-abmng.
    ELSE.
      taxcom-mglme = ekpo-ktmng.
    ENDIF.
  ENDIF.
  IF taxcom-mglme EQ 0.  "falls keine Menge gesetzt --&amp;gt; auf 1 setzen
    taxcom-mglme = 1000.  "z.B. bestellte Banf nochmal bestellt
  ENDIF.

  taxcom-mtart = ekpo-mtart.
  IF NOT ekko-llief IS INITIAL.
    taxcom-lifnr = ekko-llief.
  ENDIF.

  CALL FUNCTION 'CALCULATE_TAX_ITEM'
    EXPORTING
      i_taxcom     = taxcom
      display_only = 'X'
      dialog       = ' '
    IMPORTING
      e_taxcom     = taxcom
*    nav_anteil   = hwert
  TABLES
     t_xkomv      = pc_komv
  EXCEPTIONS
      OTHERS       = 01.

  IF sy-subrc NE 0.
    RAISE po_not_found.
  ENDIF.
ENDFUNCTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 11:28:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301831#M1222708</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T11:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module Issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301832#M1222709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sir tht fn module raise po here no such things sir..&lt;/P&gt;&lt;P&gt;very simple..&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;  call function 'ZCALCULATE_TAX_PO_ITEM'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      ebeln = itmseg-ebeln&lt;/P&gt;&lt;P&gt;      ebelp = itmseg-ebelp&lt;/P&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;      komv  = itkomv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pl guide me..&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;Manoj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 12:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301832#M1222709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T12:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module Issues</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301833#M1222710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as u said that u do not have the fm ZCALCULATE_TAX_PO_ITEM in ur server...so i tried to give u a code to make ur own function module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make a function module with the above code and use it in ur own program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 12:27:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-issues/m-p/5301833#M1222710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T12:27:46Z</dc:date>
    </item>
  </channel>
</rss>

