EWM: Function or program for changing goods received date

Hima sree 0 Reputation points
2023-03-31T06:14:43.9366667+00:00

Does someone know a function, class, method or a report to change the goods receipt date in SAP EWM?

I have already searched with google and in SAP EWM system. But without success!

Any help would be very appreciated. :)

Best regards.

Developer technologies | .NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Kumar 0 Reputation points
    2023-04-03T04:46:41.25+00:00
    
    
    After hours on hours of googling, I fail to find the solution to my problem.
    
    Goal Create a simple Excel application to post "return delivery" for multiple material documents in SAP.
    
    My assumption is that I would need to utilize the BAPI "BAPI_GOODSMVT_CREATE".
    
    Firstly I initiate the SAP Logon Prompt:
    
    '------'
    'Logon to SAP
    '------'
        Dim sapConn As Object                                ' Declare variant
        Set sapConn = CreateObject("SAP.Functions")          ' Create ActiveX object
        
        With sapConn.Connection
            .Destination = "somehost"                             
            .ApplicationServer = "someserver.com"      
            .Client = "someclient"
            .User = "someuser"                              
            .Password = "somepassword"                       
            .SystemNumber = "somesystem"                      
        End With
        
        If sapConn.Connection.Logon(1, False) <> True Then 'Try Logon
            MsgBox "Cannot Log on to SAP"
        End If
    Then I define the function
    
    '------'
    'Define function
    '------'
        Dim objRfcFunc As Object
        Set objRfcFunc = sapConn.Add("BAPI_GOODSMVT_CREATE")
    Now, here is where it all stops. I've used this method to run other BAPI's by populating it through worksheet-iteration (looking at cell values).
    
    Lastly (at the end of the function) I do the error handling:
    
    If objRfcFunc.Call = False Then
       MsgBox "Call failure" + objRfcFunc.Exception
    End If
    What I truly fail to understand, is which fields are the minimum required in order to execute the BAPI? What BAPI field sto I need to populate?
    
    If I do it manually in SAP through MIGO transaction, I require: Material Document and Material Document Year.
    
    Function I selected are "Return Delivery" -> "Material Document".
    
    Obviously I lack some code to fill the data, but I simply do not know where to start out. I've worked through this post, without any luck. Any help or pointers to the right direction are greatly appreciated.
    
    aba
    
    

    You want to know about the related topic plz visit it....

    What is SAP PM https://hkrtrainings.com/what-is-sap-pm
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.