Enter "/niw37n"
// Selection of Orders and Operations
Screen RI_ORDER_OPERATION_LIST.1000
Title "Please wait... Reading operations"
// Sample selection criteria
Set F[Period] "25.02.2000"
Set F[Period to] "31.12.2017"
Enter "/8" // Execute
// List of Orders and Operations
Screen SAPLSLVC_FULLSCREEN.0500
Title "Please wait... Reading operations"
Enter "==%PC" // Use command "==%PC", not "=%PC" !
// Alternative:
// Enter "/Menu=1,11,3"
// popup screen
Screen SAPLSPO5.0110
Title "Please wait... Reading operations"
// SAP displays the text in this general
// popup via an HTML control
// we can disable the control
// avoiding that the popup becomes visible
// for a short moment
Disable controls
// save Windows clipboard content
CopyText toText="cbbackup" -fromClipboard
// select "clipboard" option
Set R[In the clipboard] "X"
Enter
Screen SAPLSLVC_FULLSCREEN.0500
Title "Please wait... Reading operations"
// read the clipboard into a text variable
CopyText toText="temp" -fromClipboard
// restore the clipboard
CopyText fromText="cbbackup" -toCLipboard
// clear all values
Clear V[operations.*]
// skip 3 header rows
Set V[k] 4
// table row index
Set V[n] 0
label next_row
CopyText fromText="temp" toString="s" line="&V[k]"
if Q[ok]
// increase row index
Set V[n] &V[n] + 1
CopyText fromString="s" toText="cells"
CopyText fromText="cells" toString="operations.cell.aufnr.&V[n]" _
line=3 delimiter="|"
CopyText fromText="cells" toString="operations.cell.ktext.&V[n]" _
line=4 delimiter="|"
CopyText fromText="cells" toString="operations.cell.vornr.&V[n]" _
line=5 delimiter="|"
CopyText fromText="cells" toString="operations.cell.ltxa1.&V[n]" _
line=6 delimiter="|"
CopyText fromText="cells" toString="operations.cell.arbpl.&V[n]" _
line=7 delimiter="|"
CopyText fromText="cells" toString="operations.cell.sttxt.&V[n]" _
line=8 delimiter="|"
Set V[k] &V[k] + 1
goto next_row
endif
Set V[opcount] &V[n]
Return