Delete/insert lines with SOAP web service

Hi,

I don't understand how to set up the parameters to insert and delete lines via web service; actually, I can't find much on those parameters in general (their definition, when should I use which, etc). A simple example would do the job as well, I can learn from that, but I can't find anyhing on it.

I am trying this on sales quotes, so I know that in order to delete lines I should set 

WW_ACTION = "SUPLIG"
WW_IDENT = mySQHNUM
 and then I should give some value to the 
WW_TAB
 and 
WW_PAR
 arrays, but I don't know what they are referring to. I am using Sage X3 v11.

Can someone give me some insight, please?

Thank you

  • Hey, from the looks of it you are trying to call the SOAP generated calls from within Sage. Normally if you wanted to insert a line, it would just be added onto your input XML/JSON package with no line number and a positive quantity. Similarly if you wanted to delete a line, you include the line to delete on the XML/JSON package with the line number to delete and a quantity of 0. Hope that helps.

  • Hi, 

    Hijacking this thread to ask if there any online resources available for x3 web calls that might help people like the OP. Content is really light at https://developer.sage.com/x3/ as it talks about file based import.

  • in reply to SergeB

    Good say,

    Yes its described a bit in this section. The reason for the file import is because its easier to work with and the recommendation method of import. 

    The use of published object windows is cumbersome and slow.

    https://online-help.sageerpx3.com/erp/12/staticpost/import-export-soap-web-service/?highlight=SOAP

    Hope that helps.

  • in reply to Regard Hulsbos

    Wow, so the recommended method of integration is this file import process passing through clob data along to those AOWS subprograms?

    When you say 'published object windows', your talking about publishing SIH object as a webservice and using that? As that's what I've done in the past.

  • in reply to SergeB

    That is correct, its fast, efficient and can be done in real-time or batch mode. The 'published object windows' are the published entry transactions of the objects. They are limited in that they only work for certain objects, they contain a lot of display fields which are not need for transaction generation, cluttering the XML (unless you unpublish them). You can use the AOWSIMPORT/AOWSEXPORT both via SOAP and internally to process transaction generation/export. 

  • in reply to Regard Hulsbos

    Hi, I'm sorry, I didn't really understand your answer. I am (actually, I was) trying to call the webservice function from within Sage, like you said, and that was to update an existing quote. In order to avoid wasting your time, I anticipate that the problem has been solved. Still, the scenario is the following:

    • There is a custom mask where a third party writes up their costs for a specific work (much like a form)
    • We add our costs and expected profit
    • A sales quote is generated based on this data

    But:

    • What if part of such a quote needs to be deleted due to a customer's request?
    • What if I have to add further lines because the customer wants other things to be done?
    • What if I only need to change the amount on some of the lines? (well, this is easier)

    By calling the web service within Sage I directly give the parameters to the web service program, then I call it. There are those two array parameters (WW_TAB, WW_PAR) that I don't understand which data should contain.

    The thing is you still solved my problem, because the "set line qty to zero" suggestion works for the SQH object import model as well (I never tried before because I was sure it would end up with "0-qty not allowed"), deleting the line I specify, and as far as I know it's faster and safer to call the import rather than the webservice.

    Thank you very much!

  • in reply to tc43

    Apologies for not answering the original question, but glad I could help. For future reference:

    Those two pameters are used to indicate the screen abbreviation from which you want to delete a line, along with the column on the screen holding the line number separated by a "~".

    WW_PAR is the value/s of the lines to delete separated with a ";" 

    Using the SO as an example, to delete only line 2 (SOPLIN=2000)

    WW_TAB = "SOH4~SOPLIN"

    WW_PAR(1) = "2000"

    To delete more than one line one, say line two and six (SOPLIN =2000 & SOPLIN=6000)

    WW_PAR(1) = "2000;6000"