on 09-13-2006 2:16 PM
I am trying to call the BAPI_PO_CHANGE using the .NET Connector 1.x.
I have been able to connect and bind the BAPI_PO_DETAILS to a datagrid,etc.
Now I want to be able to mark the delv_completed indicator for a PO Item.
The code below executes and the return msg from the BAPI call tells me that "Standard PO 4500117558 changed".
However, the Delivery Complete indicator is not checked.
Dim proxy As New SAPProxyT3.SAPProxyT3
'establish conntection to SAP using the SAPLogon Class
Dim logon As New SAP.Connector.Destination
logon.Username = "*****"
logon.Password = "****"
logon.SystemNumber = "**"
logon.Client = "***"
logon.AppServerHost = "******"
logon.LogonGroup = "*******"
proxy.Connection = New SAP.Connector.SAPConnection(logon)
'The PO Items ...
Dim poItem As New SAPProxyT3.BAPIMEPOITEM
poItem.Deliv_Compl = "X"
poItem.Po_Item = "10"
Dim poItemTable As New SAPProxyT3.BAPIMEPOITEMTable
poItemTable.Add(poItem)
'The PO Items change...
Dim poItemChange As New SAPProxyT3.BAPIMEPOITEMX
poItemChange.Deliv_Compl = "X"
poItemChange.Po_Item = "10"
Dim poItemChangeTable As New SAPProxyT3.BAPIMEPOITEMXTable
poItemChangeTable.Add(poItemChange)
'The Return Table
Dim retTable As New BAPIRET2Table
proxy.Bapi_Po_Change(Nothing, Nothing, Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "4500117558", Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, _
Nothing, poItemTable, poItemChangeTable, Nothing, Nothing, Nothing, Nothing, _
Nothing, Nothing, Nothing, Nothing, Nothing, retTable)
'This trace returns with "Standard PO 4500117558 changed"
Trace.Write(retTable(0).Message.ToString)
Trace.Write(retTable(0).Message_V1.ToString)
Trace.Write(retTable(0).Message_V2.ToString)
Trace.Write(retTable(0).Message_V3.ToString)
Trace.Write(retTable(0).Message_V4.ToString)
Dim commitReturn As BAPIRET2
proxy.Bapi_Transaction_Commit("", commitReturn)
Trace.Write(commitReturn.Message)
proxy.Connection.Close()
Message was edited by: Kelly Joe
I found the problem with this. I was setting the wrong field. It should have been.
poItemChange.No_More_Gr = "X"
Instead of
poItem.Deliv_Compl = "X"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kelly,
I find out that right now u r using .Net connector 1.0,,
why don't you upgrade it into 2.0 version.
It's easier.
And you don't have to get mixed up like that.
Hopefully it can help you
Best regards,
Niel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.