Report for delivered PO

Hi,
What is the report to get the closed PO.
i.e no open qty exist.
regards,
sathya

hi,
we101 is to list the open PO.
But I want only closed PO i.e all qty are delivered by the vendor.
regards,
sathya

Similar Messages

  • Report for delivered but not billed orders

    Hi All,
    I am trying to build a query using logical database to extract all orders for which delivery has been done, but not yet billed. I believe i can extract this data using VAV logical database, but not quite sure if i should use VAV or VFV.
    Can someone let me know, which database to use & also what input conditions i need to maintain to extract only the information which i am looking for?
    Hope my question is clear, await inputs.
    Vivek

    Hi Vivek,
    What I wanted to say that you won't get information from VAV about billing since as far as I know it doesn't contain any relevant table.
    You should try create a query using LIKP-LIPS-(joint type: left outer)-VBRK. This will connect deliveries to billing document, you can also get SO number. Please try this.
    (Sorrowully I don't know which logical database would be good for you)
    BR
    Csaba

  • Dynamically Iterate through data a deliver a seperate report for each

    How would I configure my Crystal Report Server to dynamically iterate through a batch of check numbers, generate & deliver a report for each check number?

    Jaggy like this

  • Report for POs pending Release (approval) and POs overdue (past deliv date)

    Hi All,
    In ME2N - std report for POs. How do I set the selection critieria in order to get the following information
    1. POs pending Approval (subject to Release Strategy)
    2. POs pending delivery from Vendor where the delivery date requested in the POs is past. (How does Selection parameter WE101 help in this report.? How to show how many days past requested delivery date in the PO?)
    Thanks in advance

    Dear,
    1. POs pending Approval (subject to Release Strategy) : -
    Enter ME2N, select Dynamic Selection.
    Here click on Purchasing Document Header,
    Double click on Release Indicator field and assign "X" ,
    Then souble click on Subject to release and also give "Yes" indicator then click on execute you get list of purchase order which is unrelease.
    2) POs pending delivery from Vendor: -
    Enter ME2N, Select selection parameter WE101,
    Here you can find list of pending purchase order, You can see document date or delivery date from change layout to find out how it is past.
    Regards,
    Mahesh Wagh

  • Please Help .... in identifying(SAP Delivered): Reports for Invoice-to-Cash

    Hi,
    I will be at a meeting to help gather requirements for a project in relation to Invoice-to-Cash.
    Can you guide me to get the following information:
    1. a high level list of reports for Invoice-to-Cash
    2. a detail list of reports for Invoice-to-Cash
    3. To see the SAP deleivered data flow to give me an idea of the extractors, DSOs, Cubes(dimensions...), etc.
    Also, apart from your experience, is there a process to get this information for any requirement in general? I went to BI Content in rsa1 on our development system hoping to see some reports related to Invoice-to-Cash but to no avail?
    Thanks
    Edited by: Amanda Baah on Apr 24, 2009 8:36 AM

    Hi,
    invoice to cash is basically a sub process of the process: Customer Order to point of receiving Cash from Customer.
    So, Invoice to cash as used in my original post actually is: The point at which Customer Invoice was issued to the point at which Cash was received.
    So back to my original question, can you guide me to get the following information:
    1. a high level list of reports for Invoice-to-Cash
    2. a detail list of reports for Invoice-to-Cash
    3. To see the SAP deleivered data flow to give me an idea of the extractors, DSOs, Cubes(dimensions...), etc.
    Also, apart from your experience, is there a process to get this information for any requirement in general? I went to BI Content in rsa1 on our development system hoping to see some reports related to Invoice-to-Cash but to no avail?
    Thanks
    Edited by: Amanda Baah on Apr 27, 2009 9:35 AM

  • How to create a report for open sales orde documents which are not invoiced

    Hi Experts this is urgent,
    +pls give the Logic for document flow+
    My requirement is create a report for sales orders which are not invoiced  using the following table.
    VBAK : sales order header
    VBAP : sales order item
    VBFA : sales document flow
    VBUK for processing status
    KOMV for duties value and sales order value
    LIKP : delivery not header
    LIPS :delivery note item
    For information : In the header level the processing Status is indicated in the table VBUK field LFSTK for one sales order number. A,B , C are the possible entries.
    Case A : When a sales order is invoiced we can display information on the header status :
    Overall status : Completed  and display a invoice number in the document flow. When the items of the sales orders are invoiced the process status is the following :  Overall status       Completed            
    Delivery status      Fully delivered      
    Case B : An open sales order not delivered and not invoiced will have overall status : Open on the header and item level and will not have subsequent documents.
    Case C :
    When the items for the sales order are delivered but not invoiced the status will be u201Cfully deliveredu201D
    And the subsequent documents will be delivery notes and good issue if the delivery note is issued.
    With regards
    ravi
    Edited by: ravik ravik on Jun 25, 2008 3:29 PM

    Hello Ravi,
    U neednot develop any report..
    there is std report with txn V.02
    or copy this and make necessary changes.
    Reward, if helpful.
    Rgds,
    Raghu.

  • Material Stock Report  for tcode MB5B

    Hello Expert
    I have a SAP report for stock posting date with T-Code as MB5B and
    the report name is RM07MLBD.
    When I enter Material no, plant code , Movement type (101) and selection
    dates for a month, The report is displaying but not break by Movement type instead it is showing all the movement type....?
    Can anyone have idea about this
    REPORT RM07MLBD NO STANDARD PAGE HEADING MESSAGE-ID M7 LINE-SIZE 95.
        REPORT RM07MLBD   (Transaktionscode MB5B)                        *
    correction June 2004 MM                                   "n747306
    wrong the assignment of the MM and FI documents for data  "n747306
    constellation : n MM doc items --> 1 FI doc item          "n747306
    ABAP-Preprocessor removed                                 "n599218 A
    - this version is for release 4.6C and higher             "n599218 A
    - process database table OBEW always                      "n599218 A
    - IS-OIL specific functions :                             "n599218 A
      - define IS-OIL workings fields                         "n599218 A
      - transport and process these fields only when          "n599218 A
        structure MSEG comprise these fields                  "n599218 A
    Improvements :                       Dec. 2003 MM         "n599218
    - print the page numbers                                  "n599218
                                                              "n599218
    - send warnings and error messages only when report is    "n599218
      launched / advoid warnings when user changes entries on "n599218
      the selection screen                                    "n599218
    - send warning M7 689 when user does not restrict the     "n599218
      database in dialog or print mode                        "n599218
    - send warning M7 393 when user deletes the initial       "n599218
      display variant                                         "n599218
                                                              "n599218
    - allow to process the fields MAT_KDAUF, MAT_KDPOS, and   "n599218
      MAT_PSPNR from release 4.5B and higher                  "n599218
                                                              "n599218
    - show the current activity and the progress              "n599218
                                                              "n599218
    - error message 'programmfehler' improved                 "n599218
                                                              "n599218
    - new categories for scope of list                        "n599218
                                                              "n599218
    - use function module for database commit for the update  "n599218
      of the parameters in table ESDUS. This allows to record "n599218
      this transaction for a batch input session using        "n599218
      transaction SHDB                                        "n599218
                                                              "n599218
    - reset the entries for plant when valuation level is     "n599218
      is company code and mode is valuated stock              "n599218
                                                              "n599218
    - enable this report to run in the webreporting mode      "n599218
    Dec. 2002 MM                                              "n571473
    the definition of the selection screen moved from include "n571473
    RM07MLBP into this report                                 "n571473
    Sept 2002 MM                                              "n555246
    log function tax auditor                                  "n555246
    note 547170 :                              August 2002 MM "n547170
    - representation of tied empties improved                 "n547170
      active this function automatically in retail systems    "n547170
    - FORM routines without preprocessor commands and without "n547170
      text elements moved to the new include reports          "n547170
      RM07MLBD_FORM_01and RM07MLBD_FORM_02                    "n547170
    - the function module FI_CHECK_DATE of note 486477 will   "n547170
      be processed when it exists                             "n547170
    - function and documentation of parameter XONUL improved  "n547170
    - display MM documents with MIGO or MB03 depending from   "n547170
      the release                                             "n547170
    - get and save the parameters per user in dialog mode     "n547170
      only in release >= 4.6                                  "n547170
    the following items were improved with note 497992        "n497992
    - wrong results when remaining BSIM entries contain       "n497992
      an other quantity unit as material master MEINS         "n497992
    - improve check FI summarization                          "n497992
    - the messages M7 390, M7 391, and M7 392                 "n497992
    - definition of field g_f_repid for all releases          "n497992
    - incomplete key for access of internal table IT134M      "n497992
      causes wrong plant selection                            "n497992
    - the function "no reversal movement" did not surpress    "n497992
      the original movements; fields "SJAHR" was moved from   "n497992
      from report RM07MLBD_CUST_FIELDS to RM07MLBD            "n497992
    - process valuated subcontractor stock from database      "n497992
      table OBEW if it exists                                 "n497992
    - if FI summarization is active process warning M7 390    "n497992
      for stock type = valuated stock                         "n497992
    - the user wants to restrict the movement type : process  "n497992
      warning M7 391                                          "n497992
    - the user wants to surpress the reversal movements :     "n497992
      process warning M7 392                                  "n497992
    - consider special gain/loss-handling of IS-OIL           "n497992
    - automatic insert of field WAERS currency key into the   "n497992
      field catalogue :                                       "n497992
      - at least one ref. field is active -> WAERS active     "n497992
      - all reference fields are hidden   -> WAERS hidden     "n497992
    - the length of sum fields for values was increased       "n497992
    - customizing for the selection of remaining BSIM entries "n497992
    - customizing for the processing of tied empties          "n497992
    separate time depending authorization for tax auditor     "n486477
    additional fields are displayed in wrong format           "n480130
    report RM07MLBD and its includes improved  Nov 2001       "n451923
    - merging FI doc number into table G_T_MSEG_LEAN improved "n451923
    - handling of the short texts improved                    "n451923
    - some types and data definitions -> include RM07MLDD     "n451923
    error for split valuation and valuated special stock      "n450764
    process 'goods receipt/issue slip' as hidden field        "n450596
    error at start date : material without stock has value    "n443935
    wrong results for docs with customer consignment "W"      "n435403
    error during data selection for plants                    "n433765
    report RM07MLBD and its includes improved  May 10th, 2001 "n400992
    !!! IMPORTANT : DO NOT CHANGE OR DELETE THE COMMENT LINES !!!        *
    - consider the material number during looking for FI documents
    - field "g_cust_color" in include report "RM07MLBD_CUST_FIELDS"
      allows the customer to activate or inactivate the colors in the
      lines with the documents.
    - error during calcuation of start stock for special stock "M"
    - valuted stocks required : no documents found ? continue and
      process empty document table
    - the length of sum fields for quantities has been increased
      to advoid decimal overflow
    - table ORGAN is replaced by G_T_ORGAN
      - it is filled by the following ways :
        - at process time at selection screen if the
          user wants the selection via cc or plant
        - otherwise after the database selection of the stock
          tables
      - it contains less data fields
      - it contains all entries twice, for binary search
        with plant or valuation area
    - selection of databases MKPF and MSEG in one SELECT
      command with an inner JOIN
    - authority checks after the database selections
    - result of database selection from the both database tables
      MSEG and MKPF in working table G_F_MSEG_LEAN instead of
      the tables IMSEG and IMKPF
    - the number of processed data fields was reduced
    - the user has the possibility to increase the number of
      the processed fields deleting the '*' in the types-command
      in include report RM07MLBD_CUST_FIELDS
    - the creation of the field catalog for the ALV considers
      only the fields of structure G_S_MSEG_LEAN
    - the new table G_T_BELEG contains the results for the ALV.
      the number of fields of table G_T_BELEG corresponds with
      the number of fields of table G_T_MSEG_LEAN.
    - the functions "define breakdown" and "choose" are inactivated
      in the menue, because they are are not carried out correctly
      in all blocks of the list
        Anzeige der Materialbestände in einem Zeitintervall              *
    Der Report gliedert sich im wesentlichen in folgende Verarbeitungs- *
    blöcke:                                                             *
    1) Definition des Einstiegsbildes und Vorbelegung einzelner         *
        Selektionsfelder, sowie Prüfung der eingegebenen Selektions-     *
        parameter und Berechtigungsprüfung                               *
    2) Lesen der aktuellen Bestandswerte                                *
    3) Lesen und Verarbeiten der Materialbelege                         *
    4) Berechnung der Bestandswerte zu den vorgegebenen Datümern        *
    5) Ausgabe der Bestände und Materialbelege                          *
    *eject
    *# APP_CALL_DECLARE TEST
    this definitions depend on the release
    TYPE-POOLS:  IMREP,                   " Typen Bestandsführungsreporting
                 SLIS.                    " Typen Listviewer
      for the selection of the reversal movements only in release >=45B
          DATA: BEGIN OF STORNO OCCURS 0,
                  MBLNR LIKE MSEG-MBLNR,
                  MJAHR LIKE MSEG-MJAHR,
                  ZEILE LIKE MSEG-ZEILE,
                  SMBLN LIKE MSEG-SMBLN,
                  SJAHR LIKE MSEG-SJAHR,
                  SMBLP LIKE MSEG-SMBLP,
                END OF STORNO.
    include:  rm07mldd,     " reportspezifische Datendefinitionen
              rm07grid.     " Gitternetz, Formatierung, Farbgebung
    INCLUDE RM07APP1.     "ABAP-PREPROCESSOR  "TEST
    "n571473
    define the selection screen here                          "n571473
    "n571473
    SELECTION-SCREEN BEGIN OF BLOCK Database-selection
              WITH FRAME TITLE TEXT-001.
    Text-001: Datenbankabgrenzungen
    SELECT-OPTIONS: MATNR FOR MARD-MATNR MEMORY ID MAT
                                         MATCHCODE OBJECT MAT1,
                    BUKRS FOR T001-BUKRS  MEMORY ID BUK,
                    WERKS FOR T001W-WERKS MEMORY ID WRK,
                    LGORT FOR T001L-LGORT,
                    CHARG FOR MCHB-CHARG,
                    BWTAR FOR MBEW-BWTAR,
                    BWART FOR MSEG-BWART.
    PARAMETERS SOBKZ LIKE MSEG-SOBKZ.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS: DATUM FOR MKPF-BUDAT NO-EXTENSION.
    Datumsintervall für Selektion
    SELECTION-SCREEN END OF BLOCK Database-selection.
    SELECTION-SCREEN BEGIN OF BLOCK BESTANDSART
    WITH FRAME TITLE TEXT-002.
    Text-002: Bestandsart
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS LGBST LIKE AM07M-LGBST RADIOBUTTON GROUP BART DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 4(50) TEXT-010 FOR FIELD LGBST.
    Text-010: Lagerort-/Chargenbestand
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS BWBST LIKE AM07M-BWBST RADIOBUTTON GROUP BART.
    SELECTION-SCREEN COMMENT 4(50) TEXT-011 FOR FIELD BWBST.
    Text-011: bewerteter Bestand
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS SBBST LIKE AM07M-SBBST RADIOBUTTON GROUP BART.
    SELECTION-SCREEN COMMENT 4(50) TEXT-012 FOR FIELD SBBST.
    Text-012: Sonderbestand
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK BESTANDSART.
    improved definition of parameters for scope of list       "n599218
    SELECTION-SCREEN BEGIN OF BLOCK listumfang
      with frame title text-003.  "Listumfang
    the following 3 parameters became obsolete do not use     "n599218
    anymor. They are still here to inform the user about      "n599218
    that he is using old variants or SUBMIT commands          "n599218
      PARAMETERS :                                              "n599218
        XONUL  LIKE AM07M-XONUL            no-display,          "n599218
        XVBST  LIKE AM07M-XVBST            no-display,          "n599218
        XNVBST LIKE AM07M-XNVBS            no-display.          "n599218
    7 new categories for the scope of list                    "n599218
                                                              "n599218
    cat. I docs I stock on   I    I stock on I Parameter      "n599218
         I      I start date I    I end date I                "n599218
    ---+--+--------++------+--------      "n599218
    1   I yes  I =  zero    I =  I =  zero  I pa_wdzer       "n599218
    2   I yes  I =  zero    I <> I <> zero  I pa_wdzew       "n599218
    3   I yes  I <> zero    I <> I =  zero  I pa_wdwiz       "n599218
    4   I yes  I <> zero    I <> I <> zero  I pa_wdwuw       "n599218
    5   I yes  I <> zero    I =  I <> zero  I pa_wdwew       "n599218
         I      I            I    I          I                "n599218
    6   I no   I =  zero    I =  I =  zero  I pa_ndzer       "n599218
    7   I no   I <> zero    I =  I <> zero  I pa_ndsto       "n599218
                                                              "n599218
    definition of the pushbutton : show or hide the following "n599218
    parameters for the scope of list                          "n599218
      SELECTION-SCREEN PUSHBUTTON /1(20) PB_LIU                 "n599218
                                 USER-COMMAND LIU.              "n599218
                                                                "n599218
    text line : materials with movements                      "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN COMMENT 1(55) TEXT-072                 "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    with movements / start = zero  =  end = zero              "n599218
    1   I yes  I =  zero    I =  I =  zero  I pa_wdzer       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_wdzer    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      text-083 : no opening stock ; no closing stock          "n599218
        SELECTION-SCREEN COMMENT 5(70) text-083                 "n599218
                                 FOR FIELD pa_wdzer             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    with movements / start = zero  =  end <> zero             "n599218
    2   I yes  I =  zero    I <> I <> zero  I pa_wdzew       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_wdzew    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      text-084 : no opening stock ; with closing stock        "n599218
        SELECTION-SCREEN COMMENT 5(70) text-084                 "n599218
                                 FOR FIELD pa_wdzew             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    with movements / start stock <> 0 / end stock = 0         "n599218
    3   I yes  I <> zero    I <> I =  zero  I pa_wdwiz       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_wdwiz    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      text-085 : with opening stock ; no closing stock        "n599218
        SELECTION-SCREEN COMMENT 5(70) text-085                 "n599218
                                 FOR FIELD pa_wdwiz             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    with movements / with start and end stocks / different    "n599218
    4   I yes  I <> zero    I <> I <> zero  I pa_wdwuw       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_wdwuw    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      with opening stock ; with closing stock ; changed       "n599218
        SELECTION-SCREEN COMMENT 5(70) text-086                 "n599218
                                 FOR FIELD pa_wdwuw             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    with movements / with start and end stock / equal         "n599218
    5   I yes  I <> zero    I =  I <> zero  I pa_wdwew       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_wdwew    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      with opening stock ; with closing stock ; non-changed   "n599218
        SELECTION-SCREEN COMMENT 5(70) text-087                 "n599218
                                 FOR FIELD pa_wdwew             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    text line : materials without movements                   "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN COMMENT 1(55) TEXT-073                 "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    materials without movements / stocks = zero               "n599218
    6   I no   I =  zero    I =  I =  zero  I pa_ndzer       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_ndzer    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      text-083 : no opening stock ; no closing stock          "n599218
        SELECTION-SCREEN COMMENT 5(70) text-083                 "n599218
                                 FOR FIELD pa_ndzer             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    materials without movements / with start or end stock     "n599218
    7   I no   I <> zero    I =  I <> zero  I pa_ndsto       "n599218
      SELECTION-SCREEN BEGIN OF LINE.                           "n599218
        SELECTION-SCREEN POSITION 2.                            "n599218
        PARAMETERS : pa_ndsto    LIKE AM07M-MB5B_XONUL          "n599218
                                 modif id liu.                  "n599218
      with opening stock ; with closing stock ; non-changed   "n599218
        SELECTION-SCREEN COMMENT 5(70) text-087                 "n599218
                                 FOR FIELD pa_ndsto             "n599218
                                 modif id liu.                  "n599218
      SELECTION-SCREEN END OF LINE.                             "n599218
                                                                "n599218
    SELECTION-SCREEN END OF BLOCK listumfang.
    SELECTION-SCREEN BEGIN OF BLOCK EINSTELLUNGEN
       WITH FRAME TITLE TEXT-068.  "Settings
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS XSUM LIKE AM07M-XSUM.
    SELECTION-SCREEN COMMENT 4(50) TEXT-019 FOR FIELD XSUM.
    Text-019: nur Summen
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 1.
    PARAMETERS XCHAR LIKE AM07M-XCHRG.
    SELECTION-SCREEN COMMENT 4(50) TEXT-015 FOR FIELD XCHAR.
    Text-015: nur chargenpflichtige Materialien
    Das Kennzeichen 'xchar' bestimmt die Art der Listausgabe entweder
    auf Material- oder Chargenebene.
    SELECTION-SCREEN END OF LINE.
    the function "No reversal movements" is only         "n571473
    available from relaese 4.5B and higher               "n571473
    ( TEXT-026 : No reversal movements )                 "n571473
        SELECTION-SCREEN BEGIN OF LINE.                    "n571473
          SELECTION-SCREEN POSITION 1.                     "n571473
          PARAMETERS NOSTO LIKE AM07M-NOSTO.               "n571473
          SELECTION-SCREEN COMMENT 4(50) TEXT-026          "n571473
                                 FOR FIELD NOSTO.          "n571473
        SELECTION-SCREEN END OF LINE.                      "n571473
    SELECTION-SCREEN END OF BLOCK EINSTELLUNGEN.
    SELECTION-SCREEN BEGIN OF BLOCK LISTE WITH FRAME TITLE TEXT-040.
    PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
    SELECTION-SCREEN END OF BLOCK LISTE.
    *eject
    new data definitions
    working fields for reading structures from DDIC           "n599218 A
    and check whether IS-OIL is active                        "n599218 A
    types : stab_x031l           type standard table of x031l   "n599218 A
                                 with default key.              "n599218 A
                                                                "n599218 A
    data : g_s_x031l             type x031l,                    "n599218 A
           g_t_x031l             type stab_x031l.               "n599218 A
                                                                "n599218 A
    data : g_f_dcobjdef-name     like dcobjdef-name,            "n599218 A
           g_flag_is_oil_active(01)        type c,              "n599218 A
           g_cnt_is_oil          type i.                        "n599218 A
    contains the a structure with the max. number of fields of
    the database table MSEG, but those lines are comment lines
    with a '*'. The customer can achtivate those lines.
    The activated fields will be selected from the database table
    and are hidden in the list. With the settings in the display
    variant the can be shown.
    INCLUDE                      RM07MLBD_CUST_FIELDS.
    common types structure for working tables
    a) g_t_mseg_lean   results form database selection
    b) g_t_beleg       data table for ALV
    TYPES : BEGIN OF STYPE_MSEG_LEAN,
              MBLNR             LIKE      MKPF-MBLNR,
               MJAHR             LIKE      MKPF-MJAHR,
               VGART             LIKE      MKPF-VGART,
               BLART             LIKE      MKPF-BLART,
               BUDAT             LIKE      MKPF-BUDAT,
               CPUDT             LIKE      MKPF-CPUDT,
               CPUTM             LIKE      MKPF-CPUTM,
               USNAM             LIKE      MKPF-USNAM,
    process 'goods receipt/issue slip' as hidden field        "n450596
               XABLN             LIKE      MKPF-XABLN,          "n450596
               LBBSA             LIKE      T156M-LBBSA,
               BWAGR             LIKE      T156S-BWAGR,
               BUKRS             LIKE      T001-BUKRS,
               BELNR             LIKE      BKPF-BELNR,
               GJAHR             LIKE      BKPF-GJAHR,
               WAERS             LIKE      MSEG-WAERS,
               ZEILE             LIKE      MSEG-ZEILE,
               BWART             LIKE      MSEG-BWART,
               MATNR             LIKE      MSEG-MATNR,
               WERKS             LIKE      MSEG-WERKS,
               LGORT             LIKE      MSEG-LGORT,
               CHARG             LIKE      MSEG-CHARG,
               BWTAR             LIKE      MSEG-BWTAR,
               KZVBR             LIKE      MSEG-KZVBR,
               KZBEW             LIKE      MSEG-KZBEW,
               SOBKZ             LIKE      MSEG-SOBKZ,
               KZZUG             LIKE      MSEG-KZZUG,
               BUSTM             LIKE      MSEG-BUSTM,
               BUSTW             LIKE      MSEG-BUSTW,
               MENGU             LIKE      MSEG-MENGU,
               WERTU             LIKE      MSEG-WERTU,
               SHKZG             LIKE      MSEG-SHKZG,
               MENGE             LIKE      MSEG-MENGE,
               MEINS             LIKE      MSEG-MEINS,
               DMBTR             LIKE      MSEG-DMBTR,
               DMBUM             LIKE      MSEG-DMBUM,
               XAUTO             LIKE      MSEG-XAUTO,
               KZBWS             LIKE      MSEG-KZBWS,
             special flag for retail                          "n497992
               retail(01)        type c,                        "n497992
    define the fields for the IO-OIL specific functions       "n599218 A
             mseg-oiglcalc     CHAR          1                "n599218 A
             mseg-oiglsku      QUAN         13                "n599218 A
               oiglcalc(01)      type  c,                       "n599218 A
               oiglsku(07)       type  p  decimals 3,           "n599218 A
               insmk             like      mseg-insmk,          "n599218 A
    the following fields are used for the selection of
    the reversal movements
              SMBLN    LIKE      MSEG-SMBLN,    " No. doc
              SJAHR    LIKE      MSEG-SJAHR,    " Year          "n497992
              SMBLP    LIKE      MSEG-SMBLP.    " Item in doc
    additional fields : the user has the possibility to activate
    these fields in the following include report
              INCLUDE           TYPE      STYPE_MB5B_ADD.
    TYPES : END OF STYPE_MSEG_LEAN.
    TYPES: STAB_MSEG_LEAN        TYPE STANDARD TABLE OF STYPE_MSEG_LEAN
                                 WITH KEY MBLNR MJAHR.
    data tables with the results for the ALV
    TYPES : BEGIN OF STYPE_BELEGE.
              INCLUDE            TYPE      STYPE_MSEG_LEAN.
    TYPES :   FARBE TYPE SLIS_T_SPECIALCOL_ALV.
    TYPES : END OF STYPE_BELEGE.
    TYPES : STAB_BELEGE          TYPE STANDARD TABLE OF STYPE_BELEGE
                                 WITH KEY  BUDAT MBLNR ZEILE.
    DATA : G_T_BELEGE            TYPE   STAB_BELEGE WITH HEADER LINE,
           G_T_BELEGE1           TYPE   STAB_BELEGE WITH HEADER LINE.
    global working areas data from MSEG and MKPF
    FIELD-SYMBOLS :        TYPE STYPE_MSEG_LEAN.
    DATA : G_S_MSEG_LEAN         TYPE STYPE_MSEG_LEAN,
           G_S_MSEG_UPDATE       TYPE STYPE_MSEG_LEAN,          "n443935
           G_T_MSEG_LEAN         TYPE STAB_MSEG_LEAN.
    working table for the control break                       "n451923
    types : begin of stype_mseg_work.                           "n451923
              include            type      stype_mseg_lean.     "n451923
    types :    tabix             like      sy-tabix,            "n451923
            end of stype_mseg_work,                             "n451923
                                                                "n451923
            stab_mseg_work       type standard table of         "n451923
                                 stype_mseg_work                "n451923
                                 with default key.              "n451923
                                                                "n451923
    data : g_t_mseg_work         type  stab_mseg_work,          "n443935
           g_s_mseg_work         type  stype_mseg_work.         "n443935
    working table for the requested field name from MSEG and MKPF
    TYPES: BEGIN OF STYPE_FIELDS,
               FIELDNAME           TYPE      NAME_FELD,
           END OF STYPE_FIELDS.
    TYPES: STAB_FIELDS           TYPE STANDARD TABLE OF STYPE_FIELDS
                                 WITH KEY FIELDNAME.
    DATA: G_T_MSEG_FIELDS        TYPE      STAB_FIELDS,
          G_S_MSEG_FIELDS        TYPE      STYPE_FIELDS.
    working table for the requested numeric fields of MSEG
    types : begin of stype_color_fields,
               FIELDNAME           TYPE      NAME_FELD,
             type(01)            type c,
           end of stype_color_fields,
           stab_color_fields     type standard table of
                                 stype_color_fields
                                 with default key.
    data: g_t_color_fields       type      stab_color_fields
                                 with header line.
    DATA: BEGIN OF IMSWEG OCCURS 1000,
            MBLNR LIKE MSEG-MBLNR,
            MJAHR LIKE MSEG-MJAHR,
            ZEILE LIKE MSEG-ZEILE,
            MATNR LIKE MSEG-MATNR,
            CHARG LIKE MSEG-CHARG,
            BWTAR LIKE MSEG-BWTAR,
            WERKS LIKE MSEG-WERKS,
            LGORT LIKE MSEG-LGORT,
            SOBKZ LIKE MSEG-SOBKZ,
            BWART LIKE MSEG-BWART,
            SHKZG LIKE MSEG-SHKZG,
            XAUTO LIKE MSEG-XAUTO,
            MENGE LIKE MSEG-MENGE,
            MEINS LIKE MSEG-MEINS,
            DMBTR LIKE MSEG-DMBTR,
            DMBUM LIKE MSEG-DMBUM,
            BUSTM LIKE MSEG-BUSTM,
            BUSTW LIKE MSEG-BUSTW,                               "147374
    define the fields for the IO-OIL specific functions       "n599218 A
          mseg-oiglcalc        CHAR          1                "n599218 A
          mseg-oiglsku         QUAN         13                "n599218 A
            oiglcalc(01)         type  c,                       "n599218 A
            oiglsku(07)          type  p  decimals 3,           "n599218 A
            insmk                like      mseg-insmk,          "n599218 A
          END OF IMSWEG.
    User settings for the checkboxes                          "n547170
      DATA: oref_settings TYPE REF TO cl_mmim_userdefaults.     "n547170
    *eject
    HAUPTPROGRAMM *********************************
    F4-Hilfe für Reportvariante -
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM f4_for_variant.
    "n599218
    INITIALIZATION                                            "n599218
    "n599218
                                                                "n599218
    pay attentions : this process time will not be processed  "n599218
    in the webreporting mode                                  "n599218
    INITIALIZATION.
    PERFORM APP_PROCESS USING 'ME'. "TEST
      PERFORM initialisierung.
    get the parameters from the last run                      "n547170
      perform                    esdus_get_parameters.          "n547170
    set flag when INITILIZATION is processed
      move  'X'        to  g_flag_initialization.
    "n599218
    AT SELECTION-SCREEN                                       "n599218
    "n599218
    Prüfung der eingegebenen Selektionsparameter, -
    Berechtigungsprüfung -
    AT SELECTION-SCREEN.
    the following 3 parameters XONUL, XVBST, and XNVBST       "n599218
    became obsolete; send error when they should be filled.   "n599218
    This could be possible if the user works with old         "n599218
    selection variants or this report is launched by a        "n599218
    SUBMIT command                                            "n599218
      if  XONUL  is initial  and                                "n599218
          XVBST  is initial  and                                "n599218
          XNVBST is initial.                                    "n599218
    ok, the old parameters are empty                         "n599218
      else.                                                     "n599218
      text-088 : note 599218 : obsolete parameter used        "n599218
        MESSAGE E895             with  text-088.                "n599218
      endif.
    did the user hit the pushbutton "Category" ?              "n599218
      case     SSCRFIELDS-UCOMM.                                "n599218
        when  'LIU '.                                           "n599218
        yes, the pushbutton "Category" was hit                "n599218
          IF  g_flag_status_liu  =  C_HIDE.                     "n599218
          show the 7 parameters on the selection srceen       "n599218
            MOVE  C_SHOW         TO  g_flag_status_liu.         "n599218
          ELSE.                                                 "n599218
          hide the 7 paramaters                               "n599218
            MOVE  C_HIDE         TO  g_flag_status_liu.         "n599218
          ENDIF.                                                "n599218
      ENDcase.                                                  "n599218
                                                                "n599218
    go on only if the user wants to launch this report        "n599218
      check : sy-ucomm = 'ONLI'  or                             "n599218
              sy-ucomm = 'PRIN'  or                             "n599218
              sy-ucomm = 'SJOB'.                                "n599218
      PERFORM eingaben_pruefen.
    check whether FI summarization is active and other        "n547170
    restrictions could deliver wrong results                  "n547170
      perform                    f0800_check_restrictions.      "n547170
    - the user wants to surpress the reversal movements :     "n497992
      process warning M7 392                                  "n497992
        IF NOT NOSTO IS INITIAL.                                "n497992
      emerge warning ?                                        "n497992
          CALL FUNCTION            'ME_CHECK_T160M'             "n497992
              EXPORTING                                         "n497992
                I_ARBGB          = 'M7'                         "n497992
                I_MSGNR          = '392'                        "n497992
              EXCEPTIONS                                    

    Please read the KBA document  2012912 - Changeablility of the field "material group" in purchasing documents
    It clearly says that material group can't be changed in case you will use material master in purchase order.
    So, it is clear that you can't use different material group for material master in purchase order.
    For stock report, system will only show you the material group which is assigned to the material master (MARA-MATKL). System will not look into the purchase order section (like EKPO).

  • Report for replacement stock to be recived from vendor

    Hi
    I HAVE ONE ISSUE ON ABOUT VENDOR REPLACEMENT STOCK REPORT
    EX:.. i have done GR for material-A qty 100...and ihave done MIRO for this ..pur.order..
    after 20 days i have return the materai-A ..qty 25..(without cancel the MIRO) with movement tuype 122..but this material should be return from vedor.(subsequent deliver).after some days or weeks ..( bcoz money has already paid to vendor)...like this we many materials ..
    for this... i want report for replacement material will be recived from vendor
    regards
    sesidhar

    Hi
    already i have done MIRO..
    then return to vendor qty 25..(through MIRO...w/o creadit memo
    thne again recive the replacement material ..through MIGO (subsequent delivery)
    in this case ..need to create credit memo..?
    if yes.. pls...send me procedure.
    regards
    sesidhar

  • Crystal Report for Sales, Delivery and Payment.

    Hi Guys,
    Need some expert advice over here. Currently, our sales team are using 3 separate report, one report on sales per month for each specific customers, one report on delivered amount per month for specific customers again and the last one report on payment received per month for specific customers as well.
    We have the idea of joining this 3 report so that I can report on sales, delivery and payment all at once so that they can see the trend better. However, after trying for quite a few times, we fail to create a common joining between ORDR, ODLN and ORCT. Is there any possible way to work something out ?
    I have thought of using subreport, but I just cant find the way to plug in the figure correctly.
    Need some advice over there.
    Thank you.
    Best Regards,
    Alex

    Based on what you have told me, then you should then join Sales Order, Delivery, Invoice and Incoming Payments into one.
    The reason I say Invoice table also is because, you cannot directly link Delivery and Incoming Payments window.
    Also you it is not enough that you link the ORDR, ODLN and ORCT, you will need to get the details from RDR1 and DLN1.
    In SAP Business One, each line in SAP Business One can have a different Delivery documnet.
    The TrgetEntry, TargetType will give you this information. For example, if a line for Sales Order has TargetType 15, then TrgetEntry will be the DocEntry in the ODLN. But if it TargetType is 13 it means the Sales order was converted directly to and Invoice and bypassed the creation of Delivery step, which is possible in SAP.
    So here is how I think you will need to link Sales order and Delivery
    RDR1.TrgetEntry INNER JOIN DLN1.DocEntry AND
    RDR1.TargetType INNER JOIN DLN1.ObjType AND
    RDR1.LineNum INNER JOIN DLN1.BaseLine
    Now this could get a little more complicated if you do partial deliveries. For example if a line in your Sales Order has say 10 items and 6 of them are delivered using Delivery Note 123 and the remaining are delivered using Delivery Note 124, then the join will give you 2 different lines.
    So basically you will need to link the tables in this fashion
    ORDR <-> RDR1 <-> DLN1 <-> INV1 <-> RCT2 <-> ORCT
    Unfortunately, this linking process can get complicated if you do not follow certain steps, like for example if you do not create a Delivery Note and converted your Sales order to Invoice. Then the link would be
    ORDR <-> RDR1 <-> INV1 <-> RCT2 <-> ORCT
    I hope I didn't confuse you.
    Krishnan

  • Report for shedule vs supply and report for opening stock at back date.

    Dear All Guru,
    please can anybody reply me is there any standard report is available for
    1) Report for shedule vs supply
    2) and report for opening stock at back date.(ex- opening stock at last month 16th july or two months back on 10th may
    pl suggest if any standard report is available or how we can data for this
    Regards,
    Vimlesh

    Hi,
    To see the opening stock at a particular date use T.Code: MB5B,
    To see the scheduled quantity & delivered quantity use table EKET with the filed names MENGE & WEMNG.
    Regards,
    Prabu

  • Multi-year monthly CO report for Actual/Budget/Variance

    I have a requirement of creating a 5-year cost centre report for the following:
    Actual by month (5 years x 12)
    Budget by month (5 years x 12)
    % of the monthly amounts compared to the total (5 years x 12)
    Variance (5 years x 12)
    The request is at the cost element level, by month and for 5 years.  I am trying to decide which reporting tool is appropriate for this request.  If I use the conventional CO report format (report painter) of one column per month for actual/budget/actual %/variance, there will be a lots of columns for 5 years!
    I am familiar with reporting tools of report painter, drill-down and SAP query, although I am not sure if drill-down can be used for CCA.  Would appreciate any suggestion for: 
    1) Reporting tools for multi-year output; and
    2) Report format u2013 example of existing SAP-delivered report

    Do you intend to use a report with 240 columns? I am wondering what would be the purpose of such a large column report.
    Still if needed, you could try with painter itself, may be using page break perhaps. I am not sure of the limitation to the number of column.

  • Need a report for O[pen Purchase orders

    Hi All,
    Is there any standard report for open Purcahse orders for particular plant, my client requires one report of open P.O quantity to know the stauts, like 3 senerios example there is P.O No -100, and 3 line items
    l
    10 - X - 10 Nos deliveird 10 Nos
    20 - Y -10 Nos deliveried 5 Nos
    30 - Z - 10 Nos  No delivery - open
    in report output, i need to get P.O No and line item 20 for quanity 5 and line item 30 qty 10 Nos, since the 2 line itme need to deliver , line item 10 is completly delivered, so we need to ignore the same.
    Please lte me know how to proceed.
    Thanks
    Ramki
    Edited by: ram ki on Feb 11, 2009 4:31 PM

    Check the reports ME2N, ME2L, ME2M, ME2C
    If helpful award points
    Regards,
    Vivek
    Additionally
    In these reports you can use Selection Parameters in the input screen to filter out unwanted records. Revert if you need any additional info
    Edited by: Vivek on Feb 11, 2009 11:34 PM

  • How 2 creat report for displaying the details of a Delivery Document using

    how to create report for displaying the details of a Delivery Document using the tables LIKP, LIPS
    thank you
    regards,
    jagrut bharatkumar shukla
    points will be rewarded

    HI
    I AM GIVING YOU MY DELIVERY DOCUMENT CODE...MODIFY IT ACCORDING TO YOUR REQUIREMENT
    *& Report  ZDELIVERY                                *
    report  zdelivery  message-id z9bhu          .
    types: begin of t_likp,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
           end of t_likp.
    types: begin of t_lips,
               vbeln type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
            end of t_lips.
    types: begin of t_vbpa,
               vbeln type vbpa-vbeln,      "SD DocumenT Number
               posnr type vbpa-posnr,      "Item number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_vbpa.
    types: begin of t_kna1,
               kunnr type kna1-kunnr,      "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr type kna1-adrnr,      "Address
           end of t_kna1.
    types: begin of t_li_vbpa,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
    *           LFDAT TYPE LIKP-LFDAT,      "Delevery Date
    *           WAERK TYPE LIKP-WAERK,      "Currency
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
    *           MEINS TYPE LIPS-MEINS,      "Base Unit of Measure
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,      "Customer Number 1
           end of t_li_vbpa.
    types: begin of t_final,
               vbeln type likp-vbeln,      "Delivery
               erdat type likp-erdat,      "Date for rec creation
               kunnr type likp-kunnr,      "Ship-To Party
               kunag type likp-kunag,      "Sold-to party
               traty type likp-traty,      "Means-of-Transport
               vbeln1 type lips-vbeln,      "Delivery
               posnr type lips-posnr,      "Delivery item
               matnr type lips-matnr,      "Material Number
               arktx type lips-arktx,      "Short Text for Sales Order Item
               lfimg type lips-lfimg,      "Actual quantity delivered
               netpr type lips-netpr,      "Net Price
               vgbel type lips-vgbel,      "Doc no of the reference document
               vbeln3 type vbpa-vbeln,     "SD DocumenT Number
               parvw type vbpa-parvw,      "Partner function
               kunnrb type vbpa-kunnr,     "Customer Number 1
               name1 type kna1-name1,      "Name 1
               ort01 type kna1-ort01,      "City
               adrnr1 type kna1-adrnr,     "Address
               name2 type kna1-name1,      "Name 1
               ort02 type kna1-ort01,      "City
               adrnr2 type kna1-adrnr,     "Address
               name3 type kna1-name1,      "Name 1
               ort03 type kna1-ort01,      "City
               adrnr3 type kna1-adrnr,     "Address
           end of t_final.
    *            D A T A  D E C L A R A T I O N
    *&*********Internal Table Declaration****************&*
    data: it_likp type standard table of t_likp.
    data: it_lips type standard table of t_lips.
    data: it_vbpa type standard table of t_vbpa.
    data: it_kna1 type standard table of t_kna1.
    data: it_li_vbpa type standard table of t_li_vbpa.
    data: it_li_vbpa_temp type standard table of t_li_vbpa.
    data: it_final type standard table of t_final.
    *&*********Work Area Declaration********************&*
    data: wa_likp type t_likp.
    data: wa_lips type t_lips.
    data: wa_vbpa type t_vbpa.
    data: wa_kna1 type t_kna1.
    data: wa_li_vbpa type t_li_vbpa.
    data: wa_li_vbpa_temp type t_li_vbpa.
    data: wa_final type t_final.
    *&*********Data Declaration************************&*
    data: d_vbeln type likp-vbeln.
    data: flag type i value 0.
    *           S E L E C T I O N  S C R E E N   D E C L A R A T I O N
    selection-screen begin of block block2 with frame title text-001.
    select-options: s_vbeln for d_vbeln obligatory.    "Delivery no
    selection-screen end of block block2.
    *            A T  S E L E C T I O N - S C R E E N   E V E N T S
    *AT SELECTION-SCREEN.
    *PERFORM VALIDATE_DATA.
    *            S T A R T   O F  S E L E C T I O N     E V E N T S
    start-of-selection.
    perform fetch_data.
    perform merge_data_kna1.
    *INCLUDE Z9BT_SH_***4_FORMS.
    call function 'OPEN_FORM'
    exporting
    *   APPLICATION                       = 'TX'
    *   ARCHIVE_INDEX                     =
    *   ARCHIVE_PARAMS                    =
        device                            = 'PRINTER'
    *   DIALOG                            = 'X'
    *   FORM                              = ' '
       language                          = sy-langu
    *   OPTIONS                           =
    *   MAIL_SENDER                       =
    *   MAIL_RECIPIENT                    =
    *   MAIL_APPL_OBJECT                  =
    *   RAW_DATA_INTERFACE                = '*'
    *   SPONUMIV                          =
    * IMPORTING
    *   LANGUAGE                          =
    *   NEW_ARCHIVE_PARAMS                =
    *   RESULT                            =
    exceptions
       canceled                          = 1
       device                            = 2
       form                              = 3
       options                           = 4
       unclosed                          = 5
       mail_options                      = 6
       archive_error                     = 7
       invalid_fax_number                = 8
       more_params_needed_in_batch       = 9
       spool_error                       = 10
       codepage                          = 11
       others                            = 12
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    sort it_final by vbeln.
    loop at it_final into wa_final.
    call function 'START_FORM'
    exporting
    *   ARCHIVE_INDEX          =
       form                   = 'Z9BT_DELIVERY'
       language               = sy-langu
    *   STARTPAGE              = ' '
    *   PROGRAM                = ' '
    *   MAIL_APPL_OBJECT       =
    * IMPORTING
    *   LANGUAGE               =
    exceptions
       form                   = 1
       format                 = 2
       unended                = 3
       unopened               = 4
       unused                 = 5
       spool_error            = 6
       codepage               = 7
       others                 = 8
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'WRITE_FORM'
    exporting
       element                        = 'ITEM_LIST'
       function                       = 'SET'
       type                           = 'BODY'
       window                         = 'MAIN'
    * IMPORTING
    *   PENDING_LINES                  =
    * EXCEPTIONS
    *   ELEMENT                        = 1
    *   FUNCTION                       = 2
    *   TYPE                           = 3
    *   UNOPENED                       = 4
    *   UNSTARTED                      = 5
    *   WINDOW                         = 6
    *   BAD_PAGEFORMAT_FOR_PRINT       = 7
    *   SPOOL_ERROR                    = 8
    *   CODEPAGE                       = 9
    *   OTHERS                         = 10
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function 'END_FORM'
    * IMPORTING
    *   RESULT                         =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       spool_error                    = 3
       codepage                       = 4
       others                         = 5
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    endloop.
    call function 'CLOSE_FORM'
    * IMPORTING
    *   RESULT                         =
    *   RDI_RESULT                     =
    * TABLES
    *   OTFDATA                        =
    exceptions
       unopened                       = 1
       bad_pageformat_for_print       = 2
       send_error                     = 3
       spool_error                    = 4
       codepage                       = 5
       others                         = 6
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    *&      Form  VALIDATE_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form validate_data .
    select single vbeln into wa_likp-vbeln
                        from likp where vbeln in s_vbeln.
    append wa_likp to it_likp.
    if sy-subrc <> 0.
    flag = 1.
    endif.
    endform.                    " VALIDATE_DATA
    *&      Form  FETCH_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form fetch_data .
    select a~vbeln
           a~erdat
           a~kunnr
           a~kunag
           a~traty
           b~vbeln
           b~posnr
           b~matnr
           b~arktx
           b~lfimg
           b~netpr
           b~vgbel
           c~vbeln
           c~parvw
           c~kunnr
             into table it_li_vbpa
                    from likp as a
                    left outer join lips as b on a~vbeln = b~vbeln
                    inner join vbpa as c on b~vgbel = c~vbeln
                    where a~vbeln in s_vbeln and
                    c~parvw = 'RE'.
    endform.                    " FETCH_DATA
    *&      Form  MERGE_DATA_KNA1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form merge_data_kna1 .
    if it_li_vbpa[] is not initial.
    it_li_vbpa_temp[] = it_li_vbpa[].
    sort it_li_vbpa_temp by kunnr.
    delete adjacent duplicates from it_li_vbpa_temp comparing kunnr.
    loop at it_li_vbpa into wa_li_vbpa.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunag.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    read table it_li_vbpa_temp into wa_li_vbpa_temp with key kunnr =
    wa_li_vbpa-kunnrb.
    if sy-subrc <> 0.
    wa_li_vbpa_temp = wa_li_vbpa.
    append wa_li_vbpa_temp to it_li_vbpa_temp.
    endif.
    endloop.
    endif.
    if it_li_vbpa_temp[] is not initial.
    select  kunnr
            name1
            ort01
            adrnr into table it_kna1 from kna1
                        for all entries in it_li_vbpa_temp
                        where kunnr = it_li_vbpa_temp-kunnr.
    endif.
    loop at it_li_vbpa into wa_li_vbpa .
    wa_final-vbeln = wa_li_vbpa-vbeln.
    wa_final-erdat = wa_li_vbpa-erdat.
    *it_final-LFART = it_li_vbpa-LFART.
    wa_final-kunnr = wa_li_vbpa-kunnr.
    wa_final-kunag = wa_li_vbpa-kunag.
    *it_final-VSTEL = it_li_vbpa-VSTEL.
    wa_final-traty = wa_li_vbpa-traty.
    wa_final-vbeln1 = wa_li_vbpa-vbeln.
    wa_final-posnr = wa_li_vbpa-posnr.
    wa_final-matnr = wa_li_vbpa-matnr.
    wa_final-arktx = wa_li_vbpa-arktx.
    wa_final-lfimg = wa_li_vbpa-lfimg.
    wa_final-netpr = wa_li_vbpa-netpr.
    *wa_final-GEWEI = it_li_vbpa-GEWEI.
    *it_final-VOLUM = it_li_vbpa-VOLUM.
    *it_final-VOLEH = it_li_vbpa-VOLEH.
    wa_final-vgbel = wa_li_vbpa-vgbel.
    wa_final-vbeln3 = wa_li_vbpa-vbeln.
    *wa_final-PARVW = wa_li_vbpa-PARVW.
    wa_final-kunnrb = wa_li_vbpa-kunnrb.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnr.
    if sy-subrc = 0.
    wa_final-name1 = wa_kna1-name1.
    wa_final-ort01 = wa_kna1-ort01.
    wa_final-adrnr1 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunag.
    if sy-subrc = 0.
    wa_final-name2 = wa_kna1-name1.
    wa_final-ort02 = wa_kna1-ort01.
    wa_final-adrnr2 = wa_kna1-adrnr.
    endif.
    read table it_kna1 into wa_kna1 with key kunnr = wa_li_vbpa-kunnrb.
    if sy-subrc = 0.
    wa_final-name3 = wa_kna1-name1.
    wa_final-ort03 = wa_kna1-ort01.
    wa_final-adrnr3 = wa_kna1-adrnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    endform.

  • Pending quantity report for a manufacuting firm

    Hi Guys,
    I need a report to know the daily pending quantity report for a manufacturing company..
    I have tried a query and to some extent its working fine.. i need some more changes in the query.
    The report should be look lie below,
    ITEMCODE,ITEMNAME,ORDERED QUANTITY,ORDERED VALUE,SALES QTY(DELIVERED QTY),SALES VALUE,PENDING QTY,PENDING VALUE ,SHORTFALL(IF THE INSTOCK QTY IS LESS THAN PENDING QTY).
    Here there are using 5 different price lists.
    and the above report has to be classifed seperately for each price list seperately and also in the given period if there is a item which has not been ordered then it also be needs to list in the report with eventhoug it dont have any values .
    Could anybody pls modify the below query.
    SELECT T1.ItemCode, Max(T1.[Dscription]) As 'Item Description' ,t3.price as 'Unit Price/PC',Sum(T1.[OrderedQty]) as 'Ordered Qty' ,(Sum(T1.[OrderedQty]) * t3.price ) as 'Ordered Value' , Sum(T1.[Quantity]) as 'Del Qty',(Sum(T1.[Quantity]) * t3.price) as 'Sales Value',(Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) as 'Pending Qty',((Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) * t3.price) as 'Pending Value',T2.OnHand, (T2.OnHand - (Sum(T1.[Quantity]) - Sum(T1.[OrderedQty]))) as 'SHORT'
    FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    inner join itm1 t3 on t1.itemcode = t3.itemcode
    inner join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >=[%0] AND  T0.[DocDate] <=[%1] and t4.listname = '[%2]'
    Group By T1.ItemCode,T2.OnHand,t4.listname,t3.price

    Try this query
    SELECT T1.ItemCode, Max(T1.[Dscription]) As 'Item Description' ,t3.price as 'Unit Price/PC',Sum(T1.[OrderedQty]) as 'Ordered Qty' ,(Sum(T1.[OrderedQty]) * t3.price ) as 'Ordered Value' , Sum(T1.[Quantity]) as 'Del Qty',(Sum(T1.[Quantity]) * t3.price) as 'Sales Value',(Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) as 'Pending Qty',((Sum(T1.[Quantity]) - Sum(T1.[OrderedQty])) * t3.price) as 'Pending Value',T2.OnHand, (T2.OnHand - (Sum(T1.[Quantity]) - Sum(T1.[OrderedQty]))) as 'SHORT'
    FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    left join itm1 t3 on t1.itemcode = t3.itemcode
    left join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >='[%0]' AND  T0.[DocDate] <='[%1]' and t4.listname = '[%2]'
    Group By T1.ItemCode,T2.OnHand,t4.listname,t3.price
    union all
    select B.ItemCode, B.ItemName,D.Price,SUM(C.OnOrder), 0,0,0,0,0,SUM(C.OnHand),SUM(C.OnHand)-SUM(C.OnOrder)
    from OITM B
    INNER JOIN OITW C ON B.ItemCode = C.ItemCode
    INNER JOIN ITM1 D ON C.ItemCode=D.ItemCode
    WHERE B.ItemCode NOT IN (SELECT T1.ItemCode FROM ODLN T0 
    INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
    left join itm1 t3 on t1.itemcode = t3.itemcode
    left join opln t4 on t3.pricelist = t4.listnum
    WHERE T0.[DocDate] >='[%0]' AND  T0.[DocDate] <='[%1]' and t4.listname = '[%2]' )
    GROUP BY B.ItemCode, B.ItemName, D.Price
    Regards,
    Bala
    Edited by: Balakumar Viswanathan on Nov 15, 2010 4:23 PM

  • SD report for school project

    Hi Experts,
    Please may I get some guidance, I have a course work project as I am studying BW and I need to produce a report for a SD case.  The report needs to show the following:
    Characteristics
    Sales Organization
    Delivery Date (From/To)
    Shipping Point
    Sales District
    Vehicle Route
    Vendor/haulier
    Key Figures
    Delivered Qty (Volume)
    Delivered Qty (Weight)
    Delivered Qty (SKU)
    Shipment Cost Value
    I am taking the following steps to find the above:
    1.  In R/3 > SD look at datasources to find the fields required.
    2. Once datasources have been identified to transfer to BW and activate the business content
    3. Identify the cubes used by the datasource (AWB>Infosource and look at dataflow for the datasources I found containing required fields).
    For any GAP analysis identified I will provide field, table and user exit for ABAP programmer.
    Are these the correct steps?  Have I missed anything?  Also could someone please provide a template document I can use to write up the requirements as a blue print?
    Thanks for your help in advance, I will award points for help.
    Vic Kumar Manni

    Yes thank you, I was looking at all the datasources in SD so thanks for point me to these ones.
    As a starting point is it helful to look at Christopher Solomon tables and check for fields in SE11?
    Also, any tips for report layout/ blue print?
    Thanks,
    Vic
    Edited by: vic manni on May 27, 2008 6:02 PM

Maybe you are looking for

  • How to write the dynamic code for RadioGroupByKey and Check Boxes?

    Hi, Experts, I have created a WD ABAP application in that i have used RadioGroupByKey and CheckBox Ui elements but i want how to write the dynamic code to that i want to display male and female to RadioGroupByKey and 10  lables to check boxs. Please

  • Clustering over two separate machines(CPU)

    Hi all Oracle Experts out there, I'm currently working on my a project which requires me to Cluster two weblogic servers on two separate CPU. When a client accesses an application on one weblogic server and it goes down, the session will be passed to

  • Building a function in JSP ???

    Hi, im fairly new to JSP... Well, you will see by this question... Anyway... Im trying to built a function to test for NULL String. Here is wath i got : checkForNullParam( strLang, strMailID ); // The Call of the function function checkForNullParam(

  • I want to create a SPECIAL ringtone for the iPhone using a Windows PC

    I want to use the theme song of the television show "Big Bang Theory" as a ring tone. I bought the song off iTunes and found that I only want the first 20 seconds of it (the part you hear on television) then I want that part to REPEAT for the remaini

  • Reader/Acrobat X - SharePoint 2010 - Cannot Save

    We get this error when trying to save a pdf document back into a SharePoint 2010   document library:  After some investigation, we have narrowed the cause down to managed metadata columns in the document library: Library with NO managed metadata colu