Hi all,
 
 Will appreciate your help on how to insert a space in between existing voucher 
numbers, e.g. from 'AP-OP0000001' to 'AP-OP 0000001'. My code is as follows but 
it doesn't work. Appreciate your valuable input. 
 
 static void remove_VoucherSpace (Args _args)
 {
     LedgerJournalTable      _ledgerJournalTable ;
     LedgerJournalTrans      _ledgerJournalTrans ;
     str                      txt;
     //txt ='APOP '
     ;
     ttsbegin;
     while select forupdate _ledgerJournalTrans where _ledgerJournalTrans 
.Voucher == 'APOP*'
     {
         if (LedgerJournalTable ::find(_ledgerJo urnalTrans. JournalNum) 
.JournalName like 'AP-OP')
         {
             _ledgerJournalTrans .Voucher = 'APOP ';
             _ledgerJournalTrans .update() ;
         }
     }
     ttscommit;
     info(strfmt( "Update completed as of %1", systemdateget( )));
 }
       

Reply via email to