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: 

Customer PO#

Former Member
0 Kudos

Hi,

What is a customer PO# ? Is it the sold-to number ?

If not where can i find a CUSTOMER PO# for a document number ? I am printing this in the picking list SAP SCRIPT.

Thanks in advace.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

It is VBKD-BSTKD.

Cheers.

13 REPLIES 13

Former Member
0 Kudos

It is VBKD-BSTKD.

Cheers.

0 Kudos

I have a delivery document number with me. How can i get the customer PO# with that. In VBRK i did not find it since the document number is different.

Thanks in advance.

0 Kudos

You would need to hit against the LIPS table with your delivery number and item number, here you can get the sales document number/item. With the Sales document number you need to hit against VBKD to get the customer po number.

To hit against LIPS, use document number against VBELN.

To hit against VBKD, use LIPS-VGBEL and LIPS-VGPOS against VBKD-VBELN and VBKD-POSNR.

Make sense?

Regards,

Rich Heilman

0 Kudos

Did I just see VBELV and POSNV get swapped with VGBEL and VGPOS?

Might have been nice to correct in a reply rather than an edit (or leave the edited comment in).

Brad

0 Kudos

It was a typo. I check it in one of my programs. I always get the two confused. In most cases both sets of fields have the same data in them in my system.

I actually didn't even see your reply till after I changed it. What's the difference if I correct myself in the post or in a reply. BTW, where ya been Brad?

Regards,

Rich Heilman

0 Kudos

I guess my feeling is that the 'normal' reponse of a poster would be to award the first correct answer.

In this case if the person who posts the question comes back to view the reponses after a period of time, he sees that he gets one correct answer, and then another one which appears to be an exact copy (or very similar). I guess he will award the first.

If in fact the second reponse was actually the first correct answer (and not amended later) shouldn't that answer get the awarded?

Maybe too philosophical for a Friday evening.

In answer to where I have been, I started a new project and I'm up to my eyeballs in work. Not much time for scanning the SDN forums.

I see you have taken a bit of a jump in the league tables. Congrats. Have a good we.

0 Kudos

I agree with what you are saying, Brad. I wasn't trying to hijack your points. It was an honest typo. I had to go check one of my programs to make sure and check the database.

If we get to the point to where we are doing this kind of thing because we are so worried about points, then there is something very wrong. Points are nice, but I'm sure that most of us would not stoop that low.

Welcome back.

Regards,

Rich Heilman

0 Kudos

Thanks all for ur quick response.

Another related question is :

Where can i find the name of the person that placed the order ?

Thanks in advance.

0 Kudos

Probably I'll get trumped before I get to type this in, but its VBAK-ERNAM (link from LIPS-VGBEL) to get the username of the person who entered the order.

Remember to award those answers that helped you.

Cheers,

Brad

0 Kudos

Sorry, link from LIPS-VGBEL to VBAK-VBELN.

Then you can access VBAK-ERNAM.

BRad

0 Kudos

The person that placed the order or the person that entered the order. The person that placed the order would be the customer, VBAK-KUNNR, you can ge the name of the customer from KNA1-NAME1. If you are talking about who entered the order, check the field VBAK-ERNAM. This will have the user id of the person who actually entered the order. You can get the name with the following select statement.



report zrich_0002 .


data: begin of user_info,
      bname type usr21-bname,
      name_text type adrp-name_text,
      end of user_info.

clear user_info.

select single  usr21~bname adrp~name_text
       into corresponding fields of user_info
         from usr21
             inner join adrp
               on  usr21~persnumber = adrp~persnumber
                      where usr21~bname = sy-uname.

check sy-subrc  = 0.

Regards,

Rich HEilman

I changed the code... please see again

Message was edited by: Rich Heilman

Message was edited by: Rich Heilman

Former Member
0 Kudos

It's the PO number that the customer has assigned to the order.

Rob

Former Member
0 Kudos

Hi Subbu,

The customer PO#, is actually the customers purchase order number.

This is the number assigned to the purchase order in the customers system.

When you create a sales order in your system, this number is keyed into the purchase order number field (as stated in another post, VBKD-BSTKD.

Thus, to access this data from the delivery, you need to go back to the reference sales order (field LIPS-VGBEL at a line item level) and then select the VBKD-BSTKD field. Note that the purchase order number on the sales order can be at the header or the item level, so first look for VBKD where VBELN = LIPS-VGBEL and POSNR = LIPS-VGPOS, then if you don't find it, look where VBELN = LIPS-VGBEL and POSNR = '000000'.

Hope that helps.

Cheers,

Brad