Skip to Content
avatar image
Former Member

Getting Vendor Number and Price...

hi everyone,

i have done the following:

CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'

EXPORTING

DATE_OF_CHANGE = p_b_date

OBJECTCLASS = 'MATERIAL'

TIME_OF_CHANGE = p_b_time

DATE_UNTIL = p_e_date

TIME_UNTIL = p_e_time

TABLES

I_CDHDR = i_pt_cdhdr

EXCEPTIONS

NO_POSITION_FOUND = 1

WRONG_ACCESS_TO_ARCHIVE = 2

TIME_ZONE_CONVERSION_ERROR = 3

OTHERS = 4.

SORT i_pt_cdhdr BY objectid.

DELETE ADJACENT DUPLICATES FROM i_pt_cdhdr COMPARING objectid.

LOOP AT i_pt_cdhdr.

MOVE i_pt_cdhdr-objectid TO i_updtd_materials-matnr.

APPEND i_updtd_materials.

CLEAR i_updtd_materials.

ENDLOOP.

select maramatnr marabstme <b>maravpreh</b> maramatkl marameins maramfrnr mara~mfrpn

maktmaktx marcplifz

from mara

join marc on marcmatnr = maramatnr

join makt on maktmatnr = maramatnr

into table i_matl_details

FOR ALL ENTRIES IN i_updtd_materials

where mara~matnr = i_updtd_materials-matnr

and mara~mtart in s_matl

and makt~spras = sy-langu.

I am reading the changes for material and selecting data based on those changes. The requirement changed a bit, I have to select 'price' based on contracts, so i am no longer going to choose VPREH. I have to get EKPO-NETPR. This I can do by putting the statement: join ekpo on ekponetpr = maramatnr.

I also need to pull the vendor from the same contract. How do I do that. How can I link it up in my select statement?

Thanks in advance.

Regards,

Fred.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    May 12, 2006 at 03:58 PM

    Hi Fred you can get vendor from EKKO-ELIFN.

    Get EKPO-EBELN and pass it to EKKO to get ELIFN.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      As you have material number , check out the table <b>ELBM ( Vendor Evaluation: Material-Related Item)</b>

      Hope this’ll give you idea!!

      <b>P.S award the points.</b>

      Good luck

      Thanks

      Saquib Khan

      "Some are wise and some are otherwise"

  • May 12, 2006 at 04:10 PM

    select maramatnr marabstme maravpreh maramatkl marameins maramfrnr mara~mfrpn

    maktmaktx marcplifz

    <i><b>ekpo~ebeln

    ekpo~netpr

    ekko~ebeln

    ekko~elifn</b></i>from mara

    join marc on marcmatnr = maramatnr

    join makt on maktmatnr = maramatnr

    <b>join ekpo on ekpomatnr = maramatnr

    join ekko on ekkoebeln = ekpoebeln</b>into table i_matl_details

    FOR ALL ENTRIES IN i_updtd_materials

    where mara~matnr = i_updtd_materials-matnr

    and mara~mtart in s_matl

    and makt~spras = sy-langu.

    Try the above code.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded