Excise for material consumed

Hi ,
We have consumed the excisiable material  and now we have to reverse the excise duty please guide the steps to do it

I want to refer to the material document which was created by posting the consumption of exciable material
I will refer to this material document  for J1IH.
please tell me the accounting part of this JV.
and also tell me if we can post the  JV (J1IH)once the 201 moevement type happens for the material
Edited by: Sap: IN on Oct 7, 2010 5:30 PM

Similar Messages

  • Actual cost not correctly displayed for material consumed in an order

    Hi All,
    I have an issue which is as follows:
    In a service order, I have consumed 13 materials for which I am able to view the list of goods movement with its amount and plant and storage location.
    For each goods movement system has generated material document, accounting document, controlling document, etc.
    However system is not displaying the actual costs of all the 13 materials consumed within the order. Only one material cost is dispalyed in actual cost of overview tab of COSTS tab.
    Incidentally, when I clicked the "Rep. Plan/Act." button, system is displaying the actual costs of line item wise material consumption.
    Kindly let me know what could be the reason for this error.
    Many thanks in advance............ JK.

    Kannan,
    If the "Rep. Plan/Act." costs are correct, then you have problems with your value categories
    Have a look at the following correction programs:
    Run TCode OLI5 to correct value category errors (program RIPMCO00)
    Run TCode OLPM to re-build structures (program RIPMS001)
    PeteA

  • Excise for material

    hi all,
    i have dabut, that wether we can maintain some material as excisable and some are not which belongs to same category and division. can we maintain this information in J1ID under the tab Excise rate - Excise tax rates?
    Thanks & Regards
    Ashwini

    The tab which you mentioned is based on chapter id.  Having said this as long as the chapter id is different, yes you can differentiate the ED percent.  Otherwise no.
    G. Lakshmipathi

  • Report for material  which not consumed during C015

    HI ALL,
    "I required a report for material which material are not
    consumed at C015 production confirmation time against actual consumation (order wise , part no wise & date wise )"
    its v urgent
    good suggesstion reward with valuable points.

    Amit,
    I think your problem is that you want to monitor when users are deleting the goods issue while confirmation. So you would have to know if for a confirmation qty of 100, the planned consumption should have been 100 but the actual consuption is 50.
    So you would want to relate the confirmation qty with the planned and actual consumption.
    In COOIS Remt, qty and Withdrawal qty will show the total reqmt and actual withdrwal. Hope this will not be helpful if I understand correctly.
    You have to create a simple query joining tables AFVV with RESB. Calculate the planned consuption for the confirmation qty. This along with the actual consuption will help to give what you are looking for.
    I am right ?
    Ram

  • Capture Excise Invoice for material document created against a PGR

    Hi SD Gurus,
    We have a scenario of reverse subcontracting where we have to receive raw material from vendor, process it and then dispatch the finished goods to the vendor or the vendor's customer.
    For receiving the raw materials, i have created a document type which is copied from standard RE type. Against this order, a returns delivery is created which is then PGR-ed. With reference to the previous document, a service order is created in SD, which is then billed.
    But i am facing a problem when i tried to capture the incoming excise invoice for the raw materials. When i tried to capture the excise against the material document generated for PGR, the system is throwing a error, that it cannot capture the excise for this materia document type.
    I would be greatly obliged if anyone can throw some light on this. Do i need to maintain any special configuration for this? Why is SAP not allowing it? How this can be done?
    With Regards,
    Arindam Datta.

    Dear Arun R,
    You Kindly go to the following path and maintain your movement type over their and do the MIGO.I am very sure at the time ot migo excise tab will come for part-1 updation and subsequently you capture part-2 on J1IEX.
    SPRO->LG->Tax on Goods Movemet->India->Business Transactions->Incoming Excise Invoice->Specify which movement type involve excise Invoices.
    Hope this will help you out.
    Regards
    AKS

  • PR, PO, GR for a consumable material without material master record

    Hi,
    I have created a complete cylcle till Invoice Verification for a material without a material master record.
    But i have one query i.e. in the cylce i created i had to create a GR before entering MIRO.  Is there any way by which i need not create a GR for a consumable material i.e. to be posted directly to a GL without any inventory management.
    In my case, the GR checkbox in the PO was automatically ticked.
    Can anyone help on this please.
    Regards,
    Laxmi

    Customizing Error Message in ME23N
    When displaying of modifying Purchase Orders with a document type of Framework Order,  a user selects the LIMITS tab, they get the error message Customizing incorrectly maintained, message number SE729.
    The problem is caused by version upgrades of the SAP software.
    Number of entries in table T162V is different to the number of columns in table control for screen SAPLMLSP (400).  You can use screen painter SE51 to display the screen.  View the Element list for TC_VIEW.
    The list of fields can also be viewed within the program.  Transaction code ML81N (service entry sheet), program SAPLMLSR.  Click on the Configuration button (top right hand corner) select Administrator.  This shows the number of fields as 67.
    Using SE16N to view table T162V shows 69 fields.  This table contains six layouts (variants), they must all be the same.  Before the change the total count was 414 (69 x 6). 
    The ME23N transaction only checks that the number of entries is correct.  You will notice that the fields are not in the same sequence, but that should not matter if you donot use the service transaction ML81N and it is not a selectable tab on ME23N.
    Transaction SM31 was used to delete the extra fields.  As this is a SAP table, you may need extra authorisations to make the change.
    Note:  the number of fields shown above will be different in each site.  This is because of different SAP versions and in what software is loaded. 

  • MASS MAINTENANCE FOR MATERIAL-RELATED EXCISE DUTIES FIELDS

    Dear Experts,
    Is there any separate t code available to MASS MAINTENANCE FOR MATERIAL-RELATED EXCISE DUTIES FIELDS ?
    I got this POINT from ECC 6.0 features in Solution browser.
    Please help me on this.
    MASS MAINTENANCE FOR MATERIAL-RELATED EXCISE DUTIES FIELDS:
    Functionality Enhancements
    Provides a specific transaction for mass maintenance of material related excise duties fields
    Business Benefits
    Mass maintenance can now be performed in one step for material-relevant excise duties fields, instead of maintaining the excise duties fields in each material master record separately.
    Regards
    Soundar.G

    Dear Ravi,
    I have already created LSMW for this in Material master and J1ID.
    But i have checked in ECC 6.0 feature, there they are mentioning New t code is available for MASS maintenance of excise duty fields.
    Regards
    Soundar.G

  • MASS MAINTENANCE FOR MATERIAL-RELATED EXCISE DUTIES FIELDS - T CODE

    Dear Experts,
    Is there any separate t code available to  MASS MAINTENANCE FOR MATERIAL-RELATED EXCISE DUTIES FIELDS ?
    I got this POINT from ECC 6.0 features in Solution browser.
    Please help me on this.
    MASS MAINTENANCE FOR MATERIAL-RELATED EXCISE DUTIES FIELDS:
    Functionality Enhancements
    Provides a specific transaction for mass maintenance of material related excise duties fields
    Business Benefits
    Mass maintenance can now be performed in one step for material-relevant excise duties fields, instead of maintaining the excise duties fields in each material master record separately.
    Regards
    Soundar.G

    Dear Ravi,
    I have already created LSMW for this in Material master and J1ID.
    But i have checked in ECC 6.0 feature, there they are mentioning New t code is available for MASS maintenance of excise duty fields.
    Regards
    Soundar.G

  • Chapter id for material

    Hi,
    When creating a material master type consumable or other type  after that made a po without any tax then done migo witiout any posting of excise through j1iex. J1ID is not maintained for  that material after that when updating the excise register sytem gives maintain the chapter id for same material . Pl guide
    NKS

    Hi
    You have maintain the chapter ID for material because based on selection of material whether "Raw Material or Consumable or Asset"  Register will be update RG23A or RG23C and based upon the register whether full utlisation of Excise has to be done will be decided.
    Note - If the J!ID has been maintained automatically excise tab will be avaliable while doing GRN\
    I don't think Excise cannot be captured for the material is excise update during GRN based on MAterial document but you can do based on Purchase order.
    Regards
    davey

  • Need to capture the excise for the excise tab missing item in GR

    Hi Masters
        Our users has done MIGO with one line item(for Material A) with excise item tab and other line item(fro MAterial B) without excise item tab(non availability of Chapter ID).
    They are able to capture excise in J1IEX for the first item only with the help of GR document.
    But they want to capture the excise for the second line item?
    When we process the same GR document in J1IEX once again it shows error that documeny has been already processed.
    How to resolve this?
    Regards
    Mohanraj.C

    Hi,
    If u have done only GR for Both materials then Cancel ur GR and Post it again.
    And if you have Done J1iex for first material then Cancel GR first then Cancel Excise Invoice.
    Now to cancel Excise Invoice follow the path as
    From the SAP Easy Access screen, choose Logistics ® Materials Management ® Inventory Management ® Goods Movement ® Goods Movement (MIGO).
    In the top line:
    Select Cancellation.
    Select Material document.
    Enter the number of the goods receipt that you want to cancel
    Choose .
    Flag all of the line items as OK.
    Save the reversal document.
    Reversing CENVAT Postings
    From the SAP Easy Access screen, choose Indirect Taxes ® Procurement ® Excise Invoice ® Incoming Excise Invoices ® Individual Processing ® Change/Display/Post/Cancel.
    In the top line:
    Select Post CENVAT.
    Select Vendor Excise Invoice.
    Enter the excise invoice number.
    Choose .
    Choose Simulate CENVAT.
    A dialog box appears, showing which postings the system will make to reverse the CENVAT.
    To close the dialog box, choose .
    Choose Post CENVAT.
    Canceling Excise Invoices
    From the SAP Easy Access screen, choose Indirect Taxes ® Procurement ® Excise Invoice ® Incoming Excise Invoices ® Individual Processing ® Change/Display/Post/Cancel.
    In the top line:
    Select Cancel.
    Select Vendor Excise Invoice.
    Enter the excise invoice number.
    Choose .
    Save the excise invoice
    if Not solved then please specify that is error by system.
    Regards,
    Pardeep malik

  • Report for Material consumption quantity  & its cost in Repetitive MFG.

    Hello,
    Is there any Standard Report available in SAP to check the Quantity of raw / intermediate material consumed & their cost in Repetitive manufacturing Backflush transaction MFBF?
    Thanks

    Here I'm interesed in the MFBF Qty & against which the consumption of Raw Materials & their cost.
    The reports which you asked me to check are all structures & not much of use for individual analysis.
    My requirement: When we access the material document(MB51) of the individual MFBF we get all the Raw material Consumption Qty & from there we can go to FI Doc (A/c Document).In A/c documet  we get the cost of all Raw materials consumed alongwith the Qty.
    Is there any report or I need to develope a new report?

  • Report for material consumption

    Can any one guide me in developing a report to find the material consumed during a certain period ,
      selectio screen should me consiting of matrial and date

    Hi
    See the sample report and do accordingly
    report ystk message-id yz2 line-size 231 line-count 45
    no standard page heading.
    Type Declaration *
    type-pools slis.
    Tables *
    tables: mkpf, " Material Document: Header Data
    mseg, " Material Document: Item Data
    mara,
    mard,
    s031,
    ekko,
    ekpo,
    likp,
    makt,
    j_1iwrkcus,
    t001w,
    wb2_v_mkpf_mseg2,
    mmim_rep_print,
    yw2_stkmovements,
    yplnt,
    mardh.
    Internal Tables *
    data: i_werks like j_1iwrkcus occurs 0 with header line.
    data: begin of i_yplnt occurs 0,
    pplnt like yplnt-pplnt,
    wplnt like yplnt-wplnt,
    end of i_yplnt.
    data: begin of i_mkpf occurs 0,
    mblnr like mkpf-mblnr,
    mjahr like mkpf-mjahr,
    budat like mkpf-budat,
    vgart like mkpf-vgart,
    bwart like mseg-bwart,
    matnr like mseg-matnr,
    werks like mseg-werks,
    lgort like mseg-lgort,
    menge like mseg-menge,
    meins like mseg-meins,
    kunnr like mseg-kunnr,
    zeile like mseg-zeile,
    xauto like mseg-xauto,
    shkzg like mseg-shkzg,
    matnr1 like mseg-matnr,
    end of i_mkpf.
    data: begin of i_mardh occurs 0,
    werks like mardh-werks,
    meins like mara-meins,
    matnr like mardh-matnr,
    lgort like mardh-lgort,
    labst like mardh-labst,
    lfgja like mardh-lfgja, "Added -MB
    lfmon like mardh-lfmon, "Added -MB
    perio(6),
    insme like mardh-labst,
    einme like mardh-labst,
    speme like mardh-labst,
    retme like mardh-labst,
    o_stk like mardh-labst, " Opening Stock
    c_stk like mardh-labst, " Closing Stock
    end of i_mardh.
    data: begin of i_mard occurs 0,
    werks like mard-werks,
    matnr like mard-matnr,
    lgort like mard-lgort,
    labst like mard-labst,
    insme like mard-labst,
    meins like mara-meins,
    einme like mard-labst,
    speme like mard-labst,
    retme like mard-labst,
    end of i_mard.
    data: i_mard1 like i_mard occurs 0 with header line.
    data: i_mardh1 like i_mardh occurs 0 with header line.
    data: begin of i_mkpf1 occurs 0,
    mblnr like mkpf-mblnr,
    werks like mseg-werks,
    matnr like mseg-matnr,
    budat like mkpf-budat,
    bwart like mseg-bwart,
    mjahr like mkpf-mjahr,
    vgart like mkpf-vgart,
    lgort like mseg-lgort,
    menge like mseg-menge,
    meins like mseg-meins,
    xauto like mseg-xauto,
    shkzg like mseg-shkzg,
    end of i_mkpf1.
    data: begin of i_mkpf2 occurs 0,
    werks like mseg-werks,
    matnr like mseg-matnr,
    budat like mkpf-budat,
    bwart like mseg-bwart,
    mjahr like mkpf-mjahr,
    vgart like mkpf-vgart,
    lgort like mseg-lgort,
    menge like mseg-menge,
    meins like mseg-meins,
    xauto like mseg-xauto,
    end of i_mkpf2.
    data: begin of i_final5 occurs 0,
    werks like mseg-werks, " Plant
    matnr like mseg-matnr, " Material
    lgort like mseg-lgort, " Storage Location
    budat like mkpf-budat, " Posting Date
    mtart like mara-mtart, " Material Type
    spmon like s031-spmon, " Month
    maktx like makt-maktx, " Description
    meins(3), " UOM
    meins like mseg-meins,
    o_stk like mardh-labst, " opening stock
    trecep like mardh-labst, " total receipts
    produ like mardh-labst, " Net Receipts - Production
    recep like mardh-labst, " Net Receipts - Receipts
    sal_ret like mardh-labst, " Net Receipts - Sales Return
    tdisp like mardh-labst, " total dispatches
    custmr like mardh-labst, " Net Dispatches - Customers
    oplant like mardh-labst, " Net Dispatches - To Other Plant
    tloss like mardh-labst, " Total Loss
    trloss like mardh-labst, " Transit Loss
    whloss like mardh-labst, " Warehouse Loss
    c_stk like mardh-labst, " Closing Stock
    trfstk like mardh-labst, "Transfer stock
    menge like mseg-menge,
    othadj like mardh-labst,
    end of i_final5.
    data: begin of i_final occurs 0,
    werks like mseg-werks, " Plant
    matnr like mseg-matnr, " Material
    budat like mkpf-budat, " Posting Date
    mtart like mara-mtart, " Material Type
    spmon like s031-spmon, " Month
    maktx like makt-maktx, " Description
    meins(3), " UOM
    meins like mseg-meins,
    o_stk like mardh-labst, " opening stock
    trecep like mardh-labst, " total receipts
    produ like mardh-labst, " Net Receipts - Production
    recep like mardh-labst, " Net Receipts - Receipts
    sal_ret like mardh-labst, " Net Receipts - Sales Return
    tdisp like mardh-labst, " total dispatches
    custmr like mardh-labst, " Net Dispatches - Customers
    oplant like mardh-labst, " Net Dispatches - To Other Plant
    trfstk like mardh-labst, "Material Transfer stock
    trloss like mardh-labst, " Transit Loss
    whloss like mardh-labst, " Warehouse Loss
    tloss like mardh-labst, " Total Loss
    c_stk like mardh-labst, " Closing Stock
    othadj like mardh-labst,
    end of i_final.
    data: i_final1 like i_final occurs 0 with header line.
    data: begin of i_final_temp occurs 0,
    werks like mseg-werks, " Plant
    matnr like mseg-matnr, " Material
    mtart like mara-mtart, " Material Type
    maktx like makt-maktx, " Description
    meins like mseg-meins,
    o_stk like mardh-labst, " opening stock
    trecep like mardh-labst, " total receipts
    produ like mardh-labst, " Net Receipts - Production
    recep like mardh-labst, " Net Receipts - Receipts
    sal_ret like mardh-labst, " Net Receipts - Sales Return
    tdisp like mardh-labst, " total dispatches
    custmr like mardh-labst, " Net Dispatches - Customers
    oplant like mardh-labst, " Net Dispatches - To Other Plant
    trfstk like mardh-labst, "Material Transfer stock
    trloss like mardh-labst, " Transit Loss
    whloss like mardh-labst, " Warehouse Loss
    tloss like mardh-labst, " Total Loss
    c_stk like mardh-labst, " Closing Stock
    othadj like mardh-labst,
    end of i_final_temp.
    For Materials
    data: begin of i_mara occurs 0,
    matnr type mara-matnr,
    mtart type mara-mtart,
    meins like mara-meins,
    labst type mard-labst,
    maktx like makt-maktx,
    end of i_mara.
    data: begin of i_stkmvmnts occurs 0,
    bwart like mseg-bwart,
    shkzg like mseg-shkzg,
    vzbew like yw2_stkmovements-vzbew,
    end of i_stkmvmnts.
    data: begin of i_finalt occurs 0,
    werks like mseg-werks, " Plant
    matnr like mseg-matnr, " Material
    budat like mkpf-budat, " Posting Date
    mtart like mara-mtart, " Material Type
    spmon like s031-spmon, " Month
    maktx like makt-maktx, " Description
    meins(3), " UOM
    meins like mseg-meins,
    o_stk like mardh-labst, " opening stock
    trecep like mardh-labst, " total receipts
    produ like mardh-labst, " Net Receipts - Production
    recep like mardh-labst, " Net Receipts - Receipts
    sal_ret like mardh-labst, " Net Receipts - Sales Return
    tdisp like mardh-labst, " total dispatches
    custmr like mardh-labst, " Net Dispatches - Customers
    oplant like mardh-labst, " Net Dispatches - To Other Plant
    trfstk like mardh-labst, "Material Transfer stock
    trloss like mardh-labst, " Transit Loss
    whloss like mardh-labst, " Warehouse Loss
    tloss like mardh-labst, " Total Loss
    c_stk like mardh-labst, " Closing Stock
    othadj like mardh-labst,
    month(8) ,
    end of i_finalt.
    data: imkpft like i_mkpf occurs 0 with header line.
    data: imkpft1 like i_mkpf1 occurs 0 with header line.
    data: imardt like i_mard occurs 0 with header line.
    data: imardht like i_mardh occurs 0 with header line.
    data: t_final like i_mkpf occurs 0 with header line.
    data: imkpft2 like i_mkpf occurs 0 with header line.
    FCAT is used for the field catalog
    data: fcat type table of slis_fieldcat_alv with non-unique default key
    with header line initial size 0,
    for excluding the ICONs from the application toolbar
    fexc type table of slis_extab with non-unique default key
    with header line initial size 0,
    FS_LAYO is used for Grid Layout
    fs_layo type slis_layout_alv,
    FEVENTS to handle the events TOP OF PAGE & USER_COMMAND
    fevents type table of slis_alv_event with non-unique default key
    with header line initial size 0,
    FHEADER is used for List header
    fheader type table of slis_listheader with non-unique default key
    with header line initial size 0,
    sort is used for sorting
    fsort type table of slis_sortinfo_alv with non-unique default key
    with header line initial size 0,
    fcat1 type table of slis_fieldcat_alv with non-unique default key
    with header line initial size 0,
    fs_layo1 type slis_layout_alv,
    gt_list_top_of_page1 type slis_t_listheader,
    fevents1 type table of slis_alv_event with non-unique default key
    with header line initial size 0,
    fheader1 type table of slis_listheader with non-unique default key
    with header line initial size 0,
    g_statu_071 type slis_formname value 'Z_PFSTATUS',
    alv_variant1 like disvariant.
    Variable Declaration *
    types: trff_type_dec_6_5(6) type p decimals 5.
    data: fyear(4),
    mon(2),
    fyear1(4),
    mon1(2),
    obal like mard-labst,
    cbal like mard-labst,
    index type i,
    count,
    count1 type i,
    o_stk type p decimals 3,
    c_stk type p decimals 3,
    v_mjahr like mkpf-mjahr,
    months type trff_type_dec_6_5,
    month type i.
    Global variables for handling ALV functionality
    data: alv_keyinfo type slis_keyinfo_alv,
    alv_variant like disvariant,
    alv_layout type slis_layout_alv,
    alv_repid like sy-repid,
    alv_print type slis_print_alv,
    alv_detail_func(30),
    alv_default_variant like disvariant-variant,
    alv_colourize_fields like mmim_rep_print-color.
    ranges: r_budat for mkpf-budat.
    *Added by Prabhu for year on 26.4.05.
    data: idate like r_budat occurs 0 with header line.
    Selection Screen Elements *
    selection-screen begin of block blk with frame title text-001.
    select-options: s_werks for mard-werks obligatory
    no intervals.
    parameter: p_spmon like s031-spmon no-display .
    select-options: s_matnr for mara-matnr obligatory,
    s_lgort for mseg-lgort no-extension no intervals,
    s_mblnr for mkpf-mblnr,
    s_budat for mkpf-budat obligatory .
    selection-screen end of block blk.
    selection-screen begin of block blk3 with frame title text-004.
    parameter : mtart like mara-mtart
    default 'FERT' no-display.
    selection-screen end of block blk3.
    selection-screen begin of block blk2 with frame title text-003.
    selection-screen end of block blk2.
    ADDED BY PRABHU FOR DAY-WISE REPORT.
    selection-screen begin of block b3 with frame title text-007.
    parameters: d1 radiobutton group p1 default 'X',
    m1 radiobutton group p1,
    y1 radiobutton group p1.
    selection-screen end of block b3.
    selection-screen begin of block b2 with frame title text-006.
    parameters: alv_def like disvariant-variant.
    selection-screen end of block b2.
    data: s_budat1 like s_budat occurs 0 with header line."prabhu
    Initialization *
    initialization.
    perform alv_init.
    at selection-screen on value-request for alv_def.
    perform alv_f4.
    At Selection Screen
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_spmon.
    PERFORM monat_f4.
    At Selection Screen *
    at selection-screen.
    checking for the layout
    perform alv_check.
    authorisation check for the Plant
    PERFORM auth_check.
    Validation for the Plant
    perform validity_check.
    if mtart ne 'FERT'.
    message e041 with 'Material Type must be FERT Only...'.
    endif.
    if d1 = 'X'." On 26.4.05.
    p_spmon0(4) = s_budat-low0(4).
    p_spmon4(2) = s_budat-low4(2).
    else.
    p_spmon0(4) = s_budat-low0(4).
    p_spmon4(2) = s_budat-low4(2).
    endif.
    loop at s_budat.
    if s_budat-high is initial.
    s_budat-high = s_budat-low.
    modify s_budat.
    endif.
    endloop.
    idate-low = s_budat-low.
    idate-high = s_budat-high.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    exporting
    i_date_from = idate-low
    i_date_to = idate-high
    importing
    E_DAYS =
    e_months = month
    E_YEARS =
    data: i(3) type c.
    i = s_budat-low+4(2).
    clear: r_budat.
    refresh: r_budat.
    *added by Prabhu for Only for Oneday.on 18.5.5
    if month eq '0'.
    month = month + 1.
    endif.
    *added by Prabhu for Only for Oneday.on 18.5.5
    do month times.
    r_budat-low = s_budat-low.
    append r_budat.
    enddo.
    i = 0.
    loop at r_budat.
    r_budat-low4(2) = s_budat-low4(2) + i.
    i = i + 1.
    r_budat-low+6(2) = '01'.
    modify r_budat.
    endloop.
    loop at r_budat.
    call function 'RP_LAST_DAY_OF_MONTHS'
    exporting
    day_in = r_budat-low
    importing
    last_day_of_month = r_budat-high
    EXCEPTIONS
    DAY_IN_NO_DATE = 1
    OTHERS = 2
    modify r_budat.
    endloop.
    loop at r_budat.
    if r_budat-low4(2) = s_budat-low4(2).
    r_budat-low = s_budat-low.
    modify r_budat.
    endif.
    if r_budat-high4(2) = s_budat-high4(2).
    r_budat-high = s_budat-high.
    modify r_budat.
    endif.
    For Summary on 26.4.05.
    if y1 = 'X'.
    clear r_budat.
    refresh r_budat.
    r_budat-low = s_budat-low.
    r_budat-high = s_budat-high.
    append r_budat.
    clear r_budat.
    endif.
    endloop.
    At Selection Screen *
    at selection-screen output.
    Start of Selection *
    start-of-selection.
    v_mjahr = p_spmon+0(4).
    Get plant distinction warehouse/production
    perform get_plant_distinction.
    Collect the data from various tables
    perform getdata_fg_stock.
    here the number of rows in the output table is found
    perform output_table_check.
    here the top of the page code is written, that is to be displayed
    in the output
    perform z_top_of_page.
    here ALV layout properties are set
    perform z_layout_settings.
    ALV EVENTS for TOP OF PAGE and for USER COMMAND
    perform z_alv_events.
    The field catalog is defined for the Primary List is defined in
    the subroutine CREATE_FIELD_CATALOG include program ZPRRDOCR_FCAT
    perform z_create_field_catalog.
    This is for displaying the output
    perform z_reuse_alv_grid_display.
    *& Form getdata_fg_stock
    Getting data from standard tables
    form getdata_fg_stock.
    For getting the Start date & end date of the month
    PERFORM get_month_dates.
    Getting the Opening Stock from MARDH table
    if mon eq '01'.
    mon1 = mon.
    fyear1 = fyear.
    mon = '12'.
    fyear = fyear - 1.
    else.
    mon1 = mon.
    fyear1 = fyear.
    mon = mon - 1.
    fyear = fyear.
    endif.
    perform get_records_from_db.
    *added for Month Summary on 26.4.05.
    loop at r_budat.
    s_budat-low = r_budat-low.
    s_budat-high = r_budat-high.
    *for Month
    p_spmon0(4) = s_budat-low0(4).
    p_spmon4(2) = s_budat-low4(2).
    *for summary.
    if y1 = 'X'.
    loop at s_budat.
    s_budat1-sign = 'I'.
    s_budat1-option = 'NB'.
    s_budat1-low = s_budat-low.
    s_budat1-high = s_budat-high.
    append s_budat1.
    clear s_budat1.
    endloop.
    endif.
    imkpft[] = i_mkpf[].
    imkpft2[] = i_mkpf[].
    imardt[] = i_mard[].
    imardht[] = i_mardh[].
    perform month_wise.
    perform process_movements.
    perform calculate_opening_stock.
    perform update_non_transaction_itms.
    perform delete_empty_records.
    clear: imardht,imardt,imkpft1,imkpft,i_final,i_final5.
    refresh: imardht,imardt,imkpft1,i_final,i_final5,imkpft.
    endloop.
    clear: r_budat.
    refresh: r_budat.
    *end of changes for month.
    endform. " getdata_fg_stock
    FORM MONAT_F4 *
    F4-Hilfe für Monat *
    form monat_f4.
    data: begin of mf_dynpfields occurs 1.
    include structure dynpread.
    data: end of mf_dynpfields.
    data: mf_returncode like sy-subrc,
    mf_monat like isellist-month,
    mf_hlp_repid like sy-repid.
    field-symbols: .
    Wert von Dynpro lesen
    get cursor field mf_dynpfields-fieldname.
    append mf_dynpfields.
    mf_hlp_repid = sy-repid.
    do 2 times.
    call function 'DYNP_VALUES_READ'
    exporting
    dyname = mf_hlp_repid
    dynumb = sy-dynnr
    tables
    dynpfields = mf_dynpfields
    exceptions
    invalid_abapworkarea = 01
    invalid_dynprofield = 02
    invalid_dynproname = 03
    invalid_dynpronummer = 04
    invalid_request = 05
    no_fielddescription = 06
    undefind_error = 07.
    if sy-subrc = 3.
    Aktuelles Dynpro ist Wertemengenbild
    mf_hlp_repid = 'SAPLALDB'.
    else.
    read table mf_dynpfields index 1.
    Unterstriche durch Blanks ersetzen
    translate mf_dynpfields-fieldvalue using '_ '.
    exit.
    endif.
    enddo.
    if sy-subrc = 0.
    Konvertierung ins interne Format
    call function 'CONVERSION_EXIT_PERI_INPUT'
    exporting
    input = mf_dynpfields-fieldvalue
    importing
    output = mf_monat
    exceptions
    error_message = 1.
    if mf_monat is initial.
    Monat ist initial => Vorschlagswert aus akt. Datum ableiten
    mf_monat = sy-datlo(6).
    endif.
    call function 'POPUP_TO_SELECT_MONTH'
    exporting
    actual_month = mf_monat
    importing
    selected_month = mf_monat
    return_code = mf_returncode
    exceptions
    factory_calendar_not_found = 01
    holiday_calendar_not_found = 02
    month_not_found = 03.
    if sy-subrc = 0 and mf_returncode = 0.
    ASSIGN (MF_DYNPFIELDS-FIELDNAME) TO <MF_FELD>. " ==>> note 148804
    <MF_FELD> = MF_MONAT.
    call function 'CONVERSION_EXIT_PERI_OUTPUT'
    exporting
    input = mf_monat
    importing
    output = mf_dynpfields-fieldvalue.
    collect mf_dynpfields.
    call function 'DYNP_VALUES_UPDATE'
    exporting
    dyname = mf_hlp_repid
    dynumb = sy-dynnr
    tables
    dynpfields = mf_dynpfields
    exceptions
    invalid_abapworkarea = 01
    invalid_dynprofield = 02
    invalid_dynproname = 03
    invalid_dynpronummer = 04
    invalid_request = 05
    no_fielddescription = 06
    undefind_error = 07. "<<== note 148804
    endif.
    endif.
    endform. "MONAT_F4
    *& Form get_month_dates
    Calculating the Month Start & End Date
    form get_month_dates.
    if m1 = 'X'.
    fyear = p_spmon+0(4).
    mon = p_spmon+4(2).
    concatenate fyear mon '01' into r_budat-low.
    r_budat-sign = 'I'.
    r_budat-option = 'BT'.
    call function 'BKK_GET_MONTH_LASTDAY'
    exporting
    i_date = r_budat-low
    importing
    e_date = r_budat-high.
    append r_budat.
    clear s_budat.
    refresh s_budat.
    s_budat-sign = 'I'.
    s_budat-option = 'BT'.
    s_budat-low = r_budat-low.
    s_budat-high = r_budat-high.
    append s_budat.
    else.
    fyear = p_spmon+0(4).
    mon = p_spmon+4(2).
    concatenate fyear mon '01' into r_budat-low.
    r_budat-sign = 'I'.
    r_budat-option = 'BT'.
    call function 'BKK_GET_MONTH_LASTDAY'
    exporting
    i_date = r_budat-low
    importing
    e_date = r_budat-high.
    append r_budat.
    endif.
    endform. " get_month_dates
    *& Form output_table_Check
    checking for records for output
    form output_table_check .
    describe table i_finalt lines index.
    if index eq 0.
    message i041 with text-005.
    leave list-processing.
    endif.
    endform. "OUTPUT_TABLE_CHECK
    *& Form Z_TOP_OF_PAGE
    for setting the details in the top of page *
    has no formal paramters *

  • Report for material list

    hi,
    i want a material list for which if i specify a period i will get materials with
    a)No goods reciept
    b)No stock or material movement(issue/transfer posting etc).
    c)no sales or shipping.
    should have happened for the materials for that period.
    if no standard report exists can you tell me the algoritthm.
    urgent: satisfying answers will be awarded full points

    Rajkiran,
    am sure you will never setisfy even we send you number of report because you have to chenge according to your requirement.dont expect spoon feeding.
    *& Object Id               :                                                  &*
    *& Object Name             : ZMM_STO_REGISTER                                 &*
    *& Function Module Name    : MM                                               &*
    *& Transaction Code        : ZMMSTO                                           &*
    *& Author                  : Amit&*
    *& Module Name             : MATERIAL MANAGEMENT                              &*
    *& Sub-Module              :                                                  &*
    *& Program Type            : Report                                           &*
    *& Create Date             : 28.03.2007                                       &*
    *& Completion Date         : 30.03.2007                                       &*
    *& SAP Release             :                                                  &*
    *& Description             : STO REGISTER                                     &*
    *& MODIFICATION LOG        : MODIFIED AT 30.04.2007 adding new field          &*
    *&                          chapter-id by chakrapani mishra                   &*
    REPORT  zmm_sto_register.
    *                             TABLES USED                                     *
    TABLES :vbrk,                                   "Billing Document: Header Data
            vbrp,                                   "Billing Document: Item Data
            mara,                                   "General Material Data
            konv,                                   "Conditions (Transaction Data)
            t023t,                                  "Material Group Descriptions
            ekko,                                   "Purchasing Document Header
            likp,                                   "SD Document: Delivery Header Data
            mvke,                                   "Sales Data for Material
            t001w,                                  "Plants/Branches
            marm,                                   "Units of Measure for Material
            j_1imtchid,                             "Combination of Material Number and Chapter ID
            mseg,
            mkpf,
            j_1iexchdr.
    TYPE-POOLS : slis.                              "TYPE POOL SLIS
    *                      INTERNAL TABLES                                      *
    DATA: BEGIN OF t_vbrp OCCURS 0,                "INTERNAL TABLE FOR VBRP
            vbeln LIKE vbrp-vbeln,                 "Billing Document
            vstel LIKE vbrp-vstel,                 "Shipping Point/Receiving Point
           vgbel LIKE vbrp-vgbel,                 "Document number of the reference document
            aubel LIKE vbrp-aubel,                 "Sales Document
            matnr LIKE vbrp-matnr,                 "Material Number
            arktx LIKE vbrp-arktx,                 "Short text for sales order item
            matkl LIKE vbrp-matkl,                 "Material Group
            fkimg LIKE vbrp-fkimg,                 "Actual Invoiced Quantity
            werks LIKE vbrp-werks,                 "Plant
            posnr LIKE vbrp-posnr,                 " Billing item
            vrkme LIKE vbrp-vrkme,                 " Sales unit
            vgbel1 LIKE mkpf-xblnr,
    END OF t_vbrp.
    DATA: BEGIN OF t_vbrk OCCURS 0,                 "INTERNAL TABLE FOR VBRK
            kunag LIKE vbrk-kunag,                  "Sold-to party
            vbeln LIKE vbrk-vbeln,                  "Billing Document
            fkdat LIKE vbrk-fkdat,                  "Billing date for billing index and printout
            knumv LIKE vbrk-knumv,                  "Number of the document condition
            fkart LIKE vbrk-fkart,                  "Billing Type
            vtweg LIKE vbrk-vtweg,                  "Distribution Channel
            vkorg LIKE vbrk-vkorg,                  "Sales Organization
            erzet LIKE vbrk-erzet,
            w_flag TYPE c,
            l_tabix TYPE sy-tabix,
    END OF t_vbrk.
    DATA: BEGIN OF t_temp1 OCCURS 0,                 "INTERNAL TABLE FOR VBRK
           vbeln LIKE vbrp-vbeln,                 "Billing Document
           fkart LIKE vbrk-fkart,
          fkdat LIKE vbrk-fkdat,
           vgbel LIKE vbrp-vgbel,                 "Document number of the reference document
           werks LIKE vbrp-werks,
           w_flag TYPE c,
    END OF t_temp1.
    DATA: BEGIN OF t_mara OCCURS 0,                 "INTERNAL TABLE FOR MARA
            matnr LIKE mara-matnr,                  "Material Number
            mtart LIKE mara-mtart,                  "Material Type
            wrkst LIKE mara-wrkst,                  "Finish
            extwg LIKE mara-extwg,                  "Design
            labor LIKE mara-labor,                  "Grade/Category No.
            normt LIKE mara-normt,                  "Thickness in mm
            bismt LIKE mara-bismt,                  "Size (L*B) in mm
            matkl LIKE mara-matkl,
            spart LIKE mara-spart,
            meins LIKE mara-meins,
    END OF t_mara.
    DATA : BEGIN OF t_konv OCCURS 0,                "INTERNAL TABLE FOR KONV
            knumv LIKE konv-knumv,                  "Number of the document condition
            kposn LIKE konv-kposn,                  "Condition item number
            kschl LIKE konv-kschl,                  "Condition type
            kwert LIKE konv-kwert,                  "Condition value
            kbetr LIKE konv-kbetr,                  "Condition rate
            END OF t_konv.
    DATA : BEGIN OF t_likp OCCURS 0,               "INTERNAL TABLE FOR LIKP
            vbeln LIKE likp-vbeln,                 "Delivery
            lfdat LIKE likp-lfdat,                 "Delivery Date
            kunnr LIKE likp-kunnr,
            bldat LIKE likp-bldat,                " document date
            vbeln_kp LIKE mkpf-xblnr, " likp-vbeln,
            END OF t_likp.
    DATA : BEGIN OF t_t023t OCCURS 0,              "INTERNAL TABLE FOR T023T
            matkl LIKE t023t-matkl,               "Material Group
            wgbez LIKE t023t-wgbez,                "Material Group Description
            spras LIKE t023t-spras,                "Language Key
            END OF t_t023t.
    DATA : BEGIN OF t_ekko OCCURS 0,               "INTERNAL TABLE FOR EKKO
            ebeln LIKE ekko-ebeln,                 "Purchasing Document Number
            bsart LIKE ekko-bsart,                 "Purchasing Document Type
            aedat LIKE ekko-aedat,                 "Date on Which Record Was Created
            knumv LIKE ekko-knumv,                 "Number of the document condition
            END OF t_ekko.
    DATA : BEGIN OF t_ekpo OCCURS 0,               "INTERNAL TABLE FOR EKKO
            ebeln LIKE ekko-ebeln,                 "Purchasing Document Number
            loekz LIKE ekko-loekz,                 "Purchasing Document Type
            END OF t_ekpo.
    DATA : BEGIN OF t_mvke OCCURS 0,
            matnr LIKE mvke-matnr,
            mvgr1 LIKE mvke-mvgr1,
            END OF t_mvke.
    DATA : BEGIN OF t_t001w OCCURS 0,                "INTERNAL TABLE FOR KONV
            werks LIKE t001w-werks,                  "Number of the document condition
            name1 LIKE t001w-name1,                  "Condition type
            kunnr LIKE t001w-kunnr,                  "Condition value
            name2 LIKE t001w-name2,                  "Condition item number
           END OF t_t001w.
    DATA : BEGIN OF t_t001w2 OCCURS 0,                "INTERNAL TABLE FOR KONV
            werks LIKE t001w-werks,                  "Number of the document condition
            name1 LIKE t001w-name1,                  "Condition type
            kunnr LIKE t001w-kunnr,                  "Condition value
            name2 LIKE t001w-name2,                  "Condition item number
           END OF t_t001w2.
    DATA : BEGIN OF t_marm OCCURS 0,
            matnr LIKE marm-matnr,
            meinh LIKE marm-meinh,
            umrez LIKE marm-umrez,
            umren LIKE marm-umren,
            END OF t_marm.
    DATA : BEGIN OF t_tvm1t OCCURS 0,
            mvgr1 LIKE tvm1t-mvgr1,
            bezie LIKE tvm1t-bezei,
            END OF t_tvm1t.
    **********************modification additioon of chapter ID  30.04.2007
    DATA : BEGIN OF t_j_1imtchid OCCURS 0,              "INTERNAL TABLE FOR j_1imtchid
            matnr LIKE j_1imtchid-matnr,                "Material Number
           j_1ichid LIKE j_1imtchid-j_1ichid,           "Chapter ID
            END OF t_j_1imtchid.
    DATA : BEGIN OF t_j_1iexchdr OCCURS 0,              "INTERNAL TABLE FOR j_1imtchid
            exnum LIKE j_1iexchdr-exnum,                "Material Number
            exdat LIKE j_1iexchdr-exdat,                "Chapter ID
            rdoc LIKE j_1iexchdr-rdoc,
            werks LIKE j_1iexchdr-werks,
            status LIKE j_1iexchdr-status,
            trntyp LIKE j_1iexchdr-trntyp,
            END OF t_j_1iexchdr.
    **********************modification additioon of chapter ID  30.04.2007
    DATA: BEGIN OF t_final OCCURS 0,                  "INTERNAL TABLE T_FINAL
              fkart LIKE vbrk-fkart,
              kunag LIKE vbrk-kunag,
              vbeln_k LIKE vbrk-vbeln,
              fkdat LIKE vbrk-fkdat,
              knumv LIKE vbrk-knumv,
              fkart1 LIKE vbrk-fkart,
              vtweg LIKE vbrk-vtweg,
              vkorg LIKE vbrk-vkorg,
              vbeln LIKE likp-vbeln,                 "Delivery
              vbeln_p LIKE vbrp-vbeln,
              vstel LIKE vbrp-vstel,
              "vgbel like mkpf-xblnr,
              vgbel LIKE vbrp-vgbel,
              aubel LIKE vbrp-aubel,
              matnr LIKE vbrp-matnr,
              arktx LIKE vbrp-arktx,
              matkl LIKE vbrp-matkl,
              fkimg LIKE vbrp-fkimg,
              posnr LIKE vbrp-posnr,
              vrkme LIKE vbrp-vrkme,
              matnr_m LIKE mara-matnr,
              mtart LIKE mara-mtart,
              wrkst LIKE mara-wrkst,
              extwg LIKE mara-extwg,
              labor LIKE mara-labor,
              normt LIKE mara-normt,
              bismt LIKE mara-bismt,
              spart LIKE mara-spart,
              meins LIKE mara-meins,
              kposn LIKE konv-kposn,
              kschl LIKE konv-kschl,
              kwert LIKE konv-kwert,
              kwert1 LIKE konv-kwert,
              kwert2 LIKE konv-kwert,
              kwert3 LIKE konv-kwert,
              kwert4 LIKE konv-kwert,
              kwert5 LIKE konv-kwert,
              kbetr LIKE konv-kbetr,
              vbeln_kp LIKE mkpf-xblnr, " likp-vbeln,
              lfdat LIKE likp-lfdat,
              wgbez LIKE t023t-wgbez,
              spras LIKE t023t-spras,
              bsart LIKE ekko-bsart,
              aedat LIKE ekko-aedat,
    **********************modification additioon of chapter ID  30.04.2007
           j_1ichid LIKE j_1imtchid-j_1ichid ,
    **********************modification additioon of chapter ID  30.04.2007
              total TYPE  p  DECIMALS 2,
              mvgr1 LIKE mvke-mvgr1,
              werks LIKE t001w-werks,                  "Number of the document condition
              kunnr LIKE t001w-kunnr,                  "Condition value
              name1 LIKE t001w-name1,                  "Condition type
              name2 LIKE t001w-name2,                  "Condition item number
              werks1 LIKE t001w-werks,                  "Number of the document condition
              kunnr1 LIKE t001w-kunnr,                  "Condition value
              name11 LIKE t001w-name1,                  "Condition type
              name21 LIKE t001w-name2,
              exnum LIKE j_1iexchdr-exnum,                "Material Number
              exdat LIKE j_1iexchdr-exdat,           "Chapter ID
              rdoc LIKE j_1iexchdr-rdoc,
              bom TYPE p DECIMALS 4,
              mult TYPE p DECIMALS 4,
              bezie LIKE tvm1t-bezei,
              length(5) TYPE n,
              breath(5) TYPE n,
               bldat LIKE likp-bldat,                " document date
              size(15) TYPE p DECIMALS 2,
              area(15) TYPE  p DECIMALS 2,
               mblnr TYPE mseg-mblnr,     "Number of Material Document
               mjahr TYPE mseg-mjahr,     "Material Document Year
               budat TYPE mkpf-budat,     "Posting period
               w_flag TYPE c,
                flag TYPE c,
        END OF t_final.
    DATA : BEGIN OF t_temp OCCURS 0,
           kunag LIKE vbrk-kunag,
              vbeln_k LIKE vbrk-vbeln,
              fkdat LIKE vbrk-fkdat,
              knumv LIKE vbrk-knumv,
              fkart LIKE vbrk-fkart,
              vtweg LIKE vbrk-vtweg,
              vkorg LIKE vbrk-vkorg,
              vbeln LIKE likp-vbeln,                 "Delivery
              vbeln_p LIKE vbrp-vbeln,
              vstel LIKE vbrp-vstel,
              "vgbel like mkpf-xblnr,
              vgbel LIKE vbrp-vgbel,
              aubel LIKE vbrp-aubel,
              matnr LIKE vbrp-matnr,
              arktx LIKE vbrp-arktx,
              matkl LIKE vbrp-matkl,
              fkimg LIKE vbrp-fkimg,
              posnr LIKE vbrp-posnr,
              vrkme LIKE vbrp-vrkme,
              matnr_m LIKE mara-matnr,
              mtart LIKE mara-mtart,
              wrkst LIKE mara-wrkst,
              extwg LIKE mara-extwg,
              labor LIKE mara-labor,
              normt LIKE mara-normt,
              bismt LIKE mara-bismt,
              spart LIKE mara-spart,
              meins LIKE mara-meins,
              kposn LIKE konv-kposn,
              kschl LIKE konv-kschl,
              kwert LIKE konv-kwert,
              kwert1 LIKE konv-kwert,
              kwert2 LIKE konv-kwert,
              kwert3 LIKE konv-kwert,
              kwert4 LIKE konv-kwert,
              kwert5 LIKE konv-kwert,
              kbetr LIKE konv-kbetr,
              vbeln_kp LIKE mkpf-xblnr, " likp-vbeln,
              lfdat LIKE likp-lfdat,
              wgbez LIKE t023t-wgbez,
              spras LIKE t023t-spras,
              bsart LIKE ekko-bsart,
              aedat LIKE ekko-aedat,
    **********************modification additioon of chapter ID  30.04.2007
           j_1ichid LIKE j_1imtchid-j_1ichid ,
    **********************modification additioon of chapter ID  30.04.2007
              total TYPE  p  DECIMALS 2,
              mvgr1 LIKE mvke-mvgr1,
              werks LIKE t001w-werks,                  "Number of the document condition
              kunnr LIKE t001w-kunnr,                  "Condition value
              name1 LIKE t001w-name1,                  "Condition type
              name2 LIKE t001w-name2,                  "Condition item number
              werks1 LIKE t001w-werks,                  "Number of the document condition
              kunnr1 LIKE t001w-kunnr,                  "Condition value
              name11 LIKE t001w-name1,                  "Condition type
              name21 LIKE t001w-name2,
              exnum LIKE j_1iexchdr-exnum,                "Material Number
              exdat LIKE j_1iexchdr-exdat,           "Chapter ID
              rdoc LIKE j_1iexchdr-rdoc,
              bom TYPE p DECIMALS 4,
              mult TYPE p DECIMALS 4,
              bezie LIKE tvm1t-bezei,
              length(5) TYPE n,
              breath(5) TYPE n,
              size(15) TYPE p DECIMALS 2,
              area(15) TYPE  p DECIMALS 2,
               mblnr TYPE mseg-mblnr,     "Number of Material Document
               mjahr TYPE mseg-mjahr,     "Material Document Year
               budat TYPE mkpf-budat,     "Posting period
            END OF t_temp.
    DATA : BEGIN OF it_mseg OCCURS 0,
             werks LIKE mseg-werks,
             matnr LIKE mseg-matnr,
             ebeln LIKE mseg-ebeln,
             mblnr TYPE mseg-mblnr,    "Number of Material Document
             mjahr TYPE mseg-mjahr,     "Material Document Year
           END OF it_mseg.
    DATA : BEGIN OF it_mkpf OCCURS 0,
              budat TYPE mkpf-budat,
              mblnr TYPE mkpf-mblnr,
             tcode2 LIKE mkpf-tcode2,
            "  xblnr(10) TYPE C,
             xblnr LIKE likp-vbeln,                 "Delivery
           END OF it_mkpf.
    DATA : BEGIN OF it_vbuk OCCURS 0,
            vbeln LIKE vbuk-vbeln,
            wbstk LIKE vbuk-wbstk,
            END OF it_vbuk.
    DATA : it_vbrk LIKE t_vbrk OCCURS 0 WITH HEADER LINE.
    DATA : it_vbrp LIKE t_vbrp OCCURS 0 WITH HEADER LINE.
    DATA : it_mara LIKE t_mara OCCURS 0 WITH HEADER LINE.
    TYPES : w_str TYPE  string,
            str  TYPE  string.
    *                      WORK AREAS                                         *
    DATA:  wa_vbrk    LIKE  t_vbrk.                     "WORK AREA FOR VBRK
    DATA:  wa_vbrp    LIKE  t_vbrp.                     "WORK AREA FOR VBRP
    DATA:  wa_mara    LIKE  t_mara.                     "WORK AREA FOR MARA
    DATA:  wa_sfinal  LIKE  t_temp.                    "WORK AREA FOR T_FINAL
    DATA:  wa_sfinal1  LIKE  t_final.                    "WORK AREA FOR T_FINAL
    DATA:  wa_mseg    LIKE  it_mseg.                     "Workarea for  internal table mseg
    DATA :  wa_vbeln LIKE t_vbrk-vbeln.
    DATA:  wa_mkpf    LIKE  it_mkpf.                     "Workarea for  internal table mkpf
    *                          ALV                                           *
    DATA: it_fieldcat     TYPE    slis_t_fieldcat_alv,
          wa_fieldcat     LIKE    LINE OF it_fieldcat,
          it_top_of_page  TYPE    slis_t_listheader,
          ls_layout       TYPE    slis_layout_alv,
          gt_events       TYPE    slis_t_event.
    *                     SELECTION-SCREEN                                    *
    SELECTION-SCREEN BEGIN OF BLOCK detail WITH FRAME TITLE text-000.
    SELECT-OPTIONS: supp_pnt FOR vbrp-vstel OBLIGATORY.              "SUPPLYING PLANT
    SELECT-OPTIONS: recv_pnt FOR vbrk-kunag OBLIGATORY.              "RECEIVING PLANT
    SELECT-OPTIONS: period   FOR vbrk-fkdat OBLIGATORY.              "PERIOD
    SELECT-OPTIONS: budat    FOR mkpf-budat.                        " MIGO DATE
    SELECTION-SCREEN  END OF BLOCK detail.
    *                   START-OF-SELECTION                                 *
    ***********************************POPULATING DATA
    PERFORM populating_data.
    **********************************MOVE DATA
    PERFORM move_data.
    *********************************DATA- FETCHING
    PERFORM data_fetching.
    *********************************GET ALV  DATA
    PERFORM alv_get_data.
    *********************************ALV GRID DATA
    PERFORM alv_grid.
    *********************************TOP OF PAGE
    PERFORM top_of_page.
    *                    VALIDATION  OF SELECTION SCREEN                     *
    AT SELECTION-SCREEN ON period.
      IF period-high IS INITIAL.
        MESSAGE e001(zamit).
      ENDIF.
    *                      SELECTION OF DATA                        *
    FORM populating_data.
    *************POPULATING DATA FROM VBRK
      CLEAR   t_vbrk.
      REFRESH t_vbrk.
      SELECT  kunag
              vbeln
              fkdat
              knumv
              fkart
              vtweg
              vkorg
              erzet
      FROM vbrk INTO TABLE t_vbrk
      WHERE kunag IN recv_pnt AND
            fkdat IN period   AND
                fkart = 'JEX' OR
                fkart = 'F8'  AND
                vtweg = '10'  AND
                vkorg = '1000'.
      DELETE t_vbrk[]   WHERE fkdat = '' .
      DELETE t_vbrk[]   WHERE fkdat NOT IN period.
      DELETE t_vbrk[]   WHERE kunag NOT IN recv_pnt.
      IF t_vbrk[] IS INITIAL.
        MESSAGE i002(zamit).
        LEAVE LIST-PROCESSING.
      ENDIF.
      DELETE t_vbrk WHERE fkdat NOT IN period.
    *DATA: l_tabix TYPE sy-tabix.           " declare the sy-tabix as local variable
    *DATA: l_lines TYPE sy-tabix.
    *DATA: l_index TYPE sy-tabix.
    *"SORT T_VBRK DESCENDING BY vbeln.
    *SORT T_VBRK ASCENDING BY vbeln fkart .
    *DESCRIBE TABLE t_vbrk LINES  l_lines .       "The current number of table rows of the internal table itab is determined and is assigned to the data object lin
    *CHECK l_lines > 1.                               " check lines are greater than 1
    *LOOP AT t_vbrk.
    *  l_tabix = sy-tabix.                              " assine Index of Internal Tables into local var l_tabix
    *  l_index = l_tabix + 1.
    *  IF t_vbrk-fkart = 'F8'.                          " loop on the temp table
    *READ TABLE t_vbrk INTO wa_vbrk INDEX l_index.  " read the temp table with index l_index
    *IF sy-subrc = 0.
    *CHECK t_vbrk-vbeln < wa_vbrk-vbeln .
    *  if sy-subrc =  0.
    *  t_vbrk-W_FLAG = 'X'.
    *  MODIFY t_vbrk TRANSPORTING W_FLAG.
    *endif.
    * endif.
    *else.
    *  exit.
    *endif.
    *endloop.
    *LOOP at t_vbrk.
    *DELETE t_vbrk WHERE w_flag = 'X' .
    *endloop.
    *" change  by kalika dated 28.06.2007
    **" change  by kalika dated 28.06.2007
    *************POPULATING DATA FROM VBRP
      IF t_vbrk[] IS NOT INITIAL.
        CLEAR   t_vbrp.
        REFRESH t_vbrp.
        SELECT  vbeln
                vstel
                vgbel
                aubel
                matnr
                arktx
                matkl
                fkimg
                werks
                posnr
                vrkme
         FROM vbrp INTO TABLE t_vbrp
         FOR ALL ENTRIES IN t_vbrk
         WHERE vbeln = t_vbrk-vbeln
         AND vstel IN supp_pnt  .
      ENDIF.
      IF sy-subrc <> 0.
        MESSAGE i000(zamit).
        LEAVE LIST-PROCESSING.
      ENDIF.
      IF t_vbrp[] IS NOT INITIAL.
        SELECT vbeln wbstk FROM vbuk
          INTO TABLE it_vbuk FOR ALL ENTRIES IN
          t_vbrp WHERE vbeln = t_vbrp-vgbel.
      ENDIF.
      "DELETE t_vbrp[] WHERE vstel NOT in supp_pnt.  " by kalika
    *************POPULATING DATA FROM MARA
      it_vbrp[] = t_vbrp[].
      " it_vbrp-vgbel1 = t_vbrp-vgbel.
      "SORT it_vbrp BY matnr.
      SORT t_vbrp BY vbeln.
      "  DELETE ADJACENT DUPLICATES FROM it_vbrp COMPARING matnr . by kalika
    *  IF t_vbrp IS NOT INITIAL.
      CLEAR   t_mara.
      REFRESH t_mara.
      SELECT  matnr
              mtart
              wrkst
              extwg
              labor
              normt
              bismt
              matkl
              spart
              meins
         FROM mara INTO TABLE t_mara
              FOR ALL ENTRIES IN it_vbrp WHERE
              matnr = it_vbrp-matnr .
    *  ENDIF.
    *************POPULATING DATA FROM KONV
      it_vbrk[] = t_vbrk[].
      SORT it_vbrk BY knumv .
      DELETE ADJACENT DUPLICATES FROM it_vbrk COMPARING knumv .
      CLEAR   t_konv.
      REFRESH t_konv.
      SELECT  knumv
              kposn
              kschl
              kwert
              kbetr
         FROM konv INTO TABLE t_konv
         FOR ALL ENTRIES IN it_vbrk
           WHERE knumv = it_vbrk-knumv.
      DELETE t_konv WHERE
                             kschl <> 'ZR02'
                             AND  kschl <> 'JEXP'
                             AND  kschl <> 'JECS'
                             AND  kschl <> 'DIFF'.
    *************POPULATING DATA FROM LIKP
      it_vbrp[] = t_vbrp[].
      SORT it_vbrp BY vgbel.
      " DELETE ADJACENT DUPLICATES FROM it_vbrp COMPARING vgbel . by kalika
      CLEAR   t_likp.
      REFRESH t_likp.
      SELECT  vbeln
              lfdat
              bldat  " NEW CHANGE
         FROM likp INTO CORRESPONDING FIELDS OF TABLE t_likp
         FOR ALL ENTRIES IN it_vbrp
         WHERE vbeln = it_vbrp-vgbel.
    *************POPULATING DATA FROM T023T
      it_mara[] = t_mara[].
      SORT it_mara BY matkl .
      DELETE ADJACENT DUPLICATES FROM it_mara COMPARING matkl.
      CLEAR   t_t023t.
      REFRESH t_t023t.
      IF t_mara[] IS NOT INITIAL.
        SELECT  matkl
                wgbez
                spras
           FROM t023t INTO TABLE t_t023t
           FOR ALL ENTRIES IN it_mara
           WHERE matkl = it_mara-matkl  AND
                 spras = sy-langu.
      ENDIF.
    *************POPULATING DATA FROM EKKO
      it_vbrp[] = t_vbrp[].
      SORT it_vbrp BY aubel.
      " DELETE ADJACENT DUPLICATES FROM it_vbrp COMPARING aubel. by kalika
      CLEAR t_ekko.
      REFRESH t_ekko.
      SELECT ebeln
             bsart
             aedat
             knumv
        FROM ekko
        INTO TABLE t_ekko
        FOR ALL ENTRIES IN it_vbrp
       WHERE ebeln = it_vbrp-aubel
              AND bsart LIKE 'U%'.
    ************************delete invoice where it is being deleted from the system
    *SELECT  ebeln  loekz
    *  FROM ekpo
    *  INTO CORRESPONDING FIELDS OF TABLE t_ekpo
    *  FOR ALL ENTRIES IN t_ekko
    *  WHERE ebeln = t_ekko-ebeln.
    *DELETE t_ekpo WHERE loekz = 'L'.
    *************POPULATING DATA FROM t001w
      it_vbrp[] = t_vbrp[].
      SORT it_vbrp BY werks.
      "  DELETE ADJACENT DUPLICATES FROM it_vbrp COMPARING werks . by kalika
      CLEAR   t_t001w.
      REFRESH t_t001w.
      SELECT  werks
              name1
              kunnr
              name2
         FROM t001w INTO TABLE t_t001w
         FOR ALL ENTRIES IN it_vbrp
         WHERE werks = it_vbrp-werks .
      it_vbrk[] = t_vbrk[].
      SORT it_vbrk BY kunag.
      DELETE ADJACENT DUPLICATES FROM it_vbrk COMPARING kunag .
      CLEAR   t_t001w2.
      REFRESH t_t001w2.
      SELECT  werks
              name1
              kunnr
              name2
         FROM t001w INTO TABLE t_t001w2
         FOR ALL ENTRIES IN it_vbrk
         WHERE kunnr = it_vbrk-kunag .
    *--------POPULATING DATA FROM MARM
      SELECT matnr
              meinh
              umrez
              umren FROM marm INTO TABLE t_marm
              FOR ALL ENTRIES IN t_mara
              WHERE matnr = t_mara-matnr.
    *********************POPULATING DATA FROM MVKE
      CLEAR   t_mvke.
      REFRESH t_mvke.
      SELECT  matnr
              mvgr1
         FROM mvke INTO TABLE t_mvke
         FOR ALL ENTRIES IN t_vbrp
           WHERE matnr = t_vbrp-matnr .
    *-----------------POPULATING DATA FROM TVM1T.
      SELECT
              mvgr1 bezei FROM tvm1t
              INTO TABLE t_tvm1t FOR ALL ENTRIES IN t_mvke
              WHERE mvgr1 = t_mvke-mvgr1.
    **********************modification additioon of chapter ID  30.04.2007
    *-----------------POPULATING DATA FROM j_1imtchid.
      CLEAR   t_j_1imtchid.
      REFRESH t_j_1imtchid.
      SELECT  matnr
              j_1ichid
         FROM j_1imtchid INTO TABLE t_j_1imtchid
         FOR ALL ENTRIES IN t_vbrp
           WHERE matnr = t_vbrp-matnr .
    *-----------------POPULATING DATA FROM j_1iexchdr.
      CLEAR   t_j_1iexchdr.
      REFRESH t_j_1iexchdr.
      SELECT  exnum
              exdat
              rdoc
              werks
              trntyp
              status
         FROM j_1iexchdr INTO TABLE t_j_1iexchdr
         FOR ALL ENTRIES IN t_vbrp
         WHERE rdoc = t_vbrp-vbeln
         AND werks = t_vbrp-werks
         AND trntyp = 'DLFC'   .      " by kalika
      DELETE t_j_1iexchdr WHERE status = 'R' .   " by kalika
      DELETE t_j_1iexchdr WHERE status = 'B' .   " by kalika
      SORT t_j_1iexchdr BY rdoc.
    ***************end of modification additioon of chapter ID  30.04.2007
    ******* start of modification kalika dated 19.06.2007
      LOOP AT t_likp.
        t_likp-vbeln_kp = t_likp-vbeln.
        MODIFY  t_likp.
      ENDLOOP.
    *  SELECT budat mblnr xblnr tcode2
    *    FROM mkpf
    *    INTO CORRESPONDING FIELDS OF TABLE it_mkpf
    *    FOR ALL ENTRIES IN t_likp
    *    WHERE xblnr = t_likp-vbeln_kp
    *    AND tcode2 LIKE 'MIGO_GR'
    *    AND budat IN budat. "26.07.2007
      SELECT ebeln mblnr FROM mseg
        INTO CORRESPONDING FIELDS OF TABLE it_mseg
        FOR ALL ENTRIES IN t_vbrp
        WHERE ebeln = t_vbrp-aubel AND mblnr LIKE '5%'.
      SELECT budat mblnr tcode2
          FROM mkpf
          INTO CORRESPONDING FIELDS OF TABLE it_mkpf
          FOR ALL ENTRIES IN it_mseg
          WHERE mblnr = it_mseg-mblnr
          AND tcode2 LIKE 'MIGO_GR'
          AND budat IN budat.                                   "26.07.2007
    *loop at it_mkpf.
    *DELETE it_mkpf WHERE mblnr = '4'.
    *MODIFY it_mkpf.
    *ENDLOOP.
    ENDFORM.                    "populating_data
    *                    FORM MOVE_DATA.                             *
    FORM move_data.
      CLEAR   t_final.
      REFRESH t_final.
      SORT : t_vbrp  BY vbeln,
             t_vbrk  BY vbeln,
             t_mara  BY matnr,
             t_likp  BY vbeln,
             t_ekko  BY ebeln,
             t_t023t BY matkl,
             t_konv BY knumv,
             t_mvke BY matnr,
             t_t001w BY werks,
             t_t001w2 BY kunnr,
             t_tvm1t BY mvgr1,
             t_j_1iexchdr BY rdoc,
             t_j_1imtchid  BY matnr,
              t_j_1iexchdr BY rdoc werks,
           "   it_mkpf by mblnr,
              it_mseg BY mblnr,
              it_mkpf BY mblnr,
              it_vbuk BY vbeln.
      CLEAR   t_vbrp.
      LOOP AT t_vbrp.
        t_final-vstel = t_vbrp-vstel.
        t_final-vgbel = t_vbrp-vgbel.
        t_final-aubel = t_vbrp-aubel.
        t_final-matnr = t_vbrp-matnr.
        t_final-arktx = t_vbrp-arktx.
        t_final-matkl = t_vbrp-matkl.
        t_final-fkimg = t_vbrp-fkimg.
        t_final-posnr = t_vbrp-posnr.
        t_final-vrkme = t_vbrp-vrkme.
        " t_vbrp-vgbel1 = t_vbrp-vgbel.
        READ TABLE it_vbuk WITH KEY vbeln = t_vbrp-vgbel BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-flag = it_vbuk-wbstk.
        ENDIF.
        CLEAR t_vbrk.
        READ TABLE t_vbrk WITH KEY vbeln = t_vbrp-vbeln
                                   BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-kunag   = t_vbrk-kunag.
          t_final-vbeln_k = t_vbrk-vbeln.
          t_final-fkdat   = t_vbrk-fkdat.
          t_final-fkart  = t_vbrk-fkart.
          t_final-knumv =   t_vbrk-knumv.
        ENDIF.
        CLEAR t_mara.
        READ TABLE t_mara WITH KEY matnr = t_vbrp-matnr BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-mtart = t_mara-mtart.
          t_final-wrkst = t_mara-wrkst.
          t_final-extwg = t_mara-extwg.
          t_final-labor = t_mara-labor.
          t_final-normt = t_mara-normt.
          t_final-bismt = t_mara-bismt.
          t_final-spart = t_mara-spart.
          t_final-meins = t_mara-meins.
          SPLIT t_final-bismt AT '*' INTO t_final-length t_final-breath.
          IF t_final-bismt = ''.
            t_final-size = ''.
          ELSE.
            t_final-size = t_vbrp-fkimg *  ( t_final-length * t_final-breath ) / 1000000.
          ENDIF.
        ENDIF.
        CLEAR t_konv.
        READ TABLE t_konv WITH KEY knumv = t_vbrk-knumv BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-kschl = t_konv-kschl.
        ENDIF.
        CLEAR t_likp.
        READ TABLE t_likp WITH KEY vbeln = t_vbrp-vgbel BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-lfdat = t_likp-lfdat.
          t_final-bldat = t_likp-bldat. " NEW CHANGE
          t_final-vbeln_kp = t_likp-vbeln.
        ENDIF.
        CLEAR t_ekko.
        READ TABLE t_ekko WITH KEY ebeln = t_vbrp-aubel BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-aedat = t_ekko-aedat.
        ENDIF.
        CLEAR t_t023t.
        READ TABLE t_t023t WITH KEY matkl = t_vbrp-matkl BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-wgbez = t_t023t-wgbez.
        ENDIF.
        CLEAR t_t001w.
        READ TABLE t_t001w WITH KEY werks = t_vbrp-werks BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-name1 = t_t001w-name1.
        ENDIF.
        CLEAR t_t001w2.
        READ TABLE t_t001w2 WITH KEY kunnr = t_vbrk-kunag BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-name21 = t_t001w2-name2.
        ENDIF.
        READ TABLE t_mvke WITH KEY matnr = t_vbrp-matnr BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-mvgr1 = t_mvke-mvgr1.
        ENDIF.
        READ TABLE t_tvm1t WITH KEY mvgr1 = t_mvke-mvgr1 BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-bezie = t_tvm1t-bezie.
        ENDIF.
    **********************modification additioon of chapter ID  30.04.2007
        READ TABLE t_j_1imtchid WITH KEY matnr = t_vbrp-matnr BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-j_1ichid = t_j_1imtchid-j_1ichid.
        ENDIF.
        READ TABLE t_j_1iexchdr WITH KEY rdoc = t_vbrp-vbeln
                                         werks = t_vbrp-werks
                                         BINARY SEARCH.
        IF sy-subrc = 0.
          t_final-exnum = t_j_1iexchdr-exnum.
          t_final-exdat = t_j_1iexchdr-exdat.
          t_final-rdoc  = t_j_1iexchdr-rdoc.
          t_final-werks = t_j_1iexchdr-werks.
        ENDIF.
    **************end of modification additioon of chapter ID  30.04.2007
        "******** START OF MODIFICATION KALIKA 26.07.2007.
        READ TABLE it_mseg INTO wa_mseg WITH KEY ebeln  = t_vbrp-aubel.
        IF sy-subrc = 0.
          t_final-mblnr = wa_mseg-mblnr.
        ENDIF.
        "INTO wa_mkpf
        READ TABLE it_mkpf WITH KEY mblnr  = t_final-mblnr
                                    tcode2 = 'MIGO_GR'.
        IF sy-subrc = 0.
          t_final-budat = it_mkpf-budat.
        ENDIF.
        APPEND t_final.
        CLEAR t_final.
      ENDLOOP.
      DELETE t_final[]   WHERE flag = 'A' OR flag = ''. "change by amit for reverse deliveries as rkp.
      DELETE t_final     WHERE fkdat = ' ' .
      DELETE t_final[]   WHERE kunag NOT IN recv_pnt.
      DELETE t_final[]   WHERE vstel NOT IN supp_pnt.
      DELETE t_final[]   WHERE fkart = 'JEX' AND exnum = ' '. " CHANGE BY KALIKA
      " FOR INVOICE WHOSE EXCISE NOT MAINTAINED
      IF t_final[] IS INITIAL.
        MESSAGE i002(zamit).
        LEAVE LIST-PROCESSING.
      ENDIF.
    *---------------MARM CALCULATION
      SORT t_marm BY matnr meinh.
      DELETE t_marm WHERE meinh = 'M2'.
      SORT t_marm BY matnr.
      LOOP AT t_final.
        READ TABLE t_marm WITH KEY matnr = t_final-matnr." T_MARM-MEINH <> 'M2'.
        t_final-bom = ( t_marm-umrez / t_marm-umren ).
        MODIFY t_final TRANSPORTING bom.
        t_final-mult = t_final-bom * t_final-fkimg.
        MODIFY t_final TRANSPORTING mult.
        CLEAR t_final.
      ENDLOOP.
    *--------------------delivery no.
    *-------------------beginning of adding na*******
      LOOP AT t_final.
        " *** change by kalika
        IF t_final-matkl EQ  'BWGRBBD'
      OR t_final-matkl = 'BWGRBPD'
      OR t_final-matkl = 'BWGRCLB'
      OR t_final-matkl = 'BWGRCMD'
      OR t_final-matkl = 'BWGRGFB'
      OR t_final-matkl = 'BWGRGFC'
      OR t_final-matkl = 'BWGRGFO'
      OR t_final-matkl = 'GRNLAM'
      OR t_final-matkl = 'DVNRTKBB'
      OR t_final-matkl = 'MRETBBD'
      OR t_final-matkl = 'MRGRBBD'
      OR t_final-matkl = 'MRGRCMD'
      OR t_final-matkl = 'MRRBBD'
      OR t_final-matkl = 'PLAMGBSD'
      OR t_final-matkl = 'BWETBBD'
      OR t_final-matkl = 'PLAMGOSD'.
    *  "LOOP AT t_final WHERE matkl = 'BWGRBBD'
    *OR matkl = 'BWGRBPD'
    *OR matkl = 'BWGRCLB'
    *OR matkl = 'BWGRCMD'
    *OR matkl = 'BWGRGFB'
    *OR matkl = 'BWGRGFC'
    *OR matkl = 'BWGRGFO'
    *OR matkl = 'GRNLAM'
    *OR matkl = 'DVNRTKBB'
    *OR matkl = 'MRETBBD'
    *OR matkl = 'MRGRBBD'
    *OR matkl = 'MRGRCMD'
    *OR matkl = 'MRRBBD'
    *OR matkl = 'PLAMGBSD'
    *OR matkl = 'BWETBBD'
    *OR matkl = 'PLAMGOSD'.
    *** change by kalika
          t_final-area =  ( t_final-size *  15 ) / 10 .
          MODIFY t_final TRANSPORTING area.
        ELSE.
          t_final-area = ( t_final-normt * t_final-size ) / 4.   "t_final-bom
          MODIFY t_final TRANSPORTING area.
        ENDIF.
      ENDLOOP.
      "*** change by kalika
      " ** start Division Specific FA & NA to be displayed by kalika
      LOOP AT t_final.
        IF t_final-spart = 'LM' .
          t_final-area = space.
        ENDIF.
        IF t_final-spart  = 'DD'.
          t_final-area = space.
        ENDIF.
        MODIFY t_final.
      ENDLOOP.
    * " ** end Division Specific FA & NA to be displayed by kalika
    *  LOOP AT t_final WHERE matkl = 'BWETPLY'
    *  OR matkl = 'BWGRCHQ'
    * OR matkl = 'BWGRCLP'
    * OR matkl = 'BWGRCMG'
    * OR matkl = 'BWGRFLX'
    * OR matkl = 'BWGRFRP'
    * OR matkl = 'BWGRGCP'
    * OR matkl = 'BWGRPCT'
    * OR matkl = 'BWGRPLY'
    * OR matkl = 'BWGRSHT'
    * OR matkl = 'MRGRPLY'
    * OR matkl = 'MRTPLY'.
    *    t_final-area = ( t_final-normt * t_final-bom ) / 4.
    *    MODIFY t_final.
    *  ENDLOOP.
    *-------------------ending of adding na**********
    ENDFORM.                                            " move_data.
    *                    data_fetching                            *
    FORM data_fetching.
    *------ASSESSIBLE VALUE
      SORT t_final BY knumv.
      SORT t_konv BY knumv kposn.
      CLEAR t_final.
      CLEAR t_konv.
      LOOP AT t_konv.
        IF t_konv-kschl = 'ZR02'.
          READ TABLE t_final WITH KEY knumv = t_konv-knumv posnr = t_konv-kposn.
          t_final-kwert1 = t_konv-kwert.
          t_final-kbetr = t_konv-kbetr.
          IF sy-tabix <> 0.
            MODIFY t_final  INDEX sy-tabix TRANSPORTING kwert1 kbetr.
            CLEAR t_final.
            CLEAR t_konv.
          ENDIF.
        ENDIF.
    *-----EXICESE
        IF t_konv-kschl = 'JEXP'.
          READ TABLE t_final WITH KEY knumv = t_konv-knumv posnr = t_konv-kposn.
          t_final-kwert2 = t_konv-kwert.
          IF sy-tabix <> 0.
            MODIFY t_final  INDEX sy-tabix TRANSPORTING kwert2.
            CLEAR t_final.
            CLEAR t_konv.
          ENDIF.
        ENDIF.
    *-------CESS
        IF t_konv-kschl = 'JECS'.
          READ TABLE t_final WITH KEY knumv = t_konv-knumv posnr = t_konv-kposn.
          t_final-kwert3 = t_konv-kwert.
          IF sy-tabix <> 0.
            MODIFY t_final  INDEX sy-tabix TRANSPORTING kwert3.
            CLEAR t_final.
            CLEAR t_konv.
          ENDIF.
        ENDIF.
    *-----ROUNDING
        IF t_konv-kschl = 'DIFF'.
          READ TABLE t_final WITH KEY knumv = t_konv-knumv posnr = t_konv-kposn.
          t_final-kwert4 = t_konv-kwert.
          IF sy-tabix <> 0.
            MODIFY t_final  INDEX sy-tabix TRANSPORTING kwert4.
            CLEAR t_final.
            CLEAR t_konv.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ****************TOTAL OF ALL VALUES
      LOOP AT t_final.
        t_final-total = t_final-kwert1 + t_final-kwert2 + t_final-kwert3 + t_final-kwert4.
        MODIFY t_final INDEX sy-tabix TRANSPORTING total .
        CLEAR t_final.
      ENDLOOP.
    *--------------delivery calculation.
      " start change by kalika
      DELETE t_final WHERE total = ' '. " BY KALIKA
      " end change by kalika
      LOOP AT t_final.
        t_temp-vbeln_k = t_final-vbeln_k.
        t_temp-vgbel = t_final-vgbel.
        t_temp-fkart = t_final-fkart.
        t_temp-kunag = t_final-kunag.
        APPEND t_temp.
        CLEAR t_temp.
      ENDLOOP.
      SORT t_temp DESCENDING BY vbeln_k  .
      SORT t_temp BY vgbel.
      LOOP AT t_final.
        READ TABLE t_temp WITH KEY vgbel = t_final-vgbel.
        t_final-vbeln_k = t_temp-vbeln_k.
    *---change by amit for validating migi date by amit
        if t_final-budat = 0.
          t_final-mblnr = ''.
          endif.
    *---change by amit for validating migi date by amit
        MODIFY t_final TRANSPORTING vbeln_k  mblnr.
        CLEAR t_final.
      ENDLOOP.
      " start KALIKA 30.06.2007.
      "SORT t_final STABLE DESCENDING by  fkart fkdat. "plz kalika do not forbid stable even it doent any effect this case but in future when large amount of data in production it will works.
      SORT t_final STABLE ASCENDING BY  fkart fkdat. "plz kalika do not forbid stable even it doent any effect this case but in future when large amount of data in production it will works.
      DATA: l_tabix TYPE sy-tabix.           " declare the sy-tabix as local variable
      DATA: l_lines TYPE sy-tabix.
      DATA: l_index TYPE sy-tabix.
      DESCRIBE TABLE t_final LINES  l_lines .       "The current number of table rows of the internal table itab is determined and is assigned to the data object lin
      CHECK l_lines > 1.                               " check lines are greater than 1
      LOOP AT t_final WHERE fkart = 'F8'.
        l_tabix = sy-tabix.                              " assine Index of Internal Tables into local var l_tabix
        l_index = l_tabix + 1.
        READ TABLE t_final INTO wa_sfinal1 INDEX l_index.  " read the temp table with index l_index
        IF sy-subrc = 0.
          CHECK t_final-vgbel = wa_sfinal1-vgbel AND t_final-knumv NE wa_sfinal1-knumv.
          IF sy-subrc =  0.
            t_final-w_flag = 'X'.
            MODIFY t_final TRANSPORTING w_flag.
          ENDIF.
        ENDIF.
      ENDLOOP.
      "DELETE ADJACENT DUPLICATES FROM t_final[] COMPARING fkart
      DELETE t_final[] WHERE w_flag = 'X'.
      " end KALIKA 30.06.2007.
    *--change by amit for performa invoice deletion
      DELETE t_final[] WHERE aedat = 0.
    ENDFORM.                                                  " sub_CAL
    *                       FORM ALV GET DATA FOR NOTIONAL AREA      *
    FORM alv_get_data .
      CLEAR it_fieldcat.
    ***************** SUPPLYING PLANT
    *  wa_fieldcat-col_pos    = '1'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'VSTEL'.
      wa_fieldcat-seltext_m  = 'SUPPLYING PLANT'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      wa_fieldcat-tabname    = 'T_FINAL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************** SUPPLYING PLANT
    *  wa_fieldcat-col_pos    = '2'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'NAME1'.
      wa_fieldcat-seltext_m  = 'SUPP PLANT DESCRTN'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 20.
      wa_fieldcat-tabname    = 'T_FINAL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************** RECEIVING PLANT
    *  wa_fieldcat-col_pos    = '3'.                     " ALV O/P COL-2
      wa_fieldcat-fieldname  = 'KUNAG'.
      wa_fieldcat-seltext_m  = 'RECEIVING PLANT'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************** RECEIVING PLANT
    *  wa_fieldcat-col_pos    = '4'.                     " ALV O/P COL-2
      wa_fieldcat-fieldname  = 'NAME21'.
      wa_fieldcat-seltext_m  = 'RECE PLNT DESCRTN'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************** BILL NUMBER
    *  wa_fieldcat-col_pos    = '5'.                     " ALV O/P COL-3
      wa_fieldcat-fieldname  = 'VBELN_K'.
      wa_fieldcat-seltext_m  = 'BILL NUMBER'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *******************BILL DATE
    *  wa_fieldcat-col_pos    = '6'.                     " ALV O/P COL-4
      wa_fieldcat-fieldname  = 'FKDAT'.
      wa_fieldcat-seltext_m  = 'BILL DATE'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** OUT BOUND DELIVERY NO
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'VGBEL'.
      wa_fieldcat-seltext_m  = 'OUT BOUND DELIVERY NO'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** OUT BOUND DELIVERY DATE
    **  wa_fieldcat-col_pos    = '8'.                     " ALV O/P COL-6
    *  wa_fieldcat-fieldname  = 'LFDAT'.
    *  wa_fieldcat-seltext_m  = 'OUT BOUND DELIVERY DATE'.
    *  wa_fieldcat-just       = 'L'.
    *  wa_fieldcat-tabname    = 'T_FINAL'.
    *  wa_fieldcat-outputlen  = 15.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR wa_fieldcat.
      " *  wa_fieldcat-col_pos    = '8'.                     " ALV O/P COL-6
      wa_fieldcat-fieldname  = 'BLDAT'.
      wa_fieldcat-seltext_m  = 'DELIVERY DOC DATE'.  " NEW CHANGE
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ************* S.T.O. NO.
    *  wa_fieldcat-col_pos    = '9'.                     " ALV O/P COL-6
      wa_fieldcat-fieldname  = 'AUBEL'.
      wa_fieldcat-seltext_m  = 'S.T.O. NO.'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** S.T.O. DATE
    *  wa_fieldcat-col_pos    = '10'.                     " ALV O/P COL-6
      wa_fieldcat-fieldname  = 'AEDAT'.
      wa_fieldcat-seltext_m  = 'S.T.O. DATE'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ************ DIVISION
    *  wa_fieldcat-col_pos    = '11'.                     " ALV O/P COL-7
      wa_fieldcat-fieldname  = 'SPART'.
      wa_fieldcat-seltext_m  = 'DIVISION'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ********** MATERIAL CODE
    *  wa_fieldcat-col_pos    = '12'.                     " ALV O/P COL-9
      wa_fieldcat-fieldname  = 'MATNR'.
      wa_fieldcat-seltext_m  = 'MATERIAL CODE'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 20.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ************ DESCRIPTION
    *  wa_fieldcat-col_pos    = '13'.                     " ALV O/P COL-10
      wa_fieldcat-fieldname  = 'ARKTX'.
      wa_fieldcat-seltext_m  = 'DESCRIPTION'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************MATERIAL TYPE
    *  wa_fieldcat-col_pos    = '14'.                     " ALV O/P COL-11
      wa_fieldcat-fieldname  = 'MTART'.
      wa_fieldcat-seltext_m  = 'MATERIAL TYPE'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ************MATERIAL GROUP
    *  wa_fieldcat-col_pos    = '15'.                     " ALV O/P COL-13
      wa_fieldcat-fieldname  = 'MATKL'.
      wa_fieldcat-seltext_m  = 'MATERIAL GROUP'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *******************modification additioon of chapter ID  30.04.2007
    ******************chapterID
    *  wa_fieldcat-col_pos    = '32'.                  " ALV O/P COL-27'.
      wa_fieldcat-fieldname  = 'J_1ICHID'.
      wa_fieldcat-seltext_m  = 'CHAPTER-ID'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *  wa_fieldcat-col_pos    = '33'.                  " ALV O/P COL-27'.
      wa_fieldcat-fieldname  = 'EXNUM'.
      wa_fieldcat-seltext_m  = 'EXCISE DOC.NO.'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *  wa_fieldcat-col_pos    = '34'.                  " ALV O/P COL-27'.
      wa_fieldcat-fieldname  = 'EXDAT'.
      wa_fieldcat-seltext_m  = 'EXCISE DOC.DATE'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************end of modification additioon of chapter ID  30.04.2007
    *********SUB GROUP
    *  wa_fieldcat-col_pos    = '16'.                     " ALV O/P COL-13
      wa_fieldcat-fieldname  = 'MVGR1'.
      wa_fieldcat-seltext_m  = 'SUB GROUP'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *  wa_fieldcat-col_pos    = '16'.                     " ALV O/P COL-13
      wa_fieldcat-fieldname  = 'BEZIE'.
      wa_fieldcat-seltext_m  = 'SUB GROUP DISCRP'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************GROUP DISCRIPTION
    *  wa_fieldcat-col_pos    = '17'.                     " ALV O/P COL-14
      wa_fieldcat-fieldname  = 'WGBEZ'.
      wa_fieldcat-seltext_m  = 'GROUP DISCRIPTION'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *****************FINISH
    *  wa_fieldcat-col_pos    = '18'.                     " ALV O/P COL-15
      wa_fieldcat-fieldname  = 'WRKST'.
      wa_fieldcat-seltext_m  = 'FINISH'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *****************sale u o m
    *  wa_fieldcat-col_pos    = '19'.                     " ALV O/P COL-15
      wa_fieldcat-fieldname  = 'VRKME'.
      wa_fieldcat-seltext_m  = 'SALE U O M'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *****************BASE u o m
    *  wa_fieldcat-col_pos    = '19'.                     " ALV O/P COL-15
      wa_fieldcat-fieldname  = 'MEINS'.
      wa_fieldcat-seltext_m  = 'BASE U O M'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************DESIGN NO.
    *  wa_fieldcat-col_pos    = '20'.                     " ALV O/P COL-17
      wa_fieldcat-fieldname  = 'EXTWG'.
      wa_fieldcat-seltext_m  = 'DESIGN NO.'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *****************CATEGORY
    *  wa_fieldcat-col_pos    = '21'.                     " ALV O/P COL-18
      wa_fieldcat-fieldname  = 'LABOR'.
      wa_fieldcat-seltext_m  = 'CATEGORY'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************THICKNESS
    *  wa_fieldcat-col_pos    = '22'.                     " ALV O/P COL-19.
      wa_fieldcat-fieldname  = 'NORMT'.
      wa_fieldcat-seltext_m  = 'THICKNESS'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************SIZE
    *  wa_fieldcat-col_pos    = '23'.                      " ALV O/P COL-20.
      wa_fieldcat-fieldname  = 'BISMT'.
      wa_fieldcat-seltext_m  = 'SIZE'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ****************BILLED QTY
    *  wa_fieldcat-col_pos    = '24'.                    " ALV O/P COL-21.
      wa_fieldcat-fieldname  = 'FKIMG'.
      wa_fieldcat-seltext_m  = 'BILLED QTY'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************RETE
    *  wa_fieldcat-col_pos    = '26'.                    " ALV O/P COL-21.
      wa_fieldcat-fieldname  = 'BOM'.
      wa_fieldcat-seltext_m  = 'CONVERSION RATE'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************MULT
    *  wa_fieldcat-col_pos    = '32'.                  " ALV O/P COL-27'.
      wa_fieldcat-fieldname  = 'MULT'.
      wa_fieldcat-seltext_m  = 'BILLED QTY IN BUM'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************RETE
    *  wa_fieldcat-col_pos    = '25'.                    " ALV O/P COL-21.
      wa_fieldcat-fieldname  = 'KBETR'.
      wa_fieldcat-seltext_m  = 'RATE / BASE UOM'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    **************ASSESSIBLE VALUE
    *  wa_fieldcat-col_pos     = '27'.                    " ALV O/P COL-22.
      wa_fieldcat-fieldname   = 'KWERT1'.
      wa_fieldcat-seltext_m   = 'ASSESSIBLE VALUE'.
      wa_fieldcat-tabname     = 'T_FINAL'.
      wa_fieldcat-just        = 'R'.
      wa_fieldcat-no_zero(1)  = 'X'.
      wa_fieldcat-outputlen   = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ****************EXCISE
    *  wa_fieldcat-col_pos    = '28'.                     " ALV O/P COL-23.
      wa_fieldcat-fieldname  = 'KWERT2'.
      wa_fieldcat-seltext_m  = 'EXCISE'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *****************CESS
    *  wa_fieldcat-col_pos    = '29'.                      " ALV O/P COL-24.
      wa_fieldcat-fieldname  = 'KWERT3'.
      wa_fieldcat-seltext_m  = 'CESS'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************ROUNDING
    *  wa_fieldcat-col_pos    = '30'.                    " ALV O/P COL-26.
      wa_fieldcat-fieldname  = 'KWERT4'.
      wa_fieldcat-seltext_m  = 'ROUNDING'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************TOTAL
    *  wa_fieldcat-col_pos    = '31'.                  " ALV O/P COL-27'.
      wa_fieldcat-fieldname  = 'TOTAL'.
      wa_fieldcat-seltext_m  = 'TOTAL'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname  = 'AREA'.
      wa_fieldcat-seltext_m  = 'NA'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname  = 'MBLNR'.
      wa_fieldcat-seltext_m  = 'MIGO NO'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname  = 'BUDAT'.
      wa_fieldcat-seltext_m  = 'MIGO DATE'.
      wa_fieldcat-just       = 'R'.
      wa_fieldcat-tabname    = 'T_FINAL'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                                                       " ALV_GET_DATA
    *                            FORM ALV_GRID                                  *
    FORM alv_grid .
      PERFORM fill_list_header USING it_top_of_page[].
      PERFORM event-build USING gt_events[].
      PERFORM fill_layout USING ls_layout.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = ls_layout
          it_fieldcat        = it_fieldcat
          it_events          = gt_events[]
          i_save             = 'A'
        TABLES
          t_outtab    

  • Report for material gr/ir clearing account display differences

    report for material gr/ir clearing account display differences

    hi salsa,
    There is no such report for the datails of material gr/ir ......
    but T code J1ILN and select
    Indirect taxes -
    > Register -
    > Excise tax -
    > In J1IN Update Excise register RG23a -
    > then Extract rg23a----- > PRint utility program Rg23a
    here u can extract all the invoices gr/ir
    Through
    T code J1I5
    J2I5
    J2I6
    if useful assign points...
    regards,
    santoshkumar

  • MIGO-Sales price for material (NL1S ROH1 ) could not be found

    Hi Experts
    When i doing MIGO , i am getting following Error Message .i.e.,
    *Sales price for material (NL1S ROH1 ) could not be found*Message no. M7158
    Diagnosis
    The sales price valuation is active in the valuation area.
    The system could not determine a sales price on the specified posting date for material NL1S ROH1 in unit of entry in plant .
    Sales price conditions may not be defined for the material in plant .
    Procedure
    u2022 If you have a goods receipt for a purchase order or an order, the sales price is taken from the purchase order or the order concerned.
    Check the sales price in the purchase order or the order.
    u2022 if you have goods movements without a reference, you can specify the sales value (sales price including sales tax) manually.
    If the screen does not have the field Sales price, then you have a Customizing error: the sales price valuation was activated in the valuation area, but the field selection of the movement type was not changed accordingly. In this case, contact your system administrator.
    u2022 Check the definition of the sales price.
    Note that for distribution centers, the sales price of the consumer distribution chain maintained in the distribution center's master data is used.
    Proceed
    If you post this movement without the sales value, the movement will be valuated with value zero. This can change the average sales price.
    Please Advice us ...
    Thanks in advance
    Regards
    Rajesh .P

    Hello,
    Please check the following:
    -check with SE16 at table T001K whether you have sales pricing active for your valuation area,does your material belong to a very special material type
    -Check SAP Note 84480 ,109881
    -No sales price exists, no goods movements can be posted for an article subject to value-based inventory management. You must maintain the sales price in all cases.
    Please refer the link below:
    http://help.sap.com/erp2005_ehp_04/helpdata/en/12/085e95470311d1894a0000e8323352/frameset.htm
    hope the information is helpful
    regards

Maybe you are looking for

  • Blank screen with proprietary nvidia drivers [SOLVED]

    I've just installed arch on a new computer, and have encountered an issue- I can't get it running with the proprietary drivers, just nouveau, which is quite the handicap on a GeForce 660. I used the beginner's guide since my last fresh install was us

  • Creating a manual data link

    Using Oracle Report Builder 10g(Report Builder 9.0.4.2.0), and trying to create a manual data link between two queries. But the problem is that whenever I create a manual data link between two queries my report builder shutoff with this message “rw

  • HR Abap-RPTQTA00 enhancement

    Hi friends, anyone who made changes in rptqta00?? can you share your experince? I want to change the output this way: difference between generated leave in a year and the taken /availed leave should not exceed 40 days. is this possible? the stand rep

  • Description on the column

    Hi BI Gurus, I have written a report in the Bex and I have included the infoobject 0BILL_BLOCK and on the properties of this, I have turned on Standard: Key and text on Display As option. It's ok in terms of displaying the key and text. It's displayi

  • My brother gave me his old ipod how do I remove his name and put my name on it so itunes will reconignes me

    My brother gave me his classic ipod, how do I remove his name and put my name so my itunes will recognize my computer?