Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC Program in SAP with Excel

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

Yes It should. As this FM is RFC enabled and you are calling it from EXCEL, it should work.

Regards,

Naimesh Patel

6 REPLIES 6

naimesh_patel
Active Contributor
0 Kudos

Yes It should. As this FM is RFC enabled and you are calling it from EXCEL, it should work.

Regards,

Naimesh Patel

0 Kudos

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

0 Kudos

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

you have to read the bdcmsgcoll-MSGTYP = 'S' and in this one of the parameters will be the generated customer no.