Hey All,
Does anyone know how I can update the TrgetEntry and TargetType fields from the SDK for a sales order? I can update the baseentry and basetype fields. Shouldn't I also be able to update the target fields?
I really need to update these fields. Can I use SQL to do it directly if it is not possible through the API?
Request clarification before answering.
Hi there,
May I know what is the purpose to update the TrgetEntry and TrgetType for your Sales Order?
If you create a DO or A/R Invoice base on the Sales Order, both the target field should be updated unless you create your DO or A/R Invoice using SDK.
If you use SDK to create the DO or A/R Invoice, you can set its' baseref and basetype to your desire Sales Order for both DO and A/R Invoice. Thus, your Sales Order should have Target fields updated.
Hope this help....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys for the informative replies. The purpose for trying to do this is the client wants a sales order and purchase order to be directly linked using the base document and target document menu items on the tool bar. I can set the base fields on the PO and that works great linking back to the sales order. I guess I was hoping I could set the target doc fields on the sales order as this would then allow the user to click the target doc menu item to bring up the related PO. I told them I did not think it was possible through SDK. We will have to go with the alternative method of UDFs.
Does anyone know how i could fire the same logic that is presented to the user when they click the target doc menu item? (IE open the correct purchase order)
Hi Curtis,
What we do is to use the UI API and make the same as you would do it by hand using the B1 GUI.
So:
In the click event, take the PO number and store it. Then execute:
Me.SBOAplication.ActivateMenuItem("2305")
On the MenuEvent, catch the 2305, and if you have a PO stored, set the number in the edittext, and click the find button:
Dim oEditText As SAPbouiCOM.EditText
oEditText = Me.SBOAplication.Forms.ActiveForm.Items.Item("8").Specific
oEditText.Value = NumPedidoCompra
Me.SBOAplication.Forms.ActiveForm.Items.Item("1").Click()
Hope helps,
Ibai Peñ
thank you for raise this question.
We have similar challenge and will resolve this problem with a popup box that give user choice to pick delivery/AR-invoice or Purchase order as target document while item on tool bar.
Antoher option to be considered would be to create a button in sales order that link to the target PO. This way business logic in SBO is the same.
-Geir
Hi Curtis,
The TrgetEntry and TargetType fields are not exposed in the business object. This means SAP does not allow access to these fields. This is SAP design - used for internal system functionality. Thus you are not allowed to add/update/delete these fields.
Using SQL to directly manipulate these fields are prohibited and if you do go that route, SAP will not support your installation.
What you can do is create UDF's that can hold the values that you wish to enter into these fields. You can then use the UDF's to run the logic you would have run on the original fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 12 | |
| 8 | |
| 8 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.