Try SPSS Rake extension command. It computes weights matching specified marginals in up to 10 dimensions, which can be found at www.ibm.com/developerworks/spssdevcentral.
You can use SPSS macro for multivariate weighting. Download macro from this page: SPSS multivariate weighting
Another alternative is to create a new categorical variable which will be the intersection of A &B (i.e., it will have categories white-male, white-female, africanamerican-male, africanamerican-female, etc.).Then you have to identify the weights for each of the categories.This may or may not be the same as the products of the weight variables (most likely not).