SAP Function BAPI Scripting - Changing SD Sales Orders from Excel
ฝัง
- เผยแพร่เมื่อ 15 ก.พ. 2017
- In this video I am using FM BAPI_SALESORDER_CHANGE to update a sales order in ERP. I show how to update header, item and one more generic structure. This example explains how the process and the code works which will allow you to adapt this code to your own needs.
Excel sample: drive.google.com/file/d/0Bw1X...
SAP Functions basics: • SAP Function BAPI Scri...
SAP GUI and Functions playlist: • SAP GUI Scripting and ...
All my GUI scripting files on Github (in case you cannot access the above link):
github.com/nygma2004/km/tree/... - วิทยาศาสตร์และเทคโนโลยี
Thank you so much for sharing your knowledge. This is so very helpful and understandable for a person like me who doesn't know a single word of VB scripting. I was able to develop a function using the guidance in your videos and example sheets. Thank you again - keep up the good work :-)
Very helpful! I learned a lot with your video and I’m ready to try creating my first app using VBA. Thank you very much.
Great video, you should create more SAP scripting videos :)
excellent
Very helpful video. Thanks for sharing the excel file too.
Can you make a video on create material's from excel using bapi.
Bro how to change plant for sales order for multiple order in one upload form
Hi, I need an urgent help for creating a simple order change script for pricing date. Do you have any ready solution or can create one for me
Hello Csongor, if I process RFC Fm and parameter is table. Processing is fine. But when I press script button again the excel file just closes without any error or anything. Do you have any idea why this happens? Help will be highly appreciated
Hi , I am not able to get client data of material with Bapi BAPI_MATERIAL_GET_ALL, Will you please help me with this.My problem is I don't know how to get values from structures. In your examples you have used tables and only importing parameters.. please help..
Hi Csongor, I have a issue with my SAP GUI Scripting. I’m trying to update order text. The problem is that new text will overwrite old text while I want to keep existing text and add new text line. Can you give some advices to resolve it? Thank you
First you need to read the old text to Excel, add the old text and the new text together and write that back to Excel.
Very helpful video! Do you know what I might be doing wrong? "test" returns a null value. I can see the table structures in the local windows if I run through the column count, but row count is a null value for tPOITEM.Sub PO_Update(currentline As Long)Dim Items, Hist, x, y, n, Nextrow As Long
Dim PONumber, CompanyCode, GLAcct, VendNo As String
Dim pctcompl As Single
Dim tPOITEM, tPOHISTORY, tPOACCOUNT As SAPTableFactoryCtrl.Table
Dim test As String
Functions.Connection = objConnection'Call the Bapi Functions
Set Func_PO = Functions.Add("BAPI_PO_GETDETAIL1")
Set Func_GL = Functions.Add("BAPI_GL_ACC_GETDETAIL")
Set Func_Ven = Functions.Add("GET_VENDOR_DETAILS")' Call the PO from SAP
PONumber = Cells(currentline, 1).Value
Func_PO.Exports("PURCHASEORDER").Value = PONumber
test = Func_PO.Imports("POHEADER").Value(1)' Setup Tables
Set tPOITEM = Func_PO.Tables("POITEM")
Set tPOACCOUNT = Func_PO.Tables("POACCOUNT")
Set tPOHISTORY = Func_PO.Tables("POHISTORY")
'Count the number of PO Items
Items = tPOITEM.RowCount
I am using your excel file, but I cannot pass any value to the item tables in BAPI, do you know why ?
It is hard to tell from this one sentence. Are you creating the object for the table? Are you calling the BAPI at the end? Is your sales order editable?
I've figured it out. It's all fine in the script. The only reason that it was not working for me is that I was using GUI 750. So fyi as well.
Thanks for letting me. I see if I can get my hand on GUI 750 and retest this.
@@elvischen2668 How did you resolve the issue? Downgraded to 740? I am facing the same issue.
@@zeussuez7763 with the new release patch in 760, it works with the script now