MAP2E_IMSEG_TO_BAPI… and why I hate it (4.6c)

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 😦

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s