The function module MAP2E_IMSEG_TO_BAPI2017_GM_ITE helps the coder to find a faster way to transfer data from IMSEG structure to its BAPI equal. But the FM’s code in 4.6c doesn’t check the IMSEG’s fields’ types and/or if they are full.
Then, you call this module happily, and when you call the BAPI_GOODSMVT_CREATE you get an absurd error about PS_PSP_PNR is wrong. And you ask yourself “When I tried to fill this freaky field?”
Never. You didn’t. But that weird FM does. And a NUMC initial field when MOVE’d to a C field delivers its zeroes to the character field. And the BAPI checks if that C field is initial, taking ‘00000000’ as a valid value.
I will not use this FM in my system for now. It’s pure crap, and its original coder needs to learn some things about the MOVE sentence. Sometimes I hate BAPIs 😦