Skip to Content
avatar image
Former Member

How can I relate EBAN and DRAD Tables?

Hi All,

I have all data from EBAN Table (Purchase Requisition), now I want to get detail of objects that attached with the purchase requisition, hence need to get data from DRAD table (Document-Object Link). How can I link EBAN and DRAD?

Thaks in advance

Roy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 15, 2010 at 11:08 PM

    hi

    check these fields in in table DRAD:

    DRAD-DOKOB = 'EBAN'.

    DRAD-OBJKY = purchase_req_no_and_postion. "example: 100000028000010

    regards,darek.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 16, 2010 at 06:57 AM

    Hi Do like this...

    IF wa_eban IS NOT INITIAL.

    CONCATENATE wa_eban-BANFN wa_eban-BNFPO INTO wa_doc.

    SELECT doknr

    dokvr

    objky FROM drad INTO TABLE it_drad

    WHERE objky = wa_doc

    AND dokob EQ 'EBAN.

    SORT it_drad BY dokvr DESCENDING.

    READ TABLE it_drad INTO wa_drad INDEX 1.

    IF wa_drad IS NOT INITIAL.

    SELECT SINGLE doknr

    dokvr

    dktxt FROM drat INTO wa_drat

    WHERE doknr = wa_drad-doknr

    AND dokvr = wa_drad-dokvr.

    Add comment
    10|10000 characters needed characters exceeded