Author Topic: DATA Statement to Stack Keyboard Input  (Read 3166 times)

Chris Weitzel

  • Professional
  • ***
  • Posts: 30
DATA Statement to Stack Keyboard Input
« on: May 06, 2016, 03:23:40 PM »
In Prelude sales order entry, after each line item, I have to add a CPO "C Comment" line that contains the customer part number (CPN).  I don't want my user to have to keyboard that information each time, so I created a Process to do the work.

Since I prefer not to modify Prelude's code, my first thought was to simply plug comments with the CPN prior to going into Comments Edit.  Unfortunately Prelude clears that variable prior to displaying the screen.  My second option, which is working well, pulls the CPN  and then DATA stacks the keyboard input below, but with a minor problem - unwanted data.

Code: [Select]
DATA 'CPO','CPO',CUST.PN
To keyboard the input, I'd enter CPO <enter>, then the Comments Edits screen would display.  Comment Code would be auto-filled with CPO and the cursor would be sitting in WORK<75> (SE editor mode) to enter my comments.

So why am I stacking CPO 2x in the automated input?  If I don't, the screen stuffs CUST.PN into the Comment Code field on the screen.  Stacking CPO 2x puts one on ORDER.LINE and the second in Comment Code.  Then, CUST.PN is the first line of comments, but the residual effect of the second CPO is that it also appears on the second line of comments.  Very Weird.

Comment Code        XXXX     
Description                   
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Comment Code        CPO
Description           
130131-15             
CPO   
                 

This unwanted data isn't hateful because the user can easily delete it, but can it be prevented?  Is there a better approach to populating this data?

Chris




precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: DATA Statement to Stack Keyboard Input
« Reply #1 on: May 06, 2016, 04:08:47 PM »
I don't remember the specifics but I thought there was a user exit that you could fill in that would load up the work variables that SB+ uses for populating later lines?
-Kevin
Accidents "happen"; success, however, is planned and executed.