Debit memo excise duty calculation is wrong

Hi,
Basic excise duty is wrongly picked in to debit memo as explained below
1) Depot sales order: creted for qty 1
   Basic excise duty 80
2) delivery created:
3)depot excise invoice creted: Adjusted depot stock aganist plant excise invoice 123 and basic excise duty is 100
4) created depot invoice; CAPTURED BASIC EXCISE DUTY IS 100 which is correct (356 movement type assigned to basic ex duty in pricing procedure)
Depot returns:
1)returns sales order created with referance to depot invoice
   copied basic excise duty as 1000 (which is correct)
2) cretaed credit memo request: Here basic excise duty is 80 wronly copied from depot sales order instead of 100
Please provide the solution
Regards,
ramesh

Dear Lakshimipathy,
Thanks for your response
The excise duty combination is same in both returns order and credit memo as mentioned below
Variable key
country
plant
control code
valid from 2010/02/27   valid to 2010/02/27
condition supplements
Country         name                                amount        unit       delition  id
JEXP     IN: A/R BED %     10.000      %     flaged 
And in pricing procedur6e of the returns order is neccessay 356 alternative calculation type
as i mentioned above valid date has been expired and marked for delition how system is determinng excise duty for retuns order. please suggest
Best regards,
ramesh

Similar Messages

  • Quantity based condition type for excise duty  calculation in tax procedure

    Hi,
    If any one has worked on the issue of excise duty  calculation on Quantity of items purchased Quantity based condition type.
    [<b>For a formula based calculation procedure TAXAU]</b>
    Example : If quantity purchased = 10 units
              Duty to be calculated @ Rs.3 per unit
              Duty on the 10 units = Rs.30
    Other than SAP Note 816835 any help is appreciable.
    Thanks a lot,
    Uma
    Message was edited by: Uma

    I could not find this condition type/Tcode  in our client system.
    Even we are on 4.6c.
    Thanks,
    Message was edited by: Uma

  • Enhancement option for excise duty calculation  program - /BEV2/EDMSESES

    Hi,
    My requirement is to enhance the excise duty calculation program /BEV2/EDMSESES. I searched the user exit using the package /BEV2/ED, but was not able find any user exit. So can you please help me how to enhance this standard program.
    Thanks in advance,
    Sudhanva

    Hi,
    My requirement is to enhance the excise duty calculation program /BEV2/EDMSESES. I searched the user exit using the package /BEV2/ED, but was not able find any user exit. So can you please help me how to enhance this standard program.
    Thanks in advance,
    Sudhanva

  • Excise duty calculation on Assessable value in PO

    Dear Team,
    We are facing critical issue in Excise Duty calculation, Excise is calculating on basic price for our normal procurement and we are selling the same at MRP cost... Now the issue is Excise Duty has to be calculated on Assessable value (65% on MRP value) instead of basic price in PO.
    Example:
    Basic Price - 100
    MRP - 300
    Assessable value - 195
    Excise Duty - 24.10 (195*12.36%)
    Regards,
    Sai

    Hi Sai,
    Sorry for the late reply. I think you are close to the solution. You should not change the Procedure too much.
    MRP and Abatement condition types should be kept independent of calculations in the procedure. It is only for changing the base price already got for BED(JMOP) making use of the routine. If that is the case you will get base price (BASB) added to Excise duties which are modified for calculation of VAT.
    For Eg:
    10 BASB
    30 ZMRP(Independent condition type used to store MRP value)
    40 ZABA(Independent condition typeused to store Abatement %)
    70 JMOP   From 10(Routine XXX which will change the base value for calculating JMOP with a formula MRP*Abatement %)
    270 ZVAT(As usual will calculate from BASB+Excise duties)
    Hope this is the way you have done this. Steps 30, and 40 should not come in any "From -to"steps.
    This is working well with one of our clients.
    Regards
    Binoy

  • Excise Duty calculation error in MIGO

    Hi All,
    I have created a standard Purchase Order with Excise Duty of 10% ,2%, 1%.
    I have maintained condition record thru FV11 for excise conditions.
    While, doing MIGO, excise duties are getting calculated wrongly in header.
    It is getting called correctly at Item level.
    Consider following example:
    In Purchase Order:
    Excise Duties -
    BED = 1280.00
    E Cess = 26.00
    SE Cess = 13.00
    In MIGO
    Item Level:
    BED = 1280.00
    E Cess = 26.00
    SE Cess = 13.00
    At Header Level:
    BED = 12.80
    E Cess = 0.26
    SE Cess = 0.13
    Please Guide. Its on high proirity
    Regards,
    Ritesh

    Hi Kailash,
    The header values are equal to duties captured in MIGO. I have checked the accounting document of J1IEX, there the values are coming correctly.
    So, please guide.
    Regards,
    Ritesh

  • Excise Duty Calculation

    Hi Folks this is my 1st q in this forum.
    I want to extract the excise duty,cess and hes in mu AR invoice where the unit price is inclusive of these components.
    Eg:
    I purchase 10 nos for100 so the bill amt is
    100163.2+1.6=120.8
    In my Ar invoice I bill this for
    120 + vat 4% (For 10 nos)
    The excise duty ,cess,hes should be same as above
    or proportional if I sell less qty
    can anybody explain please.

    Hi,
    At present BED is 14%, cess 2% and HES 1% am i right.
    In OSTT, Nota fiscal ID of BED, cess and HES may be (or will be) -90.
    Using this you can calculate Excise Duty amount seperately from overall tax amount.
    Nota fiscal id of VAT is may be (will be) 7. Using this you can calcualte VAT amount from Total tax amount.
    In OSTT, Numerator column have some value (for ex, 5 for BED, 6 for Cess, 7 for HES) using these numbers you can calculate BED, Cess and HES values seperately and you can print it in report.
    How to calculate?
    1.In PLD, in Repetitive area, create an text field and enter value of Numerator (if you calculate tax amount seperately) or Nota fiscal ID if you calculate Excise duty(combination of BED, Cess and HES)
    2. Create Database field and select OSTT - Sales tax authorities Type and select Nota fiscal id or Numerator.
    3. Create formula field and check the two fields.(ie., Field_xx = Field_xy) (Here, Field_xx is text field and Field_xy is Database field)
    4. Create Database field and select A/R Invoice - Tax documents per row (for A/R Invoice) or Purchase Order - tax documents per row (for purchase order)
    5. Create formula field and multiply step 3 and step 4.
    6. In Repetitive area footer, create one formula field seperately for each and every calculation.
    Now you can print those values whereever you want in PLD.
    I hope this could help you to solve the problem.
    Regards
    Raja.S

  • Excise duty Calculation In Purchase Order

    Dear all
    I am facing the problem in exduty calculation in PO
    Actually for my clients business process scenario, Excise duty is getting inventorised so for that i have done the config in TAXINN by using Non deductible keys for JMOP and SEC edu cess.
    Well now few days back the taxes were calculating in PO (Excise duty +VAT) perfectly also the dutie swere getting inventorised.
    NOTE: In my scenario while the goods are received Excise duty is applicable which has to be inventorised whereas while the finished goods are sold no excise duty is applicable..that is my client is not avaling the credit.
    But now when i m testing again ...i.e i have made the PO and for VENDOR,MATERIAL and PLANT Combination i have mentioned the condition records
    JMOP,JSEP and JEC1 ,JVRDaslo i have mentioned JMX1 ,JHX1 and JEC1 as 0% coz i want the excise duty to get inventorised , for a particular tax code (01)
    I have selected the tax code in PO but it is not calculating Excise duty though it is calculating VAT perfectly.
    what can b the reason..Plz help me in this context
    Regds
    shailesh

    i have checked the validity but still it is not working.....also i have created one more material and maintained all the condition but still it is not working
    plz help me regdg this
    regds
    shailesh

  • Basic excise duty calculated in duty free deemed export

    Hi Experts,
    We are facing an issue where system calculates basic excise duty in case of deemed export(duty free) . In some invoices it calculates basic excise duty though it should not calculate as it is duty free.
    Our scenario is like this:-
    At sales order  in deemed export we take alternative tax classification as "7"( Header level - Billing tab). Due to this my JMOD value becomes Zero which is ok. Another condition type is JEX2 which is 100% of JMOD.
    Now while creating invoice at VF01, value of JMOD AND JEX2 are Zero which is absolutely OK. But at the time of release to accounting system update 12% value in JEX2 only which flows to G/L.
    Example:-
    This case is ok.
    Condition type                                      Price
    PR00                                                  100
    UTXJ(100% Of PR00)                           100
    JMOD                                                 0
    JEX2(100% OF JMOD)                         0
    Wrong duty calulation
    Condition type                                      Price
    PR00                                                  100
    UTXJ(100% Of PR00)                           100
    JMOD                                                 0
    JEX2(100% OF JMOD)                         12
    In our most case this work fine means if JMOD is 0 then JEX2 is also 0, But in some invoices system calculate or update JEX2 with 12% value after release to account which is not at all required.
    We have checked all the customization setting which are ok.
    Please advise why system is behaving this way only in case of some invoices.
    Your efforts will be highly appreciable.
    Regards,
    Dharminder

    Dear Experts,
    If anyone face this issue please give your valuable inputs. I will highly appreciates if got some advise or suggestion on the  issue in J1IIN
    We have done the debug at our end and following is the observation
    The name of the include is - MJ1IINF01
    The variable that needs to be watched is - CUST_TYP
    The perform called during the execution is DETERMINE_INVOICE_TYPE
    1) Export first and deemed next
    When we first create invoice for export the variable CUST_TYP is set to
    “F” and the invoice is created as per expected with correct duties.
    After this if we create a deemed invoice without exiting the screen the
    invoice type under “UTILIZATION”, include keeps CUST_TYP as “F” and
    do
    not change it to “L”. Hence it remains export. Which is the cause of
    problem we are facing at present..
    But in next case it changes CUST_TYP properly as explained below.
    2) Deemed first and Export next
    When we first create invoice for deemed the variable CUST_TYP is set to
    “L” and the invoice is created as per expected with correct duties.
    After this if we create a export invoice without exiting the screen the
    invoice type under “UTILIZATION” include changes CUST_TYP as “F” and
    hence we get desired effect.
    Our analysis shows that the include is not able to change variable
    CUST_TYP to “L” from “F” in first case. But in second case it is
    correctly changes to “F” from “L”.
    Please advise.
    Regards,
    Dharminder

  • Excise Duty Calculation on Depot for Trading Material

    Hi,
    Following are the details about my client requirement:
    1. My client has a depot plant dealing with trading material and no manufacturing activity.
    2. Present Scenario:
    Material Purchase price: 100
    Excise Duty: 14
    Sec E.D: 2
    Hr.Sec E.D: 1
    Material Sales Price: 200
    Excise Duty: 28
    Sec E.D: 4
    Hr.Sec E.D: 2
    3. Expected Scenario:
    Material Purchase price: 100
    Excise Duty: 14
    Sec E.D: 2
    Hr.Sec E.D: 1
    Material Sales Price: 200
    Excise Duty: 14
    Sec E.D: 2
    Hr.Sec E.D: 1
    For the above the price will be changed at a Condition record level.
    There are no standard functionality available in standard SAP kindly advice on some workaround for the above requirement.
    Thanks in advance.
    Madhan

    Hi Prakash & Sandip,
    Let me thank you for the response. The excise calculation as pointed by you is right. For material price of 100 (BED = 14; SE Cess  = 0.28 & Hr.Sec Edu Cess = 0.14).
    Now my query is when there is a Material price increase in case of trading material Which is 200 (BED = 28; SE Cess = 0.56 & Hr,Sec Cess = 0.28). Presently system calculates Excise duty on 200.
    Since it is a trading material there is no value addition to the material Excise duty should calculate on Rs. 100.
    Is there any workaround available?
    Thanks & Regards
    Madhan Kumar

  • Excise duty calculation in MM module

    We need to capture excise duty in percentage as well as lump sum in the purchase order in condition type. will u pl help me how to configure this additionally.
    regds
    Raghu

    Hi,
    We can capture only one type of either Percenatge based or Amount based, multiple assignment of  Calculat.type to condition types.
    Calculation type for condition
       Determines how the system calculates prices, discounts, or surcharges in
        a condition. For example, the system can calculate a price as a fixed
        amount or as a percentage based on quantity, volume, or weight.
        The calculation type can be set when generating new condition records.
        If this does not happen, the calculation type maintained here is valid
        for the condition record.
    regards,
    Rama Mohan Bangaru

  • Additional Excise Duty calculation

    Dear Gurus,
    At the time of doing Stock transfer out of 5 material, one matrial exise caluclation not done and the whole process till J1IG done.
    Now for one material i am creating Additional Excise duty through " A certificate"--J1IGA
    In J1IGA error is no data update.
    In A certificate i have given J1IH no.
    Kindly tell me the procedure, how to caputre Additional duty through A certificate.
    Regards,

    Hi,
    I have already follow that process. Is there any other way to solve that.
    Against A cetrtificate i have given J1IH no. in J1IGA.
    and put BED,ECS, Secs manually.and delete other line item for which excise calculated.
    Kindly help me, in solving that

  • No base value or Excise duty calculation coming at J1IS

    I am trying to create excise invoice by T code - J1IS with Ref. doc type - OTHR,
    but the system is not calculating the base value and excise duty
    Please help
    Regards,
    Pranav

    Hi,
    Please maintain the Assessable Value in J1ID for the material and also maintain the condition records for your excise conditions such as BED, ECS & SHECess in FV11 and try.
    Thanks & Regards,

  • % Excise Duty is coming wrong in Report

    Hi,
    I have a report of Gross Margin (FI)....
    My problem is that when i m picking the % Excise Duty from J_1IEXCTAX table against the Chapter ID....it is showing the 4 values against it...means 4 time % Excise Duty....i.e. periodic changed...
    like....
    8538 90 00................1................08.12.2008................31.12.9999................10.0000
    8538 90 00................1................01.03.2008................07.12.2008................14.0000
    8538 90 00................1................28.02.2005................29.02.2008................16.0000
    8538 90 00................1................01.01.2001................28.02.2005................16.0000
    when i m executing my report with period from 01/11/2008 to 15/11/2008..it is showing the 16%...but as per my given period, it must display 14%...
    Please tell me that what should the condition there....
    I m sending my code...
    REPORT  z_fi_gross_margin NO STANDARD PAGE HEADING LINE-SIZE 125  .
    TABLES : t179t, tvkbt, mara, vbrp, s501, mbew.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab OCCURS 0,
           vkbur   LIKE s501-vkbur,
           matnr   LIKE s501-matnr,
           prodh   LIKE s501-prodh,
           ummenge LIKE s501-ummenge,
           gumenge LIKE s501-gumenge,
           umnetwr LIKE s501-umnetwr,
           gunetwr LIKE s501-gunetwr,
           sptag   LIKE s501-sptag,
           peinh   LIKE mbew-peinh,
           stprs   LIKE mbew-stprs,
           lplpx   LIKE mbew-lplpx,
           vtext LIKE t179t-vtext,
           mtart LIKE mara-mtart,
           bezei LIKE tvkbt-bezei,
           net_sqty TYPE p DECIMALS 2,
           s_amt TYPE p DECIMALS 2,
           j_1ichid LIKE j_1imtchid-j_1ichid,
           rate LIKE j_1iexctax-rate,
           excise TYPE p DECIMALS 2,
           l_excise TYPE p DECIMALS 2,
           s_unit TYPE p DECIMALS 2,
           m_unit TYPE p DECIMALS 2,
           t_mcost TYPE p DECIMALS 2,
           m_cost% TYPE p DECIMALS 2,
           g_margin TYPE p DECIMALS 2,
           g_marg% TYPE p DECIMALS 2,
           END OF itab.
    DATA : v_index TYPE sy-tabix.
    DATA : cnt TYPE i.
    DATA : w_container TYPE scrfname VALUE 'CL_GRID',
           w_cprog TYPE lvc_s_layo,
           g_repid LIKE sy-repid,
           w_save TYPE c,
           w_exit TYPE c,
           cl_grid TYPE REF TO cl_gui_alv_grid,
           cl_custom_container TYPE REF TO cl_gui_custom_container,
           it_fld_catalog TYPE slis_t_fieldcat_alv,
           wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
           layout TYPE slis_layout_alv,
           col_pos  LIKE sy-cucol ,
           alvfc TYPE slis_t_fieldcat_alv.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   : vkbur FOR s501-vkbur.
    SELECT-OPTIONS   : matnr FOR s501-matnr.
    SELECT-OPTIONS   : sptag FOR s501-sptag.
    SELECTION-SCREEN : END OF BLOCK b1.
    PERFORM fill_catalog1 USING:
    **'SPTAG'    'ITAB'    'DATE',
    **'VKBUR'    'ITAB'    'Sales Office',
    'BEZEI'    'ITAB'    'S.Off. Desc.',
    'MATNR'    'ITAB'    'Material',
    'PRODH'    'ITAB'    'LEVEL',
    'VTEXT'    'ITAB'    'Level I',
    'MTART'    'ITAB'    'Material Type',
    'NET_SQTY' 'ITAB'    'Net Sales Qty.',
    'S_AMT'    'ITAB'    'Sales with Ex. Duty',
    'EXCISE'   'ITAB'    'Excise Duty',
    'RATE'     'ITAB'    '% Excise Duty',
    'L_EXCISE' 'ITAB'    'Sales less Ex. Duty',
    'S_UNIT'   'ITAB'    'Sales / Unit',
    'M_UNIT'   'ITAB'    'Mat / Unit',
    'T_MCOST'   'ITAB'    'Total Material Cost',
    'M_COST%'  'ITAB'    '% Material Cost',
    'G_MARGIN' 'ITAB'    'Gross Margin',
    'G_MARG%'  'ITAB'    '% Gross Margin'.
    SELECT DISTINCT a~sptag a~vkbur a~matnr a~prodh a~ummenge a~gumenge a~umnetwr a~gunetwr b~vtext c~mtart d~bezei
             INTO CORRESPONDING FIELDS OF TABLE itab
             FROM s501 AS a
             INNER JOIN t179t AS b ON a~prodh = b~prodh
             INNER JOIN mara AS c ON a~matnr = c~matnr
             INNER JOIN tvkbt AS d ON a~vkbur = d~vkbur
             WHERE a~matnr IN matnr
             AND   a~sptag IN sptag
             AND   a~vkbur IN vkbur.
    IF sy-subrc <> 0.
      MESSAGE 'DATA NOT FOUND.' TYPE 'I'(001).
    ENDIF.
    SORT itab BY matnr.
    LOOP AT itab .
      cnt = v_index.
      SELECT peinh stprs lplpx FROM mbew INTO (itab-peinh, itab-stprs, itab-lplpx) WHERE matnr = itab-matnr.
        itab-m_unit = itab-stprs - itab-lplpx / itab-peinh.
        v_index = cnt + sy-dbcnt.
        MODIFY itab INDEX v_index TRANSPORTING m_unit.
      ENDSELECT.
      SELECT j_1ichid FROM j_1imtchid INTO itab-j_1ichid WHERE matnr = itab-matnr.
        MODIFY itab INDEX sy-tabix TRANSPORTING j_1ichid .
      ENDSELECT.
      SELECT rate FROM j_1iexctax INTO itab-rate WHERE j_1ichid = itab-j_1ichid AND j_1iexcind = '1'.
        MODIFY itab INDEX sy-tabix TRANSPORTING rate .
      ENDSELECT.
    ENDLOOP.
    LOOP AT itab .
      itab-net_sqty = itab-ummenge - itab-gumenge .
      MODIFY itab INDEX sy-tabix TRANSPORTING net_sqty.
      itab-s_amt = itab-umnetwr - itab-gunetwr .
      MODIFY itab INDEX sy-tabix TRANSPORTING s_amt.
      itab-excise = itab-s_amt * itab-rate / 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING excise.
      itab-l_excise = itab-s_amt - itab-excise.
      MODIFY itab INDEX sy-tabix TRANSPORTING l_excise.
      itab-s_unit = itab-l_excise / itab-net_sqty.
      MODIFY itab INDEX sy-tabix TRANSPORTING s_unit.
      itab-t_mcost = itab-m_unit * itab-net_sqty.
      MODIFY itab INDEX sy-tabix TRANSPORTING t_mcost.
      itab-m_cost% = itab-t_mcost / itab-s_amt * 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING m_cost%.
      itab-g_margin = itab-l_excise - itab-t_mcost.
      MODIFY itab INDEX sy-tabix TRANSPORTING g_margin.
      itab-g_marg% = itab-g_margin / itab-s_amt * 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING g_marg%.
    ENDLOOP.
    layout-zebra = 'X' .
    layout-colwidth_optimize(1) = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = 'Z_FI_GROSS_MARGIN'
        is_layout          = layout
        it_fieldcat        = it_fld_catalog
        i_default          = 'X'
        i_save             = 'A'
      TABLES
        t_outtab           = itab
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  FILL_CATALOG1
          text
         -->P_FIELDNAME  text
         -->P_REF_TABLE  text
         -->P_SCRTEXT    text
    FORM fill_catalog1  USING   p_fieldname TYPE any
                                p_ref_table TYPE any
                                p_scrtext   TYPE any.
      CLEAR : wa_fld_catalog.
      wa_fld_catalog-fieldname  = p_fieldname.
      wa_fld_catalog-tabname    = p_ref_table.
      wa_fld_catalog-seltext_s  = p_scrtext.
      wa_fld_catalog-seltext_m  = p_scrtext.
      wa_fld_catalog-seltext_l  = p_scrtext.
      wa_fld_catalog-outputlen = 15.
      APPEND wa_fld_catalog TO it_fld_catalog.
    ENDFORM.                    " fill_catalog1
    Please check .....
    Thanks...

    I think ur code will do the same in my report do...
    Please check my code again and modify where as u needed.....
    REPORT  z_fi_gross_margin NO STANDARD PAGE HEADING LINE-SIZE 125  .
    TABLES : t179t, t179, tvkbt, mara, vbrp, s501, mbew, t134t, v_t179, t023t, t247.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab OCCURS 0,
           vkbur   LIKE s501-vkbur,
           matnr   LIKE s501-matnr,
           prodh   LIKE s501-prodh,
           ummenge LIKE s501-ummenge,
           gumenge LIKE s501-gumenge,
           umnetwr LIKE s501-umnetwr,
           gunetwr LIKE s501-gunetwr,
           sptag   LIKE s501-sptag,
           peinh   LIKE mbew-peinh,
           stprs   LIKE mbew-stprs,
           lplpx   LIKE mbew-lplpx,
           prdha LIKE mara-prdha,       " Product hierarchy
           prdha2 LIKE mara-prdha,       " Product hierarchy
           prdha3 LIKE mara-prdha,       " Product hierarchy
           prodh_text LIKE t179t-vtext, "Product Hierarchy Text
           prodh2_text LIKE t179t-vtext, "Product Hierarchy Text
           prodh3_text LIKE t179t-vtext, "Product Hierarchy Text
           matkl LIKE mara-matkl,
           wgbez LIKE t023t-wgbez,
           fcktx LIKE t247-ktx,
           mtart LIKE mara-mtart,
           bezei LIKE tvkbt-bezei,
           net_sqty TYPE p DECIMALS 2,
           s_amt TYPE p DECIMALS 2,
           mtbez LIKE t134t-mtbez,
           j_1ichid LIKE j_1imtchid-j_1ichid,
           rate LIKE j_1iexctax-rate,
           excise TYPE p DECIMALS 2,
           l_excise TYPE p DECIMALS 2,
           s_unit TYPE p DECIMALS 2,
           m_unit TYPE p DECIMALS 2,
           t_mcost TYPE p DECIMALS 2,
           m_cost% TYPE p DECIMALS 2,
           g_margin TYPE p DECIMALS 2,
           g_marg% TYPE p DECIMALS 2,
           new TYPE i,
           new1(6) TYPE c,
           s_period TYPE i,
           END OF itab.
    DATA : BEGIN OF itab3 OCCURS 0.
            INCLUDE STRUCTURE itab.
    DATA : END OF itab3.
    DATA : v_index TYPE sy-tabix.
    DATA : cnt TYPE i.
    DATA : w_container TYPE scrfname VALUE 'CL_GRID',
           w_cprog TYPE lvc_s_layo,
           g_repid LIKE sy-repid,
           w_save TYPE c,
           w_exit TYPE c,
           cl_grid TYPE REF TO cl_gui_alv_grid,
           cl_custom_container TYPE REF TO cl_gui_custom_container,
           it_fld_catalog TYPE slis_t_fieldcat_alv,
           wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
           layout TYPE slis_layout_alv,
           col_pos  LIKE sy-cucol ,
           alvfc TYPE slis_t_fieldcat_alv.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   : vkbur FOR s501-vkbur.
    SELECT-OPTIONS   : matnr FOR s501-matnr.
    SELECT-OPTIONS   : sptag FOR s501-sptag.
    SELECTION-SCREEN : END OF BLOCK b1.
    PERFORM fill_catalog1 USING:
    'SPTAG'    'ITAB'    'DATE',
    'VKBUR'    'ITAB'    'Sales Office',
    'BEZEI'    'ITAB'    'S.Off. Desc.',
    'MATNR'    'ITAB'    'Material',
    *'PRODH'    'ITAB'    'LEVEL',
    'PRODH_TEXT'    'ITAB'    'Level I',
    'PRODH2_TEXT'   'ITAB'    'Level II',
    'PRODH3_TEXT'   'ITAB'    'Level III',
    'WGBEZ'    'ITAB'    'Level IV',
    'MTBEZ'    'ITAB'    'Material Type',
    'NET_SQTY' 'ITAB'    'Net Sales Qty.',
    'S_AMT'    'ITAB'    'Sales with Ex. Duty',
    'EXCISE'   'ITAB'    'Excise Duty',
    'RATE'     'ITAB'    '% Excise Duty',
    'L_EXCISE' 'ITAB'    'Sales less Ex. Duty',
    'S_UNIT'   'ITAB'    'Sales / Unit',
    'M_UNIT'   'ITAB'    'Mat / Unit',
    'T_MCOST'   'ITAB'    'Total Material Cost',
    'M_COST%'  'ITAB'    '% Material Cost',
    'G_MARGIN' 'ITAB'    'Gross Margin',
    'G_MARG%'  'ITAB'    '% Gross Margin',
    'NEW1'      'ITAB'    'Month'.
    SELECT DISTINCT asptag avkbur amatnr aprodh aummenge agumenge aumnetwr agunetwr cmtart cmatkl dbezei emtbez
             INTO CORRESPONDING FIELDS OF TABLE itab
             FROM s501 AS a
             INNER JOIN mara AS c ON amatnr = cmatnr
             INNER JOIN tvkbt AS d ON avkbur = dvkbur
             INNER JOIN t134t AS e ON cmtart = emtart
             WHERE a~matnr IN matnr
             AND   a~sptag IN sptag
             AND   a~vkbur IN vkbur
             AND   e~spras EQ 'EN'.
    IF sy-subrc <> 0.
      MESSAGE 'DATA NOT FOUND.' TYPE 'I'(001).
    ENDIF.
    SORT itab BY matnr.
    LOOP AT itab .
      cnt = v_index.
      SELECT SINGLE peinh stprs lplpx FROM mbew INTO (itab-peinh, itab-stprs, itab-lplpx) WHERE matnr = itab-matnr.
      itab-m_unit = itab-stprs - itab-lplpx / itab-peinh.
      v_index = cnt + sy-dbcnt.
      MODIFY itab INDEX v_index TRANSPORTING m_unit.
      SELECT SINGLE j_1ichid FROM j_1imtchid INTO itab-j_1ichid WHERE matnr = itab-matnr.
      MODIFY itab INDEX sy-tabix TRANSPORTING j_1ichid .
      SELECT SINGLE rate FROM j_1iexctax INTO itab-rate WHERE j_1ichid = itab-j_1ichid AND j_1iexcind = '1' AND validfrom GE sptag-low AND validto LE sptag-high.
      MODIFY itab INDEX sy-tabix TRANSPORTING rate .
      SELECT SINGLE prdha FROM mara INTO (itab-prdha) WHERE matnr = itab-matnr .
      MODIFY itab INDEX sy-tabix TRANSPORTING prdha .
      SELECT SINGLE wgbez FROM t023t INTO itab-wgbez WHERE matkl = itab-matkl .
      MODIFY itab INDEX sy-tabix TRANSPORTING wgbez .
    ENDLOOP.
    LOOP AT itab .
      itab-net_sqty = itab-ummenge - itab-gumenge .
      MODIFY itab INDEX sy-tabix TRANSPORTING net_sqty.
      itab-s_amt = itab-umnetwr - itab-gunetwr .
      MODIFY itab INDEX sy-tabix TRANSPORTING s_amt.
      itab-excise = itab-s_amt * itab-rate / 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING excise.
      itab-l_excise = itab-s_amt - itab-excise.
      MODIFY itab INDEX sy-tabix TRANSPORTING l_excise.
      IF itab-net_sqty NE '0'.
        itab-s_unit = itab-l_excise / itab-net_sqty.
        MODIFY itab INDEX sy-tabix TRANSPORTING s_unit.
      ENDIF.
      itab-t_mcost = itab-m_unit * itab-net_sqty.
      MODIFY itab INDEX sy-tabix TRANSPORTING t_mcost.
      itab-m_cost% = itab-t_mcost / itab-s_amt * 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING m_cost%.
      itab-g_margin = itab-l_excise - itab-t_mcost.
      MODIFY itab INDEX sy-tabix TRANSPORTING g_margin.
      itab-new = itab-sptag+4(2).
      SELECT SINGLE ktx FROM t247 INTO itab-new1 WHERE mnr = itab-new AND spras EQ 'EN' .
      CONCATENATE itab-new1 itab-sptag+2(2) INTO itab-new1 SEPARATED BY '-'.
      itab-g_marg% = itab-g_margin / itab-s_amt * 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING g_marg% new1.
    ENDLOOP.
    LOOP AT itab.
      SELECT SINGLE vtext INTO itab-prodh3_text FROM t179t WHERE prodh = itab-prdha.
      itab-prdha2 = itab-prdha+0(5).
      SELECT SINGLE vtext INTO itab-prodh_text FROM t179t WHERE prodh = itab-prdha2.
      itab-prdha3 = itab-prdha+0(10).
      SELECT SINGLE vtext INTO itab-prodh2_text FROM t179t WHERE prodh = itab-prdha3.
      MODIFY itab INDEX sy-tabix TRANSPORTING prodh3_text prodh_text prodh2_text prdha3.
    ENDLOOP.
    layout-zebra = 'X' .
    layout-colwidth_optimize(1) = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = 'Z_FI_GROSS_MARGIN'
        is_layout          = layout
        it_fieldcat        = it_fld_catalog
        i_default          = 'X'
        i_save             = 'A'
      TABLES
        t_outtab           = itab
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  FILL_CATALOG1
          text
         -->P_FIELDNAME  text
         -->P_REF_TABLE  text
         -->P_SCRTEXT    text
    FORM fill_catalog1  USING   p_fieldname TYPE any
                                p_ref_table TYPE any
                                p_scrtext   TYPE any.
      CLEAR : wa_fld_catalog.
      wa_fld_catalog-fieldname  = p_fieldname.
      wa_fld_catalog-tabname    = p_ref_table.
      wa_fld_catalog-seltext_s  = p_scrtext.
      wa_fld_catalog-seltext_m  = p_scrtext.
      wa_fld_catalog-seltext_l  = p_scrtext.
      wa_fld_catalog-outputlen = 15.
      APPEND wa_fld_catalog TO it_fld_catalog.
    ENDFORM.                    " fill_catalog1
    please tell....

  • Rate (% Excise Duty) in picking wrong...

    Hi,
    I have a report of Gross Margin (FI)....
    My problem is that when i m picking the % Excise Duty from J_1IEXCTAX table against the Chapter ID....it is showing the 4 values against it...means 4 time % Excise Duty....i.e. periodic changed...
    like....
    8538 90 00................1................01.03.2008................31.12.9999................14.0000
    8538 90 00................1................28.02.2005................29.02.2008................16.0000
    8538 90 00................1................01.01.2001................28.02.2005................16.0000
    when i m executing my report with period from 01/07/2007 to 15/07/2007..it is showing the 14%...but as per my given period, it must display 16%...
    Please tell me that what should the condition there....
    Plz. check my code---
    REPORT  z_fi_gross_margin NO STANDARD PAGE HEADING LINE-SIZE 125  .
    TABLES : t179t, t179, tvkbt, mara, vbrp, s501, mbew, t134t, v_t179, t023t, t247.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab OCCURS 0,
           vkbur   LIKE s501-vkbur,
           matnr   LIKE s501-matnr,
           prodh   LIKE s501-prodh,
           ummenge LIKE s501-ummenge,
           gumenge LIKE s501-gumenge,
           umnetwr LIKE s501-umnetwr,
           gunetwr LIKE s501-gunetwr,
           sptag   LIKE s501-sptag,
           peinh   LIKE mbew-peinh,
           stprs   LIKE mbew-stprs,
           lplpx   LIKE mbew-lplpx,
           prdha LIKE mara-prdha,       " Product hierarchy
           prdha2 LIKE mara-prdha,       " Product hierarchy
           prdha3 LIKE mara-prdha,       " Product hierarchy
           prodh_text LIKE t179t-vtext, "Product Hierarchy Text
           prodh2_text LIKE t179t-vtext, "Product Hierarchy Text
           prodh3_text LIKE t179t-vtext, "Product Hierarchy Text
           matkl LIKE mara-matkl,
           wgbez LIKE t023t-wgbez,
           fcktx LIKE t247-ktx,
           mtart LIKE mara-mtart,
           bezei LIKE tvkbt-bezei,
           net_sqty TYPE p DECIMALS 2,
           s_amt TYPE p DECIMALS 2,
           mtbez LIKE t134t-mtbez,
           j_1ichid LIKE j_1imtchid-j_1ichid,
           rate LIKE j_1iexctax-rate,
           excise TYPE p DECIMALS 2,
           l_excise TYPE p DECIMALS 2,
           s_unit TYPE p DECIMALS 2,
           m_unit TYPE p DECIMALS 2,
           t_mcost TYPE p DECIMALS 2,
           m_cost% TYPE p DECIMALS 2,
           g_margin TYPE p DECIMALS 2,
           g_marg% TYPE p DECIMALS 2,
           new TYPE i,
           new1(6) TYPE c,
           s_period TYPE i,
           END OF itab.
    DATA : BEGIN OF itab3 OCCURS 0.
            INCLUDE STRUCTURE itab.
    DATA : END OF itab3.
    DATA : v_index TYPE sy-tabix.
    DATA : cnt TYPE i.
    DATA : v_currdate TYPE i.
    DATA : w_container TYPE scrfname VALUE 'CL_GRID',
           w_cprog TYPE lvc_s_layo,
           g_repid LIKE sy-repid,
           w_save TYPE c,
           w_exit TYPE c,
           cl_grid TYPE REF TO cl_gui_alv_grid,
           cl_custom_container TYPE REF TO cl_gui_custom_container,
           it_fld_catalog TYPE slis_t_fieldcat_alv,
           wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,
           layout TYPE slis_layout_alv,
           col_pos  LIKE sy-cucol ,
           alvfc TYPE slis_t_fieldcat_alv.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS   : vkbur FOR s501-vkbur.
    SELECT-OPTIONS   : matnr FOR s501-matnr.
    SELECT-OPTIONS   : sptag FOR s501-sptag.
    SELECTION-SCREEN : END OF BLOCK b1.
    PERFORM fill_catalog1 USING:
    'SPTAG'    'ITAB'    'DATE',
    'VKBUR'    'ITAB'    'Sales Office',
    'BEZEI'    'ITAB'    'S.Off. Desc.',
    'MATNR'    'ITAB'    'Material',
    *'PRODH'    'ITAB'    'LEVEL',
    'PRODH_TEXT'    'ITAB'    'Level I',
    'PRODH2_TEXT'   'ITAB'    'Level II',
    'PRODH3_TEXT'   'ITAB'    'Level III',
    'WGBEZ'    'ITAB'    'Level IV',
    'MTBEZ'    'ITAB'    'Material Type',
    'NET_SQTY' 'ITAB'    'Net Sales Qty.',
    'S_AMT'    'ITAB'    'Sales with Ex. Duty',
    'EXCISE'   'ITAB'    'Excise Duty',
    'RATE'     'ITAB'    '% Excise Duty',
    'L_EXCISE' 'ITAB'    'Sales less Ex. Duty',
    'S_UNIT'   'ITAB'    'Sales / Unit',
    'M_UNIT'   'ITAB'    'Mat / Unit',
    'T_MCOST'   'ITAB'    'Total Material Cost',
    'M_COST%'  'ITAB'    '% Material Cost',
    'G_MARGIN' 'ITAB'    'Gross Margin',
    'G_MARG%'  'ITAB'    '% Gross Margin',
    'NEW1'      'ITAB'    'Month'.
    SELECT DISTINCT asptag avkbur amatnr aprodh aummenge agumenge aumnetwr agunetwr cmtart cmatkl dbezei emtbez
             INTO CORRESPONDING FIELDS OF TABLE itab
             FROM s501 AS a
             INNER JOIN mara AS c ON amatnr = cmatnr
             INNER JOIN tvkbt AS d ON avkbur = dvkbur
             INNER JOIN t134t AS e ON cmtart = emtart
             WHERE a~matnr IN matnr
             AND   a~sptag IN sptag
             AND   a~vkbur IN vkbur
             AND   e~spras EQ 'EN'.
    IF sy-subrc <> 0.
      MESSAGE 'DATA NOT FOUND.' TYPE 'I'(001).
    ENDIF.
    SORT itab BY matnr.
    LOOP AT itab .
      cnt = v_index.
      SELECT SINGLE peinh stprs lplpx FROM mbew INTO (itab-peinh, itab-stprs, itab-lplpx) WHERE matnr = itab-matnr.
      itab-m_unit = itab-stprs - itab-lplpx / itab-peinh.
      v_index = cnt + sy-dbcnt.
      MODIFY itab INDEX v_index TRANSPORTING m_unit.
      SELECT SINGLE j_1ichid FROM j_1imtchid INTO itab-j_1ichid WHERE matnr = itab-matnr.
      MODIFY itab INDEX sy-tabix TRANSPORTING j_1ichid .
      SELECT SINGLE rate FROM j_1iexctax INTO itab-rate WHERE j_1ichid = itab-j_1ichid AND j_1iexcind = '1' . "AND validfrom GE sptag-low AND validto LE sptag-high.
      MODIFY itab INDEX sy-tabix TRANSPORTING rate .
      SELECT SINGLE prdha FROM mara INTO (itab-prdha) WHERE matnr = itab-matnr .
      MODIFY itab INDEX sy-tabix TRANSPORTING prdha .
      SELECT SINGLE wgbez FROM t023t INTO itab-wgbez WHERE matkl = itab-matkl .
      MODIFY itab INDEX sy-tabix TRANSPORTING wgbez .
    ENDLOOP.
    LOOP AT itab .
      itab-net_sqty = itab-ummenge - itab-gumenge .
      MODIFY itab INDEX sy-tabix TRANSPORTING net_sqty.
      itab-s_amt = itab-umnetwr - itab-gunetwr .
      MODIFY itab INDEX sy-tabix TRANSPORTING s_amt.
      itab-excise = itab-s_amt * itab-rate / 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING excise.
      itab-l_excise = itab-s_amt - itab-excise.
      MODIFY itab INDEX sy-tabix TRANSPORTING l_excise.
      IF itab-net_sqty NE '0'.
        itab-s_unit = itab-l_excise / itab-net_sqty.
        MODIFY itab INDEX sy-tabix TRANSPORTING s_unit.
      ENDIF.
      itab-t_mcost = itab-m_unit * itab-net_sqty.
      MODIFY itab INDEX sy-tabix TRANSPORTING t_mcost.
      itab-m_cost% = itab-t_mcost / itab-s_amt * 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING m_cost%.
      itab-g_margin = itab-l_excise - itab-t_mcost.
      MODIFY itab INDEX sy-tabix TRANSPORTING g_margin.
      itab-new = itab-sptag+4(2).
      SELECT SINGLE ktx FROM t247 INTO itab-new1 WHERE mnr = itab-new AND spras EQ 'EN' .
      CONCATENATE itab-new1 itab-sptag+2(2) INTO itab-new1 SEPARATED BY '-'.
      itab-g_marg% = itab-g_margin / itab-s_amt * 100.
      MODIFY itab INDEX sy-tabix TRANSPORTING g_marg% new1.
    ENDLOOP.
    LOOP AT itab.
      SELECT SINGLE vtext INTO itab-prodh3_text FROM t179t WHERE prodh = itab-prdha.
      itab-prdha2 = itab-prdha+0(5).
      SELECT SINGLE vtext INTO itab-prodh_text FROM t179t WHERE prodh = itab-prdha2.
      itab-prdha3 = itab-prdha+0(10).
      SELECT SINGLE vtext INTO itab-prodh2_text FROM t179t WHERE prodh = itab-prdha3.
      MODIFY itab INDEX sy-tabix TRANSPORTING prodh3_text prodh_text prodh2_text prdha3.
    ENDLOOP.
    layout-zebra = 'X' .
    layout-colwidth_optimize(1) = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = 'Z_FI_GROSS_MARGIN'
        is_layout          = layout
        it_fieldcat        = it_fld_catalog
        i_default          = 'X'
        i_save             = 'A'
      TABLES
        t_outtab           = itab
      EXCEPTIONS
        program_error      = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *&      Form  FILL_CATALOG1
          text
         -->P_FIELDNAME  text
         -->P_REF_TABLE  text
         -->P_SCRTEXT    text
    FORM fill_catalog1  USING   p_fieldname TYPE any
                                p_ref_table TYPE any
                                p_scrtext   TYPE any.
      CLEAR : wa_fld_catalog.
      wa_fld_catalog-fieldname  = p_fieldname.
      wa_fld_catalog-tabname    = p_ref_table.
      wa_fld_catalog-seltext_s  = p_scrtext.
      wa_fld_catalog-seltext_m  = p_scrtext.
      wa_fld_catalog-seltext_l  = p_scrtext.
      wa_fld_catalog-outputlen = 15.
      APPEND wa_fld_catalog TO it_fld_catalog.
    ENDFORM.                    " fill_catalog1
    please let me know...

    Hi,
    when  i m using this query...
    SELECT SINGLE rate FROM j_1iexctax INTO itab-rate WHERE j_1ichid = itab-j_1ichid AND j_1iexcind = '1'  AND validfrom  LE sptag-high AND validto     GE sptag-low.          
    MODIFY itab INDEX sy-tabix TRANSPORTING rate .
    it is picking the another value.....like... (picking BOLD VALUE), means 0.00
    8538 10 10................0................28.02.2005................31.12.9999................0.0000
    8538 10 10................1................01.03.2008................31.12.9999................14.0000
    8538 10 10................1................28.02.2005................29.02.2008................16.0000
    8538 10 10................1................01.01.2001................28.02.2005................16.0000
    also Excise tax indicator, not reflect anything here....
    Plz let me know......

  • Monthly Excise Duty Debit process

    Can anybody explain the process to debit monthly excise duty from PLA and RG23A part II/RG23C part II.
    As per my knowledge process is that :
    Select J1IH - other adjustment- pop up comes and put data as per pop up- select RG23A/C/PLA any one at the time one then enter go to next page then select header and put duty amount at BED enter - select G/L account and save -  excise JV created and account no generated with sr no.
    Similarly follow same procedrue for debiting from PLA.
    is it correct procedure or any other process in the system ?
    please help me. This is most urgent.

    First you will have to update all your registers i.e RG1,RG23A& RG23C part I. using transaction J1I5,
    Then use the J2I5  extract registers to update the value in RG23A & RG23C part II
    J2IUN  transaction for monthly utilization.
    U will see excise payable against which you will see bakances in different registers you can select the register from which you have to utilize the exice duty.
    I think you can now utilize the credit taken.
    Reward If useful.
    Regards

