Automate

 View Only
  • 1.  Extracting Material number from logfield

    Posted 11-23-2021 08:56
    Hello
    I work with Evolve and I working on a solution to create materials.
    The material number is created from SAP not from user in the form.
    When I run the MM01 script in the form SAP creates a material number and write a text with the number in the logfield.
    p.ex.:
    I would like to extract the material number from the logfield and put it in a seperate field to use the number in other scripts.

    I try to use the substring function. I extract from the logfield at the 13. position the next 5 signs.
    But it works only when the script runs without error.

    I there is an error it's still extract the signs.


    Did someone has a better idea?

    Best regards Jana

    ------------------------------
    Jana Kuschmierz | Leitung VID
    Rigips AG | 0041628877034
    ------------------------------


  • 2.  RE: Extracting Material number from logfield

    Employee
    Posted 11-23-2021 10:08
    Hi Jana

    If you use substring, please note the position starts at 0, not 1.  You can use an IF statement that says if the logfield DOES NOT BEGIN WITH 'Err:', then do the substring.

    If it's a transaction script, you can download the material number, as it's generated early on
    I usually download from one of the last views.  Go to expert view, and on the view tab checck disabled fields.  You'll see MATNR in there, which is the generated material number


    Best Regards,
    Sigrid

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



  • 3.  RE: Extracting Material number from logfield

    Posted 11-24-2021 08:03
    Hi Jana,
    Are you using a rule in Evolve?  If so, put a condition in that says run the role if the log field begins with "Material."  In your example, in German it looks like your condition would say if the log field begins with "Das".   Then, when you get your error message, the rule will not run and your separate field should remain blank.  You could also do this the other way and say run the rule only if the Log Field DOES NOT being with "Err".

    ------------------------------
    Krista Zinna | Master Data Specialist
    Timken Company | 234-262-2008
    ------------------------------