Hi @saurabhkulkarni123
The can_message.h is an internal MATLAB file which can be found inside the MATLAB installation folder. It is not present in the folder containing the application generated code and this is why you are not able to locate it by searching for it in the location where you have built your model.
After importing your Simulink generated code to S32DS, could you please try to add the specific MATLAB location inside the S32DS project settings so that the compiler could locate the file? For this, you should right click on the project and access the Properties option which will open the following tab, where, inside the C/C++ Build -> Settings, you could add the corresponding path in the list of Includes:

Depending on the MATLAB release you are using, this location of can_message.h might be different, but you could search inside the folder for it and add the corresponding path as illustrated above. The attached screenshot targets MATLAB R2021a. After adding the path, you could try rebuild the project inside S32DS.
Please let us know if this solves your problem.
Thank you,
Irina