Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Copy & Paste Value with VBA

Hello,

i want to copy the value of that field to a variable or directly into another field in SAP

The field with the value i want to copy is

SAP_Session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\TAB02/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_2:SAPLIQS0:7780/ctxtVIQMEL-COAUFNR")

and i want to fill that value in

SAP_Session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7740/subBELEG:SAPMQM00:3011/txtVIQMEL-REFNUM").Text = "VALUE HERE"

How could i copy the value above to clipboard or into a variable?

Thanks for any help!!

Former Member
replied

Nothing easier than that

SAP_Session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7740/subBELEG:SAPMQM00:3011/txtVIQMEL-REFNUM").Text =SAP_Session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\TAB02/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_2:SAPLIQS0:7780/ctxtVIQMEL-COAUFNR").Text

or

a_value = SAP_Session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\TAB02/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_2:SAPLIQS0:7780/ctxtVIQMEL-COAUFNR").Text

SAP_Session.findById("wnd[0]/usr/tabsTAB_GROUP_10/tabp10\TAB01/ssubSUB_GROUP_10:SAPLIQS0:7235/subCUSTOM_SCREEN:SAPLIQS0:7212/subSUBSCREEN_4:SAPLIQS0:7740/subBELEG:SAPMQM00:3011/txtVIQMEL-REFNUM").Text = a_value

no copy / paste needed

Edited by: Thomas Br on May 24, 2011 4:01 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question