Automate

 View Only
  • 1.  Direct - error when using all numeric material number

    Posted 08-09-2019 11:37
    Hi everyone,
    I have been watching the video tutorials on direct to learn more about Winshuttle full uses. I have tested two Direct scripts and having issues with one of them.

    CSAP_MAT_BOM_READ I am having the issue of when using all numeric material number to pull the BOM information the file comes back with a message saying "error". When I use a material number with a alpha character in the material number the script works perfect.

    I have also crated a script using BAPI_MATERIAL_SAVEDATA from another tutorial and I do not have this issue as I due on the BOM read.

    Any explanation and help fixing. Thanks


    ------------------------------
    Benjamin Kielas | MDG lead
    Generac Power Systems, Inc. | 2625444811
    ------------------------------


  • 2.  RE: Direct - error when using all numeric material number

    Employee
    Posted 08-10-2019 10:47
    HI Benjamin,
    Have you considered the padding for the material number?    The length of that field is 36, and the default is pre-pad with zeros.  So a material number of 111 would turn into a ton of zeros.  I would turn it off and pre-pad the right number of zeros for your material number, i.e. 000000000000000111 for a 18 digit material number.  In ECC, I believe it's 18 digits.  It's larger in S/4
    Hope this helps,
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 3.  RE: Direct - error when using all numeric material number

    Posted 08-12-2019 09:26
      |   view attached
    Upload file Thank you Sigrid,
    I have tried your recommendations with no success. What I did notice from your comments and screen shoot and our understanding was material number is 18 CHAR. When I am reviewing the properties like you show for material I see CHAR 80 for the material.  I have checked another test BAPI_MATERIAL_SAVEDATA and that shows CHAR 36 for material number. Am I using the wrong BAPI? or configuration is not set to 36 CHAR?

    Thanks for your feedback in advance!

    ------------------------------
    Benjamin Kielas | MDG lead
    Generac Power Systems, Inc. | 2625444811
    ------------------------------

    Attachment(s)



  • 4.  RE: Direct - error when using all numeric material number

    Employee
    Posted 08-13-2019 06:20
    Hi Benjamin,  Thanks for the reply and attempt to get this to work.  Any chance you can try the bapi in SE37?  SAP will pad the material number for you, and if it works there, you will see what length is best to use.
    Am also including an example that uses a fully numeric material number, again in ECC, which shows 18 digits for material - I left padding on for material number.  ( In S/4, it will be longer.)
    I'm out of pocket this week, but I'll try to respond in the mornings/evenings.
    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------

    Attachment(s)