-1
書式問題で値を渡すことに問題があります。 私はif ValidateMMonCheque <> MM
の部分のために私のコードに私のPreEditedCheque
を渡す問題を持っているので、私はコードに入れました。 if length(RawChequenumber) = 15
の出力には、あなたがチェック数が5文字のフィールドではゼロで左側にパディング持っているされて求めている何1桁の代わりに、00001(例)数値を数値形式で渡す
MM = HostGetFLD('','MM')
YY = HostGetFLD('','YY')
PreEditedCheque = substr(RawChequenumber,11,5)
ValidateMMonCheque = substr(RawChequenumber,7,2)
if ValidateMMonCheque <> MM Then *From this statement*
Do
PreEditedCheque = substr('00000',1,5) *This part where those 0 can't be properly shown if pass to the next statement*
EditedCheque = '00'||'2'||'0'||YY||MM||'00'||PreEditedCheque
rc = message(2,2,EditedCheque)
End
if length(RawChequenumber) = 15 Then
EditedCheque = '00'||'2'||'0'||YY||MM||'00'||PreEditedCheque + 1 *Second statement if <>MM ran, this part, the PreEditedCheque will be not in 00001, it will be 1.
rc = PanSetCtlData('PREVIEW',EditedCheque)
入力は何ですか、あなたはどんな出力を得ていますか? –
出力が00001(5桁)でなく1(ちょうど1桁)であると予想されますが、入力は実際にrawchequenumber変数から渡されます。 –
問題は2番目のステートメントの '+'で、これは数値式に変換されます.Ross関数を使うというロスの提案はうまくいくはずです –