‎2010 Jun 02 6:33 AM
Hi Friends,
I have a custom BAPI, using which I am extracting sales order data from SAP. This BAPI is being called from a Java application using JCO. The Java application needs sales order number, sales order item, etc without leading zero's.
But, even after using conversion routine CONVERSION_EXIT_ALPHA_OUTPUT, the Java application is still getting everything with leading zero's even though on SAP side(while debugging), I dont see any leading zeros.
I even tried using SHIFT statement, but same result
Anyone, have any idea what could the problem be? I am somewhat frustrated:-(
Thanks for all your help.
Regards
JB
‎2010 Jun 02 6:39 AM
James,
Probably you need to remove leading zeros from java side.
check these links
/thread/5391406 [original link is broken]
http://www.stylusstudio.com/xsllist/200301/post51160.html
http://www.experts-exchange.com/Programming/Languages/Java/Q_23709161.html
Thanks
Bala Duvvuri
‎2010 Jun 02 6:44 AM
Thanks Bala. But I want to achieve it from SAP side, the client doesnt want to change anything on Java side.
‎2010 Jun 02 7:14 AM
As SAP is populating the filed with out leading zeros we can't do anything. I think in Java side we can check the filed which carries the value.
--
Reddy
‎2010 Jun 02 5:01 PM
Convert your BAPI to output char fields, populated them with document and item numbers, then do "shift (fieldname) left deleting leading '0'. Numeric fields should left zero fill in a sane world, don't you think? Char fields on the other hand should naturally have trailing blanks...
‎2010 Jun 02 6:45 PM
That is what I am actually doing..created output structure as CHAR type, then using SHIFT LEFT DELETING LEADING '0'. But, the problem persists.
Do you think it is some buffering or cache issue on Java side, since I changed the structure on SAP side??
‎2010 Jun 02 6:49 PM
That is what I am actually doing..created output structure as CHAR type, then using SHIFT LEFT DELETING LEADING '0'. But, the problem persists.
Do you think it is some buffering or cache issue on Java side, since I changed the structure on SAP side??