Abap proxy to JDBC call
The scenario is Sender is ABAP proxy and receiver side is JDBC adapter.
While creating Purchase order(PO) in SAP, interface should be triggered and it should go and fetch the tax amount from a external Database(DB) and return the tax amount to SAP.
PO can have mulitple line items so for each item it should get the tax amount from DB.
I know we can change the occurence of Statement tag of JDBC structure to unbounded and accomplish multiple stored procedure calls.
But how to handle multiple response from DB for each line item and send it as a single message to SAP.
Is this possible without BPM ?
For every purchase order there are mulitple line items and for each line item we need to extract tax amount.
Question: Are these line items are in single db table or different? If it is one table, Why dont you use jdbc lookup during mapping time to fetch item amounts (Just using Select queries.. if the requirement is feasible) ?
If there are multiple tables, receiving response from many tables might not be possible. If response fails from first table then further query to the tables will not proceed. Jdbc treats entire query as one transaction.
Similar Messages
-
ABAP Proxy to JDBC syncronous method
Hi Experts,
I am very new to ABAP Proxy to JDBC syncronous method.
I have used 4 DT, 4 MT, 2 MI, 2 MM and 1 IM.
I have used reference from
SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3928. [original link is broken] [original link is broken]
My question is in Integration Directory how many sender agrement, receiver agrement, receiver determination and interface determination should i use?
Is my above DT , MT , MI , MM and IM is correct?
I am not using any BPM.
Thank you in advanced.
regards,
S.Saravannanmrsaravannan wrote:
> My question is in Integration Directory how many sender agrement, receiver agrement, receiver determination and interface determination should i use?
for a Sync sceanrio, you will create
1 RD
1 ID
1 SA (since its a ABAP proxy call this is optional)
1 RA
>
> Is my above DT , MT , MI , MM and IM is correct?
Yes -
Using of Integration Scenario in a Abap Proxy to JDBC receiver synchronous
Hi ,
Can any one help me out how to go about for creating Integraion scenario in ESR as i'm new to the use of Integration scenario..
its an Abap proxy to Jdbc synchronous scenario... kindly help in this regards.Hi Indudhar,
Right click on the namespace where you want to create the IS and say new, Select process integration scenario option, give a suitable name and say OK.
In the Component View section right click on the first grey column and Insert a sender Application component. Enter ur product and the software component version. Like wise in the next grey column enter the target Application component.
Now go to the top level menu and click on view and select grid.
Now right click on each App. component and insert the created actions. If the scenario is sync then the actions will be side by side otherwise the target one will be in the next grid of the target app. component.
After entering the actions click on the source action then press shift and click on the target action, right click and choose create connection between the two actions.
Fill in the info and then save.
Regards,
Anshul -
Sender Abap Proxy -- Receiver JDBC , catch communication channel exceptions
Hi All,
I have a sender abap proxy and a receiver jdbc asynchronous interface.
Now under some circumstances when I send some junk data for an update query(which satisfies metadata requirement but wrong primary key) it shows chequered flag in both XI and r/3.
But in communication channel it shows error.
Queries:
1. How do I handle this.
2. Since this is triggered from Abap wht will be subrc when method ends in this particular case.
3. Is there any possibility of program goin into dump?
Regards,
PremYou can catch the exception in cx_ai_system_fault.
http://help.sap.com/saphelp_nw70/helpdata/en/75/a55c3cff8ca92be10000000a114084/content.htm
DATA:
lo_mes TYPE REF TO
[Client proxy class],
l_sys_exc TYPE REF TO
cx_ai_system_fault,
l_app_exc TYPE REF TO
cx_ai_application_fault.
CREATE OBJECT lo_mes.
TRY.
CALL METHOD
lo_mes->EXECUTE_SYNCHRONOUS
EXPORTING
OUTPUT = ls_request
IMPORTING
INPUT = ls_response.
CATCH cx_ai_system_fault
INTO l_sys_exc.
* handle system error
EXIT.
CATCH cx_fault_1
INTO l_app_exc.
* handle application error 1
CATCH cx_fault_n
INTO l_app_exc.
* handle application error n
CATCH cx_ai_application_fault
INTO l_app_exc.
* handle other
* application errors
ENDTRY.
Thanks,
Beena. -
Handling Transport ack. in Abap Proxy to JDBC Scanario
HI all
I have a scanario where i have message which is being sent from an abap proxy to a SQL Server database using JDBC adapter. The scenario involves a BPM.While sending the message the message shows delivered in MDT (Message monitor for Adapter ) but the Business process is still executing and is waiting for the acknowledgement(transport) . Can anyone please tell me how do find where the exact prblem lies.And how do i delete these acknowledgements. Even though i deleted the work items the Ack Status column still shows "Still Awaiting Acknowledgement"
regards
Nilesh TaunkHi,
As metioned check the Send Step Properties ( mode etc)..
After changing activate the BPM and refersh the cache in SXI_CACHE and test the scenario.
also check the BPM technical details. For this go to SXMB_MONI>PE>Technical Details so that you can find the logs in the monitor.
Regards,
Moorthy -
SOAP--PI--ABAP Proxy-how to call this scenarion from third-party PeopleSoft
My scenario is:
Third-party Peoplesoft sending an Asynchronous XML message to PI through SOAP Adapter which will then be processed by ABAP proxy server.
I have everything in place (SDL,IR,ID & ABAP Proxy). I have created a SOAP tool that uses URL (http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel) and XML message to test the process - it works.
Now the problem is the Peoplefoft system guys need help to figure out how do they reach our system and this process.
per my understanding, I created a WSDL using ID>Tools>Define Web Service option and sent it to them hoping they will be able to use this WSDL to program their call to our system.
I also additionally sent them the SOAP client tool that i use to test the process that has default XML payload in it.
The only change i made in WSDL before sending to third-party is - replaced location tag from the actual URL that reaches sender SOAP adapter to the external URL that will be used by PeopleSOft system reach our network. I think our network guys are going to map this external url to internal URL.
Is there anything else i can do as a PI consultant to help Peoplesoft reach our network and hit the SOAP Adapter (SOAP sender adapter channel for my process).
I will Appreciate any ideas.
Thanks,
SaurabhAs a PI developer, ur only task is to provide the correct wsdl to the Peoplesoft guys. As u have changed the URL, there is nothing else to be done at ur end.
The SOAP Client user just have to use the wsdl and fill in the data. Before the communication, please make sure that there are no firewall restrictions.
Regards,
Prateek -
Reg. Client(ABAP) Proxy to JDBC scenario
Hi All,
I am working on a scenario of Proxy to JDBC. The scenario goes like this.....
SAP is the sender and I need to fetch data from the database table at the R/3 end and update in the legacy system at the receiver end .
Can anybody guide me apart from PI configuration, the settings need to be done at the R/3 end in the transaction sproxy i.e. the ABAP class and objects. Also let me know if I need to trigger the interface weekly once, is it possible to trigger it automatically by using ABAP class and objects else I need to write an ABAP program in order to trigger the interface.
Thanks for understanding in advance.
Regards,
Neethu ChordiaHi,
Can anybody guide me apart from PI configuration, the settings need to be done at the R/3 end in the transaction sproxy -
As Raj suggested please search on SDN, you will find lot of links on this.
Also let me know if I need to trigger the interface weekly once, is it possible to trigger it automatically by using ABAP class and objects else I need to write an ABAP program in order to trigger the interface. -
>For this you need to write Abap class program and override method "Execute asynchronous" this will send the SAP R3 data to XI and then you have to configure job on R3 to run this program periodically as per your requirement.
Divyesh Vasani -
ABAP Proxy to JDBC : UPDATE_INSERT issue.
Dear Friends
I am inserting one ekpo records to MS SQL server. my structure and records are below.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_EKPO_RECEIVE xmlns:ns0="http://gspcgas.net/asset_rfid">
- <StatementName>
- <dbTableName action="UPDATE_INSERT">
<table>EKPO</table>
- <access>
<EBELN>4500000687</EBELN>
<EBELP>00010</EBELP>
<MATNR>000000000100000012</MATNR>
<MENGE>1.000</MENGE>
<MEINS>EA</MEINS>
<WERKS>1000</WERKS>
<LGORT />
<AEDAT>2011-12-12</AEDAT>
<BUKRS>1000</BUKRS>
<ANLN1>010023000315</ANLN1>
<PSTYP>0</PSTYP>
<KNTTP>A</KNTTP>
<LOEKZ /> <-- during insertion I am not updating this field ( this is for item deletion)
</access>
- <Key1>
<EBELN>4500000687</EBELN>
<EBELP>00010</EBELP>
</Key1>
</dbTableName>
</StatementName>
</ns0:MT_EKPO_RECEIVE>
this works absolutly fine and record inserted in the MS SQL server.
problem occurs when in second run my user is changing the fields means he deletes the item from the PO, but it is not reflecting in the data base. only I can see previously created entery not the changed one. I have below payload in RWB for the receiver communication channel.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_EKPO_RECEIVE xmlns:ns0="http://gspcgas.net/asset_rfid">
- <StatementName>
- <dbTableName action="UPDATE_INSERT">
<table>EKPO</table>
- <access>
<EBELN>4500000687</EBELN>
<EBELP>00010</EBELP>
<MATNR>000000000100000012</MATNR>
<MENGE>1.000</MENGE>
<MEINS>EA</MEINS>
<WERKS>1000</WERKS>
<LGORT />
<AEDAT>2011-12-12</AEDAT>
<BUKRS>1000</BUKRS>
<ANLN1>010023000315</ANLN1>
<PSTYP>0</PSTYP>
<KNTTP>A</KNTTP>
<LOEKZ>L</LOEKZ> <---- I receive the value here when user has deleted the item in the PO.
</access>
- <Key1>
<EBELN>4500000687</EBELN>
<EBELP>00010</EBELP>
</Key1>
</dbTableName>
</StatementName>
</ns0:MT_EKPO_RECEIVE>
Please help me to understand why the changed values are not reflecting in my MSSQL server from PI. and tell me what should i do to correct it. I have no error message in RWB for the receiver communication channel. please reply me. your any reply will be highly appreciated. Please reply meDelete is handled differently when compared to an Update_Insert.
an Update_insert statement is like a modify command. it either inserts an entry or changes it, but does not delete it. You need to specify the keys in the Update_insert XML-SQL.
In case you have a scenario for delete along with update/insert, please do the following
1. Let the source system determine an action, and pass it to PI
2. Based on the action code, implement 2 split mappings using enhanced interface determination ( rule based interface determination).
3. Implement 2 seperate maps for Delete and Update, and call them based on the action code rule from the interface determinaton.
Hope this helps.
Regards,
Abhishek -
Sender Abap Proxy -- Receiver JDBC MaxDB
Hi Experts,
Please, PI works with MaxDB database?
What is the procedure? Need to install drivers?
SO is Linux.
Thanks for the help!Hi,
>>>>Please, PI works with MaxDB database?
yes
>>>What is the procedure? Need to install drivers?
yes you need to install the driver - the rest is the same as with any other DB
Regards,
Michal Krawczyk -
Sender ABAP Synchronous proxy -- PI -- JDBC sync scenario pls!!
Hi Guys,
Can any one help to find one sample scenario like ABAP Proxy --> PI --> JDBC Sync call ? Sync ABAP proxy sample code any 2 or more filelds going from ABAP proxy and maps on JDBC sync request, up date target side SQL server database tables, in case if any error happens error/success message must go back to SAP one Z table with response.
Any help would be really great!!
Many thanks in advance
Sanup date target side SQL server database tables, in case if any error happens error/success message must go back to SAP
one Z table with response.
When you do an update you can get back the number of rows updated in the JDBC response....you can find this in the help page showing JDBC structure. If you are looking for any other response then probably the message needs to be genarated by PI itself after checking the response from JDBC.
Regards,
Abhishek. -
Error Handling for ABAP Proxy sender
Hello Everyone,
I am trying out a scenario of SAP R/3 to Oracle database (ABAP Proxy to JDBC).
I have the following code and it works fine.
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
I know that the above Catch block would be used to handle system errors on the sender side.
Please tell me what kind of errors could these be and what I can do to test these errors. ie. I want to create error situations explicitely and see how they are handled.
Thanks and Regards,
AshwinThanks guys, this was useful.
My scenario is for Asynchronous communication.
I guess Fault messages are used in case of Synchronous communication for handling application errors. So if there was something wrong at the JDBC end then I could use the fault messages.
Have i got this right?
I also came across this piece on Acknowledgements. But is says that they can be used with the following Receivers:
The following receivers support acknowledgments:
ABAP and Java proxies (XI 3.0 SP1 for the latter)
Integration processes
IDocs (note that IDocs only return acknowledgments when they have been configured using the ALE audit)
Receiver adapters support system acknowledgments but not application acknowledgments
My Receiver is JDBC. So I guess I cannot use acknowledgements either.
Hence, I need to know what I can do to replicate the system errors eg. failed server etc...so that I can get catch these errors during sending.
I'll tell you abt what happened earlier.
My XI server was down. I executed the code for the sender ABAP Proxy and it did not catch the error. In SXMB_MONI in the R/3 system, I could see the messages queued up. When the XI server started, the messages were transferred to XI.
I need to handle such errors...ie. If the server is down or message did not reach XI then my ABAP program that sends data via ABAP proxy needs to know that something went wrong.
Thanks and Regards,
Ashwin -
Synchronous ABAP Proxy - no answer
Hello!
I have scenario ABAP Proxy --> PI --> JDBC
It's synchronous. Messages are sending, in PI in SXI_MONITOR I see a response from database, but in ERP in debug mode I don't see this response
My proxy call look like that:
TRY.
CALL METHOD g_proxy->OS_DOM_CAJO
EXPORTING
output = ls_out_mt
IMPORTING
input = ls_in_response_mt.
COMMIT WORK.
CATCH cx_ai_system_fault .
CATCH cx_ai_application_fault .
ENDTRY.
So, there is no data in ls_in_response_mt.Hi,
1. both of your service interfaces are sync right (outbound and inbound) ?
2. and did you try to use the reponse XML from JDBC in your message mapping (copy/paste) to check the mapping as Grzegorz suggested ?
3. just a reminder :
you can also turn on loggin_sync on ERP backend not only in PI system
to see sync calls in ERP backend too (req/resp)
Regards,
Michal Krawczyk -
Problem with Synchronous abap proxy time out
Hi there.
I have the following scenario:
sync sync
3rd party <--> PI <--
> ERP
http abap proxy
In the implementing class on the abap proxy i'm calling an standard BAPI, followed by a commit and returning the result.
The 3rd party app has a mechanism that when a message fails, he'll retry each 5 mins until it gets the response.
Last night there where some delays on ERP that cause the sync mesages to timeout, the 3rd party retried about 10 times to send the message until it finally went off. This morning i check and i have the same message 11 times on ERP!!, to my understanding if the sync comm timed out the process will abort and the message will not be processed on ERP, does anybody knows if im missing some configuration for this to work this way??.
Kind Regards,
Roberto.Hi Roberto.
There are a lot of time out configures in PI .
Follow the link that explain about this:
How to Investigate Timeouts In Synchronous XI PI Scenarios
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c059d583-a551-2c10-e095-eb5d95e03747
I hope to help you.
If you still keep this problem, you can ask me more about it.
Regards..
Bruno. -
Hello folks
Have a sender abap proxy to jdbc scenario.
Have a question: how do we trigger abap proxy from SAP ? can we do by scheduling a job or some other better ways exist ?
Thank you.>
> Ok req is : ABAP - > JDBC scenario : each xml payload is small... just 5 -6 fields coming over from SAP but it is very frequently triggered on SAP ... every 1 minute.. this will be triggeed.
>
> if its job / batch based: aggregate records come over for every 5 -10 minutes... which is good for PI but for SAP overhead is more since job is scheduled very frequently.
>
> if it is event based trigger of abap proxy from SAP then multiple small messages flood PI since data uis not aggregated.
>
> Dont know what is generally preferred?
>
Completely depends on how you want and depends on requirement,if you are able to generate multiple records at a time then it it would be really good , because resource utilization in ECC and PI also will be reduced.
else go with individual record.
Regards,
Raj -
Hi All,
1. I need to send material master data from sap r/3 to XI through abap proxy. How can i do this? can i write code in abap to extract material master data by using select statement? Please let me know.
2. I am receiving invoice data from XI I need to post this data into sap r/3 by abap server proxy. This data shouldn't be post immediately. it should be in parked status after doing some cross check i need to post. How can i do this?
Regards,
venkateshHi,
>>>2. I am receiving invoice data from XI I need to post this data into sap r/3 by abap server proxy. This data shouldn't be post immediately. it should be in parked status after doing some cross check i need to post. How can i do this?
inside your abap proxy (server) just call BAPI BAPI_INCOMINGINVOICE_PARK
and you can park invoices with this one
there is no special handling necessary in ABAP proxy for this requirement
parking of invoices is a standard FM in SAP
>>>1. I need to send material master data from sap r/3 to XI through abap proxy. How can i do this? can i write code in abap to extract material master data by using select statement? Please let me know.
there is no standard proxy for materials so just use IDoc instead
Regards,
Michal Krawczyk
Maybe you are looking for
-
When I try to sync it says sync can not start because the sessions hasn't started?
-
How to restore data files from a purchased app that isn't working
I recently had to reset my iPad after an ios7 problem with hyperlinks. The reset fixed the hyperlink problem but now I can't open excel or word files created in a purchased application, productivity suite. When I click on the file, it starts to ope
-
My mac got slow suddenly.... i think too much buildup of cache (i am a ex-windows user).... how to clean wanted files and make my Macbook to run again like a horse?????
-
How to upgrade QuickTime to access iTunes
I just downloaded latest OS onto my Mac and now cannot open iTunes. When I try and open itunes, it says: 'iTunes requires QuickTime 7.5.5 or later'. When I try and download QuickTime, I am told it is part of my OS package. What can I do?
-
Cost assosiated with the cost center
Hi, How do I know the cost associated with a particular cost center. Also I would like to distribute the cost in a particular center to all the active cost centers. Please let me know how can this be achieved. Thanks.