Skip to Content
author's profile photo Former Member
Former Member

to get no of invoice

hello all,

can anyone let me know how can i get total number of invoice for a particular sale order.

in VBRP its taking more time, so performance is problem.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 26, 2008 at 06:17 AM

    Use VBFA table... To get invoice

    DATA : BEGIN OF WA_VBFA,
    VEBLN TYPE VBFA-VBELV,
    VBELV TYPE VBFA-VBELV,
    END OF WA_VBFA.
    
    DATA : IT_VBFA LIKE STANDARD TABLE OF WA_VBFA WITH HEADER LINE.
    
    SELECT VBELN VBELV FROM VBFA
    INTO TABLE IT_VBFA
    WHERE VBTYP_N = 'M' AND " M => invoice
    VBTYP_V = 'C' AND
    VBELV = '0000800044'. "  Sales order
    
    DATA: V_LINE TYPE I.
    
    DESCRIBE TABLE IT_VBFA LINES V_LINE.
    
    WRITE : 'No of invoice for sales order is ' , V_LINE.

    Hope it will solve your problem..

    Thanks & Regards

    ilesh 24x7

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 26, 2008 at 06:10 AM

    Use the Function module

    RV_ORDER_FLOW_INFORMATION

    Add a comment
    10|10000 characters needed characters exceeded

    • Did you check the table VBFA,

      There Preceeding document and Succeeding Document.

      One is sales order and other is Invoice, So you can

      VBTYP_N

      VBTYP_V

      Pass Proceeding Document VBELV "sales order number

      VBTYP_V = 'C' "for Order

      VBTYP_N = 'M'

      and you will get the details. Same you have to pass the Function module.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 26, 2008 at 06:16 AM

    Hi,

    first get the data from table VBFA where vbtyp_N = 'M'.

    then you can get data from vbrp table using VBELN

    POSNN of vbfa tble. Performance would be fine in this case.

    Rgds,

    Paras

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 26, 2008 at 06:56 AM

    The above post(you gave 10 point) is modifed with the code after i posted the information how to proceed.

    Did you check that.

    It is left to you.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.