Mix flour, baking soda, salt, baking powder, and coconut together in a bowl. Set aside. Beat the margarine, brown sugar, and white sugar with an electric mixer in a large bowl until smooth. Add the eggs one at a time. Beat in the vanilla extract and water with the last egg. Mix in the flour mixture until just incorporated. Add more flour if the dough becomes too sticky.
Roll the dough into walnut-sized balls and place 2 inches apart onto ungreased baking sheets. Make an indentation in each cookie using a 1/2 teaspoon size measuring spoon. Fill each cookie with the raspberry jam.
Bake in the preheated oven until slightly golden, 10 to 12 minutes. Cool in the pans for 10 minutes before removing to cool completely on a wire rack.