SIH SOAP webservice x Stock issue lines creation

SUGGESTED

Hello,

When creating a Direct Sales invoice through SIH SOAP Webservice, the system returns the message below:

<message>Line Number 1 \ Product ITMMOB001 : The stock to issue has not been determined \ Document line quantity 1 Processed quantity 0</message>

How is possible to create an invoice and its stock line determination through SIH SOAP Webservice?

Based on some old posts and Sage KB's, there is a problem related to open another screen during a SOAP call, but in my case, when creating it manually there are no secondary screens in the process and the stock issue line is created automatically based on the settings. (Direct Invoice type, STK movement flags, Transaction with stock determination auto)

Sage X3 Version: V12.22

Parents Reply Children
  • 0 in reply to RobertoMSNascimento

    Hi Roberto, followed the  solution you proposed but under Misc. Issues , am using import template SMO not web services. The import is creating an entry without asking me to specify a  lot  to issue which is what I need-my products are lot managed. However I have this challenge , the system is ignoring stock issue rules when importing ONLY (I need to issue lots from specific location). The below is the script I added: Could you have an idea how I can also work around this?

    Subprog APRES_NBLIG

    If [M:SMO0]STKFLG=2

    Gosub AAPRES_NBLIG From SUBSMO
    Endif

    End

  • 0 in reply to alie

    Hello,

    @Alie, since it it not really related to this, I think you should've oppened a new discussion/topic. Anyway...

    Generally SMO import is marked as a "special report" if you duplicate the standard and in this case, you do not need to call this action since the standard code generally simulates these actions by calling SAI_NBLIG subprogram from the screen code (source @ W0<screen>).

     Did you check your file structure/data?
    Try something like this:
    Header -> E;<header data...>
    Line      -> L;<ITMREF>;<STU>;<Total quantity>
    Stock detail/Stojou -> S;<STU>;<Negative Quantity!>;<LOT>;<LOC>;<STA>;...

    The detail here is to put a negative quantity in the STOJOU line (since the stock is going out). If you have 2 lots, simply add 2 different "S" lines below your main "L" line in the file...

    H;...
    L;ITEM1;PCS;2
    S;PCS;-1;LOT1;LOCATION_A;...
    S;PCS;-1;LOT2;LOCATION_B;...

    Regards,
    Roberto Nascimento

  • 0 in reply to RobertoMSNascimento

    Thanks Roberto had forgot to put negative . Let me check