Need help in CIM program.

jchellap

Member
Hi All,

I am using the version MFG/PRO eb2.

I am validating the valid account combination through the standard below QAD program
like below
DEFINE VARIABLE m_flag AS LOGICAL NO-UNDO.
{gprunp.i "gpglvpl" "p" "initialize"}
{gprunp.i "gpglvpl" "p" "validate_fullcode"
"(INPUT poacct, input posub,
input pocc, """",
OUTPUT m_flag)"}.

if m_flag is "no" then it is an invalid account combination. I am getting it correct.
However, when it is invalid/in active I am writing it in the error file. However, it throws the error message like "ERROR: Invalid account code. Please re-enter" which I want to avoid.
Is there any other way to do this? Please help me. Thanks in advance :)
 

Attachments

  • 1.p
    40.1 KB · Views: 7
Last edited:

nineinch

New Member
Hi jchellap,

You could use this code to check for valid account-subaccount combinations.

Code:
find cr_mstr no-lock
where cr_domain = global_domain
  and cr_type = "SUB_ACCT"
  and cr_code = posub
  and poacct >= cr_code_beg
  and poacct <= cr_code_end no-error.
m_flag = avail cr_mstr.
 

Nikhil Limaye

New Member
The code should look something like this -
DEFINE VARIABLE m_flag AS LOGICAL NO-UNDO.
{gprunp.i "gpglvpl" "p" "initialize"}
{gprunp.i "gpglvpl" "p" "set_disp_msgs" "(input false)"}
{gprunp.i "gpglvpl" "p" "validate_fullcode"
"(INPUT poacct, input posub,
input pocc, """",
OUTPUT m_flag)"}.

Notice the line -
{gprunp.i "gpglvpl" "p" "set_disp_msgs" "(input false)"}

This line will prevent gpglvpl to display any error messages. I hope this helps. Please feel free to touch base with me if you need further help.
 
Top