Regarding Inventory report in ALV

hi experts
can you pls describe the below task and give me tables and fields for below
·     On Hand Inventory report in ALV format for listing plant, material details, and Identifying and inventory quantity and inventory amount sorted on plant with grand total.
thanks and regard
priyanka

Hi Priyanka,
You can display the following fields in the List output:
          matnr       TYPE  matnr,       "material number
          werks    TYPE  werks_d,     "inventory plant
          lbtxt       TYPE  lbtxt,       "customer name
          maktx       TYPE  maktx,       "mat. description
          kdmat       TYPE  matnr_ku,    "customer material no
          inv_qty     TYPE  labst,       "on hand inv qty
          wip_poq     TYPE  ru_lmnga,    "WIP Inv qty PO
          wip_rpq     TYPE  ru_lmnga,    "WIP Inv qty RP
          tot_qty     TYPE  gamng,       "total qty
          stprs       TYPE  stprs,       "std cost/unit
          tot_amt     TYPE  p DECIMALS 3,"total inv amount
Regards,
George

Similar Messages

  • Urgent: regarding physical inventory report display

    hi,
    i had made a report in which i have to display the physical inventory report details in which details about the material is to be given.
    I want to check the details which are present in the tcode MI07 . Can anybody tell me any tcode in which i can see the details of mi07 tcode(including the reason of it).

    Greetings,
    It might shed some light to read about the display in your portable computer: http://en.wikipedia.org/wiki/LCD
    LCDs are primarily plastic panels with various layers inside.  Pressure applied to those panels can cause them to crack, leaking the liquid crystal components about.  Pressure could be heavy books in a bag pushing against the screen, heavy cat sitting on a closed lid, dog, other animal, someone slamming the lid, child running through the room, etc.  This applies to any LCD whether it be in a computer or in a Television (don't press too hard on your TV screen!!).
    Displays don't exhibit the type of damage you indicate by themselves.  A single pixel might go dead in an LCD but zig zag lines indicates cracking of the layers inside the panels themselves.  Something from the outside world made an impact on the display resulting in the damage you see.  You may not have been the one pressing hard on it and you may not have seen it happen, but something happened.
    The 1 year limited warranty and AppleCare protection plan offer coverage for component failures, not damage.
    Coverage for damage would be provided by something along the lines of insurances (home owners, renters, etc.)  If you purchased this computer with a Credit Card you may wish to contact your Credit Card company.  Many cards have included insurance for purchases you make so even if an item is damage during your use of it, they will cover it.
    Best of luck.

  • INVENTORY REPORT for customer but not consignment company owned

    HI Everyone,
    I am working on creating an inventory report and sending it out to a customer.
    We have a customer who needs to see their inventory we are going to ship. we are making materials for them on an MTS scenario based on a forecast... So the customer before placing a PO should be able to look at the inventory levels we make for them. on a daily basis.... No what I am trying to is execute a program that sends out an inventory report (the programs I am using are( RSMIPROACT and ROEMPROACT)... I try to fill in the fields and save as a variant and we run it as a background job every morning and we send out an idoc to the customer...
    The above process is a scenario that still needs to be worked on...
    THe customer should be able to look at only his stock and not any other stock....
    Now can we use a display of listing/exclusion function to send out the material stock report.... we need to send the total inv as well as the mat numbers... can we acheive it with the listing/exclusion funtion..
    Or is there a program that pulls all the data from the tables which store the customer material info record where we maintain all the materials for a customer...
    If there i a better way through which this can eb done please suggest me... thank you..
    Once again the above stock is not consignent stock... we are manufacturinng based on the forecasts and we need the customer t be able to look at the stock on a daily basis.... Please help...

    There is no report / funtionality is SAP to acheive this. Custom program is the only solution. Your logic looks ok, where there is a CMIR maintained, you may pick the total stock from table MARD put into a format/layout and transfer via idoc to the customer.
    Thanks & regards
    AHP.

  • Inventory Report For Special Stock (Project Stock)

    Dear Sir,
    We are in Make -To - Order scenario and procure the material against  the WBS element . For getting the Inventory List , we use MBBS tcode but it has following limitation :
      a) It give the Stock Status as on date basis . While we need Stock Inventory on a cut off date , say on
          31/Jan/2007 .
      b) We are not able to get the Inventory Report , Material Group wise
    I request to kindly guide me , as how to take the Inventory Report for Project Stock .
    Regards
    B Mittal

    Hi Shailesh,
    Is there any way we can include some extra fields into this MC.9 report - i tried but could not find anything.  Can you please help.
    Regards,
    Laxmi

  • Inventory report for the selection of requisitioner and MRP controller

    Hello Experts,
                           Can someone please help me with a standard  Inventory report in which we can give input thr requistioner and MRP controller
    regards,
    YK

    Hi,
    You will get the requisition no. from EKKO (provided PO has been created otherwise you won't get any record). Find out PO & item no. for the requisition item. Then you can check EKBE table whether GR has been posted or not. If GR has not been posted then there won't be entry in EKBE for that PO & item.
    Regards,
    Rakesh

  • Inventory Report-Replacement path for Base UOM to Case and Standrad Cost

    Hi, We have a Scenario as below:
    Question1:
    We have a multiprovider contains 4 infocubes and 2 Master Data objects
    a.Demand
    b.Inventory
    c.Sales Orders
    d.In Transit
    Master Data objects
    a. Material (contains Base UOM to Case as Key Figure Attribute and also Base UOM as an attribute)
    b. Material Location (Contains material as an attribute and also Standard Cost as a Key Figure attribute)
    At the report level two formula variables are defined with replacement path for showing the Base UOM to Case and Standard Cost in columns.
    We have 4 reports on this multiprovider. There is a dialy sales report which gives the following details
    Material, Location, MRP Controller, CalDay, Base UOM, Actual Sales(AS), Dependent Demand(DD), Consumption Qyt(CQ), Base to Case UOM, Standard Cost
    In this report for all the records the Base to UOM and Standard Cost column is coming with values which is nothing but the replacement path on the material master key figure attribute. Though this report is on the multiprovider all the major keyfigures (AS, DD and CQ) are coming from a single cube( this is an observation from myside).
    We have another report which is the Inventory Report with the following details:
    Material, Location, MRP Controllder, Calday, Base UOM,      Unrestricted Inventory(UI), committed Inventory(CI), Back Order Qty(BOQ), In Transit by Sh/Rec(ITS), In Transit Pipeline(ITP), On Order Qty (OOQ), Current Inventory Position (CIP), Quality Inspection Stock(QIS), Block Stock(BS), Base to Case UOM, Standard Cost
    Now in this report for all the records the Base to Case UOM and standrad cost is not showing up. Is there anything which needs to be done in order to get the Base to Case UOM and standard cost for all the records.
    Question2:
    When Non-Cumulative and Cumulative key figures are combined at the multi provider and also at the report level, will there be any problem?
    Regards
    Vijay

    Hi,
    I think you can proceed with virtual characteristics for this.In the code you can truncate the time and you can display on the date:
    Regards
    Prasad

  • How to Convert Simple Report into ALV...

    Hi All,
    i have developed Simple now  i want to convert this report in ALV grid Report.
    how can i do it please Help..
    my code is..
    REPORT  ZGSTT_YVENDORDTL_REPORT.
    Tables :ZMSEG,LFA1.
    DATA: BEGIN OF struct occurs 100,
    MBLNR Type ZMSEG-MBLNR,
    BLDAT Type ZMSEG-BLDAT,
    LIFNR Type ZMSEG-LIFNR,
    BOENR Type ZMSEG-BOENR,
    name1 type lfa1-name1,
    END OF struct.
    types: comm2(16) type c.
    data: itab like  LFA1 occurs 1 with header line.
    data: ind type i.
    selection-screen: begin of block b1 with frame title comm2.
       parameters: matno like ZMSEG-MBLNR.
    select-options: ORDERDAT for ZMSEG-BLDAT.
    selection-screen: end of block b1.
    INITIALIZATION.
    comm2 = 'Selection Screen'.
    start-of-selection.
    if matno is not initial and orderdat is not initial.
    select * from ZMSEG into corresponding fields of table struct where MBLNR = matno and bldat in orderdat.
    elseif matno is initial and orderdat is not initial.
    select * from ZMSEG into corresponding fields of table struct where  bldat in orderdat.
    elseif matno is not initial and orderdat is initial.
    select * from ZMSEG into corresponding fields of table struct where MBLNR = matno.
    else.
    select * from ZMSEG into corresponding fields of table struct.
    endif.
    select * from lfa1 into table itab.
    loop at struct.
      ind = sy-tabix.
      read table itab with key lifnr = struct-lifnr.
    if sy-subrc = 0.
       move itab-name1 to struct-name1.
      endif.
      modify struct index ind transporting  name1.
    endloop.
    SKIP TO LINE 5.
    WRITE:SY-VLINE,(5) 'NO',SY-VLINE,(12) 'Bill of Date',SY-VLINE,(30) 'Vendor Name',SY-VLINE,(20) 'Material Document No.',SY-VLINE,(10) 'Bill of No.',SY-VLINE.
    FORMAT COLOR OFF.
    loop at struct.
      write: / SY-VLINE,(5) count UNDER 'NO',SY-VLINE,(12) struct-BLDAT UNDER 'Bill of Date',SY-VLINE,(30) struct-name1 UNDER 'Vendor Name',SY-VLINE,(20) struct-MBLNR UNDER 'Material Document No.',SY-VLINE,(10) struct-BOENR UNDER 'Bill of No.',SY-VLINE.
    endloop.
    Thanks In Advance...
    Yunus

    Hi,
    You can write your ALV programs in 2 methods by making use of classes or by making use of reuse function modules.
    You can go through the following standard programs.
    BCALV_FULLSCREEN_DEMO
    BCALV_FULLSCREEN_DEMO_CLASSIC
    regards,
    Sangram

  • Inventory report with the last transaction details of each material

    Hi,
    is there any standard inventory report in SAP which gives us  the last transaction details of each
    Material,along with last procurement qty, value, date and last issue
    details of Qty, Value & date.
    Thansk in advance.

    Hi
    try following t-code
    MB5B u2013 Stock on Posting Date
    or
    2   s_p00_07000139 u2013 Stock Card and Inventory Material Report
    Regards
    Kailas Ugale

  • How to generate interactive report in alv

    hi,
      how to generate interactive report in alv,for this what are the requirements,
    give me one sample report.
                                                 thankyou.

    Hi,
    Chk these helpful links..
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Regards
    Anversha

  • Interactive report and ALV s in HR ABAP.

    hi all,
         can any one tell , how to do  Interactive reporting  and alv's in HR ABAP. with some example reports..

    Hi Rao
    Nothing changes for HR ABAP when it comes to ALV or Interactive Lists. Only the DATA fetching process is changed. To fetch HR data , you use Logical Database PNP or Clusters or just read a specific infotype using a method.
    Here is a sample program for ALV 'BALVST02_GRID'. For interactive list , use this demo program
    DEMO_LIST_INTERACTIVE_1. It is a series of Demo Programs which you can open in SE38.
    Reward Points, if helpful.
    Regards
    Waz

  • Program to check inventory report

    Hi guys,
    I need to send inventory report as  idoc to customer on daily basis, bt they need customized fields located in SAP .. so i need is to extend the idoc.. insert the required segments and modify the user exit .. to pop the required fields in idoc.. untill here everything is fine..
    Now my question is.. how should i configure to trigger the idoc to be sent daily... and to define output type as idoc...
    Normally, if its standard application .....we  will configure in NACE and schedule the program rseout00 .. bt in this case .. what should i do??

    Hi,
    Go to program RSVTPROT in se38 transaction. There enter customzing object table as V_T001B and T001B. Thern enter the date range you want to evaluate,also customizng object or tables, select all output options BUT not archived logs and execute.
    You will get the ALV report with user name,date and changes done
    cya
    udayakumar

  • PO receiver report with ALV GRID

    Hello abpers,
    Can anyone gimme some guidance or sample code how to generate the PO receiver report with alv.... 
    input fields include..
    Vendor number, material number, PO number, Purchasing group/Buyer, PO creation date, PO delivery date, PO created by
    I should get the out put with the fields....
    PO, PO date, PO group/buyer, purchasing org, vendor, PO line, order quantity, Unit, Material, Description, ST LOC SHELF BIN, ST LOCBULK BIN, QTY TO BE RECV, QTY RECEVED.
    Thanks alot for your anticipation....
    SRI

    Here is a very simple ALV program which shows a basic skeleton of an ALV program,  you simply get the data from the database(usually passed on some parameters from the selection screen) and build the FC, then call the function module.
    report zrich_0003 .
    * Global ALV Data Declarations
    type-pools: slis.
    * Internal Tables
    data: begin of ialv occurs 0,
          test1(10) type c,
          test2(10) type c,
          end of ialv.
    data: fieldcat  type slis_t_fieldcat_alv.
    start-of-selection.
      perform get_data.
      perform call_alv.
    *      Form  GET_DATA
    form get_data.
      ialv-test1 = 'ABC'.
      ialv-test2 = 'DEF'.
      append ialv.
      ialv-test1 = 'GHI'.
      ialv-test2 = 'JKL'.
      append ialv.
      ialv-test1 = '123'.
      ialv-test2 = '456'.
      append ialv.
    endform.                    "GET_DATA
    *  CALL_ALV
    form call_alv.
      perform build_field_catalog.
    * Call ABAP List Viewer (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          it_fieldcat  = fieldcat
        tables
          t_outtab     = ialv.
    endform.                    "CALL_ALV
    * BUILD_FIELD_CATALOG
    form build_field_catalog.
      clear fieldcat. refresh fieldcat.
      data: tmp_fc type slis_fieldcat_alv.
      clear tmp_fc.
      tmp_fc-reptext_ddic = 'Test1'.
      tmp_fc-fieldname    = 'TEST1'.
      tmp_fc-tabname      = 'IALV'.
      tmp_fc-outputlen    = '10'.
      append tmp_fc to fieldcat.
      clear tmp_fc.
      tmp_fc-reptext_ddic = 'Test2'.
      tmp_fc-fieldname    = 'TEST2'.
      tmp_fc-tabname      = 'IALV'.
      tmp_fc-outputlen    = '10'.
      append tmp_fc to fieldcat.
    endform.                    "BUILD_FIELD_CATALOG
    The use of selection screen is not use in this program, I assume that you know how to do that.
    Regards,
    Rich Heilman

  • How we add & grandtotal of sales order report in alv

    hi guru how we add & grandtotal of sales order report in alv
    regards
    subhasis

    hi subhasis,
    since u want the grand total in ALV use the following code...
    clear gs_fieldcat.
    gs_fieldcat-fieldname = field.
    gs_fieldcat-tabname = DB table
    gs_fieldcat-seltext_m = text.
    gs_fieldcat-do_sum = 'X'
    gs_fieldcat-datatype = data type (Curr or Quant)
    gs_fieldcat-ref_fieldname = reference field name
    gs_fieldcat-ref_tabname  = reference table name
    append gs_fieldcat to gt_fieldcat.
    hope this will work...
    please reward points in case usefull
    regards,
    prashant

  • URGENT:-Regarding sub-total in alv code

    Hi,
    i had made dis report and it is working fine but now i want to add the sub total feature in dis report as it is the new requierment of report.
    plzz help me out by providing the code of sub-total feature in dis report .
    Help will be definately rewarded. here is d code of report:-
    TABLES: ISEG,MARA.
    TYPE-POOLS : SLIS.
    DATA : DATE1(15) TYPE C,
    DATE2(15) TYPE C,
    TITLE(65) TYPE C,
    DT(25) TYPE C.
    DATA : ITEVENT TYPE SLIS_T_EVENT.
    DATA: lv_sort TYPE slis_sortinfo_alv,
          t_sort type slis_t_sortinfo_alv.
    DATA : repid LIKE sy-repid.
    INTERNAL TABLE FOR INVENTORY STOCK *****************
    DATA: BEGIN OF ITS1 OCCURS 0,
          MATNR LIKE ISEG-MATNR,
          ITEMID(6) TYPE C,
          MEINS LIKE ISEG-MEINS,
          MENGE LIKE ISEG-MENGE,
          WRTZL LIKE ISEG-WRTZL,
          BUCHM LIKE ISEG-BUCHM,
          WRTBM LIKE ISEG-WRTBM,
          WERKS LIKE ISEG-WERKS,
          BUDAT LIKE ISEG-BUDAT,
          ZLDAT LIKE ISEG-ZLDAT,
          MTART LIKE MARA-MTART,
          ITEMDESC LIKE MAKT-MAKTX,
          DIFFQTY LIKE ISEG-BUCHM,
          DIFFVALUE LIKE ISEG-WRTBM,
          GRUND LIKE ISEG-GRUND,
          GRTXT LIKE T157E-GRTXT,
          BWART LIKE T157E-BWART,
          REAS TYPE C LENGTH 15,
          END OF ITS1.
    data: t_heading type slis_t_listheader.
    SELECTION-SCREEN BEGIN OF BLOCK PAR1 WITH FRAME TITLE TEXT-001.
    *SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    *********PARAMETERS*********
    PARAMETERS : PLANT LIKE ISEG-WERKS OBLIGATORY.
    *********SELECTION SCREEN OPTIONS*********
    SELECT-OPTIONS : R_DATE FOR ISEG-BUDAT OBLIGATORY NO-EXTENSION,
                     M_TYPE  FOR MARA-MTART,
                     IT_M FOR MARA-MATNR.
    *********DEFINING VARIABLES*********
    SELECTION-SCREEN END OF BLOCK par1.
    CONCATENATE R_DATE-LOW6(2) '.' R_DATE-LOW4(2) '.' R_DATE-LOW+0(4) INTO DATE1.
    CONCATENATE R_DATE-HIGH6(2) '.' R_DATE-HIGH4(2) '.' R_DATE-HIGH+0(4) INTO DATE2.
    TOP-OF-PAGE.
      PERFORM PG_HEADER.
       START-OF-SELECTION.
      SELECT AMATNR AMEINS AMENGE AWRTZL ABUCHM AWRTBM AWERKS ABUDAT AZLDAT BMTART AGRUND CBWART
       FROM ISEG AS A INNER JOIN MARA AS B ON BMATNR = AMATNR
       INNER JOIN MSEG AS C ON AMBLNR = CMBLNR
       INTO CORRESPONDING FIELDS OF TABLE ITS1 WHERE BMATNR = AMATNR  AND BMEINS = AMEINS AND AWERKS = PLANT AND ABUDAT IN R_DATE AND BMTART IN M_TYPE AND BMATNR IN IT_M.
    SORT ITS1 BY MTART.
    LOOP AT ITS1.
         ITS1-ITEMID = ITS1-MATNR+12(6).
         ITS1-DIFFQTY = ITS1-MENGE - ITS1-BUCHM.
         ITS1-DIFFVALUE = ITS1-WRTZL - ITS1-WRTBM.
         SELECT SINGLE MAKTX FROM MAKT INTO ITS1-ITEMDESC WHERE MATNR = ITS1-MATNR.
         SELECT SINGLE GRTXT INTO ITS1-GRTXT FROM T157E WHERE GRUND = ITS1-GRUND AND SPRAS = 'E' AND BWART = ITS1-BWART.
         MODIFY ITS1.
    ENDLOOP.
    PERFORM PRN_SMSTOCK_ALV.
    WRITING DATA FROM D TABLES**********
    FORM PG_HEADER.
    WRITE : 'INVENTORY REPORT             PLANT : ', PLANT.
    ENDFORM.
    *&      Form  PRN_SMSTOCK_ALV
          text
    -->  p1        text
    <--  p2        text
    form PRN_SMSTOCK_ALV .
    data: w_title   type lvc_title,
          w_repid   type syrepid,
          w_comm    type slis_formname,
          w_status  type slis_formname,
          x_layout  type slis_layout_alv,
          t_event   type slis_t_event,
          t_fieldcat type slis_t_fieldcat_alv,
          t_subtot TYPE slis_t_sortinfo_alv,
          subtot LIKE LINE OF t_subtot.
    refresh t_fieldcat.
    refresh t_event.
    refresh t_sort.
    clear x_layout.
    clear w_title.
      perform set_fieldcat2 using:
    1  'MTART'     'MTART'     'MARA'  '15'  space 'MATERIAL TYPE'        space  space  space space space space space space SPACE t_fieldcat 'L' 'L',
    2  'ITEMID'    'ITEMID'    'MARA'  '7'   space 'ITEM ID'              space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    3  'ITEMDESC'  'MAKTX'     'MAKT'  '25'  space 'MATERIAL DESCRIPTION' space  space  space space space space space space SPACE t_fieldcat 'L' 'C',
    4  'MEINS'     'MEINS'     'MARA'  '5'   space 'UOM'                  space  space  space space space space space space SPACE t_fieldcat 'C' 'C',
    5  'MENGE'     'MENGE'     'ISEG'  '13'  space 'ORG.INV.QTY'          space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    6  'WRTZL'     'WRTZL'     'ISEG'  '13'  space 'ORG.INV.VALUE'        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    7  'BUCHM'     'BUCHM'     'ISEG'  '13'  space 'PHY.INV.QTY'          space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    8  'WRTBM'     'WRTBM'     'ISEG'  '13'  space 'PHY.INV.VALUE'        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    9  'DIFFQTY'   'MENGE'     'ISEG'  '13'  space 'DIFF.INV.QTY'         space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    10 'DIFFVALUE' 'WRTZL'     'ISEG'  '13'  space 'DIFF.INV.VALUE'       space  space  space space space space space space SPACE t_fieldcat SPACE 'P',
    11 'BUDAT'     'BUDAT'     'ISEG'  '18'  space 'CORRECTED DATE'       space  space  space space space space space space SPACE t_fieldcat  'C' 'C',
    12 'GRTXT'     'GRTXT'     'ISEG'  '18'  space 'REASON'               space  space  space space space space space space SPACE t_fieldcat  'L' 'L',
    13 'REAS'      'REAS'      'ISEG'  '18'  space 'AUTH.BY'              space  space  space space space space space space SPACE t_fieldcat  'C' 'C'.
    x_layout-zebra = 'X'.
    perform set_top_page_heading using t_heading t_event.
    perform set_events using t_event.
      w_status = ''.
      w_repid = sy-repid.
    w_comm   = 'USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = w_repid
          it_fieldcat              = t_fieldcat
          i_Callback_top_of_page   = 'Top-of-page'
          is_layout                = x_layout
          it_sort                  = t_sort
          i_callback_pf_status_set = w_status
          i_callback_user_command  = w_comm
          i_save                   = 'X'
          it_events                = t_event
          i_grid_title             = w_title
          tables
          t_outtab                 = ITS1
          exceptions
          program_error            = 1
          others                   = 2.
    if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    ENDFORM.
    FORM set_fieldcat2 USING
          p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
        p_subtot
          t_fieldcat TYPE slis_t_fieldcat_alv
          P_JUST
          P_FTYPE.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-hotspot = p_hotspot.
      wa_fieldcat-checkbox = p_checkbox.
      wa_fieldcat-icon = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
    IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
    ENDIF.
    IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
    ENDIF.
    IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
    ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
    IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
    ENDIF.
      IF NOT P_JUST IS INITIAL.
        WA_FIELDCAT-JUST = P_JUST.
      ENDIF.
      IF NOT p_edit IS INITIAL.
        wa_fieldcat-Input     = 'X'.
        wa_fieldcat-edit     = 'X'.
        wa_fieldcat-do_sum = 'x'.
       wa_fieldcat-checkbox = 'x'.
       wa_fieldcat-hotspot = 'x'.
        ENDIF.
    APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    ======================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
         exporting
              it_list_commentary = t_heading.
    ENDFORM.
    form set_top_page_heading using t_heading type slis_t_listheader
                                    t_events  type slis_t_event.
    data: x_heading type slis_listheader,
          x_event   type line of slis_t_event.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = 'PHYSICAL INVENTORY AUDIT REPORT'.
      append x_heading to t_heading.
    Plant Name
    clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'PLANT        : '.
      x_heading-info = PLANT.
      append x_heading to t_heading.
    IF DATE2 = '00.00.0000'.
      CONCATENATE DATE1 'to' DATE1 INTO DT SEPARATED BY SPACE.
    ELSE.
      CONCATENATE DATE1 'to' DATE2 INTO DT SEPARATED BY SPACE.
    ENDIF.
    X_heading-TYP = 'S'.
    X_heading-key = 'PERIOD         :'.
    X_heading-INFO = DT.
    APPEND x_heading TO t_heading.
    Control Date
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'CONTROL NO. :'.
      x_heading-info = ' ASDFADDFAAS  DATE : 11.04.2007'.
      append x_heading to t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-form = 'TOP_OF_PAGE'.
      append x_event to t_events.
    endform.
    form set_events using t_events type slis_t_event.
    data: x_event   type line of slis_t_event.
    endform.
    Edited by: ric .s on Jan 29, 2008 5:21 AM

    Hi,
        U can do subtotal for a field based on some other field in ur ALV report using slis_t_sortinfo_alv.
    see the sample code below...
    data:  int_sort TYPE slis_t_sortinfo_alv,
              fs_sort TYPE slis_sortinfo_alv.
    Sort the output based on ORG UNIT.
      CLEAR fs_sort.
      fs_sort-fieldname = 'ORGEH'.
      fs_sort-subtot = 'X'.
      fs_sort-up = 'X'.
      APPEND fs_sort TO int_sort.
    perform f_alv_catsfieldcat.
    Fieldcat calculates the sum for SMPCNT field.
    FORM f_alv_catsfieldcat.
       DATA: loc_fieldcat TYPE slis_fieldcat_alv.
      DEFINE define_field.            
        clear loc_fieldcat.
        loc_fieldcat-fieldname = &1.
        loc_fieldcat-seltext_l = &2.
        loc_fieldcat-key = &3.
        loc_fieldcat-outputlen = &4.
        loc_fieldcat-do_sum = &5.
        append loc_fieldcat to int_fieldcat.
      END-OF-DEFINITION.
      REFRESH int_fieldcat.
      CLEAR int_fieldcat.
    define_field 'PERNR' text-029 'X' '8' ''.
    define_field 'ENAME' text-030 '' '40' ''.
    define_field 'KOSTL' text-037 '' '10' ''.
    define_field 'SMPCNT' text-040 '' '' 'X'. 
    endform.
    Then call REUSE_ALV-GRID_DISPLAY with ur internal table with int_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
              EXPORTING
                i_callback_program       = sy-repid
                i_callback_top_of_page   = 'TOP_OF_PAGE'
                it_sort                  = int_sort  
             i_callback_pf_status_set = 'F_PF_STATUS_SET'
                i_callback_user_command  = 'F_USER_COMMAND'
                it_fieldcat              = int_fieldcat
                i_save                   = 'X'
              TABLES
                t_outtab                 = int_outputcpy
              EXCEPTIONS
                program_error            = 1
                OTHERS                   = 2.
            IF sy-subrc <> 0.
              WRITE / 'error'.
            ENDIF.
    Hope it will help u..
    Reward points if helpful
    Cheers,
    Shanthi
    Edited by: shanthi ps on Jan 29, 2008 5:37 AM
    Edited by: shanthi ps on Jan 29, 2008 5:38 AM

  • Inventory Report Based On Posting Date

    Hai All
    Can any one help me with the subject "Inventory Report Based On Posting Date"
    Please
    with regards
    Shankar

    hi,
    Visit this link,already answered.
    Difference between posting & system date in Inventory Audit Report
    Jeyakanthan

Maybe you are looking for

  • Returning my iPhone 5c?

    I purchased an iPhone 5c 8GB. I've had it for a little bit now and I was just waiting for my SIM card to get here. My SIM card got here today. I got everything set up only to find out that the phone doesn't hold all of my music and pictures. On my or

  • When I call an external program from Labview, how can I embed the interface into the front panel?

    I'm running Labiew 6i for Linux. I'm using a system exec.vi to call an external program to do image manipulation (since there is no IMAQ for linux). How can I embed the user interface of the external program into the front panel of Labview?

  • Imac freezes in Leopard

    My iMac freezes and locks-up when I do certain things. a) Go into the Video/Audio pane on ichat prefs b) when I'm scrolling through image sin preview c) when using time machine sometimes d) once or twice when switching to full screen in Parallels e)

  • Standard User Lic upgrade to Professional Lic for CUMA

    Hi NetPro. my company is going to purchase CUMA server , however my current user lic which all in Stand only. however, i am thinking to upgrade them to Professional in order to use the feature of CUMA . however, i am stucked in the Dynamic Tool gener

  • Playlist managem

    Hello board, I have a question regarding playlists. I've used an iPod before buying a Zen, and iTunes allows for just dragging folders into it's right pane and automatically creates playlists out of them. I have become very used to this and would lik