I need to create a document cost with shipment type Z003 (requested by client). Whenever I give the FM the FKART = Z003 does not work. If I remove the parameter it works but creates it with Z001 type.
Is there a way to make this work?
Sounds like your customer system has some BAdI active that sets the value to Z001
. Have you checked this one in function SD_SCD_TYPE_DETERMINE
?
* BADI SCD_CREATE: SET_SHIPMENT_COST_TYPE
CALL FUNCTION 'SD_SCD_GET_INSTANCE'
EXPORTING
i_badi = co_badi_scd_create
CHANGING
c_interface_ref = l_badi_create
EXCEPTIONS
OTHERS = 1.
IF sy-subrc IS INITIAL.
CALL METHOD l_badi_create->set_shipment_cost_type
EXPORTING
i_refobj = i_refobj
CHANGING
c_fkart = e_tvtf-fkart.
ENDIF.