Skip to Content
0
Former Member
Dec 26, 2011 at 05:15 AM

Needed help in FMS

161 Views

Dear Experts,

I have made an FMS to get Sales Opportunity no in Sales Quotation row level. Actually there is no direct link between Sales Opportunity & Sales Quotation in B1, after the Quotation get saved in the system which is been created from the Opportunity it stores the information of link doc type & doc no in Opportunity table - OPR1.

But i need a Opportunity no before the Quotation is saved for that i have an FMS which has an error of date/time out of range

for the first query:

FMS-1:

select a.OpprId from OOPR a

left join OPR1 b on a.OpprId=b.OpprId

left join OQUT c on b.OpenDate=c.DocDate

where a.CardCode=$[OQUT.CardCode] and b.OpenDate= $[OQUT.DocDate]

Then i created the second Query:

FMS-2:

select a.OpprId from OOPR a

left join OPR1 b on a.OpprId=b.OpprId

left join OQUT c on b.OpenDate=c.DocDate

where a.CardCode=$[OQUT.CardCode] and b.OpenDate= convert(datetime, $[oqut.docdate], 103)

it has started giving an error of Internal error (-1003)

Kindly suggest what are possible change can be done to over come from this issue.

Thanks in Advance...

Regards

Krishna