Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I set up categories for Dispatcher in SAP - e.g. if DISPO.MARC = A06 it's category Purchasing.
the categorisation is based on an external Excel sheet:
if the field %Dispo is empty, the category "others" should be created. But this is not working at the Moment... I tried filling the empty field in Excel with 0/' '/" " etc. but nothing worked and materials with no Dispatcher (empty) field are not shown within the category "others".
I am glad for any Input 🙂
Thank you a lot!
Regards,
Barbara
What is the script you are using to check empty %DISPO? Is it Len(Trim(%DISPO)) > 0 or something else?
The script is as followed:
DisponentCategories:
LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(ooxml, embedded labels, table is [Disponent Kategorien]);
Hi Barbara,
Solution Script one way to check for nulls i mean empty values:
Resulttable:
Load
%DISPO,
if( len(%DISPO)=0,'others',Category) as Category
;
Load %DISPO,
Category
from table;
Solution Script second way to check for nulls:
Resulttable:
Load
%DISPO,
if( isnull(%DISPO),'others',Category) as Category
;
Load %DISPO,
Category
from table;
what is your code?
Let me know if either of the below script helps you
DisponentCategories:
Load
DISPO.MARC,
if( len(DISPO.MARC)=0,'others',Category) as Category
;
LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(ooxml, embedded labels, table is [Disponent Kategorien]);
///////////or ///////////////////////////////////
Load
DISPO.MARC,
if( isnull(DISPO.MARC),'others',Category) as Category
;
LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(ooxml, embedded labels, table is [Disponent Kategorien]);
Hi!
unfortunately it didn't helps..
the second one creates a lot of syntetic keys - the first one didn't changes anything..
The whole script part is a followed:
first I am loading table MARC after that the Excel file with the mapping between Dispo.marc and category:
MARC:
left keep(MARA)
LOAD *
FROM $(Data)\MARC.QVD (qvd);
DisponentCategories:
LOAD %DISPO as DISPO.MARC,
Category
FROM
[..\..\02 Extern\steuernde_Daten_PP\Lagerauslastung.xlsx]
(ooxml, embedded labels, table is [Disponent Kategorien]);
I am gladful about any other tipp :-)!
its me again 🙂
the Syntax error was my mistake - but also the second script had no changes...
maybe one further screenshot from the datamodel - when I select category "others" the first line in the Dispo.Marc should be selected: