Application Development and Automation 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: 
Read only

Sales order number?

Former Member
0 Kudos
147

Hi all,

How to get the sales order number based on customer number?

Kishi.

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
112

You can simply do a select against VBAK. You would use the field KUNNR.

Data: ivbak type table of vbak with header line.

select * into table ivbak from vbak
          where KUNNR  = '0000100498'.

loop at ivbak.   
   write:/ ivbak-vbeln.
endloop.

Regards,

Rich Heilman

Read only

Former Member
0 Kudos
112

Hi,

From table VBAK itself u can get all the sales orders for a particular Customer.

Based on partners u can fetch from VAKPA - Sales Index: Orders by Partner Function.

Reward if helpful.

Read only

Former Member
0 Kudos
112

Hi,

enter the customer number in field KUNNR of table VBAK.

Regards

Nicola

Read only

ferry_lianto
Active Contributor
0 Kudos
112

Hi,

You can use BAPI BAPI_SALESORDER_GETLIST to get all sales orders based on customer number.

Regards,

Ferry Lianto