cancel
Showing results for 
Search instead for 
Did you mean: 

Passing input field to a table through bapi

Former Member
0 Kudos

Hi All..

I am new to webdynpro. I want to pass values through input fields (user input) to a bapi, which stores it as a table. i get the following error :

"Adapter error in INPUT_FIELD "INPUT_FIELD1" of view "Z_BACKUP_14TH.MAIN": Context binding for property VALUE cannot be resolved: The COMPONENTCONTROLLER.1.BAPI_BCA_PAYMITEM_PO.1.CHANGING_1.1.PAYMENTITEMS node++ "

Please help out.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi bichoo...

you can follow the link below to get an idea of how a value is passed to he bapi......

[link|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600]

the error is due to some context binding which you have not properly done.

---regards,

alex b justin

Former Member
0 Kudos

Hi Alex..

ITill now when i used to bind the input field to a normal field of bapi, it was working fine, but now i am trying to attach it to a table which the bapi takes as input parameter.Here i am not able to figure out what has gone wrong.

Former Member
0 Kudos

hi bichoo.....

if you are passing a table to the bapi.......

then the structure of teh table you pass must be same as the structure in the bapi.

---regards,

alex b justin

Former Member
0 Kudos

hi again Alex,

Here's what actually happening.. I've interfaced BAPI's successfully before. I've done this by binding an InputField with the import parameters of a BAPI.

However, I'm now trying to get to a BAPI that requires a whole table as one of its parameters. For the normal import parameters, InputFields still work fine. When I map the same Inputfield with that of an attribute of the table, I get the above said error..

Therefore, can we pass values to a table using an Input Field? If we can't, what are the other options, besides using a direct table mapping. Moreover, is there a way to store values that can be used over other methods and actions (sorta like a global variable)? Sorry for this laundry list of errors, but hope the problem makes more sense now.

Former Member
0 Kudos

hi bichoo.......

you cannot pass an input field to a table....

you can pass values from one method to another by using the ikport export parameters that every method has on the top. a small tablular column or a table control.

the best method is to create attributes in the context and update it whenever needed.

there should be no situation where you are going to pass only one field as a parameter to a table.

---regards,

alex b justin

Former Member
0 Kudos

Hi Alex.

Thanks a lot fr the help. one last doubt can u plz tell me how i will pass the values of the input field to the table of the bapi. I m not able to do that..

Former Member
0 Kudos

hi bichoo........

i will give you a scenario.....

consider you are having an internal table with fields like po no, user who created it. but your input field will have only the po no.

in that case.

create a work area for that internal table.

let it be wa.

so:

wa-pono = <input field>.

append wa to itab.

now pass this itab to your bapi which will have only po no and not the user name ho created it.

---regards,

alex b justin

Answers (0)