cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch contact number from sales order

cathy_liang
Contributor
0 Kudos

Hello experts,

In sales order, there’re different partner functions, for example, ZZ stands for customer contact. ZZ has a telephone number. I tried to fetch this telephone number from sales order but failed. It seems the same number in VBPA-ADRNR for different partner functions in a sales order.

Is it possible to fetch this telephone number from sales order? If yes, how to meet it? which table stores it?

cathy_liang
Contributor
0 Kudos

Hi Tammy,

Thanks for your sharing.

For my case, it’s not suitable. For my partner function ZZ, we can maintain multiple ZZ against different numbers in a sold-to party. In a sales order, we just let only one ZZ enter. For report purpose, we try to fetch phone number from ZZ based on sales order instead of customer master.

Now the problem is the same number in VBPA-ADRNR for different partner functions based on sales order. It seems impossible to meet our requirement.

Any ideas?

VeselinaPeykova
Active Contributor
0 Kudos

It is difficult to give suggestions without understanding the setup and without looking at the outcome of order creation on table level.

Maybe you can post a few screenshots to show the configuration of this ZZ partner function, the underlying master data (where exactly you maintain these phone numbers), how the users select the corresponding partner and what is the result in VBPA.

cathy_liang
Contributor
0 Kudos

Hi Veselina,

As you suggested, screen shots are attached. Need to fetch telephone number from partner function ZP based on sales order (screen shot 3 below). Looking forward to your advice.

cathy_liang
Contributor
0 Kudos

SCREEN SHOT 1

cathy_liang
Contributor
0 Kudos

CUSTOMER MASTER

cathy_liang
Contributor
0 Kudos

Need to fetch telephone number (highlighted in green) from ZP based on sales order.

cathy_liang
Contributor
0 Kudos

Same ADRNR number 65852 for different partner functions against the same sales order. Based on this number, table ADRC seems just to reflect sold-to party’s telephone number.

cathy_liang
Contributor
0 Kudos

I just noticed i can use partner number to meet the requirement. Plz bypass my question. Thanks for your attention.

Accepted Solutions (1)

Accepted Solutions (1)

S0022029617
Active Participant
0 Kudos

Pass Sales order Number into VBPA-VBELN and fetch both ADRNR (Address No.) and ADRNP (Person No.) for the PARVW= "ZZ" (since in your case ZZ is you partner function) and pass it into ADR2-ADDRNUMBER (Address No.) and ADR2-PERSNUMBER (Person No.) respectively and fetch ADR2-TEL_NUMBER. ADR2 Table stores data of Telephone Numbers.

In case your contact person is maintained in Sales Order Item you have to pass POSNR along with VBELN in VBPA.

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

Hi Cathy - for us, the phone number is in KNA1-TELF1

From your partner functions, the partner number equals the customer number

Link via VBPA-KUNNR to KNA1-KUNNR and then obtain field KNA1-TELF1