on 07-31-2006 12:00 PM
Hi all,
In my application, I am using 2 Bapis. The first one just for displaying data with all material numbers. The second Bapi is for inserting the Sales data to database. Both of them have Material number. Now from the first Bapi, I displayed all the materials in a dropdown list. Now when i select one value from Dropdown list, and I fill some values for Sales data, then the data has to be stored in database along with the material number.I displayed the material number of first Bapi in my View and the remaining feilds of second (Sales)Bapi. How to do this?
Help is highly appreciated.
Hi
Try this
IPrivate<ViewName>.I<Name>Node nodeCheck=wdContext.node<Name>();
int size=nodeCheck.size();
for(int i=0;i<size;i++){
IPrivate<ViewName>.I<Name>Element elementCheck=nodeCheck.get<Name>ElementAt(i);
if(nodeCheck.isSelected(i)){
String role=elementCheck.getBestemdvoorId();
}
}
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mukesh,
My requirement is like, I want to select the material number of first Bapi and pass (set)that to secong Bapi, which has also material number and I set some other feilds that belong to send Bapi and finally I will execute the Second Bapi, which will insert into database, with material number that i hav set and with other feilds that i have filled. Can you plz help me step-by-step.
Thanks a lot
Hi,
Step1:
//Input Tothe First BAPI
<Bapi>Input input1=new <Bapi>Input();
wdContext.node<BAPIInput>().bind(input);
input.set<Param>(wdContext.current<ContextName>Element.get<Param>());
Step2:
//Execute the First BAPI
Step3:
//Output Of the FirstBapi
int len=wdContext.node<BAPIList>().size();
Step4:
<Bapi2>Input input2=new <Bapi2>Input();
wdContext.node<BAPI2Input>().bind(input2);
//SecondBapi Input from First Bapi
for(int l=0;l<len;l++) {
String returndata=String.valueOf(((IPrivate<viewname>.I<BAPIList>Element)(wdContext.node<BAPIList>().getElementAt(l))).get<Parameter>());
input2.set<Param>(returndata);
}
//Do Other Input for Second Bapi
input2.set<Param>("Input");
//Execute the Second Bapi
//Output Of Second Bapi//Like Step4
//Execute the SQl
Kind Regards
Mukesh
Hi,
You can value from attribute which is mapped to selectedKey property of drop down. Like:
wdContext.current<NodeContainigAttribyte>Element().get<AttributeMappedToSelectedKeyProperty>()
Kind Regards,
S.Saravanan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.