Add a new field to SDELIVERY from BPCUSTOMER table

SUGGESTED

Hi,

I want to add a new field value to SDELIVERY to store the value of a field from BPCUSTOMER table.

We have a field on BPCUSTOMER - YDROPSHIP table ( datatype M, chapter =1 ). We set the field value when we create the customer record. I want to have the same field on SDELIVERY table and I want the value to be auto populated from the value it has on the BPCUSTOMER table for the delivery customer.

I have added the field to SDELIVERY table, but I am not able to link the two tables together to get the data populated correctly.

  • 0
    SUGGESTED

    Sharat,

    I do not believe that there is any automatic class transfer from the BPCUSTOMER table to the SDELIVERY Table,

    I believe that your simplest approach for this would be this:

    Create a custom field somewhere on the delivery function for your Dropship Flag.

    Create an after modification field action on SDH0:BPCORD , and then set the Dropship Flag based on the value in BPCUSTOMER.  (I checked and BPCUSTOMER is populated after the value of BPCORD is set)   This will also allow you to capture the correct value if the customer ID changes during Delivery Creation.

    Test to see if the class transfer from Screen to Table sets your value on SDELIVERY... It should.

    If not, then you may need to add code to the Creation action.

    Test Manual Delivery Creation, Delivery Creation from Sales Orders, and Order Delivery Generation.   If all three generated the expected result, then you should be all set.

    Best of luck!