Maybe you are looking for

  • Why can't I double click to open embedded images?

    I want to put this topic in the Features request, but I'm putting it here first to check that I've not made a silly mistake. I'm slowly getting the hang of Illustrator. But it often feels like I'm learning how to do things in a non-intuative way. Tak

  • Nokia Belle Email: I want a Small Widget like the ...

    Hi, the widget for Email Nokia Belle is too big and I don't like it. I want to install the small widget for Email like I had it on Anna OS in order to install 5 widgets in a single desktop. How can I get this small widget for Nokia Belle Email, pleas

  • Move/Duplicate/Copy

    All, Ok, so essentially I'm trying to write a script so that I can batch process a whole bunch of .SVG files. The .SVG files come from a variety of sources... some open very cleanly with nice layer structure, etc... others open with completely wacked

  • Setting up IP,Subnet, default gateway and secondary gateway in solaris 10 x

    Hi, I am new to solaris. I have instralled solaris10 x86 on my system. I am not able to access internet as i am not able to setup address. I use broadband and have static ip address. How do i configure them... ip, subnet, default gateway, and seconda

  • Layouts in CO24 missing

    Hello! After the Upgrade from R/3 46C to ECC 600 the Layouts of the CO24 are missing. Only the standard layouts "Material View" and "Order View" are available. Could anybody help me, thanks a lot, Barbara