VishalMistry
18th April 2013, 08:34
Hi,

I want to execute session tcmcs0423m000 (Print Item groups) through it's AFS. I have already generated it's AFS tcmcsf0423m000 and incorporated in my script and written following code:

tcmcsf0423m000.put.Item_Group.citg.f(citg.f)
tcmcsf0423m000.put.Item_Group.citg.t(citg.t)
tcmcsf0423m000.set.report("tctri999901000", "D", error)
tcmcsf0423m000.Print(error)

When I see process browser, session tcmcs0423m000 is loaded in background but the report is not coming on screen.

Can anybody help in this regards, how can I pass item group range (item group from / item group to) select default report and call it's print button programmatically.

Vishal

MilindV
18th April 2013, 14:17
Vishal,

check the error value in set.report function.

i think, you should be providing report arg as below.

tcmcsf0423m000.set.report("rtctri999901000", "D", error)

starting character 'r' is missing in report name argument.

Hope this resolved your problem.

Thank you,

VishalMistry
19th April 2013, 14:08
Vishal,

check the error value in set.report function.

i think, you should be providing report arg as below.

tcmcsf0423m000.set.report("rtctri999901000", "D", error)

starting character 'r' is missing in report name argument.

Hope this resolved your problem.

Thank you,


Hi,

After following your suggested step, the error is changed now. Pl see my below code:

tcmcsf0423m000.put.Item_Group.citg.f(citg.f)
tcmcsf0423m000.put.Item_Group.citg.t(citg.t)
tcmcsf0423m000.set.report("rtctri999901000", "D", error)
error = tcmcsf0423m000.get.last.error()
tcmcsf0423m000.Print(error)

Now I am getting error "Report name not filled error", whereas you can clearly see I have used set.report function to set report name. Any clue why I am getting this error ?

Vishal

mark_h
19th April 2013, 15:39
Are you sure that is the right report name? I would expect the report name to be rtcmcs042301000.

If I was writing one on my 4c4 session it would look like:

tcmcsf0423m000.put.Item_Group.citg.f(citg.f)
tcmcsf0423m000.put.Item_Group.citg.t(citg.t)
tcmcsf0423m000.set.report("rtcmcs042301000", "D", error)
error = tcmcsf0423m000.get.last.error()
tcmcsf0423m000.continue(error)


I think 99% of the time I use continue versus the print.report command. As a mtter of fact the library my system generated did not even have that print.report command in it.