Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI - strange problem

Former Member
0 Likes
794

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

6 REPLIES 6
Read only

Former Member
0 Likes
737

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

Read only

0 Likes
737

Thanks Bala. But I want to achieve it from SAP side, the client doesnt want to change anything on Java side.

Read only

0 Likes
737

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

Read only

Former Member
0 Likes
737

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...

Read only

Former Member
0 Likes
737

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??

Read only

Former Member
0 Likes
737

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??