[TITOP] 영수증 자동 인코딩으로 소장해드릴게요. - 니커에서 왔어요.

1435 단어 functionFilenull
FUNCTION i100_code() # 
   DEFINE l_year1    LIKE azn_file.azn02
   DEFINE l_month1   LIKE azn_file.azn04
   DEFINE l_day1     LIKE type_file.dat
   DEFINE l_code     LIKE type_file.num20
   DEFINE l_code1    LIKE type_file.chr20
   DEFINE l_tc_ccc01 LIKE tc_ccc_file.tc_ccc01
   DEFINE l_tc_ccc02 LIKE tc_ccc_file.tc_ccc01
   DEFINE l_nn       LIKE type_file.num20

   #   
   SELECT MAX(tc_ccc01) INTO l_tc_ccc01  FROM tc_ccc_file WHERE tc_ccc38 = g_tc_ccc.tc_ccc38
   IF cl_null(l_tc_ccc01) THEN
     LET l_tc_ccc01 = YEAR(g_tc_ccc.tc_ccc38) USING "&&&&",MONTH(g_tc_ccc.tc_ccc38) USING "&&",
                      DAY(g_tc_ccc.tc_ccc38) USING "&&","0001"
     LET l_tc_ccc02 = l_tc_ccc01[3,12]
     LET g_tc_ccc.tc_ccc01 = g_tc_ccc.tc_ccc01||l_tc_ccc02
   ELSE
     LET l_tc_ccc02 = l_tc_ccc01[7,16]
     SELECT CAST(l_tc_ccc02 AS int) INTO l_code from dual
     LET l_code = l_code+1
     LET l_tc_ccc01 = l_code
     LET g_tc_ccc.tc_ccc01 = g_tc_ccc.tc_ccc01||l_tc_ccc01
   END IF
   # 
   SELECT COUNT(*) INTO l_nn FROM tc_ccc_file WHERE tc_ccc01=g_tc_ccc.tc_ccc01
   IF l_nn > 0 THEN
      CALL s_errmsg('','','','sub-144',0)
   END IF
END FUNCTION

좋은 웹페이지 즐겨찾기