Calling a Bapi in the backend
Hi,
how can I call from SRM system a Function Module in Backend named
BAPI_REQUISITION_CHANGE.
With a other words there are two systems. SRM and ERP in the backend.
The Bapi is in the backend (ERP). The call must be performed from SRM System.
I would appreciate your help on this..
thankz in advance
Regards
ilhan
hi,
to create a RFC destination for the backend system in SM59 there are a lot of possibilities.
Which type is the right one ?
- Abap Connections
- Http Conn.
-Internal connections
Regards
ilhan
Similar Messages
-
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 two BAPIs in the sequence in same transacon
Hi ,
I am caling Two BAPIs in a sequnce in MII Transaction. I am using Jco Interface for this. My first Bapi is getting called and for second bapi call , I am etting the following error.
Problem retrieving JCO.Function object: Function [] not found.
Now I would like use session action and in session I will be calling two function with bapis and if something goes wrong i have to roll back the session. suggest me the sequnce of steps.
Thanks, EswarHi Rohit,
Thanks for the reply.
I have used JCo interface for calling two bapis and i have given time delay of 5 seconds between calls and it served my purpose.
Thanks , Eswar -
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. -
How to call a previous operation in the routing in the backend?
(We have a requirement to call a previous operation in the routing in the backend and create-assemble-complete the SFC.)
Routing would be u2013 OPERATION_1 -> OPERATION_2 -> OPERATION_3
The SFC has not been create and we are using u201CCreate SFC On Demandu201D.
The production operator is given the SFC value to use, however, the POD is configured to START the SFC at OPERATION_2
The desire is to process the SFC at OPERATION_1 as a u201Cblindu201D operation to production.
The question: If we use a PRE_START activity, is it possible to launch the PRE_START activity at OPERATION_2 and have the activity:
1) Create the SFC,
2) Start the SFC at OPERATION_1,
3) Assemble a child SFC (part of the activity information),
4) Complete the SFC at OPERATION_1,
5) Upon completion of the SFC at OPERATION_1 finalize the activity and allow the SFC to start at OPERATION_2 normally?
Thanks and Regards,
Avinash
Edited by: Avinash Fernandes on Feb 16, 2012 3:30 AMHi,
a managed property only gives you a anlde to a bean or property, it doesn't execute it. To execute a bean, you can use a custom JSF PhaseListener that calls a bean method. The reference to the bean is achieve through value binding
ValueBinding vb = FacesContect.getCurrentInstance().getApplication().createValueBinding("Name of Managed Bean);
TypeOfBean theBean =(TypeOfBean) vb.getValue(FacesContext.getCurrentInstance());
.... theBean.theMethod() ...
Frank -
How to make the Commit after calling a BAPI from SE37 ?
Hi
When i use a BAPI for update some SAP table i always call the BAPI inside a program and then i call the BAPI_TRANSACTION_COMMIT for made the changes and validate them
Bot now i need to test the BAPI directly in SE37 , and the BAPI returns the sucess message but i can not see the changes in the SAP tables , i guess i need to make the Commit but how can i do this ?
by calling the BAPI_TRANSACTION_COMMIT directly in SE37 after the call to the other BAPI ?
Thanks
Frankse37 > clear the field of the function module name
menu path: Function module > test > test sequence and give you FM's sequence you want to test -
Call the BAPI from the program..
Hey guys,
can we call the BAPI from the program..
if yes how can we can show sales orders being loaded..
thanks its urgentNishant,
yes easily you can call bapi from program.
for getting all sales order use:
BAPI_SALESORDER_GETLIST
also am providing a program so that you can see how bapi has to call in program.
CALL FUNCTION 'BAPI_SALESORDER_GETLIST'
EXPORTING
customer_number = lf_customernumber
sales_organization = if_sales_organization
document_date = lf_document_date_from
document_date_to = lf_document_date_to
* PURCHASE_ORDER = IF_PURCH_ORDER
material = lf_matno
IMPORTING
return = ls_return
TABLES
sales_orders = sales_orders.
Am afraid to say you that above solution you get about bapi it is not for showing the list of SO these are for creating SO.
Edited by: Amit Gujargoud on Jul 3, 2008 3:12 PM -
How the backend confirmation comes to EB
Hi experts,
In ECS scenario we can do confirmation directly in the backend system. How the GR number along with other details comes to the EBP system in this case. Is it through bbp_get_status_2 job . I have gone through this program but there is a mention of PO updation . There is no mention of GR or invoice explicitly.
please clarify.
thanks
sankarHi
Why you need these details ? Any specific requirement ?
Coming most probably from BAPI or IDoc. [Which is called either from this report program or some other program ]
Incase you need the name of the BAPI / Idoc will let you now.
Regards
- Atul -
Change existing PO in the backend
Hi SRM gurus,
Scenario: I have to create custom fields in shopping cart it will have the backend PO number, i need to check this field and add shopping cart line items to the the the same PO.
i can get the back end PO details by calling
"BAPI_PO_GET_DETAILS1",but i could n't find any structure in SRM for this bapi.
please help me out ,
points will be rewarded .
thankx,
Radha
Message was edited by: RadhaHi jaga,
Lets us suppose PO(0000783) exist in r/3 for sc 1000089.
now i am creating new sc(only 1 line item will bein sc) with the above po number .
1.system should check whether the po exists in the backend system....if not ...throw error mesage.(if entered)
2.if yes,after approval and before creating backend document,system should update(change) the existing po(0000783) comparing with new sc .
it shouldn't create new po for that sc(new)
3. the new sc should be deleted.(can we delete sc after approval?)....if no any other suggestion to achieve.
4. updated (change ) made should be reflected in the history of sc(1000089).
5. if po number is not given in the sc field...the system should follow the standard ..to create back end document.
the above is the scenario...Please help me to achieve this.
Thanks,
radha -
How to call a BAPIs that requires a commit as a Web Service
We have a Web Dynpro Java application which has some business objects that generate notifications in a backend R/3 system. Using JCo we simply call BAPI_ALM_NOTIF_CREATE, followed by BAPI_ALM_NOTIF_SAVE, and finally BAPI_TRANSACTION_COMMIT all using the same connection (e.g. these are stateful calls.)
Now we need to change from using JCo to calling these BAPIs as Web Services. We have generated the deployable proxy for these but can't find a way to call them in the same "ABAP session." The ports generated in the deployable proxy are set to use HTTP Cookie based sessions but the BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT return empty results as if they are not being executed in the same ABAP session as the call to BAPI_ALM_NOTIF_CREATE.
We're running WAS Java 6.40 SP15. Any help would be very much appreciated.Hi Jason,
try to do this using JRA.
http://help.sap.com/saphelp_nw2004s/helpdata/en/cb/072642c9dedd2ce10000000a1550b0/frameset.htm
Vito
Best regards,
Please mark helpful answers -
Calling ABAP BAPIs from a JAVA client - Web Services vs. JCo
Hi All,
When calling BAPIs from a JAVA client, what are the pros/cons for making the call employing JCo vs web service technologies. I understand that using SOAP would play better into the SOA theme and that there are nice tools to generate a WSDL document from a BAPI. Aside from the obvious, are there any performance considerations and/or other major pros/cons to each
Thanks,
MarkHi Mark,
Have you got any information on this. If you have any information on this pls forward to me at <b>[email protected]</b> I am also having this confusion. My question is a bit deviating from your point. If we use XI when developing WDJs with WS, will it help in improving performance and maintenance.will it give any advantage if I use XI with BAPIs to connecto backend from WDJ apps. I got this confusion, becasue of a requirement to develop WDJ apps that will be accessed by 50,000 users. Somebody told client that use of XI willimprove performance.
Any help is greatful
Regards
Ravindra
Message was edited by:
Ravindra Babu Tanguturi -
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. -
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 -
Change the backend doc type from PR to PO in BADI BBP_TARGET_OBJECTS.
Hi,
We have followed below approach for backend document type determination.
1. A custom function module contains the logic to determine the backend document type of a Shopping cart line item. THis function module, performs many checks and hence cannot be called in any BADI that is executed in Foreground.
2. I am using BADI BBP_TARGET_OBJECTS to change the follow document type by calling the custom function module.
Issue here is, if the backend document type of a line item is Purchase requisition (2) by SAP standard, and if I try to change it to Purchase order, it gives run time error and ends up in creation of Purchase order.
After further investigation I found that this line item (with default backend doc type as 2) has a desired vendor. If we change the desired vendor of this line item to fixed(To Partner function 19 from partner function 39), it allows us to change the doc type from Purchase requisition to purcahse order in BADI BBP_TARGET_OBJECTS.
But changing the partner function is possible only in BBP_DOC_CHANGE BADI, and I cannot call the custom function module there, as it may impact the performance.
Is there any other way, I can change the partner function in any of the BADIs called in background?
Or Is there any way by which I can change the backend document type from PR to PO in BBP_TARGET_OBJECTS?Hi Parab
if you swaping 39 to 19 viadoc change badi
REQUESTER has a control on Purchase ORDER Vendor and BUYER lost a control so your business has to decide.In this case procurement department lost their control.
Fixed vendors are like inforecord and contract negotiated for best price ..
Muthu
Maybe you are looking for
-
My iPad can no longer connect to Wi-Fi (anywhere)...at home, I get a message that says "Cannot scan for networks" -- and at my office...I get a message that says "Unable to join the network". Other mobile devices are connecting fine at both home and
-
Ever since I upgraded my iphone it works very slow and freezes all the time..I cant answer 50% of myy calls because of this , next thing its working just fine..all of my friends who had their phones updates experience the same..can I go back to the p
-
Ability to print CS review file
Our team received a question from a client regards to being able to print a CS review file. The client does not have any adobe product installed other than Acrobat. What would you recommend as the most efficient way for the client to print their CS
-
How to add an HP1015 over Samba
Just read thru the HP printers on http://docs.info.apple.com/article.html?artnum=303057#hpdrivers and I see that the drivers for the Laserjet 1015 are shown as HPs own but not "modern". The note above the table says that non-modern drivers cannot be
-
What is file named "????.plist"
I found a file in ~/home /Library /Preferences named: ????.plist I can not figure out what this might relate to. Has anyone encountered it?