06-19-2017 9:18 AM - edited 02-03-2024 9:15 PM
Hi all,
i'm trying to create an Inventory Transfer Request Draft via DI API but i can't, i always obtain a confirmed Inventory transfer request whenever i set properties to have a draft.
Following the SDK sample code i have to declare and assign
Dim oTSRequest As StockTransferoTSRequest = oSapB1Addon.oCompany.GetBusinessObject(BoObjectTypes.oInventoryTransferRequest)
Then i'm setting
If bDraft Then
oTSRequest.DocObjectCode = BoObjectTypes.oStockTransferDraft
Else
oTSRequest.DocObjectCode = BoObjectTypes.oInventoryTransferRequest
End If
Because looks like there isn't an object like InventoryTransferRequestDraft.
The code works except that it always create a confirmed Inventory Transfer Request whatever DocObjectCode i set.
Anyone has some hint regarding this problem?
Hi Massimiliano,
A sample how to create a draft from transfer request:
Dim oTransfer As StockTransfer = oCompany.GetBusinessObject(BoObjectTypes.oStockTransferDraft)
oTransfer.DocObjectCode = BoObjectTypes.oInventoryTransferRequest
oTransfer.Lines.ItemCode = "033445566"
oTransfer.Lines.FromWarehouseCode = "01"
oTransfer.Lines.WarehouseCode = "02"
oTransfer.Lines.Quantity = 1
If oTransfer.Add() <> 0 Then
MessageBox.Show(oCompany.GetLastErrorDescription())
End If
This code works fine on SAP 9.1 PL 13, so, I believe it works fine on 9.2.
Kind Regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer to SAP Note 2442090 which might be related to your issue.
Kind regards,
ANKIT CHAUHAN
SAP SME Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit,
thanks for the answer but it's not what i'm looking for.
I don't have any error, i can create the Inventory Transfer Request but not in draft whenever i set properties to have draft.
I always get confirmed Inventory Transfer Request. The note you provided regards Inventory Transfer (aka StockTransfer) not the Inventory Transfer REQUEST.
Anyway thanks for the suggestion.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.