Skip to Content

Problem Creating Inventory Transfer Request Draft in SAP 9.2 in SDK

Jun 19, 2017 at 08:18 AM


avatar image
Former Member

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

    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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
DIEGO LOTHER Jun 19, 2017 at 11:51 AM

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
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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Diego, it works.

Best Regards.

Jun 19, 2017 at 09:15 AM


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

Kind regards,


SAP SME Support

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.