Skip to main content

BEAS Script / Integration to SAP / #JBS

Comments

2 comments

  • Andreas von Arx

    exactly what I need!

    // Return Item Name from Item "FP"
    let h=new HTTPClient;
    h.SetRequestHeader("Content-Type", "application/json;charset=UTF-8") ;
    let check=h.SendRequest("GET","http://192.168.178.21:8080/odata4/Itemu('FP')");
    // Error handling
    if (check<1) {
      alert("Error reading data: "+check);
      return 1;}
    // check return status
    if (h.GetResponseStatusCode()!=200) {
      let j=h.GetResponseJSON() ; // Convert error message to josn
      alert("Can't read Data: "+h.GetResponseStatusText()+" "+j.error.message.value);
      return 1;}
     
    let j=h.GetResponseJSON() ;

    alert(j.value.ItemName);

    Just make this active and official. where is the documentation? Seems to work as intended. Why is there some form of language which we could use to script with and it is not there?

  • Martin Heigl

    good question ...

Please sign in to leave a comment.