11-20-2007 10:15 PM
Hi Guys: I recorded a BDC program in SAP. I also RFC enabled it. Now I want to pass data from Excel to this program in SAP.
Can this be done?
thanks
Brian
11-20-2007 10:23 PM
Yes It should. As this FM is RFC enabled and you are calling it from EXCEL, it should work.
Regards,
Naimesh Patel
11-20-2007 10:23 PM
Yes It should. As this FM is RFC enabled and you are calling it from EXCEL, it should work.
Regards,
Naimesh Patel
11-20-2007 10:37 PM
Thanks Naimesh...would you happen to know VB script?
I have mapped each cell in excel to a field in the BDC program, but the data is not transmitted. It gives me an error.."Object Variable or With Block Variable Not Set"...
any idea?
thanks
11-20-2007 11:21 PM
This can be helpful to you:
http://help.sap.com/saphelp_46c/helpdata/en/76/4a42f7f16d11d1ad15080009b0fb56/content.htm
Regards,
Naimesh Patel
11-21-2007 3:49 PM
I think that was helpful..and I have seen that post before...thanks
I managed to connect to SAP from Excel,load the customer data via an RC Function Module, but I cant get the customer number in the return message from SAP.
Here is my VB code for the return part
' Get return parameters & display in excel
Set objReturn = objCreateCustomer.Imports("SUBRC")
ActiveSheet.Cells((vLastRow + vRows), 1) = objReturn.Value("MESSTAB")
Also, in my function module (EXPORT), I have
SUBRC LIKE SYST-SUBRC
And in my (TABLES), I have
MESSTAB LIKE BDCMSGCOLL
Any idea how to make the customer number appear as a return message from SAP?
thanks so much...almost there
Brian
11-21-2007 8:34 PM
I don't know how to loop thourgh the table which was returned by SAP to excel. Try with passing the Customer as also a Export parameter.
Read your message table in the RFC function module and pass the customer which was generated there to the export parameter. Try to give the message with this number. If you get the message then you will almost get the the success.
Regards,
Naimesh Patel
11-21-2007 8:25 PM
you have to read the bdcmsgcoll-MSGTYP = 'S' and in this one of the parameters will be the generated customer no.