IDOC Segement Release vs IDOC Basic Type
we are in an upgrade project and are runing into a general question about idoc creation.
Here is our behavior:
1. We have an reduced IDOC Type in BD53 ZMATMAS based on Messagetype MATMASDI.
2. It has 2 Segements E1MARAM with fields MSGFN MATNR PSTAT and Subsegemnt E1MAKTM with fields MSGFN SPRAS MAKTX.
3. Done the things around (RFC, Partner Profile, distribution model, changepointer ..)
4. In Distribution Model in outbound parameters, added our ZMATMAS.
As parameters we have: Partner type: LS, Message Type: ZMATMAS, Basic Type MATMAS03! and Seg. release in IDOC Type 46B. The Partnersystem is an NoneSAP System.
We are using MATMAS03 because this interface exists since 46B.
Now we send an Material with BD10 and Message Type ZMATMAS.
The Master and Commuidoc are successfull created. In BD87 the commuidoc is an MATMAS03 and has the expected 2 segements E1MARAM and E1MAKTM.
But what we do not expect, if we look into the content of E1MARAM there are ALL Fields which exist for the E1MARAM in release 7.00. Not only our 3 fields MSGFN MATNR PSTAT, or as we second expect only the segemnts that had existed in the segemnt E1MARAM in release 46B of MATMAS03.
The additional fields were filled with the NODATA sign.
My question is: Is it correct that an IDOC with basic type MATMAS03 can have an segement E1MARAM which is formated like the segemntdefinition E2MARAM007 (Release 7.00 / 6.03)?
The difference is definatly the length of the field! 876 in 7.0 vs 757 in 4.6A.
Why is SAP using the highest available segemnt release regardles which basic type we choose?
Isnt this wrong?
We know that it is not possible to have an IDOC with basic type MATMAS03 with an segement e.g. E1MARA1 which only exists in newer basic type MATMADI if segemnt release is set to 46B in our distribution model.
Failure is: Segment E1MARA1 is unknown in Release 46B/ (correct and expected behavior)
If we are using this scenario with not an reduced message type, we will only find the fields in E1MARAM which are filled with data. (Not all fields of the latest release with nodata)
I traced the MASTER_IDOC_CREATE_MATMAS and hit the function IDOC_REDUCTION_FIELD_REDUCE. As you can see in it, it first checks if the idoc is an reduced message type, and at the end, fills up all fields with the "empty_symbol" which have no data in it. Why is this only happening if it is an reduced message type?