on 05-03-2007 2:32 PM
I have a Web Dynpro application in which a user will enter information and click a button to call an RFC. The RFC then returns data to a new view. The user can make changes to this view, and will hit a button to call a BAPI. I am using a custom controller. I am not sure how to feed the results from my RFC to my BAPI. Can someone give me some pointers as to where to begin?
Mazurek,
No problem at all -- just copy attributes between 2 model nodes (output of RFC and input of BAPI). After call to RFC execute:
-- invalidate output of RFC so fresh results get into node, kind of
wdContext.node<RFC-OUTPUT-NODE>().invalide();
-- bind fresh BAPI model object to BAPI input node, like
wdContext.node<BAPI-INPUT-NODE>().bind( new <BapiInputModelClass>() );
-- copy attributes of RFC output to BAPI input like
wdContext.current<BAPI-INPUT>Element().setBapiAttr1(
wdContext.current<RFC-OUTPUT>Element().getRfcAttrA()
);
wdContext.current<BAPI-INPUT>Element().setBapiAttr2(
wdContext.current<RFC-OUTPUT>Element().getRfcAttrB()
);
Now you are ready to execute BAPI, or you may let user alter values populated above.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Issue solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How does the logic you provided Valery relate if the input fields to my BAPI are two structures? Do I use this logic to populate the two structures, and then need to use different logic to set these structures to the BAPI? The BAPI I am using is BAPI_REPMANCONF1_CREATE_MTS?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maz,
Follow This Procedure,
Create Model:
Create a new Model for Your Webdynpro Project.
Name your Model and Give The R/3 Login details
After successful login select your RFC FM module/BAPI
Add your Model to component.
Mapping:
Do Mapping between Model and Your component controller.
Do Mapping Between your component Controller and View
Binding:
Create Required UI elements.
Bind your UI elements
Code:
Write a method to execute You BAPI.
Create a Model Object in InitView and Bind it.
Call execution method.
Regards,
<b>Ramganesan K</b>
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 following tutorials it will help you in creating WD applications accessing BAPI's
regards
ambica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
check out this thread:
http://help.sap.com/saphelp_nw2004s/helpdata/en/59/3062258ce36b4ea80f540837959d28/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm
tutorials:
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
hope it helps
let me know if you face any problem
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.