Cim program.

Shubham Pipada

New Member
Hello all,
I am writing a CIM program. In that i have item,site,supplier,startdate as primary unique. So what i have to do is that when the input file to the CIM is provided, check if the records provided in the file with the primary unique combination already exists in the table. If the startdate provided in the file falls into the range of start and expire date of already existing record, then give error. But whats happening is that the validation is failing since for the comparision the recods from the file itself are not getting stored in the table unless all data from file is read. Please find the attached code for cim. In that xxgscmsd_det is the table where i need to store the data. I hope the program helps.
What i understood from the program is that (on referring) the find first present is failing since the record is only not getting stored in the table so it cant compare to other records. So can someone please help me resolve this!

Many thanks in advance.
 

Attachments

  • cim.txt
    7.8 KB · Views: 39
the first, you should write code to dynamic output to cim file dependt on diferenct conditon, because mabybe differnet conditon , the cim file is different .
the second, you should call QAD standard CIM to process cim, the benefic is origial function can control and ensure the error data will not be saved .
 
Hello all,
I am writing a CIM program. In that i have item,site,supplier,startdate as primary unique. So what i have to do is that when the input file to the CIM is provided, check if the records provided in the file with the primary unique combination already exists in the table. If the startdate provided in the file falls into the range of start and expire date of already existing record, then give error. But whats happening is that the validation is failing since for the comparision the recods from the file itself are not getting stored in the table unless all data from file is read. Please find the attached code for cim. In that xxgscmsd_det is the table where i need to store the data. I hope the program helps.
What i understood from the program is that (on referring) the find first present is failing since the record is only not getting stored in the table so it cant compare to other records. So can someone please help me resolve this!

Many thanks in advance.
I am seeing there is an error that will make your process fail in the first loop within MAINLOOP. You are trying to search pt_mstr and likely you do not have an item pt_mstr where pt_part = "Item Number". You should either first eliminate that first line (title row) or handle a for first.... no-error: end.

As is, the first record fails and is breaking your program.

Move the "if tt_part = "item number" before the for first but for shure there the "no-error" is missing as any invalid "part" will break your code.
 
Top