cancel
Showing results for 
Search instead for 
Did you mean: 

GRPO

Former Member
0 Kudos

hai

    i create a Gpro Document for 5000 qty  and Based on the Grpo i create a Two Ap invoice .

example

Grpo 5000 Qty   - Ap invoice 2000 qty

                            Ap invoice 4000 Qty

AP invoice Qty Greater than the  Grpo  Qty so i want block this scenario ? Any Store procedure is there ??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

Try this

IF(@object_type = '18') and (@transaction_type in ('A', 'U'))

begin

IF Exists (select T0.DocEntry from OINV  t0 inner join inv1 t1 on t0.docentry=t1.docentry inner join pdn1 t2 on t1.baseentry=t2.docentry and t1.itemcode = t2.itemcode

where T0.DocEntry = @list_of_cols_val_tab_del and (sum(t1.Quantity)>sum(t2.quantity))

Begin

SET @error = 1

SET @error_message = 'Invoice qty exceeded the GRN Qty'

End

End

Former Member
0 Kudos

While run this Query Error Showing "

Msg 156, Level 15, State 1, Procedure SBO_SP_TransactionNotification, Line 143

Incorrect syntax near the keyword 'begin'. "

Former Member
0 Kudos

HI

Try now

IF((@object_type = '18') and (@transaction_type in ('A', 'U'))

begin

IF Exists (select T0.DocEntry from OINV  t0 inner join inv1 t1 on t0.docentry=t1.docentry inner join pdn1 t2 on t1.baseentry=t2.docentry and t1.itemcode = t2.itemcode

where T0.DocEntry = @list_of_cols_val_tab_del and (sum(t1.Quantity)>sum(t2.quantity))

Begin

SET @error = 1

SET @error_message = 'Invoice qty exceeded the GRN Qty'

End

End

nikunjmehta2290
Participant
0 Kudos

Hi,

Would you help me on this TN into HANA?

Answers (0)