2 weeks ago - last edited 2 weeks ago
How do I SAP script to copy and paste, so it can go into excel as Ctrl + C, Ctrl + V doesn't record any sort of actions when recording a macro. I have 6 columns to copy the entirety of:
- Document
- Cust. No.
- Customer Name
- Doc. Date
- Net Value
- Internal Comment
session.findbyID("wnd[0]").maximize
session.findbyID("wnd[0]/tbar[0]/okcd").Text = "zvak"
session.findbyID("wnd[0]").sendVKey 0
session.findbyID("wnd[0]/usr/chkP_ANG").Selected = False
session.findbyID("wnd[0]/usr/chkP_GUT").Selected = False
session.findbyID("wnd[0]/usr/ctxtS_VBELN-LOW").Text = ""
session.findbyID("wnd[0]/usr/ctxtS_KUNNR-LOW").Text = ""
session.findbyID("wnd[0]/usr/chkP_GUT").SetFocus
session.findbyID("wnd[0]").sendVKey 8
session.findbyID("wnd[0]/tbar[1]/btn[33]").press
session.findbyID("wnd[1]/usr/subSUB_CONFIGURATION:SAPLSALV_CUL_LAYOUT_CHOOSE:0500/cntlD500_CONTAINER/shellcont/shell").setCurrentCell 33, "TEXT"
session.findbyID("wnd[1]/usr/subSUB_CONFIGURATION:SAPLSALV_CUL_LAYOUT_CHOOSE:0500/cntlD500_CONTAINER/shellcont/shell").selectedRows = "33"
session.findbyID("wnd[1]/usr/subSUB_CONFIGURATION:SAPLSALV_CUL_LAYOUT_CHOOSE:0500/cntlD500_CONTAINER/shellcont/shell").clickCurrentCell
session.findbyID("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[0]/shell").SelectAll
TIA.
Hi. Are you trying to input data into SAP or extract SAP data into Excel?
Excel into SAP can just be done by name the cell as a variable and using that variable for a field in SAP (as below)
objSess.findById("wnd[0]/usr/ctxt*PROJ-PSPID").Text = Var1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.