cancel
Showing results for 
Search instead for 
Did you mean: 

REG :

Former Member
0 Kudos

Hello All,

Pl. help me in passing the values in abstract list from webdynpro.Pl. find the follwing code.My concern is that i have to pass two values in same field of structure.I am doing as follows but i am not able to achieve this.

AbstractList partlist_num = new Bapiadtel.Bapiadtel_List();

Bapiadtel obj_num = new Bapiadtel();

obj_num.setTelephone(mob_number);

obj_num.setR_3_User("3");

obj_num.setTelephone(tel_number);

obj_num.setR_3_User("1");

partlist_num.add(obj_num);

input.setIt_Bapiadtel(partlist_num);

Regards,

Anupama

Accepted Solutions (1)

Accepted Solutions (1)

susmita_panigrahi
Active Participant
0 Kudos

Hi

As per my understanding when you will set two value in the same import parameter of BAPI. then in the execution time of BAPI it will take the latest value of the field(In your case it will take 1 instead of 3).

Thanks

Susmita

Former Member
0 Kudos

Hi All,

Susmita,

ya its taking in the same way,So any solutions...

Idhaya R,

ya we are passing in two rows in backend.

Aviad,

the provdied code is also not working.I have tried this snippet also.

Murali,

Using this it wont add two rows in teh sam estructure.

Kindly Advise me how to do

Regards,

Anu

Former Member
0 Kudos

How do you fill the same data when you test the RFC in SE37?

Former Member
0 Kudos

Actually while executing in se37 we are adding one more line and we are entering the telephone numebr and mobilenum respectively.Pl. find below the explanation for the same.

Fields : Telephone Number and Mobile Number

Case 1 : Telephone number entered from frontend

 Acc to RFC, it should go to telephone field in Bapiadtel structure. Also R3_User field has to be entered which should be u201C1u201D when it is Telephone number

Case 2 : Mobile number entered from frontend

 Acc to RFC, it also should go to telephone field in Bapiadtel structure. Also R3_User field has to be entered which should be u201C3u201D when it is Mobile number.

The both entries have to go to backend at the same time.

Now our concern is we canu2019t enter two different values in same attribute at the same time. Is there any way to enter two different values in same parameters of BAPIADTEL Structure.

Because what i am doing by taht its taking recent one.How to enetr two rows in structure?

Former Member
0 Kudos

What is wrong with code snippet i gave you?

It doesn't work or you get errors?

Former Member
0 Kudos

Hi Anupama ,

Try to write like this..

AbstractList partlist_num = new Bapiadtel.Bapiadtel_List();

Bapiadtel obj_num = new Bapiadtel();

Bapiadtel obj_num1 = new Bapiadtel();

obj_num.setTelephone(mob_number);

obj_num.setR_3_User("3");

partlist_num.add(obj_num);

obj_num1.setTelephone(tel_number);

obj_num1.setR_3_User("1");

partlist_num.add(obj_num1);

input.setIt_Bapiadtel(partlist_num);

Try using this .. In case of anyproblems kindly revert..

Best Wishes

Idhaya R

Former Member
0 Kudos

Aviad,

its not giving any errors but its taking recent isnerted value.

Former Member
0 Kudos

Are you sure you have bind the RFC to the node? and that all other values are ok?

Do you have any return structure in the RFC? (such as BAPIRET2)

Maybe you will see the error code there?

Former Member
0 Kudos

finally it solved my problem,now its going in twodiffrent rows.:)

thnks Idhaya R.

Regrads,

Anu

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

you can create two seprate instances for your Bapi node and then set different values to the same field.

Bapi_xxx abd = new Bapi_xxx();

abd.setusrname("india");

bind the data to the node

Bapi_xxx bgf = new Bapi_xxx()

bgf.setusrname("uk");

bind the data to the node

Former Member
0 Kudos

try this:


AbstractList partlist_num = new Bapiadtel.Bapiadtel_List();

Bapiadtel obj_num = new Bapiadtel();
obj_num.setTelephone(mob_number);
obj_num.setR_3_User("3");
partlist_num.add(obj_num); 

obj_num = new Bapiadtel();
obj_num.setTelephone(tel_number);
obj_num.setR_3_User("1");
partlist_num.add(obj_num);
 
input.setIt_Bapiadtel(partlist_num); 

Former Member
0 Kudos

Hi Anupama,

How will execute the bapi in the backend. Will you pass two rows in the structure or only one row containing two values for the R3 User field . Can you tell me how are passing inputs in the backend??

Best Wishes

Idhaya R