SAP ECC 6.0 - Using BAPIs for C# to extract data out
I have had a client recommend a strategy of extracting data usin C# (Visual Studio 2005) to extract data from SAP ECC using BAPIs.
We do have an existing methodology in place using flat files to extract data to non SAP systems
We have purchase XI which we intend to implement next year.
I basically wanted to keep things tidy and continue with the flat file interface strategy just to keep things simple going forward to XI.
THen there is also the security piece, the developer has had to slowly build a profile / roles that alows him to come in thru visual studio to access these BAPIs
I am looking for anyone who has had experience with this and what your experiences are. As well, what are the SAP best practicies concerning this strategy
Thank YOU ALL who will reply
I think that SAP's strategy toward exposing BAPI is leaning toward leveraging their AS-JAVA stack. With the AS-JAVA Enterprise Services and standard delivered web content, SAP is already exposing many existing BAPI/Business Functionality outside of the ABAP world. However, that's not saying that traditional flat files have no place in the future. Matter of fact, I don't see flat/delimited files going away any time soon.
It all really comes down to what you are doing, you may even end up with a landscape that's a mix of files/RFCs. Here inhouse, we leverage file based transfers for large data sets such as SAP BI OHS extracts, and daily R/3 FI extracts. Why file? because it's simple, easy to control, and you can see the data being transferred. A file can be "hold in my hands" if you will, at best there's just a few characters in-flight.
As for RFCs, any type of RFCs in fact (Anything from sap .net connector to AS-JAVA ESOA Based ES), are basically designed for transactional data. Here, you are looking at things that are high in transactional count but small in individual size. Your client's call using C#, it all really depends on how you are doing it. MOST IMPORTANTLY: Make sure you are using a proven, standarized, and SAP supported way, PERIOD. NEVER EVER go into production with a "hack".
For the high-transactional-count-small-individual transactions, we leverage BizTalk Server (BTS) here. I'll be frank, we are not using BTS because we wrote it. We are using BTS because it just works better for us, in our environment. BTS now support SAP 2.0 connector (registered program ID) and SAP 3.0 (WCF based, direct SAP RFC call, supported by Microsoft AND SAP). We are leveraging these adapters and BTS (as distribution and transformation) in our environment more and more.
So, long story short: Determine the transaction type, multiple solutions is ok, make sure the solution is supported!
Similar Messages
-
Using BAPIs for sales contracts
Hi,
I'm having this situation that I have to upload sales contracts into SAP from flat files. We planned to use BAPIs for this purpose. Is it a good option. Can anyone suggest better ideas. If BAPI is a good option, has anyone used standard BAPIs for sales contracts updation in SAP System. If yes, can you guide me through the process.Hi,
You can start off with a program with:
Get the filename of the convert file
IMPORT /SAPDMC/LSMEMORY FROM MEMORY ID '/SAPDMC/LSMW'.
V_PROJECT = /SAPDMC/LSMEMORY-PROJECT. " Project
V_SUBPROJ = /SAPDMC/LSMEMORY-SUBPROJ. " Subproject
V_OBJECT = /SAPDMC/LSMEMORY-OBJECT. " Object
IF V_PROJECT IS INITIAL.
V_PROJECT = 'XXXX_LOC'.
ENDIF.
IF V_SUBPROJ IS INITIAL.
V_SUBPROJ = 'SD'.
ENDIF.
IF V_OBJECT IS INITIAL.
V_OBJECT = 'XXXX_VA41'.
ENDIF.
Function will return path of converted file by LSMW object
CALL FUNCTION '/SAPDMC/LSM_FILE_INFO_GET'
EXPORTING
PROJECT = V_PROJECT " /sapdmc/lsmemory-project
SUBPROJ = V_SUBPROJ " /sapdmc/lsmemory-subproj
OBJECT = V_OBJECT " /sapdmc/lsmemory-object
X_ONLY_USED_FILES = 'X'
IMPORTING
FILE_CONV = V_DSNAME " Path of converted file
EXCEPTIONS
NO_SUCH_OBJECT = 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.
I am not much of an LSMW expert so wont be able to comment much.
regards
Aveek -
Interface Using BAPI for Uploading shipment datas
Can any1 send me the example code for Inbound Interface using BAPI for Uploading shipment datas.please kindly send me the programs which u using with BAPI
Hi
Except hiring (or new joinee) for all other actions you can use below Function Module.
HR_INFOTYPE_OPERATION.
~~~Ganesh Kumar K. -
BAPI for converting legacy case data
Hello friends,
I would like to know is there any BAPI for converting legacy case data to SAP CRM case.
thanks in advance
RakeshHi,
use bapi 'BAPI_CUSTOMER_CREATE' to create customer and bapi
'BAPI_VENDOR_CREATE' to create vendor.
Regards,
SuryaD. -
Any BAPI for Infotype 0015(Additional Data)
Hi,
Can anyone provide information on BAPI for Infotypes 0015(Additional Data).
Your help will be appreciated !!!
Vijayanand.To upload data into infotype 0015
Use HR_INFOTYPE_OPERATION to create your a wrapper BAPI. You would also have to use BAPI_EMPLOYEE_ENQUEUE and BAPI_EMPLOYEE_DEQUEUE for locking and unlocking of the record in your BAPI or program.
Enqueue personnel number
call function 'BAPI_EMPLOYEE_ENQUEUE'
create 0015
call function 'HR_INFOTYPE_OPERATION'
Use FM : HR_MAINTAIN_MASTERDATA to update IT 0015
check bapi : BAPI_HRMASTER_SAVE_REPL_MULT
Dequeue personnel number
call function 'BAPI_EMPLOYEE_DEQUEUE'
You could also use LSMW Tool to upload the data.
Regards
Vasu -
Does EBS license include tools for reporting and extracting data (queries)
Hello,
I'm recommending Oracle EBS to a customer and I need to mention what tools for reporting and extracting data (queries) are included in a Oracle EBS license.
I hope you can help me with that information, or at least with providing me the place where I can get the info.
Thanks in advance,
A/P Sergio MaestriHi,
Thanks, I think the same ... but the customer asked me about it ... I supose my answer will be that he can use Reports Builder for reporting and Toad or PLSQL Developer to access to the database and make queries ...
What about XML Publisher ? ...it can be used to make reports against an Oracle EBS database and integrate them into the EBS Application ?I believe you need a developer license to use Oracle Developer (Forms/Reports) for customizing/creating reports.
Global Pricing and Licensing
http://www.oracle.com/corporate/pricing/index.html
And IINM, the same thing applied to XML Publisher -- See this thread for a similar discussion.
eBiz & XML Publisher - Confusion
http://forums.oracle.com/forums/thread.jspa?messageID=3834445
Please contact your Oracle sales representative, he/she is the best one to answer such questions.
Thanks,
Hussein -
Does anyone else use a PDF form to extract data they can then use to populate Dynamic Content in Ill
Does anyone else use a PDF form to extract data they can then use to populate Dynamic Content in Illustrator?
You can connect the form to the DB using anODBC connection. This functionality comes as part of Acrobat but the form must be Reader Extended by the full LiveCycle Server version of Reader Extension to allow this in Reader. In your case, if your system is the only on ethat will interact with the DB then this might be a viable solution (but you woudl have to use Acrobat). This solution woudl involve create an ODBC connection in your system then configuring the form to make use of that connection.
Does that make sense?
Paul -
Using BAPI for calling transaction from NON-SAP system
hi all,
im new to BAPI , i m working in producton firm we r short of license of SAP, we have given few authourisations to our venders and we also have implemented HR portal and we r having shortage of license in that too. so my question is that can we use BAPI to reduce the use of SAP on vendors side and also for HR portal? like by using non-sap system on vendors side and for portal we can resolve the issue of licenses..???
if yes then i want to do it that will be good for my carrer point of view. plzz help me out and give me the simple solution on it. we can not afford to buy the licenses bcoz of financial issues..
thanxx....Hi Nilesh,
Depending on the Scenario you need to decide what BAPI you will use. what solution are you excepting?
Regards
Shital -
Using bapi how to upload the data into sap database?
hi dear all,
im facing problem with bapi ? let me edcuate on bapi ..
i will be waiting for reply.
my e-id :[email protected]
thanks®ards
shiva.Hi
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
with each other at the Business Object / Process level.
Check this link to know more about BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling & logging features. .
To know more about BDC,
check the link.
http://sappoint.com/abap/
Main differences are...
In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
not only that...
when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
http://www.sap-img.com/abap/ale-bapi.htm
SAP BAPI
BAPI STEPS
Hope this helps.
ashish -
How to update data using BAPI for MD61
Hello,
IN my zprogram i used to bapis for uploading data from flat file to sap-system
1)BAPI_requirement_create
2)BAPI_requirement_change
i)my program is taking data from my flat file but it is wipping out old data i nned to update not to overwrite is there any BAPI for this query
ii)One more thing if data is already entered in on date (i.e 10.07.2009) and when he upload data from flat file for another date same month (12.07.2009) old date data sholud not removed ...
Please reply me if my query is not understand..
Thanks in advance..Assuming you have your new requirements in table IT_REQ.
You could do something like:
DATA: it_req TYPE TABLE OF BAPISSHDIN.
DATA: l_req TYPE BAPISSHDIN.
DATA: it_req_out TYPE TABLE OF bapisitmeo.
DATA: l_req_out TYPE bapisitmeo.
* Get existing requirements
CLEAR it_req_out[].
CALL FUNCTION 'BAPI_REQUIREMENTS_GETDETAIL'
EXPORTING
material = p_matnr
plant = p_werks
requirementstype = p_bedae
version = p_versb
reqmtsplannumber = ''
TABLES
requirements_out = it_req_out[]
return = lt_return[].
* Append old requirements to requirements table
LOOP AT it_req_out INTO l_req_out.
MOVE: l_req_out-date_type TO l_req-date_type,
l_req_out-req_date TO l_req-req_date,
l_req_out-req_qty TO l_req-req_qty,
l_req_out-unit TO l_req-unit.
APPEND l_req TO it_req.
ENDLOOP.
* Change requirements
CALL FUNCTION 'BAPI_REQUIREMENTS_CHANGE'
EXPORTING
material = p_matnr
plant = p_werks
requirementstype = p_bedae
version = p_versb
reqmtsplannumber = ''
vers_activ = p_vervs
TABLES
requirements_schedule_in = it_req[]
return = lt_return[]. -
How to update the Weekly data using BAPI for MD61
Hi All,
i have used two BAPI's in my Z program to upload data from flat file to sap-system (BAPI_REQUIREMENTS_GETDETAIL and BAPI_REQUIREMENTS_CHANGE) and i uploaded the Monthly Data from the flat file on sap system successfully.
but i have to also upload the Weekly Data on the sap system using BAPI.
is there any BAPI for the same or what can be the solution for the uploading weekly data on sap system ?
Please reply me.
Thanks in advance..
Edited by: Prajapati_Shyam on Dec 29, 2010 4:19 PMHi Jovito,
thanks for your reply,
i developed a Z program to upload monthly data as well as weekly data into tcode MD61 by selecting the radio button weekly or monthly but i am not able to upload the weekly data as i didnt' get any BAPI OR any other logic to upload weekly data Or not able to use the existing BAPI BAPI_Requirement_create , because the upload file is in monthly format.
MD61 tcode can be used for both data (Monthly or weekly data).
can you suggesst me any BAPI to upload the weekly data or any other logic for the same
thanks & regards
Prajapati -
Creating a PO Using BAPI For Multiple PLants Or Multiple Line Items
Hi All
Can you please suggest me how to create a Purchase Order Using BAPI_PO_Create1 for Multiple Plants Or for Multiple Line items. The Requirement is like the PO is for single material for single vendor but for mulple stores i.e plants
NOte: Suggest me the Creation of PO for MUltiple Line items or for multiple plants Using BAPI . Hope you people will give me the needful.
Regards
Shivakumar BandariHi,
Here is the sample code to do that...
*---> po header data
wa_poheader-vendor = your vendor..
wa_poheader-doc_type = Your doc type..check with Functional contact....
wa_poheader-purch_org = Purchasing Org..
wa_poheader-pur_group = Purchasing Group
*---> po header data (change toolbar)
wa_poheaderx-vendor = 'X'.
wa_poheaderx-doc_type = 'X'.
wa_poheaderx-purch_org = 'X'.
wa_poheaderx-pur_group = 'X'.
*---> poitem data
data: item like ekpo-ebelp.
item = '0010'.
loop at t_parts.
it_poitem-po_item = '00010'.
IT_POITEM-PLANT = Plant..
IT_POITEM-STGE_LOC = Sloc...
*---> poitemx (item data change toolbar)
it_poitemx-po_item = '0010'.
it_poitemx-po_itemx = 'X'.
IT_POITEMX-PLANT = 'X'.
IT_POITEMX-STGE_LOC = 'X'.
*---> add record's to internal table
APPEND: it_poitem,
it_poitemx.
endloop.
*call bapi_po_create1
CLEAR v_ebeln.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_poheader
poheaderx = wa_poheaderx
IMPORTING
exppurchaseorder = v_ebeln
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx.
*---> check the return table for error message
READ TABLE it_return WITH KEY type = 'E'.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
endif.
Thanks,
Murali -
Using BAPI for outbound delivery processing "BAPI_DELIVERYPROCESSING_EXEC"
Hi all,
I am using this bapi "BAPI_DELIVERYPROCESSING_EXEC" for Outound delivery processing. But How can I use this BAPI for Batch Split functionality. Because Here we have to enter batch also while processing outbound delivery with reference to Sales Order. Please reply anyone on high priority
Regards,
Venkat
Ph: 9990417848Hi,
When u r using BAPI then include in it this batch Split fnality like do the recording in SHDB and transfer recording and in this recording record the batch split.
Also what u can do is create a BDC and include the std bapi with this batch split in it.
Regards
Krishna -
The Transportation Module provides a very detailed functionality to capture & control the transportation both inward and outward. However there is a set of transaction codes in SAP ECC 6.0 which may provide some functionality on transportation.
Can Logistics Execution provide some basic control in the absence of Transportation Module? Also what are the advantages Transportation Management module provides over Logistics Execution in SAP ECC 6.0?Hello Prasad,
For ESS and MSS you do not require special data from the backend side, If a person has master data maintained in PA30, He can see his personal details in ESS, For that employee should maintain the Portal user id in Infotype 0105 , subtyp0001.
With that userid he can able to enter the portal and maintain his details. Same is the case for MSS , Manager should have maintained 0105 subtype 0001. and he can see the details of his employees in MSS application.
For ESS you need to have Portal
SAP_ESS
PCUI_GP
BP for ESS
You can check the following link :
http://wiki.sdn.sap.com/wiki/display/ERPHCM/HOWTOGETRIDOFSPSTACKMISMATCHISSUES
about the compatibility of Support Packages..
All the above mentioned package should be deployed on Eneterprise Portal.
You can search on various blogs also about this information.
Best Regards,
Deepak.. -
Using BAPI for Quotations: BAPI_SLSTRANSACT_CREATEMULTI
Hi everyone,
I am working with the BAPI: BAPI_SLSTRANSACT_CREATEMULTI to create an enquiry OR even a quotation. Using t.code SE37, in the following tables I enter:
Header: (2 fields)
Process_Type: ZAG (t.type for enquiry)
Description: description of the enquiry
Partner: (3 fields)
Partner_Fct: (partner function) - e.g. 00000001 (SP)
Partner_No: (partner number) - BP ID
KIND_OF_ENTRY
(Entered 5 partners; 1 that was entered manually (SP) and the other four which are determined auto.)
HENCE in the INPUT FIELD I have 5 BP's
INPUTFIELDS (1 Field)
Fieldname : entered 5 BP's
On execution, the return table shows three errors:
E CRM_ORDER_CUST 004 System error: Incorrect call of read module for table CRMC_OBJECTS!
W CRM_ORDER 003 Object type cannot be processed
A CRM_ORDER 009 Program error: Incorrect values in interface parameters
I entered handle 00000001 for header and 0000002 for the partner and specified the same in the INPUTFIELDS: REF_HANDLE, it leads to more errors
Any solutions please? Deserving points shall be awarded.
Best Regards,
Jacob.
Edited by: Jacob Raj on Mar 14, 2008 1:50 PMHi,
May be following code is useful for you.
******************************Header Data***********************************
DATA: lwa_header TYPE bapibus20001_header_ins,
lwa_input_fields TYPE bapibus20001_input_fields.
lwa_header-handle = '0000000001'.
lwa_header-process_type = lwa_crmd_orderadm_h-process_type.
APPEND lwa_header TO i_header.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'ORDERADM_H'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'PROCESS_TYPE' CHANGING lwa_input_fields
********************************Partner Data********************************
DATA:lwa_partner TYPE bapibus20001_partner_ins,
lwa_input_fields TYPE bapibus20001_input_fields,
lwa_partner-ref_handle = '0000000001'.
lwa_partner-ref_kind = 'A'.
lwa_partner-ref_partner_handle = '0001'.
lwa_partner-kind_of_entry = 'C'.
lwa_partner-partner_fct = '00000001'.
lwa_partner-partner_no = <partner no>.
lwa_partner-no_type = 'BP'.
lwa_partner-display_type = 'BP'.
APPEND lwa_partner TO i_partner.
lwa_partner-ref_partner_handle = '0002'.
lwa_partner-partner_no = <partner no>..
lwa_partner-partner_fct = '00000014'.
APPEND lwa_partner TO i_partner.
lwa_partner-kind_of_entry = 'A'.
lwa_partner-ref_partner_handle = '0003'.
lwa_partner-partner_no = <partner no>.
lwa_partner-partner_fct = '00000012'.
APPEND lwa_partner TO i_partner.
CLEAR lwa_input_fields.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'PARTNER'.
lwa_input_fields-logical_key = '0001'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.
CLEAR lwa_input_fields.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'PARTNER'.
lwa_input_fields-logical_key = '0002'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.
CLEAR lwa_input_fields.
lwa_input_fields-ref_handle = '0000000001'.
lwa_input_fields-objectname = 'PARTNER'.
lwa_input_fields-logical_key = '0003'.
lwa_input_fields-ref_kind = 'A'.
PERFORM populate_input_field_name USING 'DISPLAY_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'KIND_OF_ENTRY' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'NO_TYPE' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_FCT' CHANGING lwa_input_fields.
PERFORM populate_input_field_name USING 'PARTNER_NO' CHANGING lwa_input_fields.
FORM populate_input_field_name USING lv_field_name TYPE string
CHANGING lwa_input_fields TYPE bapibus20001_input_fields.
lwa_input_fields-fieldname = lv_field_name.
APPEND lwa_input_fields TO i_input_fields.
ENDFORM.
***************************CALL BAPI_SLSTRANSACT_CREATEMULTI*********************************
CALL FUNCTION 'ZBAPI_SLSTRANSACT_CREATEMULTI'
TABLES
header = i_header
return = i_return
sales = i_sales
partner = i_partner
input_fields = i_input_fields
created_process = i_created_process
saved_process = i_saved_process
COMMIT WORK.
If helpful kindly reward me.
Thanks & Regards,
Anirban
Maybe you are looking for
-
How can I fix my mail problem?
I have a Macbook Pro running OS X Snow Leopard 10.7.5. My mail app is constantly asking me to re-enter my password, also there is checkbox that says, "Remember this password in my keychain". By the way I am using a Yahoo mail account. First I tried
-
I'm interested in the new soundlink mini Bose wireless speakers that function only via bluetooth. I wanted to diffuse music to them from an airport extreme connected hard drive through my macbook air. I don't want to stoc music on my mac given the li
-
Can the lumia 525 be updated to next version of wi...
Can the lumia 525 be updated to next version of windows (probably 8.1) ? When the phone will be launched in india? Solved! Go to Solution.
-
Hello ! I read that controlled access to EJB methods can be achieved by mean of defining security roles (in the EJB deployment descriptors). I also read that each time an EJB method is called, the EJB client's Principal is forwarded to the EJB contex
-
DLL calling a subsidiary static library
I've built a DLL using labwindows that calls a subsidiary static library. I've added a step in Test Stand that calls this DLL. On my development station all is good. The subsidiary library is called. But, on a deployed station I keep getting a "Ca