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@xxxxxxxxxxxx> 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@xxxxxxxxxxxx] 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 <DLAUDERDALE@xxxxxxxxxxx>
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@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx 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@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
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@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mapics-l
or email: MAPICS-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mapics-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.