cancel
Showing results for 
Search instead for 
Did you mean: 

want to check ware house code in header and in row column

Former Member
0 Kudos

Hi experts,

In production order i want to check whether the ware house code in header and in  each row ware house code is same .

its already there

but i want to know how can we check it   through coding

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please Help

edy_simon
Active Contributor
0 Kudos

Hi Nikhil,


                Dim sHeaderWhs As String = form.Items.Item("78").Specific.ToString

                Dim oMtx As SAPbouiCOM.Matrix = form.Items.Item("37").Specific

                For i As Integer = 1 To oMtx.RowCount

                    Dim sItem As String = oMtx.GetCellSpecific("4", i).String

                    If sItem.Trim = "" Then Continue For

                    Dim sLineWhs As String = oMtx.GetCellSpecific("10", i).String

                    If sHeaderWhs <> sLineWhs Then Throw New Exception(String.Format("Warehouse not match. Line {0}", i))

                Next

Regards

Edy

Answers (1)

Answers (1)

edy_simon
Active Contributor
0 Kudos

Hi Nikhil,

What will happens when they are not the same ?

If you want to block the document, you can use SP Transaction Notification.

Regards
Edy

Former Member
0 Kudos

if they are not same we cant add the document

i know it can be done through SP Transaction Notification but i want the coding

so please post the coding to check it....i mean for loop or if condition which i want to use and how to use.

please help its urgent