Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have some questions concerning ApplyMap.
I am currently using an excel file loaded to fill the table of mapping.
The loading is as followed
MAP_MVT:
Mapping LOAD
Code as [Code mouvement],
Type_Mouvement
FROM [lib://DATA - Commun:DataFiles/Mapping_Mvt.xlsx]
(ooxml, embedded labels, table is GRP);
Later, I want to use it to add a new field:
MSEG:
LOAD
// KDAUF_KDPOS,
// MBLNR_MJAHR,
// "TVA non déductible",
// Action,
// "Adapt. qté crs poste",
// "Ann.EM malgré EF",
// "Article NPF",
// "Article cible",
// "Article cible 1",
[Article], // OK - 5
// "Art.géré en stk",
// "Alt. base amount",
// "Boîte de dialogue oui/non",
// "Code : valor. stock sous-tr.",
// "Code de mise à dispo",
// "Code origine mvmt.",
// "Commande d'achat",
// "Commande automatique",
// "Commande client",
// "Commande client 1",
// "Chaîne de valeur",
// "Chaîne de qté",
// "Clé d'état",
// "Clé condition",
// "Clé condition 1",
// "Clé objet immobilier",
// "Clé état lot transf.",
// Client,
[Code débit/crédit], // OK - 8
[Code mouvement], // OK - 4
ApplyMap('MAP_MVT', [Code mouvement], 'Pas de mapping') as Type_MVT,
..
It is not working however.
The field in the table loaded is defined as a 3 character long.
The field in the excel file is defined as text.
Do you have an idea on how to solve it ?
Here are the screenshot of the file loaded and the result.
Thanks you for your answers.
Thomas.
Use Trim() as there may be leading and trailing spaces.
Use Trim() as there may be leading and trailing spaces.
Thank you for your answer. I have added the Trim as followed
But also during the call of the applymap
And it worked !
Thank you for the advice.
@tbrevigno : Change ApplyMap syntax
ApplyMap('MAP_MVT', [Code mouvement], 'Pas de mapping') as Type_Mouvement