cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Creating Inventory Transfer Request Draft in SAP 9.2 in SDK

0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member185682
Active Contributor
0 Kudos

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

0 Kudos

Thanks Diego, it works.

Best Regards.

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Refer to SAP Note 2442090 which might be related to your issue.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos

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.