The error is that the material group doesn't exist. You are passing the material group as a parameter in the line:
it_item-matl_group = wa_porder-matl_group.
it_itemx-matl_group = 'X'.
Does the material group "0001c" exist? And does the SD document exist? SAP is saying it doesn't.