on 10-25-2006 9:57 AM
Hi i am new to webdynpro. I have some doubts on bapi.
I created models for bapi (ex. bapi_fl_list which has optional import, optional export and tables parameter.the bapi purpose is to retrieve all the records if no parameter is passed. in the webdynpro when creating model binding from model node i am choosing bapi's input-output- parameters and assinging the context to table control. but records are not retrieved. am i right in mapping the parameter of bapi(under root input - under input output - parameters). i created jco(selected dictionary data) too its fine. connections are ok. should i need to write the code to display the data. (ex. initializing bapi's) to retrieve the data.
Awaiting for early reply,
Ganesh.D
Hi,
Thanks for early reply. i did that application too already. all pdf describe the steps to do the partricular example. but not the usage of bapi(i mean which parameter to select or description of why we are selecting the bapi's input - output - params. and i said that i mapped context to table and binded the context to bapi's input - output - params. but i am not geting the output. are you clear about my question.
regards,
ganesh.d
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Suppose u want to display material list.
bapi :Z_Matnr.
In your View init method.u can write the code like this.
Z_Matnr_Input input = Z_Matnr_Input();
wdContext.node<Z_Matnr_Input>.bind(input);
Do u have any input params send here.
input.set<param>();
Otherwise u do not have params.
wdContext.current< Z_Matnr_Input()>.modelObject().execute();
wdContext.node<OutPutNode>.invalidate();
This will help.
Map the out node to you View.
Thanks,
Lohi.
Hi Lohi,
Many thanks to you. I tried it already but i hav confusion in concept. i tried to initialize the input. but it is not recognizing. i dont know which file to import. and i gave * to so that u it uses all. and another thing i am not geting that execute option when i try to enter modelobject.execute() option is not comming. thats why i am confused. wher i am wrong.
regards,
Ganesh.
Hi,
Bapi: bapi_projectdef_getlist
i need to display project definition and description in value help of a text box and return the project definition value in text box.
the fields are in bapi_projectdef_getlist_input -- output -- bapi_projectdef_getlist_output -- project_definition_list -- bapiprexp
hope its clear.
regards,
Ganesh.
Hi,
When you import BAPI into WD through Model U have to get the two model classes.
bapi_projectdef_getlist_input
and
bapi_projectdef_getlist_output
Here we have to use the only First class one only for sending the input and displaying output.
Here your ur not passing any params.
then in the bapi_projectdef_getlist_input ur getting your table node suppose some output.
this out put node map to the out put view.
In the init method u have to write the code like this.
Z_Matnr_Input input = Z_Matnr_Input();
wdContext.node<Z_Matnr_Input>.bind(input);
wdContext.current< Z_Matnr_Input()>.modelObject().execute();
wdContext.node<OutPutNode>.invalidate();
This might helps you .
If any issues post me.
Thanks
Lohi.
Hi Lohi,
I have 2 textbox with value help option. 1st text box has value help i successfully displayed the records as per your tips. In the second text box i hav another value help which displays the records based on the 1st text box. both retrieves records using different bapi's.
both bapi has key fields to compare. that is the first textbox element. for example emp id in first textbox. and department in the second textbox. the second value help should show only the records relevant to particulare emp id which is selected in the emp id value help. i hav two different custom controller. Help me out in this Lohi. i could't able map the value help attribute field to custom controller value attribute.
The only option is passing value of empid to second bapi. that can be done as follows.
.......bind(new bapi's)
//pass the parameter to bapi
input.setDeptid( <get 1st textbox value which is
selected from value help> ) remember the codes are in doInit(). i am unable to retrieve the value attribute of the view. the codes are done in second custom controller with respective to second textbox.
awaiting for your reply,
regards,
Ganesh.D
hi
This is PDF for accessing data from the back end go through this it should help you.
for ready use code and creation Jco and SLD help.
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
Othere wise let me know any issues post those.
Thanks
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.