Invoice Qty from VBFA

Hello folks!:
I have made a query and created a new field related to the invoice qty. All at item level and referenced to the sales order.
This new field is configured to pull the invoice qty from the document flow:
FACPOS = ' '.
select  RFMNG  into FACPOS
from vbfa
where vbelv = vbap-vbeln
  and posnn = vbap-posnr
  and vbtyp_n = 'M'.
endselect.
Then the report shows the sales order qty and the invoice qty per item. Everything looks perfect at this time. The problem starts when the invoice is partially created from partial deliveries (which is very often) and then a partially invoice is made. Due to the fact that the data is generated from the VBFA table, it will always going to bring the latest invoice qty and not the sum of all the invoices.
Example:
Order for 6 pcs of product A
Delivery for 4 pcs and Invoice for 4 pcs
Pending 2 pcs
Report shows: Invoice qty 4 pcs
Then another invoice is created for 2 pcs
Nothing left from the sales order
Report shows: Invoice qty 2 pcs <----
PROBLEM
PROBLEM: The report only shows as a total of the invoice qty just the 2 pcs from the last invoice. I actually want to add up all the invoice qty's generated per line item in the document flow.
1. Any idea on how to configure the code so that I can have the sum of all the invoices in the document flow per item?
2. Is there a special function that can do this?
Pls let me know
Regards

Hi,
Pass the sales order number in VBFA for the field "VBELV".
Execute.
Here there is a chance of two cases.
1)If the billing document is created w.r.t. order:In this case,you will get the invoice number from VBELN field.
Pass the same to VBRP table as VBELN and then fetch "FKIMG".
This will give you the quantity.
2)If the billing document is created w.r.t. a delivery:In this case,take VBELN and again pass it to VBELN into VBFA table as VBELV and then fetch VBELN
Pass the same to VBRP table as VBELN and then fetch "FKIMG".
Regards,
Krishna.

