Prompting a list of all customers defined in Sales Ledger (or Account Receivable as its also known) is simple from within any JBA RPG program.
A call to SL016 – JBA Customer Inquiry – pops a window up, you select you customer using various subset, selection functions and it will be returned to the calling program via the *LDA
Sample RPGLE code could be:
L#CUSN is the returned customer code defined at:
D L#CUSN 482 489
And you can display the customer selection window like this:
// If customer prompt has been requested, do so. // Note: oslsl* needs to be in *libl /free CUSN L#CUSN = CUSN?? IF *INKD; Out LDA; Call 'SL016'; // or whatever prototype you have created to call this RPG*PGM In LDA; CUSN?? = L#CUSN; //populate the return customer number EndIf;
Obviously the Selected customer code is returned via *LDA variable L#CUSN (defined earlier) and in this case you can see that the window looks like this:
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.
Single Black iSeries looking for a lasting relationship with the latest IBMi operating system
How to Install IBM Access Client Solutions (ACS)
IBM i Data Obfuscation – Making Data Foggy Murky and Squinty
How to rename Fresche (BCD) Presto Library – XL_PRESTO
What is AS400 modernization?
IBM i ACS 5250 EMULATOR FONT – and other ridiculous mumbo jumbo
IBM i SQL statement to convert or compare hundred year date format
How to compare ‘100 Year Date’ to a Timestamp – aka – Weird AS400 iSeries Date formats
Modernize AS400 iSeries Queries – Convert to IBM i SQL