Reg .Calling a Bapi F.M
Hi Everyone,
Iam very new to Bapi . Any one can tell me how to call "BAPI_SERVNOT_CHANGEUSRSTAT" this Bapi , what parameters i
need to pass if any one give some idea on this its very helpful to me.
Thanks ,
Narasimha
Moderator message: sorry, these forums cannot replace proper training, please search for available information/documentation or attend classes.
Edited by: Thomas Zloch on Nov 17, 2010 12:48 PM
Hi Sreenivas,
Thaks for giving the reply... if you created any program with the mentioned Bapi.. colud you please send it to
me that is very help ful in my developments.
Thanks,
Nara
Moderator message: please do not ask to have documents/code sent by mail.
Edited by: Thomas Zloch on Nov 17, 2010 12:49 PM
Similar Messages
-
How to call a BAPI from Visual Composer
hi,
I am new to Visual composer. can some body give me step by step information of calling a bapi or RFC from VC.
Thanks in advance,
GopiHi Gopi,
Steps involed for calling RFC/BAPI from VC
1. Choose Model->Select Data Services.
(Alternatively, click the Data button in the task panel toolbar.)
2. In the Portal field at the right end of the main toolbar, enter the URL of the portal from
which you can access the back-end system used by the iView.
For example, you could enter: http://<yourportal>:50000/..
3. Click the traffic light icon to the right of the Portal field. The portal Welcome screen
appears.
4. Log on to the portal as a user that exists in the connected back-end system, or which is
mapped to a user of that system. Click OK.
Once a connection to the portal is established, a list of system aliases defined in the
portal system landscape appears in the System drop-down
list.
From the System drop-down list, choose the SAP system that contains the function module.
6. Under Search SAP System, click the Search tab and in the Name field, enter the search string: <RFC/BAPI name>. Then click Search (at the bottom).
5. A list of function modules matching the search string is displayed.
7. Drag the function module/bapi from the Data task panel into the
workspace: The data service is added to your model.
8. Periodically save your work. To do so, choose File->Save Model.
Finally test the iview in VC.
In the workspace, drag your mouse from the Input port of the data service, <inputform> and dragn your mouse from the outut port from the data service <tabelview and etc..>
or
Go through the this documentation...
http://help.sap.com/download/netweaver/nw04/visualcomposer/VC_60_UserGuide_v1_1.pdf
Thanks,
Suriya. -
How to put the message in sxi_monitor when call a bapi
hi experts,
I call a bapi in my abap program, and I want to put some information of this program into the xml messages,then I can monitor in future, but I don't know how to do this.
Thanks.I'm still waiting for the answer. anyone will help me?
thanks. -
Error while calling BAPI_PARTNEREMPLOYEE_CREATE BAPI using JCO
Hi All,
Our requirement is to create and update customer contact details from java application. For this purpose we are trying to call BAPI_PARTNEREMPLOYEE_CREATE BAPI for create contact and BAPI_PARTNEREMPLOYEE_EDIT for updating contact information. As these BAPIs are of online version, error is coming while calling these BAPIs.
So is there any way to call these BAPIs through JCO or are there any alternative BAPIs available for same purpose?
Thanks in advance,
Arati.Hi,
All the bapi or function module available in SAP to create contact person will internally do a call transaction to VAP1 and VAP2 tcodes in order to create or change contact person respectively.
We had a similar problem when we were creating and updating customer contact person using inbound idoc. We then created a bdc recording for the same and then created two function module with name Z_CREATE_CONTACT and Z_CHANGE_CONTACT. In your case you can make this function modules as RFC enabled FM and call them using JCO I guess.
KR Jaideep, -
Getting error while calling this BAPI:Field MATNR has been transferred inco
Hi,
I have a rquirement to upload material master data into sap for Plant 1251.(For plant 1251 we need to upload both Basi veiw and Extended View).
I am getting the following error while calling this BAPI.Field MATNR has been transferred inconsistently or is blank
the errror is :Field MATNR has been transferred inconsistently or is blank.
I have written the below logic in the program to upload material master data into SAP.
Please help me out to resolve this issue.
Thanks in advance.
Program logic which i have wriiten in the program is
LOOP AT it_rpt.
CLEAR lwa_return.
v_tabix = sy-tabix.
IF ( it_rpt-werks EQ p_werks AND
it_rpt-matnr IS INITIAL ).
retrieve internal number
PERFORM get_internal_number USING lc_mtart
lc_mbrsh
CHANGING it_rpt-matnr.
ENDIF.
IF NOT it_rpt-matnr IS INITIAL.
PERFORM convert_field_input CHANGING it_rpt-matnr.
ENDIF.
Header data
CLEAR lwa_headdata.
lwa_headdata-material = it_rpt-matnr.
lwa_headdata-ind_sector = lc_mbrsh.
lwa_headdata-matl_type = lc_mtart.
lwa_headdata-basic_view = 'X'.
IF NOT it_rpt-vkorg IS INITIAL.
lwa_headdata-sales_view = 'X'.
ENDIF.
lwa_headdata-purchase_view = 'X'.
lwa_headdata-mrp_view = 'X'.
lwa_headdata-storage_view = 'X'.
lwa_headdata-forecast_view = 'X'.
lwa_headdata-work_sched_view = 'X'.
lwa_headdata-account_view = 'X'.
lwa_headdata-cost_view = 'X'.
*Client data
CLEAR: lwa_clientdata, lwa_clientdatax.
IF it_rpt-werks EQ c_1251.
lwa_clientdata-matl_group = it_rpt-matkl.
lwa_clientdata-old_mat_no = it_rpt-bismt.
lwa_clientdata-base_uom = it_rpt-meins.
lwa_clientdata-manu_mat = it_rpt-mfrpn.
lwa_clientdata-mfr_no = it_rpt-mfrnr.
ENDIF.
lwa_clientdata-division = it_rpt-spart.
lwa_clientdata-unit_of_wt = lc_gewei.
lwa_clientdata-trans_grp = lc_tragr.
IF it_rpt-werks EQ c_1251.
lwa_clientdatax-matl_group = 'X'.
lwa_clientdatax-old_mat_no = 'X'.
lwa_clientdatax-base_uom = 'X'.
lwa_clientdatax-manu_mat = 'X'.
lwa_clientdatax-mfr_no = 'X'.
ENDIF.
lwa_clientdatax-unit_of_wt = 'X'.
lwa_clientdatax-trans_grp = 'X'.
lwa_clientdatax-division = 'X'.
Material Description
IF it_rpt-werks EQ c_1251.
lt_matdesc-langu = sy-langu.
lt_matdesc-matl_desc = it_rpt-maktx.
APPEND lt_matdesc.
ENDIF.
*Plant data
CLEAR lwa_plantdata.
lwa_plantdata-plant = it_rpt-werks.
lwa_plantdata-availcheck = lc_mtvfp.
lwa_plantdata-mrp_type = lc_dismm.
lwa_plantdata-mrp_group = lc_disgr.
lwa_plantdata-auto_p_ord = 'X'.
lwa_plantdata-proc_type = 'F'.
IF it_rpt-werks EQ c_1251.
it_rpt-prctr = lc_prctr. "1252
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-prctr = lc_prctr1. "1262
ENDIF.
lwa_plantdata-profit_ctr = it_rpt-prctr.
lwa_plantdata-period_ind = lc_perkz.
lwa_plantdata-max_stock = it_rpt-stawn.
lwa_plantdata-countryori = it_rpt-herkl.
lwa_plantdata-sloc_exprc = it_rpt-lgfsb.
CLEAR lwa_plantdatax.
lwa_plantdatax-plant = it_rpt-werks.
lwa_plantdatax-availcheck = 'X'.
lwa_plantdatax-mrp_type = 'X'.
lwa_plantdatax-mrp_group = 'X'.
lwa_plantdatax-auto_p_ord = 'X'.
lwa_plantdatax-proc_type = 'X'.
lwa_plantdatax-profit_ctr = 'X'.
lwa_plantdata-period_ind = 'X'.
lwa_plantdatax-max_stock = 'X'.
lwa_plantdatax-countryori = 'X'.
lwa_plantdatax-sloc_exprc = 'X'.
*Valuation data
CLEAR lwa_valuationdata.
lwa_valuationdata-val_area = it_rpt-werks.
lwa_valuationdata-price_ctrl = lc_vprsv.
lwa_valuationdata-price_unit = lc_peinh.
lwa_valuationdata-val_class = it_rpt-bklas.
CLEAR lwa_valuationdatax.
lwa_valuationdatax-val_area = it_rpt-werks.
lwa_valuationdatax-price_ctrl = 'X'.
lwa_valuationdatax-price_unit = 'X'.
lwa_valuationdatax-val_class = 'X'.
*Storage location
CLEAR lwa_storagelocation.
lwa_storagelocation-plant = it_rpt-werks.
lwa_storagelocation-stge_loc = it_rpt-lgort.
CLEAR lwa_storagelocationx.
lwa_storagelocationx-plant = it_rpt-werks.
lwa_storagelocationx-stge_loc = it_rpt-lgort.
*Tax Classifications
IF it_rpt-werks EQ c_1251.
it_rpt-tatyp = lc_tatyp. "u2018MWSTu2019
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-tatyp = lc_tatyp1. "u2018UTXJu2019
ENDIF.
lt_taxclass-tax_type_1 = it_rpt-tatyp.
lt_taxclass-taxclass_1 = lc_taxkm.
lt_taxclass-tax_ind = lc_taxim.
APPEND lt_taxclass.
*Sales data
CLEAR: lwa_salesdata, lwa_salesdatax.
IF it_rpt-werks EQ c_1251.
it_rpt-vkorg = lc_vkorg.
ELSEIF it_rpt-werks EQ c_1261.
it_rpt-vkorg = lc_vkorg1.
ENDIF.
lwa_salesdata-sales_org = it_rpt-vkorg.
lwa_salesdata-distr_chan = lc_vtweg.
lwa_salesdata-cash_disc = lc_sktof.
lwa_salesdata-item_cat = lc_mtpos.
lwa_salesdatax-sales_org = it_rpt-vkorg.
lwa_salesdatax-distr_chan = lc_vtweg.
lwa_salesdatax-cash_disc = 'X'.
lwa_salesdatax-item_cat = 'X'.
*Forecast parameters
CLEAR: lwa_forecast, lwa_forecastx.
lwa_forecast-plant = it_rpt-werks.
lwa_forecast-fore_model = lc_prmod.
lwa_forecast-fore_pds = lc_anzpr.
lwa_forecast-hist_vals = lc_peran.
lwa_forecastx-plant = it_rpt-werks.
lwa_forecastx-fore_model = 'X'.
lwa_forecastx-fore_pds = 'X'.
lwa_forecastx-hist_vals = 'X'.
Purchasing long text
IF it_rpt-werks EQ c_1251.
IF it_rpt-tdline1 <> ' '.
lv_tdobject = 'MATERIAL'.
lv_tdid = 'BEST'.
lv_tdname = it_rpt-matnr.
PERFORM fill_longtext TABLES lt_longtext
USING lv_tdobject
lv_tdname
lv_tdid
sy-langu
it_rpt-tdline1.
ENDIF.
Basic long text
IF it_rpt-tdline2 <> ' '.
lv_tdobject = 'MATERIAL'.
lv_tdid = 'GRUN'.
lv_tdname = it_rpt-matnr.
PERFORM fill_longtext TABLES lt_longtext
USING lv_tdobject
lv_tdname
lv_tdid
sy-langu
it_rpt-tdline2.
ENDIF.
*Units of measure
CLEAR : lt_uom,lt_uomx.
lt_uom-alt_unit = it_rpt-meins.
lt_uom-alt_unit_iso = it_rpt-meins.
lt_uom-unit_of_wt = it_rpt-gewei.
APPEND lt_uom.
lt_uomx-alt_unit = it_rpt-meins.
lt_uomx-alt_unit_iso = it_rpt-meins.
lt_uomx-unit_of_wt = 'X'.
APPEND lt_uomx.
ENDIF.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = lwa_headdata
clientdata = lwa_clientdata
clientdatax = lwa_clientdatax
plantdata = lwa_plantdata
plantdatax = lwa_plantdatax
forecastparameters = lwa_forecast
forecastparametersx = lwa_forecastx
storagelocationdata = lwa_storagelocation
storagelocationdatax = lwa_storagelocationx
valuationdata = lwa_valuationdata
valuationdatax = lwa_valuationdatax
salesdata = lwa_salesdata
salesdatax = lwa_salesdatax
IMPORTING
return = lwa_return
TABLES
materialdescription = lt_matdesc
unitsofmeasure = lt_uom
unitsofmeasurex = lt_uomx
materiallongtext = lt_longtext
taxclassifications = lt_taxclass
returnmessages = it_messages.
Regards,
ReddyCan you check with below code .
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = it_rpt-matnr
IMPORTING
OUTPUT = it_rpt-matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Move it_rpt-matnr to lwa_headdata-material .
Regard's
Smruti -
Can we call a BAPI iteratively in Visual Composer
Hello All,
I have a Web Service that returns a table of Sold-Tos. I want to call the BAPI iteratively for each Sold-To in Visual Composer, get the cumilative result and display it in a table.
Please advise.Hi Subba,
I don't think you can do that.
What you can do is to adapt your service or create a new one that will do that for you (will get the table and make the needed calculation). -
i am trying to generate purchase order and i create a BAPI also which is active.
But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".Hi,
Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
This is my CODE-
FUNCTION ZBAPIPOTV2.
*"*"Local Interface:
*" IMPORTING
*" VALUE(POHD) TYPE ZPOHD OPTIONAL
*" VALUE(POITEM) TYPE ZPOITEM OPTIONAL
*" TABLES
*" RETURN STRUCTURE BAPIRET1 OPTIONAL
data: ls_pohd type bapimepoheader,
ls_pohdx TYPE bapimepoheaderx,
lt_poit TYPE TABLE OF bapimepoitem,
lt_poitx TYPE TABLE OF bapimepoitemx,
ls_poit TYPE bapimepoitem,
ls_poitx TYPE bapimepoitemx.
MOVE-CORRESPONDING pohd to ls_pohd.
MOVE-CORRESPONDING poitem to ls_poit.
ls_pohdx-comp_code = 'x'.
ls_pohdx-doc_type = 'x'.
ls_pohdx-vendor = 'x'.
ls_pohdx-purch_org = 'x'.
ls_pohdx-pur_group = 'x'.
ls_poit-po_item = '00010'.
APPEND ls_poit to lt_poit.
ls_poitx-po_item = '00010'.
ls_poitx-po_itemx = 'x'.
ls_poitx-material = 'x'.
ls_poitx-plant = 'x'.
ls_poitx-quantity = 'x'.
APPEND ls_poitx to lt_poitx.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = ls_pohd
POHEADERX = ls_pohdx
* POADDRVENDOR =
* TESTRUN =
* MEMORY_UNCOMPLETE =
* MEMORY_COMPLETE =
* POEXPIMPHEADER =
* POEXPIMPHEADERX =
* VERSIONS =
* NO_MESSAGING =
* NO_MESSAGE_REQ =
* NO_AUTHORITY =
* NO_PRICE_FROM_PO =
* PARK_COMPLETE =
* PARK_UNCOMPLETE =
* IMPORTING
* EXPPURCHASEORDER =
* EXPHEADER =
* EXPPOEXPIMPHEADER =
TABLES
RETURN = return
POITEM = lt_poit
POITEMX = lt_poitx
* POADDRDELIVERY =
* POSCHEDULE =
* POSCHEDULEX =
* POACCOUNT =
* POACCOUNTPROFITSEGMENT =
* POACCOUNTX =
* POCONDHEADER =
* POCONDHEADERX =
* POCOND =
* POCONDX =
* POLIMITS =
* POCONTRACTLIMITS =
* POSERVICES =
* POSRVACCESSVALUES =
* POSERVICESTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* POEXPIMPITEM =
* POEXPIMPITEMX =
* POTEXTHEADER =
* POTEXTITEM =
* ALLVERSIONS =
* POPARTNER =
* POCOMPONENTS =
* POCOMPONENTSX =
* POSHIPPING =
* POSHIPPINGX =
* POSHIPPINGEXP =
* SERIALNUMBER =
* SERIALNUMBERX =
* INVPLANHEADER =
* INVPLANHEADERX =
* INVPLANITEM =
* INVPLANITEMX =
ENDFUNCTION.
i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". -
I called a BAPI to retrieve information in R3. However, I encountered a problem when our R3 is in the downtime period. It raises a short dump for my program. Is there any exception that I can catch to prevent or other solutions to prevent this short dump.
Hi again,
1. I use the exception like the below code, right?
Yes, use it like this only.
2.
Does my RFC function on R3 have these exceptions ?
No, the RFC/BAPI does not have
any such exceptions
in the definition
(u will see in SE37, that,
the EXCEPTIONS tab is empty)
3. BUT
IT IS A FACILITY (AUTOMATIC FACILITY)
PROVIDED BY R3
TO DETECT SUCH COMMUNICATION PROBLEMS
(The RFC FM/BAPI does not Take care of this by itself,
bcos, if communication is not there,
then the FM is not at all called in the target system)
4.
If not, how can the system know that when the system is cracked, it will raise the exception 2?
Do not worry.
If the target server is DOWN,
then your program will not give run time error.
However, u should chec sy-subrc
to DETECT, some error has occured bcos
of communication.
5. To get a taste of it,
just copy paste
(Change the DESTINATION as per your requriement,
give some wrong destination,
give some right one
etc)
6.
REPORT abc.
DATA: msg_text(80) TYPE c.
CALL FUNCTION 'RFC_PING' DESTINATION 'PRD'
EXCEPTIONS
communication_failure = 1 MESSAGE msg_text
system_failure = 2 MESSAGE msg_text.
IF sy-subrc <> 0.
*----- MESSAGE
message 'problem' type 'I'.
ENDIF.
regards,
amit m. -
Problem with call to BAPI when the data contains spaces
Hi everyone,
I've a table in R3 that has 2 fields which is consulted via BAPI from XI. The Bapi call run correctly while the data don't contain spaces preffixed but when for example the data is ' A31' the BAPI call doesn't return nothing.
The table structure is:
CODE DESCRIPTION
values:
' A31' 'Desc A'
'A30' 'Desc B'
When I call the bapi with A30 value the Bapi return me Desc B, but when I try it with the value ' A31' the Bapi doesn't return any value.
Could anyone help me?
Thanks in advance>>The problem isn't the trim, because the bapi call must contain the spaces.
Are you able to get expected results while testing the BAPI with data containing spaces?
I have seen some cases where you get correct results when you test the RFC in SE 37, but the same data when passed from XI does not get the desired results. It was coz. when testing the RFC in R/3 some user exits are called and the data fets populated in the correct way. Check this.
Regards,
Jaishankar -
Calling a Bapi on XI ABAP stack
Hi to all,
I have to call a Bapi defined on XI ABAP stack. I want to use a synchronous scenario in which my sender channel uses a File Adapter. The Bapi that I have to call is defined on the same SAP XI, then I don't know if my receiver channel has to use a RFC Adapter or an XI Adapter. If I use a RFC Adapter, I don't see any message in Message Monitoring. Instead, if I use the XI Adapter as Receiver, I get this error:
HTTP response contains status code 401 with the description Unauthorized Error when sending by HTTP (error code: 401, error text: Unauthorized)
Thanks to all!<i>I don't know if my receiver channel has to use a RFC Adapter or an XI Adapter</i>
No XI Adapter configuration required. Use RFC adapter
<i>
I want to use a synchronous scenario</i>
Synchronous scenario using file adapter can be achieved using BPM. A workaround would be
File - RFC - File without a BPM - Possible from SP 19.
Regards,
Prateek -
Servlet calling a BAPI Web Service...
Hi everyone,
I downloaded the wsdl file for the BAPI_USER_GETLIST.
I created a Deployable Proxy that points to this wsdl file.
I created a Web modul project with a servlet.
I also created an Enterprise application project that contains my Web modul project.
In the Web modul project, I created a servlet :
Here is the code of the servlet :
<b>try {
InitialContext ic = new InitialContext();
BAPI_USER_GETLISTService sampleWS = (BAPI_USER_GETLISTService)ic.lookup("java:comp/env/SampleWSProxy");
BAPI_USER_GETLISTPortType vi = sampleWS.getLogicalPort();
BAPI_USER_GETLIST importParams = new BAPI_USER_GETLIST();
ArrayList list = new ArrayList();
BAPIUSNAME structure = new BAPIUSNAME();
structure.setUSERNAME(new String());
structure.setFIRSTNAME(new String());
structure.setLASTNAME(new String());
structure.setFULLNAME(new String());
list.add(structure);
BAPIUSNAME[] rows = new BAPIUSNAME[list.size()];
list.toArray(rows);
importParams.setUSERLIST(rows);
importParams.setWITH_USERNAME("X");
BAPI_USER_GETLISTResponse exportParams = null;
BAPIUSNAME[] res = vi.BAPI_USER_GETLIST(rows,"");
for(int i=0;i<res.length;i++)
response.getWriter().write(res<i>.getFIRSTNAME());
} catch(Exception e)
response.getWriter().write("ERROR!!!" + e.getMessage());
</b>
The exception is :
<b>ERROR!!!Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.</b>
Can someone help with this security problem ?
Is the code OK except the security problem ?
Thanks a lot.Hi David,
Before calling a BAPI, we have to make a connection to
R/3. Try following code...
import com.sap.mw.jco.*;
public class TutorialConnect1 extends Object {
JCO.Client mConnection;
public Connect1() {
try {
// Change the logon information to your own system/user
mConnection =
JCO.createClient("001", // SAP client
"<userid>", // userid
"****", // password
null, // language
"<hostname>", // application server host name
"00"); // system number
mConnection.connect();
System.out.println(mConnection.getAttributes());
mConnection.disconnect();
catch (Exception ex) {
ex.printStackTrace();
System.exit(1);
public static void main (String args[]) {
Connect1 app = new Connect1();
This code from sap help, for details visit this link..
http://help.sap.com/saphelp_erp2004/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
Hope this helps.
Regards,
Narinder Hartala -
JCA IConnection call to BAPI with table in table as import and export param
Is it possible to call a BAPI with a table in table as import and export data?
Please give small code example if this is possible.
Thanks in advance.Inner tables can be handled with:
IRecordSet innerTable = (IRecordSet)outerTable.getObject("INNER_TABLE"); -
Calling Multiple BAPI's - LUW problem
Hi All,
I am calling multiple BAPI's in a program. After Executing First BAPI - the database is updated after the commit work . but for the second BAPI the database is not commited.
Any Suggestions.
Thanks in Update.
Rk.Hi,
1) Are you getting any error messages after the second call?
2) Are you calling the COMMIT WORK BAPI after each call, or just once after calling the BAPI twice?
3) Is the second BAPI call dependent on the first BAPI call in terms of data?
Provide more info on the BAPI you are calling and a code snippet of the program structure, the more information you provide, the more information you will get back from the forum.
Regards,
Chen -
Call a BAPI with different user ID
Hi All,
Here is my scenario:
CALL BAPI
System 1 -
> System 2
<----
TRANSFER DATA
What I want to do is when I call the BAPI in System 2 with a different user ID than is actually logged into System 1
executing the BAPI.
Is this possible?
thanks.
JBHello,
I suppose you use a Trusted RFC connection in your BAPI call and not an RFC destination with a dedicated user in it.
What you can do in the source system is calling your BAPI from a background process (job).
You can change the user ID in the step of the job.
In this case trusted RFC will make sure that the BAPI is called in the target system with the user specified in the step.
If trusted RFC is not an option you can use an RFC destination with a dedicated user ID in it.
I hope this helps.
Wim -
How can we call a BAPI from a scheduler?
My project involves reading some data from R/3 and send a mail at regular intervals. I intend to use a schedular for that but dont know how to call a BAPI there. Is there a better way to go about it?
Scheduler Task->Portal Service->RFC or BAPI
You still have one issue which is IPortalComponentRequest. Portal service doesn't have access to it but you can get around it by setting up a SAP system for usermapping and then mapping that userid to a generic userid. Example code:
private IConnection getConnection(
String alias)
throws Exception {
IUser user =
UMFactory.getUserFactory().getUserByLogonID("Administrator");
IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
ConnectionProperties prop = new ConnectionProperties(user.getLocale(), user);
return cgService.getConnection(alias, prop);
thanks.
sridhar
Maybe you are looking for
-
How do i update the software on an iPhone 4
i am unsure how to update my iphone 4, please help
-
How do I get rid of xmarks. I never installed it and I can't find it in the control panel
see above this feature is only on my desktop and i can't get rid of it
-
View tracks instead of selecting albu
When I go to media library, artists, then to a selected artist is there some way i can just get the tracks to show up instead of having to pick an album?this by the way is for a microphoto 8gbMessage Edited by Karma8 on 03-29-20062:36 PM
-
How to use a link bar or navigation bar for display only?
My app has a link bar in an Application Control bar that is bound to the view stack of the steps in my application. I would like to use this as a mechanism to show the user which step he is on and how many are left, but NOT to click on it to navigate
-
Why cant my ipod connect to my home wifi?
Whenever i go anywhere, i can connect to wifi no problem, but i am unable to connect to it at home. When i tap the network, the check mark never appears, just the spinning wheel. I have already tried resets and backing it up. NOTHING WORKS!!!!!!! how