Re: Whole number quantities on customer orders

Kevin Fox <[email protected]>
Newsgroups gmane.comp.systems.as400.mapics
Message-ID <CALo5ePf5KEVMb3mBPk_0HwAQPaLK4EZzPRqGrPPk-ZHELc75mg@mail.gmail.com>
Not directly, but indirectly and it works.  For now (Emphasis !) the user
exits are compiled RPG, so the RPG has to call the routines.

See these articles on how to the calls from RPG to Java:

http://www.itjungle.com/mpo/mpo013102-story02.html.   Note the JNI

http://stackoverflow.com/questions/1286756/calling-a-remote-java-program-on-iseries-from-rpg

With C, C# if the compilers are installed on the iSeries, then you have
more options:

Here is an article:

http://www-01.ibm.com/support/docview.wss?uid=nas8N1016576

One favorite trick is that you can also call MS SQL stored procedures
direct from a iSeries RPG program such as an XA user exit.   As a result,
you can  us XA EI to update remote databases by passing parameters, the
stored procedure can execute JAVA and C# as well.

Enjoy




On Thu, Mar 12, 2015 at 6:29 AM, Josh Diggs <JDiggs-7y5+ka1ulstWk0Htik3J/[email protected]> wrote:

> Kevin,
>
> You said;
>
> > Although you can use any language, I had this done in RPG Free as most
> members of the list read/write RPG
>
> Is there a supported method to execute Java or C# code as part of the
> normal IDF user exit model?
>
> -----Original Message-----
> From: MAPICS-L [mailto:mapics-l-bounces-Zwy7GipZuJhWk0Htik3J/[email protected]] On Behalf Of Kevin
> Fox
> Sent: Wednesday, March 11, 2015 3:02 PM
> To: MAPICS ERP System Discussion
> Subject: Re: [MAPICS-L] Whole number quantities on customer orders
>
> Dave
>
> The best way to do this is very straight forward. If you had not put
> "...with a unit of measure of EA"  you could accomplish this with a simple
> 5 minute change to the attribute "Order Quantity"
> [orderQuantityUnitOfMeasure].
>
> Another option, is to use the Order Unit of Measure conversion which
> permits rounding rules.
>
> However, since you want to limit it to "EA" only and assuming you are not
> converting from other order units of measure, then I recommend that you use
> the customer order line item object and create a Edit Class.  In my case
> the system assigned the edit class C00001 which will be included in the
> User Exit UXPCDN1R when you activate the edit class.
>
> This is done in Enterprise Integrator.  You can create a new edit class to
> only allow whole numbers if Unit of Measure = EA.
>
> Here is some sample code.  Although you can use any language, I had this
> done in RPG Free as most members of the list read/write RPG.
>
> Note: I personally prefer JAVA or C# because those are the most common
> languages in Infor.
>
> Here is the edit class which EI Assigned the subroutine class code of
> C00001.
>
>      C* START USER PROTECTED SECTION  - SECN0R 0008.000 / *USR / C00001
>  bb01 /Free
>  bb01    If mcdcqcd = 'EA';
>  bb01       decplaces = mcdacqt - %int(mcdacqt);
>  bb01          If decplaces > 0.0000000;
>  bb01             w#erfl = *on;
>  bb01             wType = 'E';
>  bb01          EndIf;
>  bb01    ENDIF;
>  bb01 /End-free
>      C* FINISH USER PROTECTED SECTION - SECN0R 0008.000
>
> Thats it.  Should take you 5-10 min.
>
> This sends a message to the user telling them that the quantity requires
> whole quantities only.
>
> A nice enhancement would be to automatically do this and then place the
> message as a comment in the order line item comment, to advise the customer
> of any adjustment that was made on their orders.
>
> By doing simple edit class in EI, it now works no matter where you want to
> enter an order from:  (PowerLink, NetLink, MS Excel, ION BOD, EDI..etc.)
>
> That is the beauty of EI and SystemLink.  Simple edits, small amount of
> code, reused everywhere.
>
> There is an COM API available, however these should no longer be used
> because we are 15 years into the replacing of the COM RPG code base and in
> what is now a very short horizon (weeks, months) these will most likely be
> dropped by Infor.  As a result, any code written using these API's may be
> at risk.
>
> I hope this helps
>
> Kevin Fox
>
> On Thu, Mar 5, 2015 at 7:02 PM, Dave Lauderdale <[email protected]>
> wrote:
>
> > Is anyone aware of a way to limit customer order entry quantities to
> > whole numbers, particularly for items with a unit of measure of EA?
> >
> > David
> > --
> > This is the MAPICS ERP System Discussion (MAPICS-L) mailing list To
> > post a message email: MAPICS-L-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe,
> > or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/mapics-l
> > or email: MAPICS-L-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a
> > moment to review the archives at http://archive.midrange.com/mapics-l.
> >
> >
> --
> This is the MAPICS ERP System Discussion (MAPICS-L) mailing list To post a
> message email: MAPICS-L-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change
> list options,
> visit: http://lists.midrange.com/mailman/listinfo/mapics-l
> or email: MAPICS-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
> Before posting, please take a moment to review the archives at
> http://archive.midrange.com/mapics-l.
>
> --
> This is the MAPICS ERP System Discussion (MAPICS-L) mailing list
> To post a message email: MAPICS-L-Zwy7GipZuJhWk0Htik3J/[email protected]
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/mapics-l
> or email: MAPICS-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/mapics-l.
>
>
-- 
This is the MAPICS ERP System Discussion (MAPICS-L) mailing list
To post a message email: MAPICS-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mapics-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.