Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

function modue which imports belnr and exports vbeln?

Former Member
0 Kudos

hi all,

can anyone tell me if there is any function module in which if i pass accounting document(belnr) i get the corresponding billing document(vbeln)..

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

No need for a funciton module, simply do SELECT against table VBRK, VBELN and BELNR are both there. You may need to create an index on BELNR for performance reasons.

Regards,

Rich Heilman

0 Kudos

hi rich,

though both the fields are there but belnr is not maintained in vbrk,

i checked that in my server all the belnrs are coming blank,

i know how to select from db tables

but some problems arer arising,

so i want a fm which does this work for me...Please tell me if u can find any

0 Kudos

Yes, you are very much correct, it is the same in my system, BELNR is blank. I'm sure that Ferry has found your funciton module, which is probably reading document flow underneath, table VBFA

Regards,

RIch Heilman

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please check this FM SD_BILLING_DOCUMENT_DETERMINE.

Regards,

Ferry Lianto

Former Member
0 Kudos

You can also try:


  DATA: v_reference    TYPE bkpf-awtyp,           "Reference procedure
        v_objectkey    TYPE bkpf-awkey.           "Object key

    v_objectkey = billing_doc.        
    v_reference  = 'VBRK'.

    SELECT SINGLE bukrs belnr gjahr               "Accounting Doc Header
      FROM bkpf
      INTO doc_int
      WHERE awtyp =  v_reference
        AND awkey =  v_objectkey.

Rob