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: 

invoice based on purchase order no

Former Member
0 Kudos

Hi Experts,

how i can get invoice no based on purchase order no

thanks in advance

narendra

3 REPLIES 3

uwe_schieferstein
Active Contributor
0 Kudos

Hello Narendra

Call BAPI_PO_GETDETAIL1 with your purchase order number.

TABLES parameter POHISTORY returns you the purchase order history.

These records have a field HIST_TYPE ( PO history category ) with the following values (value table T163B):

		
1	AAf	Down Payment Req.
2	AAfV	DP Request Clearing
3	AnzV	Down Payt Clearing
A	Anz	Down payment
B	NAbr	Subseq. settlement
C	NeuR	Miscell. provision
D	Lerf	Service entry
E	WE	Goods receipt
F	BzWE	Delivery costs
G	BzRE	Delivery costs
I	BzKP	Del.costs acct.maint
J	RLfs	Return delivery
K	KtoP	Account maintenance
L	Lfs	Delivery note
M	BzRe	Del. costs log. inv.
N	NB-L	Subs. deb. log. IV
O	LB	Subcontracting
P	NB-B	Subs. deb. dl. costs
Q	RE-L	Invoice receipt                    " <<<
R	RE	Invoice receipt                    " <<<
S	Sped	Subs.deb.: forwarder
T	VRe	Parked invoice
U	WA	Goods issue
W	NeuB	Revaluation log. IV
X	NB	Subs.deb.: general
Z	Zahl	Payment

Presumably you are interested in categories 'Q' and 'R'.

Regards

Uwe

Former Member
0 Kudos

u can also check EKBE where VGABE = 2 for Invoice.

regards

prabhu

0 Kudos

Hello Narendra

Prabhu is completely right. Using the BAPI check the history records for PROCESS_ID (type VGABE) = '2' (= invoice receipt).

Regards

Uwe