Skip to Content
avatar image
Former Member

How to retrive the VBELN Value based on EBELN

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Apr 17, 2006 at 02: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 02: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 02: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 17, 2006 at 02: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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 17, 2006 at 03: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?

    Add comment
    10|10000 characters needed characters exceeded