Similar Messages

  • Get sales documetn of the invoice from VBFA table

    In my user exit, i use to get the sales document from the table.

    Hi Kranthi Kumar ,
    If u want to know the sales document no of a invoice document from VBFA.
    u have a fields VBELV (Preceding sales and distribution document) for this document if you want to know whether it is a
    invoice or delivery or etc you can know using the field VBTYP_V (Document category of preceding SD document).
    Similarly,
    u have a fields VBELN (Subsequent sales and distribution document) for this document if you want to know whether it is a
    invoice or delivery or etc you can know using the field VBTYP_N (Subsequent category of preceding SD document).
    for ex if vbeln is a invoice docu then preceding document(VBELV) is a delivery.
    check again the VBELV docu no in VBELN field
    which is a delivery
    check the preceeding docu for that delivery docu in VBELV which obviously would be a sales order.
    *Else if you want to know directly the corresponding sales document go to VF02  enter that particular invoice number and then go to the document flow.(F5).
    Hope its useful.
    Revert back to me for any other queries on the same.
    Reward points if useful.
    Thanks ,
    Surya Pydikondala.

  • Get customer invoice address from one time vendor

    Hi All,
    I am working on cheque printing.
    I have a question with in that.Customer wants if Vendor is one time vendor.
    I can identify the one  time vendor using 'LFA1-XCPDK  is 'X'  then the customer invoice assress priting in screen
    How can identify the custome invoice address from one time vendor
    Please any suggestions are helpful

    Hi Tarangini,
    I hope it is a third party scenario. Get the sales order number from the purchase order created with that vendor. EKPO table contains PO line item with sales order as the reference document.
    From the sales order , get the invoice from VBFA table. Pass this Invoice number to get the customer from (VBRK). Pass this customer to (KNA1) to get the address number. Pass this Address number to ADRC to get the customer address.
    Regards,
    Sai

  • Invoiced qty field in 2lis_02_scl

    I am extracting data from 2lis_02_scl in this we have a keyfigure called invoice qty,so my user wants this value to be extracted from mseg table filed menge .First of all I want to know the invoice qty figure is coming from which table & the data of this table will be same as that of mseg –menge field,if so what will be the difference if thevalues are not same then in order to extract data from this table for this particular field what needs to be done
    Pls help me out

    Hi,
    Invoiced qty is calculated by the extractor .So I hope,it is either the qty from MSEG table or the qty for which the finance document has been created.Also search the consulting notes on this field.
    If you still not interested to go with field. Then my suggestion is enhance the BF Ds to get PO and PO item and then create the update rules from this infosource.
    With rgds,
    Anil Kumar Sharma .P

  • I NEED FIELDS FROM VBFA TABLE

    HI ALL,
    I NEED FIELDS FROM VBFA TABLE
    THE FIELDS I WANT IS :
    CUSTOMER-ID
    CUSTOMER NAME
    CONTACT NAME
    PROJECTID
    ORDER NO
    SALES MAN ID
    ORDER PROCESS DATE
    INVOICE DATE
    GROSS AMOUNT
    NET AMOUNT POSTAL CODE.
    THANKS & REGARDS,
    R.VINOD.

    Hi Vinod..
    Try this Code. I made all the modifications in your code .. It will solve ur issues..
    REPORT zsdr_omvsa40.
    TYPE-POOLS
    TYPE-POOLS: slis.
    TABLE DECLARATIONS
    TABLES : vbak, vbkd,
    zzvbak,
    kna1, vbrk, vbrp, knvp .
    INTERNALTABLE DECLARATION *
    DATA: BEGIN OF i_vbak OCCURS 0,
    vbelv LIKE vbfa-vbelv, " Sales Order no
    vbeln like vbfa-vbeln, "Invoice No
    erdat LIKE vbak-erdat, " Date on Which Record Was Created
    kunnr LIKE vbak-kunnr,
    ps_psp_pnr LIKE vbak-ps_psp_pnr, " Work Breakdown Structure Element
    END OF i_vbak.
    *DATA : BEGIN OF i_zzvbak OCCURS 0,
    *vbeln LIKE zzvbak-vbeln,
    *zssidc LIKE zzvbak-zssidc, "Salesman ID
    *END OF i_zzvbak.
    DATA : BEGIN OF i_vbrk OCCURS 0,
    vbeln LIKE vbrk-vbeln,
    fkdat LIKE vbrk-fkdat, "Invoice Date
    END OF i_vbrk.
    DATA : BEGIN OF i_kna1 OCCURS 0,
    kunnr LIKE kna1-kunnr , " Customer Number 1
    name1 LIKE kna1-name1, " Customer Name
    pstlz LIKE kna1-pstlz , " Postal Code
    END OF i_kna1.
    DATA : BEGIN OF i_vbrp OCCURS 0,
    vbeln LIKE vbrp-vbeln,
    aubel LIKE vbrp-aubel,
    netwr LIKE vbrp-netwr , " Net Value in Document Currency
    kzwi1 LIKE vbrp-kzwi1, " Subtotal 1 from pricing procedure for condition
    erdat LIKE vbrp-erdat, "Billing document.
    END OF i_vbrp.
    DATA : BEGIN OF i_knvp OCCURS 0,
    parvw LIKE knvp-parvw , " Partner Function
    kunnr LIKE knvp-kunnr ,
    parnr LIKE knvp-parnr , " Number of contact person
    END OF i_knvp .
    DATA : BEGIN OF i_data OCCURS 0,
    erdat LIKE vbak-erdat, " Date on Which Record Was Created
    vbeln LIKE vbak-vbeln, " Sales Order no
    fkdat LIKE vbrk-fkdat, " Invoice date.
    kunnr LIKE kna1-kunnr , " Customer Number
    ps_psp_pnr LIKE vbak-ps_psp_pnr, " Work Breakdown Structure Element
    name1 LIKE kna1-name1, " Customer Name
    netwr LIKE vbrp-netwr , " Net Value in Document Currency
    kzwi1 LIKE vbrp-kzwi1, " Subtotal 1 from pricing procedure for condition
    parvw LIKE knvp-parvw , " Partner Function
    parnr LIKE knvp-parnr , " Number of contact person
    *zssidc LIKE zzvbak-zssidc, "Salesman ID
    pstlz LIKE kna1-pstlz , " Postal Code
    END OF i_data.
    ALV Declaraton
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    it_listheader TYPE slis_t_listheader,
    gd_repid LIKE sy-repid.
    Selection - Screen
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS creation FOR vbak-erdat . " Sales Order Date
    SELECT-OPTIONS period FOR vbrk-fkdat . " Invoice Date
    SELECT-OPTIONS order FOR vbak-vbeln . " Sales order no
    SELECT-OPTIONS name FOR kna1-name1 . " Customer Name
    SELECT-OPTIONS contact FOR knvp-parnr . " Contact Name.
    *SELECT-OPTIONS ssid FOR zzvbak-zssidc . " Salesman ID
    SELECT-OPTIONS project FOR vbak-ps_psp_pnr . " Work Breakdown Structure Element
    SELECTION-SCREEN : END OF BLOCK b1.
    START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
    PERFORM BUILD_LAYOUT.
    PERFORM top_of_page.
      PERFORM fill_listheader USING it_listheader.
      PERFORM display_alv_report.
    END-OF-SELECTION.
    *TOP-OF-PAGE.
    TOP-OF-PAGE.
    END-OF-PAGE.
    *& Form BUILD_FIELDCATALOG
    text
    FORM build_fieldcatalog.
      fieldcatalog-fieldname = 'KUNNR'.
      fieldcatalog-seltext_m = 'Sold to Party'.
      fieldcatalog-col_pos = 0.
      fieldcatalog-outputlen = 10.
      fieldcatalog-emphasize = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'NAME1'.
      fieldcatalog-seltext_m = 'Hlev Customer'.
      fieldcatalog-col_pos = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'PARNR'.
      fieldcatalog-seltext_m = 'Contact name'.
      fieldcatalog-col_pos = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'PS_PSP_PNR'.
      fieldcatalog-seltext_m = 'Project ID'.
      fieldcatalog-col_pos = 3.
      fieldcatalog-do_sum = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'VBELN'.
      fieldcatalog-seltext_m = 'Sales Document Type'.
      fieldcatalog-col_pos = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'ZSSIDC'.
      fieldcatalog-seltext_m = 'SSID'.
      fieldcatalog-col_pos = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'ERDAT'.
      fieldcatalog-seltext_m = 'so date'.
      fieldcatalog-col_pos = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'FKDAT'.
      fieldcatalog-seltext_m = 'inv date'.
      fieldcatalog-col_pos = 7.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'KWZI1'.
      fieldcatalog-seltext_m = 'gross amt'.
      fieldcatalog-col_pos = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'NETWR'.
      fieldcatalog-seltext_m = 'net amt'.
      fieldcatalog-col_pos = 9.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname = 'PSTLZ'.
      fieldcatalog-seltext_m = 'Postal code'.
      fieldcatalog-col_pos = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR fieldcatalog.
    ENDFORM. "BUILD_FIELDCATALOG
    *& Form DATA_RETRIEVAL
    text
    FORM data_retrieval.
      SELECT VBFAvbelv VBFAvbeln
             VBAKerdat VBAKkunnr VBAK~ps_psp_pnr
             INTO TABLE i_vbak
      FROM VBFA
      INNER JOIN vbak
      ON VBFAVBELV = VBAKVBELN
      WHERE VBAK~erdat IN creation
      AND VBFA~vbelV IN ORDER
      AND VBAK~ps_psp_pnr IN project
      AND VBFA~VBTYP_N = 'M'  "Subsequent doc is Invoice
      AND VBFA~VBTYP_V = 'C'  "Prec doc is Sales order
      IF NOT i_vbak[] IS INITIAL.
    **Change of ORDER in SELECTS HERE
        SELECT vbeln fkdat FROM vbrk INTO TABLE i_vbrk
        FOR ALL ENTRIES IN i_vbak
        WHERE vbeln = i_vbak-vbeln
        AND fkdat IN period.
        IF NOT i_vbrk[] IS INITIAL.
          SELECT vbeln aubel netwr kzwi1 FROM vbrp INTO TABLE i_vbrp
          FOR ALL ENTRIES IN i_vbrk
          WHERE VBELN = i_vbrk-vbeln.
        endif.
        SELECT kunnr name1  pstlz  FROM kna1 INTO TABLE i_kna1 FOR ALL ENTRIES IN i_vbak
        WHERE kunnr = i_vbak-kunnr
        AND name1 IN name.
    *SELECT vbeln zssidc FROM zzvbak INTO TABLE i_zzvbak FOR ALL ENTRIES IN i_vbak
    *WHERE vbeln = i_vbak-vbeln
    *AND zssidc IN ssid .
    select netwr kzwi1 erdat from vbrp into table i_vbrp for all entries in i_vbak
    where erdat = i_vbak-erdat.
        SELECT kunnr parnr parvw FROM knvp INTO CORRESPONDING FIELDS OF TABLE i_knvp FOR ALL ENTRIES IN i_vbak
        WHERE kunnr = i_vbak-kunnr
        AND parvw = 'AP'
        AND parnr IN contact.
      ENDIF .
      SORT I_VBAK BY VBELN .
      SORT I_VBRK BY VBELN .
      LOOP AT i_vbrp.  "Invoice Item data
        MOVE i_vbrp-netwr TO i_data-netwr .
        MOVE i_vbrp-kzwi1 TO i_data-kzwi1.
        READ table I_VBAK WITH KEY VBELN = I_VBRP-VBELN BINARY SEARCH.  "Sales Order info
        IF SY-SUBRC = 0.
          MOVE I_VBAK-VBELV TO I_DATA-VBELN.   "Sales Order no
          MOVE I_VBAK-erdat TO I_DATA-erdat.   " Date on Which Record Was Created
          MOVE I_VBAK-kunnr TO I_DATA-KUNNR.    "Customer No
          MOVE I_VBAK-ps_psp_pnr TO I_DATA-ps_psp_pnr. " Work Breakdown Structure Element
        endif.
        READ TABLE I_VBRK WITH KEY VBELN = I_VBRP-VBELN BINARY SEARCH.   "Invoice header info
        IF SY-SUBRC = 0.
          MOVE i_vbrk-fkdat TO i_data-fkdat.
        endif.
        READ TABLE I_KNA1 WITH KEY KUNNR = I_VBAK-KUNNR BINARY SEARCH.   "Customer info
        IF SY-SUBRC = 0.
          MOVE i_kna1-kunnr TO i_data-kunnr.
          MOVE i_kna1-name1 TO i_data-name1.
          MOVE i_kna1-pstlz TO i_data-pstlz .
        endif.
        READ TABLE I_KNvp WITH KEY KUNNR = I_VBAK-KUNNR BINARY SEARCH.   "Partner info
        IF SY-SUBRC = 0.
          MOVE i_knvp-parnr TO i_data-parnr.
        endif.
        APPEND i_data.
      ENDLOOP.
    ENDFORM. "DATA_RETRIEVAL
    *& Form DISPLAY_ALV_REPORT
    text
    FORM display_alv_report.
    GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
      i_callback_program = sy-repid
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
      i_callback_top_of_page = 'TOP_OF_PAGE'
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME =
    I_BACKGROUND_ID = ' '
    I_GRID_TITLE =
    I_GRID_SETTINGS =
    IS_LAYOUT =
      it_fieldcat = fieldcatalog[]
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS =
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    I_HTML_HEIGHT_TOP = 0
    I_HTML_HEIGHT_END = 0
    IT_ALV_GRAPHICS =
    IT_HYPERLINK =
    IT_ADD_FIELDCAT =
    IT_EXCEPT_QINFO =
    IR_SALV_FULLSCREEN_ADAPTER =
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
      TABLES
      t_outtab = i_data.
    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. "DISPLAY_ALV_REPORT
    FORM FOR FILLING LISTHEADER *
    FORM fill_listheader USING it_listheader TYPE slis_t_listheader.
      DATA : wa_listheader TYPE slis_listheader.
      wa_listheader-typ = 'H'.
      wa_listheader-info = 'Noel Gifts International Limited '.
      APPEND wa_listheader TO it_listheader.
      wa_listheader-typ = 'S'.
      wa_listheader-info = 'CUSTOMER CREDIT EXCEPTION REPORT' .
      APPEND wa_listheader TO it_listheader.
      CLEAR wa_listheader.
    ENDFORM. "fill_listheader
    *& Form top_of_page
    text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader.
    ENDFORM. "top_of_page
    REWARD IF HELPFUL.

  • How to retrieve invoice details from the sales order .. urgent..

    hi,
    i am retrieving  vbak-vbeln with this i should retreive invoice details
    how to relate vbak with abrk table
    i have vbak -vbeln,erdat,VBAK- VKORG,VBAK-KUNNR,VBAK-VTWEG,VBAK- SPART.
    its urgent..

    Hi
    U can see the sales order number in VBRP table, fields:
    VBRP-AUBEL and VBRP-AUPOS.
    But if u have the sales order number it's better to use VBFA table.
    SELECT * FROM VBFA WHERE VBELV = VBAK-VBELN
                         AND VBTYP_N = 'M'
      SELECT SINGLE * VBRK WHERE VBELN = VBFA-VBELN.
      IF SY-SUBRC = 0.
        WRITE: 'Bill number:', VBRK-VBELN.
      ENDIF.
    ENDSELECT.
    U have to make sure to use the right document type:
    M = Invoice
    N = Invoice cancellation
    So the bill type depends on the sales order type
    Max

  • Logic to fetch delivered and invoiced Qty using sales order and line no

    Hi Experts,
    I am creating a Sales Order report in which I need to Fetch the delivered Quantity and Invoiced Quantity fields.
    I am currently going to VBFA table and pass SO and line item number and fetch all data. Then I perform addition/ subtraction to remove cancelled quantities. this is making the logic complicated.
    Is there any standard Function module/ or table or BAPI which can fetch the Delivered and Invoiced quantities directly?
    Regards,
    Onkar B

    Hi,
    First pass the sales order number into "VBFA" table into the field "VBELV".
    Execute or Press F8.
    Get the document number of the delivery from "VBELN".
    Pass the same delivery document numebr into "LIPS" table into the field "VBELN".
    Execute.
    Get the value of the delivery quantity from the field "LFIMG" in this table.
    Next got the table "VBFA".
    Pass the delivery document number into the field "VBELV".
    Execute or Press F8.
    Get the document number of the billing document from "VBELN".
    Pass the same billing document numebr into "VBRP" table into the field "VBELN".
    Execute.
    Get the value of the invoiced quantity from the field "FKIMG" in this table.
    Like this we have to get the delivery and invoice quantities.
    Regards,
    Krishna.

  • How to get invoice field from SD tables

    Hi, experts,
    what is the "invoice field name" in SD tables.
    please specify in which tables i can find it

    Hi Praveen,
    in SD the order,delivery or invoice , evrything has field name vbeln.
    only difference is which table your are referreing.
    if you are working on VBAk, the vbeln will give the sales order..
    if in LIPs, it will give delivery while in VBRK for vbeln you will get invoice number.
    VBFA will give you the complete flow of order, delivery and invoice
    e.g:-
    Find sales order number and item from the delivery document
    number and delivery item no by using sales document flow table
        select single VBELV POSNV from VBFA into ITAB where
               VBELN = mseg~oivbeln and         "delievry
               POSNN = mseg~oiposnr,     and  "Delivery item
               VBTYP_N = 'J'.

  • Invoice Qty Vs PO Qty and Invoice Amount Vs PO Value - PO Line item same

    I want to control as per below.
    1) Invoice Verification should not be allowed ( GR based & Non-GR Based IV - Both scenarios ) if total invoice qty is more than po total qty against PO same line item.
    e.g.,
    in line item 10, Material "M1" is having qty 100 EA in Purchase order "PO1".
    while doing IV for the above, ( may be GR based IV and may not be GR based IV ) if the qty exceeds 100 EA, system should not allow.
    Requirement: Always total invoice qty ( already invoiced and now invoicing ) should be validated against total PO qty against same line item.
    2) want to control "Value" as per above.

    Hi,
    Set Error messages in t.code: OMRM & Maintain the following messages( For restriction of invoice verification wrt PO)
    For GR based invoice verification:
    M8 -081 Quantities invoiced greater than goods receipt quantity as ERROR ( maintain GR-based IV in the PO item level )
    For PO based invoice verification :
    M8 -087( item without GR ) - Invoice quantity greater than PO quantity as ERROR & save.
    Also maintain the messages M8 -081 & M8 -087 as ERROR in OBMSG t.code & save.
    Regards,
    Biju K

  • Single excise invoice J1IJ from two outbound deliveries

    Hi Experts,
    Can we do single Excise Invoice (J1IJ) from two or multiple outbound deliveries in depo sales.
    Please Confirm.
    Thanks & Regards
    Naresh

    When you are returning the material, you get a material document.
    You create an Excise invoice by using J1IS transaction with reference to the material document.
    This excise invoice will come for monthly utilization
    regards
    prasad

  • Min.order Qty from Info record in PR in MRP

    Hi,
    Is there any setting by which , while running MRP, system will take min.order quantity from info record (instead of material master) ?.
    If not , then is there any way to achieve the same?

    Hi Csaba Szommer
    You are right, If you try to convent PR in to PO, and  if you have maintained min.order qty in info record,  you get message ( error / warning ) as per your message setting.
    Your question is also valid that if the same material is being procured by many vendors, and each vendor might have  different min. order qty, Hence it has to be picked from info record only.
    But I have tried with all the possibilites. While converting PR into PO, based on system message you can correct the Quantity, but if MRP generates PR ,based on the min.order qty in info record, then no need to handle such messages.
    You can try also, maintain different min. order qty in Material master and info record, it will always take from Material master and never from info record.
    But Logically, it should take from info record.
    That is why I wanted to make the system take info record min.order.qty.
    So it would solve the problem if you know some setting that takes min.order.qty from info record.
    ( ref: I am aware of planned del. time , there is one checkbox in  plant parametes, if you select that , system will take planned del.time from info record , if you don't, system will take it from material master. So if you know any such setting for min.order.qty, pls let me know. I could not find any such possibilities)
    Thanks

  • Entering value in a field of an invoice coming from R/3

    Hai,
             I have a problem here. I am working with data that was loaded long back. I found a discrepancy and I am working on it. As you know, an invoice has Financial document number and invoice number among many other fields. For original invoice there would be a Financial document number and the invoice number field is empty. For the clearing document, coming form R/3, there would be another Financial document number but the invoice number is nothing but the Financial document number of the original invoice. The BW system, as per the logic, now connects the Original and Clearing invoices.
           Now my problem is that, in ODS(the data was loded in ODS long back),the clearing document does have an invoice number as usual that is linking it to the original invoice. But the same clearing invoice doesnot have the invoice number field filled in when checked in R/3. I extracted the invoice pair to PSA only and then simulated the update and both the source and target records doesnot have an invoice number for the clearing document. The question thats killing me is how can the invoice loaded long back had an invoice number and how the field is empty when I extract it now?
    Can somebody please help.
    I appreciate any help.
    Thank you.
    I have an invoice coming from R/3. The invoice generally has a Financial document number and an invoice number fields among others. I extracted the invoice to PSA. I found that the invoice number field is empty. Is it possible to fill up just that field manually without

    Hi,
    Your issue looks quite strange. I believe you should give more information, for instance: which extractor are you using? FI_GL_3? 2LIS_13_VDITM?
    Is that a standard scenario? If it is, I suggest you to open a customer message and let SAP have a look.
    Otherwise, if field is not being filled but you know where to find it, you could probably overwrite it by programming the extraction...
    Hope it helps,
    David.

  • Commercail invoice qty should not be greater than PO qty.

    Hi,
    We have a requirement where, system should check for the commercial qty with PO qty and if commercial invoice qty exceeds than PO qty, system should give an error. This is required to avoid duplicate payment of customs duties.
    This functionality should work for parking and posting of commercial invoice both.
    Please suggest relevant solution.
    Thanks & Regards,
    Bhargavi.

    Hello,
      You can use the function exit EXIT_SAPMM06E_012 to carry out this validation.
    Thanks,
    Venu

  • Error during archive MM_EKKO - Invoice qty GR quanity

    Hi All
    System is 4.6C
    During archiving of Purchase Orders (Object MM_EKKO), the spool of program RM06EW30 shows following error message
    For a PO/item nr:  "Quantity invoiced differs from GR quantity"
    I understand that it is a standard check before archiving POs . But the issue is that we do not do MIRO (Invoicing) in this system, instead it is done externally in another system. So though there are no invoices anyway in the system.
    My questions are:
    What does the system check (Document/Table/Fields) before giving the above error message?
    Can we remove the check by customizing or is a modification of program required?
    Regards
    Rajesh

    see report FM06AFE0
    find
    - WE = X, RE = X : geliefert = berechnet ----------------------------*
    below this statement you can see the checks that are performed

  • How to find the invoice number from accounting document number?

    Hi
    I am using the bapi BAPI_AP_ACC_GETSTATEMENT and trying to get the invoice numbers of all the payments.
    but i am unable to find the link between the accounting document number from the bapi and the vendor invoice number.
    i have tried the tables BSE_CLR, BSEG and BKPF. the field AWKEY in BKPF has the combination of BELNR & BUKRS & GJAHR when the document type is anything other than RE.
    How can i get the invoice numbers from the accounting doc. numbers?
    Regards
    Sujai

    I am unable to find the link between BKPF-BELNR and RBKP-BELNR from the bapi return values.
    XBLNR is blank when i check the table.
    the output of the bapi is something like this                                                                               
    COMP VENDOR   CLEAR_DATE CLR_DOC_NO ALLOC_NMBR   FISC   DOC_NO     ITE
                                                                                    1000    1100 ........ .........................................  20020123           2002 1900000202   002
    1000    1100 ........ .........................................20020123           2002 1900000203   002
    1000    1100........ .........................................20020123           2002 1900000204   002
    1000    1100........ .........................................20020123           2002 1900000205   002
    now i try passing the doc_no (1900000XXX) and the fiscal year (2002) and company code to BKPF
    the XBLNR field is blank. This document number sequence doesn't seem to be the accounting document number of the invoice coz that starts with 51XXXXXXXXX.
    If i try passing the number with sequence 51XXX... to BKPF i get the invoice number there in the AWKEY field.
    I am not sure what this sequence (19___) represents.
    Sujai
    Edited by: Sujai S on Nov 5, 2008 7:22 PM
    Edited by: Sujai S on Nov 5, 2008 7:22 PM

Maybe you are looking for