Get Billing Invoice according to Billing document number

If we only have the billing document number and company code, how can we retrieve the billing invoice?
we can use the function moudle 'AC_DOCUMENT_RECORD', just like this:
 call function 'AC_DOCUMENT_RECORD'
    EXPORTING
       I_AWTYP       = 'VBRK'
       I_AWREF       = 'Billing Document Number'
       I_AWORG       = 'Log System'
       X_DIALOG      = 'X' OR SPACE
    TABLES
       T_DOCUMENTS   = T_DOC.


  LOOP AT T_DOC WHERE AWTYP = 'BKPF'.
    V_BELNR = T_DOC-DOCNR.
  ENDLOOP.



你可能感兴趣的:(document)