Dear experts:
This is my very first post to the SCN world so if I’m not following established etiquette please forgive. I have been working with LSMW’s for about 4 years now but I have never done any custom coding in the field mapping and conversion rules section as of myself. I would normally have that done by a developer but I am now wanting to learn how to do this.
I have created a LSMW using the BAPI/Idoc method to create Material Masters and have been able to run it successfully until I added custom code to the Availability Check field (MTVFP). I checked the syntax function and it says it is correct and works. The code says if (XCHPF) is ‘X’ then (MTVFP) equals ‘CH’ else (MTVFP) equals ‘02’.
When I run ‘Read Data’ step it populates the input file correctly with the right values. When I run the ‘Convert Data’ step and display the results it populates and translates the right values as well but when I finish creating the material, (XCHPF) and (MTVFP) are both blank in the material master.
Please let me know what I am missing or how to get this to work.
Please see attached file for more detailed information and screen shots.