04-17-2006 3:38 PM
Dear Friends,
I think so everybody is doing Goood,
This is my small doubt but I am not getting it.
Here i want to get VBKD-VBELN value Where VBKD-BSTKD = EKKO-EBELN.
But i know BSTKD length is 35 and EBELN Length is 10 only how to fetch this VBELN??
Thanks in advance
Sridhar.
04-17-2006 3:42 PM
HI Reddy,
YOu can pass the EKKO-EBELN value to v_ebeln which is of length 35 chars or of type VBKD-BSTKD
and then use it in where condition.
Regards,
Ravi
04-17-2006 3:43 PM
Hi
Try this
TABLES: VBKD, EKKO.
DATA: BSTKD TYPE BSTKD.
MOVE EKKO-EBELN TO BSTKD.
SELECT * FROM VBKD WHERE BSTKD = BSTKD.
ENDSELECT.
Max
04-17-2006 3:49 PM
Hi Sridhar,
U can compare EKKO-EBELN directly with VBKD-BSTKD.
or else pass this EKKO-EBELN to a 35 char variable
and compare that variable with VBKD-BSTKD
Regards,
GSR.
04-17-2006 3:55 PM
Try this:
TABLES: vbkd, ekko.
DATA: BEGIN OF itab OCCURS 0,
doc LIKE vbkd-vbeln,
END OF itab.
SELECT vbeln FROM vbkd
INTO TABLE itab
WHERE bstkd = ekko-ebeln.
Rob
04-17-2006 4:41 PM
Are you sure that your PO number is the customer PO number on the sales order? BSTDK is the customer PO number. This is used to store the number your customer uses to refer to the sales order. The EBELN is your PO number to your vendor.
Unless you have the business process confirming that these two are the same, you will not be able to combine the two.
What exactly are you trying to get using a PO?