Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question