cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro questions.

Former Member
0 Kudos

Hi All,

I am using a Adaptive RFC call which should populate some fields in a table in the backend. I am using InputFields to take the input and call the BAPI to populate. The strange thing is all the inputfields are appearing blank and read only when I launch my WD app. Any ideas why this may happen? I know from the tutorial 2 views are created: a search view and a results view, then some input is taken and sent to the backend and some data is pulled out and sent to the front end. But what I'm trying to achieve here is having like 7-8 inputfields which will go and populate a record in the the backend. I have mapped the context elements in the input Bapi. In the custom controller I have implemented the wdInit method to create a new element in the Bapi input node. I have implemented the executeBapi function which is called when I press my 'create' button and the onActionCreate is called. I still can't understand why the app has just blocked me from entering any input into the inputfields at all??

Any suggestions please?

Kunal.

Accepted Solutions (0)

Answers (1)

Answers (1)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I have had the same problem in the past. The problem is that the fields may not be mapped correctly, or you have not bound them correctly.

Check to make sure that you have something like this in the wdDoInit method of the Custom or Component Controller.

    Bapi_Gl_Acc_Getlist_Input input = new Bapi_Gl_Acc_Getlist_Input();
    wdContext.nodeBapi_Gl_Acc_Getlist_Input().bind(input);

Regards,

Rich Heilman

Former Member
0 Kudos

Apart from the above, if the input fields are of a structure, then you even need to initialize the corresponding proxy object in the BAPI's input object. e.g. if Bapi_Gl_Acc_Getlist has another structure for input and this is bound to a UI element, then this has to be initialized as

<i>Bapi_Gl_Acc_Getlist_Input input = new Bapi_Gl_Acc_Getlist_Input();

wdContext.nodeBapi_Gl_Acc_Getlist_Input().bind(input);</i>

<structure_class> struct = new <structure_class>();

input.set<structure_name>(struct);

This idea can be generalized as, if there is a datatype in the BAPI's input parameters apart from the standard data-types in Java (i.e.int, float, char, String...), then you explicitly need to create an object of the data-type and set it in the input.

Hope this helps,

Nirav

Former Member
0 Kudos

Following the above you are likely to get through. This is a common mistake that the correspondind proxy object in BAPI's input object is not "created"( for input structures ) or not "added" ( for input "tables" ).

If the input to model is a structure follow the above reply. If the input to model happens to be a table you need to code similarly as above except you use add instead of set.

input.add<Table_name>(new <Table_row_type>);