Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem posting events with weight information

Dear all (esp. SAP experts ^^),

I have copied and extended the standard FM sending event message contents to TM to submit quantity values (the fields are available in the standard interface structure but are not filled by default). I also implemented the BAdI on TM side, changing ct_modify-data to post the weights to the respective TOR object EXECUTIONINFORMATION (I am talking about messages for a freight order here, Appobject/EH is a derivation of Z_ODT30_TO). What I would expect is that nodes of type EXECUTIONINFORMATION are added having the fields GRO_WEI_VAL and GRO_WEI_UNI filled (these are the only ones for which I transfer values at the moment).

However, this is not what happens. During testing and debugging, there were a few cases where the node appeared suddenly with the values filled, but don't ask me how that happened... The transfer of the values works fine, if I induce a dump by putting ASSERT 0 = 1 in the BAdI, I can see the values populated. What fails is the actual modification of the BOPF object afterwards. Interestingly, if I omit the weight value when sending the event message (and still using the same custom coding), everything works well - respective EXECUTIONINFORMATION node is created/updated.

Obviously, the BOPF performs some logic here if the GRO_WEI_VAL field is populated which prevents saving of the node. But as you might know, it is not very funny to debug the whole srv_mgr->modify method... :-) Do you know what happens here and how this was thought of at SAP (if thought of at all? ^^)

This might be connected to the "Discrepancy" functionality, which is (to my understanding) just the posting of an event called REPORT_QUANTITY which is possible by some UI fields in the TOR item view... Maybe the quantity fields in EXECUTIONINFORMATION structure should only be used for this purpose and the corresponding logic prevents the things I am trying to do.


Hi MIchael,

I guess that is the isse: You have to use 'KG' with uppercase letters, otherwise the check for the dimension in SAP TM is not successfull, which raises an exception -> this then prevents the successfull processing of the new EXECUTIONINFORMATION node. This check is done with FM 'DIMENSION_GET_FOR_UNIT' - so you can always check if your UOM will raise this exception or not.

Please try it with 'KG' and let us know if it worked.

Best regards, Daniel

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question