Skip to Content
avatar image
Former Member

NEED TO BLOCK DOCUMENT GENERATION WIZARD WHEN

Dear Experts

Am using Document Generation Wizard to convert Delivery Note >> Ar Invoice

am having define Prefix as per my Branches

Supposes Branch A- Delivery Note is like this - DN-A (Base Document)

Branch A - AR invoice is like this - AR-A (Target Document)

if supposes my user selected different series for DN-A (Base Document) instead of

AR-A (Target Document) then it should be alerted and blocked from next step in wizard

how is it possible, is it possible via TP, if so pls provide me the TP

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Feb 11, 2017 at 12:28 PM

    Hi,

    You can assign the series login wise with the help of authorization group also in the numbering series set up.

    Also you can not write SPTN on wizard. You can write it only at document level. After completing the wizard, the framed logic will validate the series before posting the document to the DB.

    Regards

    Pradnya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 11, 2017 at 02:20 PM

    Hi,

    IF @object_type = '15' AND @transaction_type IN('A', 'U')

    IF EXISTS(

    SELECT t1.docentry FROM ODLN T1 INNER JOIN DLN1 T2

    ON T1.DocEntry = T2.DocEntry WHERE @list_of_cols_val_tab_del = T1.DocEntry

    AND (T1.Usersign = 10 or T1.UserSign2 = 10)

    )

    BEGIN

    SET @error = -1

    SET @error_message = 'You Cannot Add Goods Receipt PO without Purchase Order.'

    END

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 11, 2017 at 02:20 PM

    Hi,

    IF @object_type = '15' AND @transaction_type IN('A', 'U')

    IF EXISTS(

    SELECT t1.docentry FROM ODLN T1 INNER JOIN DLN1 T2

    ON T1.DocEntry = T2.DocEntry WHERE @list_of_cols_val_tab_del = T1.DocEntry

    AND (T1.Usersign = 10 or T1.UserSign2 = 10)

    )

    BEGIN

    SET @error = -1

    SET @error_message = 'You Cannot Add Goods Receipt PO without Purchase Order.'

    END

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 11, 2017 at 02:27 PM

    Hi,

    IF @object_type = '17' AND @transaction_type IN('A', 'U')

    Begin

    Declare @Series as Nvarchar(10)

    select @Series = distinct t1.Series from nnm1 t1 inner join ORDR t2 on t1.series = t2.series

    inner join rdr1 t3 on t2.docentry = t3.docentry where t2.docentry = @List_Of_Cols_Val_Tab_Del

    And (T2.User = 10 or T2.UserSign2 = 10)

    if @Series = 8

    Begin

    SET @error = -1

    SET @error_message = 'Incorrect Document Series Chosen'

    End

    End

    For sample, I have taken sales order. And assumed few things

    User 10 is allowed to work only on series number 8. So this SPTN will fire when user 10 will try to add the sales order under any other series than 8.

    Hope this will help you.

    Regards

    Pradnya

    Add comment
    10|10000 characters needed characters exceeded