Skip to Content

Value Mapping - I don't want an error returned if not found

For each record I'm bringing in through AIF, I'm running it through a Value Mapping that will convert a Plant Code to a different value. The problem is that this, right now it is only applicable for 1 certain Plant so I only have 1 entry in my Value Mapping.

For instance, if the plant code is AAAA, I want to overwrite that with BBBB. So, I have created that entry in my Value Mapping table.

The problem is that when my message has a plant code of CCCC, the message errors out because CCCC doesn't exist in the Value Mapping table.

I need the message to retain CCCC since no mapping value was found and continue processing.

What would be the best way to accomplish that?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 08, 2015 at 07:46 AM

    Hi Robert,

    if you want to use the normal value mapping maintained in transaction /AIF/VMAP and for all plants that are not included the source value only should be passed thru as CCCC -> CCCC, you can implement a value mapping function module with "value_out = value_in" and add it to the existing value mapping customizing object. The function module will be processed in case that the the normal value mapping (maintained in VMAP) does not find a value. Then you are able add in your function module source code all additional logic you need.

    Please note that the error message is looking different. To get the same error message as before have a look into this thread

    Perhaps this could also help.

    Kind regards


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 07, 2015 at 10:17 PM

    Try adding a wild card entry in your value mapping table such as *  for the external value. But then you'll need some dummy internal value corresponding to those entries that you don't have value mappings for. This will allow you to bypass the error  but then you'll always get the dummy value mapped.

    But wouldn't you want this since there's no plant value mapping?

    Remember that you can make the raw field holding the plant changeable.

    So a user can go into transaction /AIF/ERR, note the error and then update the plant accordingly prior to restarting the message etc...

    Hope this helps.


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08, 2015 at 02:00 AM

    If your use case is that, most plant codes are to be converted into another codes via Value Mapping, but some other plant codes are not to be convered or event to be converted via a different Value Mapping, AND, it is possible to identify those plant codes accordingly a certain logic. For example,

    only plant code starting with 1* should not converted, but simply copied from source to target.

    In such case, you may consider to use Conditional Field Mapping as another option.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08, 2015 at 08:20 AM

    Hi Robert,

    I have another solution without ABAP-Coding:

    Define in the value mapping a DB table lookup on T001 (select field BUKRS with where condition BUKRS = '$1'), and in addition allow values with "Single" and "Master Data".

    Then AIF will first check if the value is an existing company code, and if not, check in the values (maintained in /AIF/VMAP, also allowing wildcards like "1*").

    Finally, a value mapping function will be called (if maintained). The function will be called in both cases, when a value was determined before, and also if no value was determined.

    You see, there are many ways to implement; maybe this one is the easiest, without ABAP coding and without conditional field mapping.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded