WebDynpro remote call BAPI
Hi,everybody!
I am developing personality ESS/MSS in webdynpro.When I want show personal photo in my develop function from that stored in ECC6.So I find two BAPIs:HRMSS_RFC_EP_READ_PHOTO_URI and HR_ESS_WHO_PROG_GET_PICT_URI in ECC6.Then I call the HRMSS_RFC_EP_READ_PHOTO_URI or HR_ESS_WHO_PROG_GET_PICT_URI in webdynpro,and them can return personal photo URL.But,the returned URL is be encrypt.If I used this encrypt URL in webdynpro Image control,however the personal photo is not show.How should I do?Can I dencrypt in webdynpro?If can dencrypt in webdynpro,what should I do?
On the side,somebody can tell me the difference of HRMSS_RFC_EP_READ_PHOTO_URI and HR_ESS_WHO_PROG_GET_PICT_URI,and each of them use.
Thank you!
Hi,
check this link for webdynpro remote call
The webdynpro/ABAP (WDA) calling RFC enabled FM of other ECC systems
thanks,
Sendil
Similar Messages
-
Creating webservice using webdynpro java calling bapi from r/3
hi all,
as i am new to this area can anyone provide me a guide to create a simple webservice using webdynpro java to call bapi's from r/3?
i want to consume the created webservice on a .net client.
Thanks in advance,
RaghunandanYou can use the SAP .NET Connector to do it.
Download from [http://service.sap.com/connectors|http://service.sap.com/connectors]. -
Webdynpro java calling bapi function module
Hi all,
I am webdynpro java developer, In my application i created model using bapi function module and fetch those values using iviews mapping to custom controller . While running that application i got an error as shown below
**Application error occurred during request processing.**
Details: com.sap.tc.webdynpro.services.sal.core.DispatcherException: The requested deployable object 'ram.com/getdata' and application 'Searchapp' are not deployed on the server. Please check the used URL for typos.
Exception id: [BCAEC58D04E400870000019500000DF80004B20FE3921612]
Please help me anyone
Thanks in advance.Hi,
Have you deployed your application?because it is mentioned that the "Searchapp"(which i suppose is your application) is not deployed.
Take the "Deploy and Run" option by right clicking the application(i mn Seachapp). It will prompt you to enter the SDM password. Give the pwd and it will open the explorer and will show you the output.
Hope this helps you.
Regards,
Jithin -
Calling BAPI in Webdynpro or EP
Hi
any one can u send how to store data in r/3 when we submit the form in either webdynpro or EP . i mean how to call BAPIs
Regards
sunilHi Sunil
Refer to
<a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/16244247-0a01-0010-3294-d81c21e7e86e">VC</a>
2)
<a href="https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">Webdynpro</a>
SDN :-https://www.sdn.sap.com/irj/sdn/howtoguides
Check for RFC there
Thanx
Pankaj -
Calling BAPI from Adobe Interactive Form
Hi Guys,
I have a requirement from my client to work on interface using BAPI for creating Service notification. Idea is that users will fill an Adobe interactive form (AIF) on company INTRANET and as soon as user press a SUBMIT button on the adobe form, BAPI should be called to create a SERVICE NOTIFICATION (Tcode IW51). I have work with BAPIs and I know the BAPI name (BAPI_SERVNOT_CREATE) to create SERVICE NOTIFICATIONS, but not with this kind of interface. Please advice me how to go about it and if some one can share any documentations to accomplish this task.
Another developer is in charge of developing the AIF and I am responsible for ABAP side .
Thanks in advance.
miniHi Mini,
Kindly check the webDynpro ABAP section of Intercative form homepage. at - https://www.sdn.sap.com/irj/sdn/adobe.
You can create a portal application and call your BAPI. Other options include - webDynpro Java, calling webservice (if the call can be unsecured). You will be able to call secure web services from adobe forms from future versions afaik.
Thanks and Regards,
- anto -
How to Call BAPI From the Custom Controller
Hi
I developed frist WD Application Using RFC Adapter.
i did the following steps
1. created the project
2. created the model.
3. created the customer controller and mapped the model of the controller to the model.
4. mapped controller context to the views
5. created one action in the start view
6. created one method in the customer controller.
so please let me know the lines of code to call BAPI using RFC.
and how to pass input valus to the bapi and how to execute the BAPI
plese send the reply ASAP
regards
mmukeshHi
i did like this
In Start View OnActionSearch () method code
public void onActionsearch (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
wdThis.wdGetTestCustControllerController().executeGetlistBapi();
in CustomController Init method
public void wdDoInit()
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_FlightGetlist_Input().bind(input);
input.setDestination_From(new Bapisfldst());
input.setDestination_To(new Bapisfldst());
In CUSTOMECONTROLLER executeGetlistBapi();
METHOD
public void executeGetlistBapi( )
//@@begin executeGetlistBapi()
try{
wdContext.currentBapi_FlightGetlist_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}catch(Exception ex){
ex.printStackTrace();
Then let me know what is wrong in this
i did as per pdf
please correct if there is any worng in this code.
this is flight example .
regards
mmukesh -
Can i call BAPIs with explict commit uisng xi
I have a RFC which has 3 BAPI's inside it . Each Bapi is using an explict commit. Can i call this RFC from XI .
Hi,
You have 2 options..
In the RFC Receiver Communication channel set the Advanced Property - "Commit Control for Individual BAPI Calls"
the description in help is as follows -
<b>Commit Control for Individual BAPI Calls</b>
If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values , S, I, and W are displayed. All other values are regarded as errors.
To change this setting, set the indicator BAPI Advanced Mode.
In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.
http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/frameset.htm
or
you can include the commit in the RFC(if it is a custom one...)
Thanks,
Renjith -
Hi all,
My requirement is create a one ZRFC, inside RFC
call BAPI sales order creation.
How to call BAPI in side RFC.
please give step by step.
Thanks,hi,
First create a RFC FM and than call this BAPI in RFC. the following r the steps.
1. Create a FM using tcode SE37. go to Attributes TAB --. make Processing type as Remote enabled module.
2. In the Source ocde of this FM, call the BAPI FM...
Hope it is clear to u.
Regards,
Deepthi.
Edited by: deepthi dandibhotla on Sep 23, 2008 1:51 PM -
Any program for calling bapi from ABAP step by step
any program for calling bapi from ABAP step by step
points will be rewarded,
thank you,
Jagrut BharatKumar ShuklaHi Jagrut,
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
The following standardized BAPIs are provided:
Reading instances of SAP business objects
GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
Create( ) and CreateFromData! ( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( )
The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
ex BAPI:
API_SALESORDER_CREATEFROMDAT1
BAPI_SALESORDER_CREATEFROMDAT2
You can get good help form the following links,
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
www.sappoint.com/abap/bapiintro.pdf
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://sap-img.com/bapi.htm
<b>EG::</b>
<b>Here is the step by step procedure for creating BAPIs.</b>
There are 5 different steps in BAPI.
- Create BAPI Structure
- Create BAPI Function Module or API Method.
- Create BAPI object
- Release BAPI Function Module.
- Release BAPI object.
Step1. Creating BAPI Structure:
- Go to <SE11>.
- Select Data Type & Enter a name.
- Click on Create.
- Note: Always BAPI should be in a development class with request number (Not Local Object).
- Select Structure & hit ENTER.
- Enter the fields from your database. Make sure that the first field is the Primary Key Field.
- Then SAVE & ACTIVATE.
Step 2. Creating BAPI module:
- Enter TR.CODE <SE37>.
- Before entering any thing, from the present screen that you are in, select the menu
Goto -> Function Groups -> Create Group.
Enter a name (Note: This name Must start with ZBAPI)
Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
Click on the Third ICON that says Inactive Objects.
Select the group that you just created and click on Activate.
Notice that the group you created will disappear from the list of inactive objects.
- Go back to ><SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
Then click on the second tab that says [IMPORT].
Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box Pa. All remotely enabled functional modules MUST be Pa enabled, where Pa means Passed by Value and if you dont select Pa, then that means it will be passed by reference..
Then click on tab that says [EXPORT].
Enter the following as is in the first three fields
RETURN TYPE BAPIRETURN (These 3 field values are always same)
Here also select Pa meaning Pass by value.
Note: BAPIRETURN contains structure with message fields.
Then SAVE and ACTIVATE.
Step 3. Creating BAPI object:
- Enter Tr.Code <SWO1> (Note. It is letter O and not Zero).
- Enter a name and then click on create. Enter details.
NOTE: Make sure that that Object Type and Program name are SAME.
- Enter Application M, if you are using standard table Mara. If you are using your own database then select Z at the bottom.
- Then hit <ENTER>.
- Now we have to add Methods. High light METHODS and then select the following from the menu:
Goto Utilities -> API Methods -> Add Methods.
- Enter function Module name and hit <ENTER>.
- Select the second FORWARD ARROW button (>)to go to next step.
- Check if every thing looks ok and again click on FORWARD ARROW button (>).
- Then select YES and click on <SAVE>.
- Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
- Goback to TR.CODE <SWO1>.
Here select the menu combination shown below in the same order.
- Edit -> Change Release Status -> Object Type Component -> To Implemented.
- Edit -> Change Release Status -> Object Type Component -> To Released.
- Edit -> Change Release Status -> Object Type -> To Implemented.
- Edit -> Change Release Status -> Object Type -> To Released.
- Then click on <SAVE>.
- Then click on Generate Button (4th button from left hand side looks like spinning wheel).
- Then Click on the button that says PROGRAM to see the source code.
To check if this is present in work flow goto TR.CODE <BAPI>.
Here it shows business object repository.
- First click on the middle button and then select ALL and hit ENTER.
- Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully
<b>Reward pts if found usefull :)</b>
regards
Sathish -
Remote enabled BAPI/RFC to upload a Resume
Is there any Remote enabled BAPI/RFC to upload a Resume and how to assign it to Applicant ?
I need to upload Resume from a .Net program and assign it as attachment or otherwise to Applicant.The reason for posting it here is this:
I used Remote Enabled FM BDS_BUSINESSDOCUMENT_CREATEF to create an attachment (.DOC word document) to APPLICANT Object. It works fine when executed from SE37.
When I execute(call) from .Net code, I get exception "ERROR_KPRO".
So I am looking for ANY way to attach or send Resume document into SAP and some how associating it with APPLICANT object, either by solving ERROR_KPRO or by suggesting any other way...
Thanks for the response -
Calling BAPI only ones and receiving all values
HI all,
I am having a BAPI and I want to receive all the values from the BAPI at the first time.I am having two tables table1 and table2. These tables are inside a Tab(tab strip).
When i click the Tab strip the BAPI fills the first table table1 and based on the lead selection in table1 it calls the BAPI again and fills the second table tab2. But I want to call BAPI only ones when i enter the Tab and show the details from buffer.
It should give the values based on the lead only from webdynpro.
Please help..Its urgent..
Thangs®ards
karthik.Hi Karthi,
1> Take a Value Node with the necessary attributes to store the BAPI output only once.
2> Inside wdDoint Method: Execute the BAPI and Copy the BAPI Output to your Value Node.
3>All the data will be available in your ValueNode. Use the Value Node as per your requirement.
Re: RFC Issue - Cardinality and Selection problem
Issue with Table
Regards,
Mithu -
Sample ABAP code for userexits, and calling bapi's
Hi,
Can someone please send me sample ABAP code
1) to do extractor enhancement using user exit.
2) ABAP program to call BAPI to read live cache order series data in SNP and write to Idocs through some ports.
3) ABAP routine to generate file name (based on date/country)in the infopackage to upload flatfiles.
Thank you very much in advance and appreciate any help.
Regards
Prasadhai ,
check this code...
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen. -
hi
i developed one report and one bapi (to create sale order with ref to contract) every thing working fine.
now my client asked he want to call bapi program from report because my report output is input to bapi for this i maintained check box for every row in report and in application tool bar i maintained one key , suppose he selected one record and press on that key it should move to bapi up to this working fine .for this my logic is
SET PF-STATUS 'ZCON'.
At USER-COMMAND.
CASE SY-UCOMM.
WHEN 'BAPI'. "this is key
CALL TRANSACTION 'ZBC'. "zbc = my bapi tcode
endcase.
now i have to pass selected record values to bapi input automatically so what i have to write .
please share information
thanks in advance
Moderator message : Duplicate post locked. Continue with the original thread.
Edited by: Vinod Kumar on Sep 7, 2011 10:32 AMHello Bhavin,
you have marked your question an self solved. Would be fine if you post your solution.
Regards
Gregor -
I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
Anyone have an idea on other things to try to debug/resolve this?
Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
Thanks!After a week's worth of debugging, I found the issue.
The Java type returned from the call was defined as ArrayList. Changing it to List resolved the problem.
I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid. And, why it works in Debug mode and not in Release build is even stranger. Maybe someone can shed some light on the logic here to me. -
How to add error message to return structure of calling BAPI from a BADI
i have a bapi where a badi is triggered.this badi method has just importing and changing parameters.is there any way with which i can add error message to the return structure of calling bapi.please reply at the earliest.High points can be expected.
thanks got it
Maybe you are looking for
-
Help with setSelectionPath() method (JTree)
Hi. I'm having problems with manually selecting a node when the structure of the tree changes (nodes inserted or removed). This fails when I insert a second node (NullPointerException). Here's the code and Thanks: public void slideAdded(Slide sli
-
"failed to respond/connect" fix
I have a Dual G4 Mirror Drive Door running Tiger. After upgrading to Tiger, iChat AV wasn't working, like I've seen in many other posts. After culling this discussion board for a setup like mine: iChat via tower connected to Airport Extreme base stat
-
Mac version of PSE 12 open tiff files in ACR only. How I can open it WITHOUT ACR?
I don't like to correct TIFF (or PNG) files in ACR, but PSE 12 (Mac) open this files in ACR (I try File > Open (NOT Open in Camera Raw!!!), or double click on file, or right click on file > Open with PSE...). WTH?
-
New Form Layout for form 16A India
Dear Whether any one has already implemented SAP Note 1476590 New Form Layout for Form 16A and Form 24D. Pleae opine Regds
-
Access SAP database table from different SAP server
Hi, May i know is that possible to access the SAP database table from server A to server B without write a program on server A? Is it possible for direct access the SAP database table. Best regards, Gan