Skip to Content

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

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?

Thanks,

Robert.

Former Member
Former Member replied

Hi Robert,

try to enter your FM ZAIF_MARS_MATNR into your value mapping MARS_TO_SAP_PRODUCT definition instead of into the field mapping definition.

Then VALUE_FOUND can be used:

IF value_found <> abap_true.
       value_out = value_in.
ENDIF.

I implemented in case that the source value is initial set value_out on initial. This works.

Kind regards

Christoph

0 View this answer in context

Helpful Answer

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