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: 

Import attachments

Former Member
0 Kudos

Hi Team,

Happy Christmas to All.

I want to automatically import/upload attachments in SAP through T-code FB03.

I have recorded below script for uploading the attachments.

session.findById("wnd[0]").maximize

session.findById("wnd[0]/tbar[0]/okcd").text = "/nfb03"

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[0]/usr/txtRF05L-BELNR").text = "100111498"

session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").text = "3220"

session.findById("wnd[0]/usr/txtRF05L-GJAHR").text = "2015"

session.findById("wnd[0]/usr/txtRF05L-GJAHR").setFocus

session.findById("wnd[0]/usr/txtRF05L-GJAHR").caretPosition = 4

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[0]/titl/shellcont/shell").pressContextButton "%GOS_TOOLBOX"

session.findById("wnd[0]/titl/shellcont/shell").selectContextMenuItem "%GOS_PCATTA_CREA"

After this script line, i get the popup box which i have attached in JPG format for your reference.

Could any of you help me to get the complete script which will enable me to download 1 by 1 attachments on the basis of the information pulled from the excel through below script line

session.findById("wnd[0]/usr/txtRF05L-BELNR").text = "100111498"

session.findById("wnd[0]/usr/ctxtRF05L-BUKRS").text = "3220"

session.findById("wnd[0]/usr/txtRF05L-GJAHR").text = "2015"

Thanks for your support and will be waiting for better solution on this.

1 REPLY 1

Former Member
0 Kudos

hello Dan,

the solution to your problem can be found here:

Pasting filename in a panel using script | SCN

and here:

hope that helps,

Best Regards,

Darek