Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need Help in stored procedure

Hi experts,

                        I want one stored procedure (sp) for GRPO .In that GRPO i created two user defined fields "Add"  and "Sub" .when i raised GRPO i will

give some value in that U_Add or U_Sub according to depending on vendors . And these two fields must should be reflect to linetotal value and that

value not depending on Quantity.

                          For that one i  written two sp query in sp_transaction notification that is executing and not working in GRPO.


1)    IF @Object_type = '20' and @transaction_type in (  'A' , 'u')


       update PDN1 set PDN1.LineTotal = PDN1.Quantity * PDN1.Price + PDN1.U_add - PDN1.U_sub

        From PDN1

        Where PDN1.ItemCode = @list_of_cols_val_tab_del

2)   IF @Object_type = '20' and @transaction_type in (  'A' , 'u')


       update PDN1 set PDN1.LineTotal = PDN1.Quantity*PDN1.Price + PDN1.U_add - PDN1.U_sub

       From OPDN

       Where PDN1.ItemCode = @list_of_cols_val_tab_del

Thanks & regards


Former Member
Not what you were looking for? View more on this topic or Ask a question