on 12-09-2008 4:48 AM
Dear experts,
I am calling an BAPI from web dynpro java, but I encountered on problem. The length of the data field 'material' is 18. We test the BAPI in se37, and input the material with '80010509', everything is fine. But when we test it in web dynpro jave, and input the value '80010509', but reports one error, it need to input '0000000000080010509' to make it works properly.
The BAPI runs on ECC5, is there any way to solve this problem, many thanks!
Best Regards,
Hi,
The easiest way to handle this would be to use conversion routine for your input parameter in BAPI itself so that it would add those remaining 0s to the mataerial number. Ask an ABAPer in your team to help you with this on R/3 side itself.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
More clearly for ur question.
if(x.length()==8)
x="00000000000"+x;
if(x.length()==7)
x="000000000000"+x;
if(xI.length()==6)
x="0000000000000"+x;
if(x.length()==5)
x="00000000000000"+x;
.
.
.
.
if(x.length()==1)
x="000000000000000000"+x;
and now set the x value to the import parameters in teh RFC.
Thanks & regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do one thing.Already you might have binded the input field to a atrribute in context.
Get the attribute into string.
String x = wdcontext.currentcontextelement.get<attribute>
if(x.lenght() == 😎
{
x="0000000000"+x;
}
and set this particular value to the RFC import paramter.
ZBAP_XX n = new ZBAP_XX();
n.set<attribute>(x);
In the same way keep the conditions for all the inputs given by the user.
Check the length and append it with the number of zeros req and set it to the function module import parameter.
Thanks & Regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As for my experience with accessing rfc's u should send the field with leading zeros.
If u will try to fill the field in se37 with leading zeros it will work fine also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is the type of the field 'material' in BAPI? Is it 'char' or 'num'? Try with 'num'.
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try to set the input field length 18 on webdypro side.and see it works or not
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.