This topic was raised many times, I always found it's not possible to (or at least to hard to try) to update components allocation for routing operations. Fortunately I had to do it somehow and I manage ...
As you can imagine, INTTYPE is just a presentation of DATATYPE in internal SAP format in most of cases. I wrote most of cases because it can also say if the field in internal table is a reference to other ...
...
end of t_hierarchy,
tt_hierarchy type standard table of t_hierarchy with default key.
constants: c_components type string value '&&components&&'.
data: hierarchy type tt_hierarchy. ...
...
The main part is again to use FM ME_COMPONENTS_MAINTAIN and ME_COMPONENTS_UPDATE_PREPARE , but this time there is no easy way to fill MDPA and MDLB structures which are needed here.
So I ...
In previous post I've shown how to re-explode subcontracting components of purchase requisition using FM ME_COMPONENTS_MAINTAIN and ME_COMPONENTS_UPDATE_PREPARE . Using very similar code you can delete ...
... instead of selecting and updating components in the database. IF_BOM_MM didn't helped as well. I started to dig in the standard transactions and local classes of ME52N and finally I have figure out ...
... FMs in the interface or inside the code you can find a table with structure ESDUSCOM. This structures contains three components: ACTION, ELEMENT, ACTIVE. This components can be found of course in ESDUS table. ...
... copy completely source routing to target but in any case you can also omit some of the areas and create them after save (like material allocation or components assignment ). form create_routing_by_copy_ewb using f_plnty_s ...
...
endif.
"you can get all components from structure so no need to manually
"write all the names of characteristics but just to show it I will
"it fast and I'll directly put characteristic name ...
...
append ms_comp to mt_comp.
"We got all components so we can create structure of a characteristic
mo_str = cl_abap_structdescr=>create( mt_comp ).
"and we can create table for this characteristic ...
...
data: mt_drat type table of drat.
data: ms_drat type drat.
data: mt_files type table of cvapi_doc_file.
data: mt_components type table of cvapi_doc_comp.
data: ms_draw type draw.
data: m_mimetype type mimetypes-type. ...