patwanirav
13th March 2014, 06:05
when i run the advance payment request session (tppin4110m000) manually to transfer the invoice through session tppin4200m000, the sel.use.parent.selection() function works properly means it returns the true value.

But when i write the AFS for both tppin4110m000 & tppin4200m000 session, the sel.use.parent.selection() function gives me false value.

I am totally confused why sel.use.parent.selection() function not returning true when i go through AFS. Can anybody help me ???

AFS Code :
stpapi.put.field("tppin4110m000", "tppin010.cono", i.cono)
stpapi.put.field("tppin4110m000", "tppin010.cnln", i.cnln)
stpapi.put.field("tppin4110m000", "tppin010.sern", num)
stpapi.put.field("tppin4110m000", "tppin010.ofbp", "")
ret = stpapi.find("tppin4110m000", error.msg)
if ret = 1 then
ret = stpapi.mark("tppin4110m000", error.msg)
if ret = 1 then
stpapi.form.command("tppin4110m000", 2, "tppin4200m000", error.msg)
stpapi.set.report("tppin4200m000", "rtppin420001000", "D", error.msg)
stpapi.end.session("tppin4200m000")
endif
endif
stpapi.end.session("tppin4110m000")

Thanks in Advance :)

mark_h
13th March 2014, 19:36
What version of baan is this? I am not familiar with these session. From the looks of things you are running one session just to start another session to print a report. I would just call tppin4200m000 without the other session - assuming it is a main session.

patwanirav
14th March 2014, 05:14
@Mark_h : It is ERPLN FP9.

tppin4200m000 session updates the "transferred to invoicing" flag of the record maintained in advance payment request (tppin4110m000).

Now when i run this tppin4200m000 session from tppin4110m000, it will update the transferred flag of that particular record which is selected in tppin4110m000.

While i run only tppin4200m000 session, it will update the transferred flag in all the records of that contract & contract line.

Now one more thing FYI : when i run tppin4200m000 session as a main session, it will populate all the filters. but when i run this session from tppin4110m000 it will show me just few filters while others are invisible and populated automatically from the parent session which is (tppin4110m000).

dhruv_x0
14th March 2014, 13:06
Hi,

I haven't had contracts implemented in our system but i went through these session. I think you can directly execute tppin4200m000. There you can provide contract no and line for which you want to execute this. It will transfer it for that line only and not for whole(it seems in system). According to me it should work from there. No need to start it from tppin4100m000.


Thanks

patwanirav
15th March 2014, 06:22
Hi Dhruv,
I have multiple advance payment request for one contract & contract line, and i want to transfer only one advance payment request.

using tppin4200m000 as main session transfers all the payment request of that contract & contract line.

My requirement is to transfer particular payment request only not all, which is working fine if i run all session manually. But if i use AFS for that all session than that particular line is not transferring.

sachinbaan
21st March 2014, 10:48
hi,

As you said sel.use.parent.selection() is working properly , you should use
remove.mark(), it might resolve your problem.

Regards,
Sachin

patwanirav
22nd March 2014, 05:16
hi sachin,

By applying remove.mark() it will not transferring that particular advance payment request of contract and contract line. It will open the tppin4200m000 session with all the filtration criteria and transfers all the advance payment request of that contract and contract line.