bumbaermail
13th June 2018, 17:55
Hello,
How can I import records from overview session where the more than one records (multiple mark) are selected.
Please check the attached image for better understanding of scenario.
Thanks
sachinbaan
14th June 2018, 10:51
Hi,
If you are going to use the form command after selecting record then make use of do.selection() and you can store value of each record in a single string seperated by comma or pipe and export it.
For example
function extern export.currency()
{
o.currency = ""
do.selection(true, set.values)
export("o.currency", o.currency)
start.session(MODELESS, "tcflx0501m001", prog.name$, "tcmcs002.ccur")
}
function set.values()
{
if isspace(o.currency) then
o.currency = tcmcs002.ccur
else
o.currency = o.currency & "," & tcmcs002.ccur
endif
}
******************************************************************
Import session
before.program:
import("o.currency", o.currency)
new.currency = ""
new.currency = chr$(034)
for i = 1 to len(o.currency) step 1
single.char = o.currency(i)
if single.char = "," then
new.currency = new.currency & chr$(034) & chr$(044) & chr$(034)
else
new.currency = new.currency & single.char
endif
endfor
new.currency = new.currency & chr$(034)
query.extend.where("tcmcs002.ccur IN (" & new.currency & ")")
034 is ascii value of "
044 is ascii value of ,