on 07-16-2007 5:38 AM
Hi All,
Good morning..,
I have scenario like:
I want to pass the values from the web dynpro appication to the SAP Back end R/3 Table. IN backend the RFC is writtn to accept the structure input from the Webdynpro.
Upto know I imported the corresponding RFC and maaped to the View.
How to proceed with the coding to save the data...
PLease suggest...
Regards and Thanks in Advance,
CSP
Hi Pradeep
Steps:
1. First create an instance for bapi and bind the instance to the bapi node.
Z<bapi name> zb=new Z<bapi name>();
wdContext.nodeZ<bapi name>. bind(zb);
2. Then if u have the import parameter u have to set them by using
The instance of the above bapi.
Zb.set<import parameters>;
3. If the bapi has a table parameters then the structure for the table parameters will also be imported
In the model class.
4. Set the table parameters by creating the instance for that structure and using this instance set it.
Z<Struct>itm tab=new Z<Struct>();
Tab.set<table parameters>
5. Then add the structure instance to the bapi instance.
Zb.add(Tab);
6. Then Execute the bapi after setting the import parameters.
7. If there is any export parameters, then get the values after execution.
Look at this thread for codes
Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
1. In wdDoInit(), add
<Bapi>_Input input=new <Bapi>_Input();//DECLARE this variable globally
wdContext.node<Bapi>_Input().bind(input);
2. In execute() method,
/**********FOR STRUCTURE*************/
<InputStructure> zh=new <InputStructure>();
zh.setXX("xx");
zh.setYY("yy");
input.set<InputStructure>(zh);
/**********************************************/
/**************FOR TABLE****************/
for(int i=0;i<5;i++)//ADDS 5 ROWS
{
<InputTable> zt=new <InputTable>();
zt.setXX("xx");
zt.setYY("yy");
input.add <InputTable>(zt);
}
/**********************************************/
wdContext.current<Bapi>InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
Regards,
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go through the tutorial to understand how to use BAPI in Webdynpro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.