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: 

RE: Have to get invoice number from the ble RBKP using the table REGUP

Former Member
0 Kudos

Hi all

I writing a user exit. I have access to REGUH and REGUP (payment run).

Can any tell me like which tables i have to join to get invoice number ( RBKP table) using the tables REGUH and REGUP.

OR

I have document number from BKPF, vendor number ,payment document number and reference field for the invoice Now can any one tell me how to get invoice number from table RBKP.

appreciate your help

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use table BKPF to link table RBKP and REGUP.

Please check these joins.


CONCATENATE RBKP-BELNR RBKP-GJAHR INTO WA_AWKEY.

BKPF-AWTYP = 'RMRP'
BKPF-AWKEY = WA_AWKEY.

REGUP-BUKRS = BKPF-BUKRS
REGUP-BELNR = BKPF-BELNR
REGUP-GJAHR = BKPF-GJAHR.

Regards,

Ferry Lianto

4 REPLIES 4

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use table BKPF to link table RBKP and REGUP.

Please check these joins.


CONCATENATE RBKP-BELNR RBKP-GJAHR INTO WA_AWKEY.

BKPF-AWTYP = 'RMRP'
BKPF-AWKEY = WA_AWKEY.

REGUP-BUKRS = BKPF-BUKRS
REGUP-BELNR = BKPF-BELNR
REGUP-GJAHR = BKPF-GJAHR.

Regards,

Ferry Lianto

Former Member
0 Kudos

Thank you very much Ferry. You are awesome.

Former Member
0 Kudos

Quick question Ferry

Why do we have to use awtyp=rmrp.

ferry_lianto
Active Contributor
0 Kudos

Hi,

It is used to find the invoice based on reference procedure.

Regards,

Ferry Lianto