Application Development and Automation 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: 
Read only

BDC Program in SAP with Excel

Former Member
0 Likes
1,016

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
Read only

naimesh_patel
Active Contributor
0 Likes
981

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

Regards,

Naimesh Patel

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

6 REPLIES 6
Read only

naimesh_patel
Active Contributor
0 Likes
982

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

Regards,

Naimesh Patel

Read only

0 Likes
981

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

Read only

0 Likes
981
Read only

0 Likes
981

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

Read only

0 Likes
981

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

Read only

Former Member
0 Likes
981

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