Mapping function in SAP Business connector not mapping default values set


I am new to WM. I am using SAP BC to create FI Documents in SAP following certain conditions. I have been able to set up the flow completely with help from the developer documents. However i am getting the following error: The IDoc metadata for null is not available.

After further analysis, i found out that i am getting this error because the idoc metadata is not getting filled correctly. i am using the service and the function “MAP” to insert the EDI_DC40 data. This data are default data set in the function “MAP”. My problem is that these default values is not mapped by the function “MAP” and hence the EDI_DC40 data is blank. Can you please explain to me why i am getting this problem?

For information, when i had created this mapping function it was working correctly and since no modification has been done.