2 Replies Latest reply: Oct 5, 2011 2:51 PM by Rupendra Pandey RSS

How to get PO number for Invoice

Rupendra Pandey
Currently Being Moderated

Hi Experts,

 

My requirement is to get the PO number for the particular invoice in SRM system. I know I can get this from Item Level details using FM BBP_PD_INV_GETDETAILS. but is there any other way so that i can directly get the PO number for the Invoice. I checked in header data also which is returned through this above FM but it does not contain the PO number.

In sort can you please tell me ..Is there any table or any FM or any other way to get the PO number using Invoice number or GUID.Thanks in advance..

 

Thanks,

Rupendra Pandey

  • Re: How to get PO number for Invoice
    sammeta Neelima
    Currently Being Moderated

    hello Rupender,

     

    Please find the link below

    need po and external invoice number from Invoice.

     

    Regards,

    Neelima

    • Re: How to get PO number for Invoice
      Rupendra Pandey
      Currently Being Moderated

      Hi Neelima,

       

      Thanks for the reply. But I already gone thru this link. as i already said we can get PO number at Item level details of invoice. I dont want to go thru this way. Since my requirement is to get the PO number of the invoice so that i can fetch required details from the PO and update the Invoice accordingly.

      So for that i have used below logic can anybody verify that It wuld be always correct : 

       

      CALL FUNCTION 'BBP_PD_INV_GETDETAIL'

            EXPORTING

              i_guid    = is_header-guid

            IMPORTING

              e_header  = ls_header

            TABLES

              e_item    = lt_item

              e_account = lt_account

              e_tax     = lt_tax.

       

      LOOP AT lt_item INTO ls_item.

                l_ponum = ls_item-be_refobj.

                CALL FUNCTION 'BBP_PD_PO_GETDETAIL'

                  EXPORTING

                    i_object_id = l_ponum

                  IMPORTING

                    e_header    = is_header_po.

       

        • Copy the required PO header fields  into invoice header fields 

       

                EXIT.

      ENDLOOP.

Actions