Vendor Address Defaults

 1 Replies
 0 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Author
Messages
dukeslater
Basic Member
Posts: 9
Basic Member
    I'm having trouble figuring out the logic for returning the default addresses for each vendor.

    For example, in APVENMAST vendor 8 is 3M. Both the REMIT_TO_CODE and PURCH_FR_LOC are null.

    In APVENADDR vendor 8 has 36 addresses, all have CUR_ADDR = Y.

    Each has a different location code, but only about 10% of the vendors have an address with the location code I would consider our 'home' location.

    If the location fields in APVENMAST are null, how would I return the default addresses (for this project either purchasing or remittance address would work equally well.)

    TIA.
    JonA
    Veteran Member
    Posts: 1163
    Veteran Member
      Are you looking for the address that you see in AP10.1? This would be the address in APVENADDR that has no location code. {APVENADDR.LOCATION_CODE} = " " in the record selection will give you this. Or if you want the address for the remittance code and that code is standard accross all vendors then use that. Frankly, I don't know what the REMIT_TO_CODE and PURCH_FR_LOC fields are used for in APVENMAST. Those fields are really stored in APVENLOC. Just use the APVENADDR table in your query and link to APVENMAST if you need the vendor name or other fields.
      Jon Athey - Sr. Supply Chain Analyst - Materials Management - MyMichigan Health