Skip to Content
avatar image
Former Member

Problem Creating Inventory Transfer Request Draft in SAP 9.2 in SDK

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    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
    	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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 19, 2017 at 09:15 AM

    Hi,

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

    Kind regards,

    ANKIT CHAUHAN

    SAP SME Support

    Add comment
    10|10000 characters needed 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.