Automate

 View Only
  • 1.  Query: Pre-pad with zeroes for alphanumeric MATNR

    Posted 04-12-2021 03:13
    Pre-pad with zeroes not working for alphanumeric MATNR
    Hi, may you advise if the Query "Pre-pad with zeroes option" doesn't work with alphanumeric values? Example above - our materials are composed of 9 alphanumeric char. The MATNR field is an 18-char. string so I expect that when I choose "Pre-pad with zeroes" option, the user need not key in leading zeroes. However, this is not the case. Even with the "Pre-pad with zeroes" option selected, Query is unable to recognize our 9-char. alphanumeric materials on their own - the 9 leading zeroes still need to be manually pre-pended by user.


    ------------------------------
    Allan Joseph Tiongson | Planner, Master Data and Processes
    Chevron Corporation | 97109959
    ------------------------------


  • 2.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Posted 04-12-2021 06:30
    hi Allen, it works for me ... (Studio 12.1):
    I made a little query MARA-MARC-MAKT, as you did (as far as I can see on you screenshots).
    I'm getting correct results, with pre-padding with zeroes as well as without padding with zeroes.
    Sure you don't have any spaces (leading or trailing)? You may want to set the TRIM flags in Studio options ?

    best, jan

    ------------------------------
    jan ketele | Sr engineer release mgt
    Xeikon Manufacturing NV | +32 34 43 1 875
    ------------------------------



  • 3.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Posted 04-14-2021 05:12
    Yes, the TRIM flags are set. It looks like pre-padding doesn't work with alphanumeric values, as per Sigrid below. But thanks for looking into this. Appreciate it.

    ------------------------------
    Allan Joseph Tiongson | Planner, Master Data and Processes
    Chevron Corporation | 97109959
    ------------------------------



  • 4.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Employee
    Posted 04-13-2021 12:19
    Hi Allan

    I believe zero padding only works with fully numeric material numbers.  Jan was great to jump in and test, but his start with alphabetic characters and are not zero padded.  Since yours are a mix and zero padded, perhaps you can use a formula to create a column of derived zero padded material numbers.

    If the format is always the same, 15 digits and 3 alpha, you could use something like this

    Otherwise, you'd have to get a bit fancier and write a macro.  I found several suggestions via a google search, so maybe you can, too.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 5.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Posted 04-14-2021 05:15
    Hi Sigrid,
    Thanks for the confirmation. The workaround you showed is indeed what I have in mind in case the user needs to input several materials at once in the criteria. Just wanted to confirm the if the pre-padding functionality caters to fully numeric values only. Most of our materials have 1st 6-digit numeric and last 3 alphanumeric char.

    ------------------------------
    Allan Joseph Tiongson | Planner, Master Data and Processes
    Chevron Corporation | 97109959
    ------------------------------



  • 6.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Employee
    Posted 04-14-2021 08:58
    Please note, Allan, that you can apply formulas in the script to derive that formatted material number.  It will run as the script runs, so no worries if a runner accidentally removes the formulas when entering data.

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 7.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Posted 04-16-2021 05:55
    Thanks Sigrid.

    For Purchase Order Query, my users will most likely enter the material nos. manually here. Is there a way to set a formula on this level so that they can enter our normal 9-digit alphanumeric mat'l and the system will see it as "000000000500549DNK" and generate an output? I don't think the "Add Transform" option will address that. It's not a major issue but will be good to have for convenience.



    ------------------------------
    Allan Joseph Tiongson | Planner, Master Data and Processes
    Chevron Corporation | 97109959
    ------------------------------



  • 8.  RE: Query: Pre-pad with zeroes for alphanumeric MATNR

    Employee
    Posted 04-16-2021 09:36
    Hi Allan,

    Because you're using this material number in a Query with an IN operator, I would allow the user to enter it wherever you currently have it, and then use a formula in another column - either displayed or hidden.  Then point the IN operator to the derived material number column of data.

    Hope that helps,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------