× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

Conversion routine in Enquiry

  • bsolomon
  • Topic Author
  • Offline
  • New Member
  • New Member
More
17 years 2 months ago #831 by bsolomon
Conversion routine in Enquiry was created by bsolomon
hi everyone,



i have written a conversion routine attached to an enquiry,. The routine returns the value zero through O.DATA upon specific criteria. The value for other fields on the report however becomes zero when the routine is attached to the enquiry though they have other values in the respective table. can anyone help me with this.





The routine is below




FONT size=2>
0001 SUBROUTINE CUST.PAR

0002 $INSERT I_COMMON

0003 $INSERT I_EQUATE

0004 $INSERT I_ENQUIRY.COMMON

0005 $INSERT I_F.LD.LOANS.AND.DEPOSITS

0006

0007 FN.PD = 'F.PD.CUSTOMER'

0008 F.PD = ''

0009 CALL OPF(FN.PD,F.PD)

0010 FN.LD = 'F.LD.LOANS.AND.DEPOSITS'

0011 F.LD = ''

0012 CALL OPF(FN.LD,F.LD)

0013

0014 * DEBUG

0015 CUS.ID = 0

0016 CUS.ID = O.DATA

0017 R.RECORD = ''

0018 Y.PD.ID = 0

0019 Y.PAR = 0

0020 READ R.RECORD FROM F.PD , CUS.ID THEN

0021 Y.PD.ID = R.RECORD

0022 END

0023

0024 IF Y.PD.ID NE 0 THEN

0025 LD.ID = 0

0026 LENPD = 0

0027 LENLD = 0

0028 Y.PAR = 0

0029 LENPD = LEN(Y.PD.ID)

0030 LENLD = LENPD - 2

0031 LD.ID = RIGHT(Y.PD.ID,LENLD)

0032 CALL F.READ(FN.LD,LD.ID,R.LD.REC,F.LD,ERR)

0033 Y.PAR = R.LD.REC

0034 O.DATA = Y.PAR

0035 END ELSE

0036 Y.PAR = 0

0037 O.DATA = Y.PAR

0038 END

0039

0040 RETURN






Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #832 by daguma
Replied by daguma on topic RE: Conversion routine in Enquiry
Hey!

The variable R.RECORD is part of I_ENQUIRY.COMMON, so you should try another name instead of that. Try to add a 'Y' in front of the name so is not already used.

To continue with the standard, use F.READ instead of that READ you have there.

And donĀ“t use: R.LD.REC, use R.LD.REC, so in that case: R.LD.REC

Try those changes please.

cheers

Please Log in or Create an account to join the conversation.

More
17 years 2 months ago #833 by malai
Replied by malai on topic R.RECORD
Yes, the culprit is the common variable R.RECORD.



T24 does't have any standard notification for common variables. Its very hard to identify those unless you are good in common insert files.



So whenever you do coding always concat your favourite character as a prefix for your local variables.



Temenos developers always concatenate 'Y' as prefix.






Keep posting and make this community active|Thanks

Please Log in or Create an account to join the conversation.

  • bsolomon
  • Topic Author
  • Offline
  • New Member
  • New Member
More
17 years 2 months ago #834 by bsolomon
Replied by bsolomon on topic conversion routine in enquiry


Hey !

Thanks alots ,

After concatenating Y.R.RECORD it worked perfect.



cheers.


Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds