JDBC-IDoc through XI
Dear All,
I am using JDBC and IDoc Adapter for a typical scenario in XI.Please tell me how the channel will get INVOKE while there is updation in Database Table(JDBC Side)
in following cases
Deletion
Updation
Insertion
thanks,
RP
RP,
As a standard, have a status flag to indicate whether the record is processed by XI or not. If the value of the stats flag field is unchanged then it implies the record is not processed by XI yet. In your sender JDBC adapter write an update query in the update column that will update the status flag. Ensure you have same where clause for your select and update queries.
In case a record is updated, make your appln update this status flag field to unread.
P.S: JDBC adapter does not work on event based, it just keeps polling the table for a new record which satisifies the select query.
Regards,
Jai Shankar
Similar Messages
-
Creation of IDOC through abap program.
hello all,
I hav created idoc through abap program. I hav used FM 'Master_idoc _distrribute'.this program creates an idoc but giving status 30. can any one tell me how to get status 03. I hav already created port, Logical sys,partner no.,distribution model.
My Program is as follows:
ABLES : CRMD_ORDERADM_I,CRMD_ORDERADM_H,CRMD_SCHEDLIN.
DATA : S_CTRL_REC LIKE EDIDC OCCURS 0 WITH HEADER LINE,"Idoc Control Record
ORDER_NO TYPE CRMT_OBJECT_ID VALUE '5000000032'," SEGMENT ORDER DATA
PRODUCT TYPE CRMT_ORDERED_PROD VALUE 'SRV_01',
QUANTITY TYPE CRMT_SCHEDLIN_QUAN VALUE '1.000'.
DATA : ZORDER LIKE ZORDER_NUM OCCURS 0 WITH HEADER LINE.
DATA : T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE. "Data Records
DATA : T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE. "Generated Communication IDOc
CONSTANTS :
C_ZRZSEG1 LIKE EDIDD-SEGNAM VALUE 'ZORDER_NUM'.
PARAMETERS : C_MESTYP LIKE EDIDC-MESTYP DEFAULT 'ZORDER_IDOC2', "Message Type
C_RCVPRT LIKE EDIDC-RCVPRT DEFAULT 'LS', "Partner type of receiver
C_LOGSYS LIKE EDIDC-RCVPRN DEFAULT 'BSNL_OUT',
C_RCVPOR LIKE EDIDC-RCVPOR DEFAULT 'A000000006',
C_SNDPOR LIKE EDIDC-SNDPOR DEFAULT 'SAPBCD0000',
C_SNDPRN LIKE EDIDC-SNDPRN DEFAULT 'BCDCLNT100',
C_IDOCTP LIKE EDIDC-IDOCTP DEFAULT 'ZORDER2',
C_SNDPRT LIKE EDIDC-SNDPRT DEFAULT 'LS'. "Destination System
***START-OF-SELECTION
START-OF-SELECTION.
PERFORM GENERATE_CONTROL_RECORD.
PERFORM SEND_IDOC.
*& Form generate_control_record
FORM GENERATE_CONTROL_RECORD .
S_CTRL_REC-RCVPOR = C_RCVPOR. "Receiver Port
S_CTRL_REC-MESTYP = C_MESTYP. "Message type
S_CTRL_REC-IDOCTP = C_IDOCTP. "Basic IDOC type
S_CTRL_REC-RCVPRT = C_RCVPRT. "Partner type of receiver
S_CTRL_REC-SNDPOR = C_SNDPOR. "SENDER PORT
S_CTRL_REC-RCVPRN = C_LOGSYS. "Partner number of receiver
S_CTRL_REC-SNDPRT = C_SNDPRT. "Sender Partner type
S_CTRL_REC-SNDPRN = C_SNDPRN. "Sender Partner Number
APPEND S_CTRL_REC.
ENDFORM. " generate_control_record
*& Form send_idoc
FORM SEND_IDOC.
ZORDER-ORDER_NO = ORDER_NO.
ZORDER-PRODUCT = PRODUCT.
ZORDER-QUANTITY = QUANTITY.
APPEND ZORDER.
T_EDIDD-SEGNAM = C_ZRZSEG1.
T_EDIDD-SDATA = ZORDER.
APPEND T_EDIDD.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = S_CTRL_REC
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_IDOC
MASTER_IDOC_DATA = T_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK.
LOOP AT T_COMM_IDOC.
WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
ENDLOOP.
ENDIF.
ENDFORM. " send_idoc
I hav created segment , basic type,message typealso and release also .I also linked them.
Plz help me.
HemlataHi Hemalatha,
Just call this Progream RSEOUT00 from your Zprogram and pass the basic parameters like IDOC number, Basic type,Partner number etc.
You can check the parameters by executing the Program RSEOUT00.
This Program will change the status of your IDOC 30 to 03.
Thanks.
Note:Reward Points if you find useful. -
How To Edit Failed IDocs Through Report ?
Hi
I have the requirement of editing (Modifying) IDocs through a report program..
( My program displays the content of a specified segment of failed IDocs in the ALV format..
Then the changes made to those fields in ALV have to be updated in those failed IDocs.. So that i can reprocess the IDocs.. )
Is there any BAPI or BADI or Any other solution to edit IDocs through a report....??
I dont want to use BDC as the report program is meant for editing huge number of failed IDocs..
Please help me..
Thanks a lot,
RajThere is a similar POST open in DATA TRANSFER FORUM...
-
ALE Error while sending PO IDOC through EDI
Hi Experts,
I am sending one PO IDOC through EDI but I am getting the following error:-
Message no. B1130.
"Too many recipients found for message type ORDERS in the ALE model"
How can I solve this error ? Please guide me in this regards as this is an
important issue with urgency.
Thanks & Regards
Jitendra GujarathiPlease check this discussion thread
Re: Too many recipients found for message type in the ALE model -
In sap 4.7 ver i want to dispatch an Idoc through http in xml format
Hi
Here i am giving the brief scenario of about my
requirements "::::
Our organization need to receive an IDoc through
HTTP into XML format then we have to send an acknowledgement back to USA (external system
located)
then we hav eto process tha tIDoc an dsend it back
to the edi 850 ...
we are not using Sap Business Connector
Plz send the suggestions as soon as possible
I really appreciated if u can give the suggestions
regarding my business scenario ..
without using any thirdparty tool in sap 4.7 version it is possible how can i do that ??
Thanks & Regards ,
bakThe exact error message I'm getting is :
ABAP XML formatting error in XML node of type "element", name: "abap" -
Hello experts.
I have next scenario JDBC --> Idoc.
I have a sender JDBC adapter who reads information of BD table. This information is passed to Idoc, and update DB records, for next iteration don´t touch this records.
JDBC adapter reads in 5000 sec interval, but how I can do that JDBC adapter only read when another condition?
For example if read process is more large then 5000 secons, JDBC adapter reads the same information but my process until don´t update BD table, and this is a BIG problem , but two identicals Idocs are generated.
Some one know how I can solve this problem?
Thanks.Julian,
When you make the option as serializable,the update query will update all records that satisfy the update query but it will ensure that no new data is entered in to the table between the execution of the select and update query.
In your case as I guess you have given maxRecords in the select Queryt ( only 1500 ) records were selected , but as you aren ot using this same criteria in the update query all rows have been updated.
Remember Serializable ensure that no new data is enetered into the table between the select and update query's execution. You should ensure that the update query only updates the data selected in the Select Query.
A DB expert should be able to helo your forumuale the required querry.
regards
Bhavesh -
JDBC == IDOC sceanrio
HI Experts,
Now i am doing sceanrio like JDBC ==> IDOC , here oracle side 1-unbound and IDOC side 1-1
So how can i create each IDOC for each record at oracle side.
for example, if i have 5 records at oracle side, i need to create 5 IDOCs , so how can i do this mapping .
vasuHi,
Change the occurrence of IDOC to 1...unbounded and map each record from source to IDOC node. Please refer the below links.
The specified item was not found.
Multi-Mapping without BPM for IDoc Scenarios- Yes, its possible!..!!!
Regards,
Priyanka -
Sending IDOCS through transaction PFAL
Hi,
We have a requirement to send idocs through transaction PFAL for a set of PERNRs for all infotypes.What is the way to go about this?
Thanks ain Advance!
Regards,
Nejuma Iqbalhi
you cannot send IDocs thru PFAL transaction.
you can send HR Master Data thru PFAL.
yes you can send the Pernrs as they are Components of Organizational Elements.
Here is the Procedure to send Personal Numbers:
1.Execute the transaction PFAL.
2.Give the object type as P.
3.Give the Pernr values in Object ID field
4.Select the transfer mode as Update
5.In the Receiving Partner give your receiver name
6.Give the message type as HRMD_A in the Message Type field.
7.Dont change the remaining values.Keep it as such.
8.Execute the Program.
Also keep in mind that while sending the HR data you need to follow the certain sequence
unless otherwise your data wont be replicated successfully.
Here is the sequence O,S,P and C.
Means before sending P you should send O and S.
Cheers,
Abdul Hakim
Mark all useful answers.. -
IDOC through Proxies ABAP-PI ports
HI,
Please suggest what are the pros and cons of sending IDOCS through proxies.
When should we design like this ?
Thanks,
HarshaFirst of all why u want to send IDOC through proxy as SAP provided all std IDOCs and IDOC approach to send data to XI,only u have to configure the things in R3 as well as XI.
Cons will be u have to write the abap code for sending IDOCs and difficult to IDOC monitor.
Just have a look at the below blog:-
/people/ravikumar.allampallam/blog/2005/08/14/choose-the-right-adapter-to-integrate-with-sap-systems
chirag -
Post inbound as well as outbound IDOCs through a report
Hi all,
I have a specific requirement where i need to post an IDOC through a report which ressemble to WE05. This requirement implies for Inbound as well as Outbound for all message types. Can anyone let me know how can this be achieved. Please let me know if this can be acheived through any FM or method.
Regards
Simin.RHi,
To create a new inbound idoc use the following function module:
IDOC_INBOUND_SYNCHRONOUS
To Create a outbound idoc use the function module
MASTERIDOC_CREATE_* - search and decide based on your requirement.
Regards,
Baburaj -
Sending failed idocs through Mail adapter or Alerts
Hi Friends,
I am working on File to IDoc scenario ,where we have some 35 interfaces.
My requirement is to send only failed idocs thru email to concerned users and IT Head immeditely.
Could anyone suggest or let me know how to achieve this requirement.
Can it be done thru alert config .. Pl suggest.
Thanks & Regards,
SumanHi
If it is failed in Adapter engine or in Integration engine u can raise an alert by using Transaction codes ALRTCATDEF and by configuring in RWB Alert configuration.
Go through Michael blogs you will get good idea.
The specified item was not found.
The specified item was not found.
You can call alerts using Function module also. Go through Stefan grube blog
Regards.
G.Jayaram
Edited by: jayaram garikapati on Jul 27, 2008 2:01 PM -
JDBC - IDoc with acknowledgment
Hello,
I have the following requirement:
Reading data via JDBC from a database (select query), creating an IDoc and send to SAP.
If the IDoc was sent successfully there should be an acknowledgement written back to the database (there is a special coloumn for acknowledgements in the database,key is record ID).
My question:
- Is it absolutely necessary to use BPM for this scenario (I think yes, as I need to track the record ID to write back the acknowledgement?)
- My idea was to use a send step for the IDoc with enabled acknowledgments (system or application ??). In case of positive acknowledgement I would update the database in the next step (How do you check the acknowledgment returned from the SAP system, do I need a separate asynchronous receive step to get the ALEAUDIT back?)
Thank you very much for your advice on this!Is it absolutely necessary to use BPM for this scenario (I think yes, as I need to track the record ID to write back the acknowledgement?)
i think the key of question is either transport ack or application ack?
if you just need transport ack,actually,you do not have to use bpm!
>My idea was to use a send step for the IDoc with enabled acknowledgments (system or application ??).
apparently,you need it which is application ack,otherwise,whereis your purpose?
>How do you check the acknowledgment returned from the SAP system, do I need a separate asynchronous receive step to get the ALEAUDIT back?)
For the inbound IDoc adapter to be able to send an acknowledgment IDoc to the sender, a communication channel with the interface ALEAUD.ALEAUD01 must be maintained for the sender,that is your intergration process. -
Outbound Idoc through Workflow in CRM
Hello,
Consider this scenario, I need to create an opportunity document through Idoc inbound in CRM 4.0. There are certain validations done at the XIF layers as well as the application layer.
In case if there are any errors in the Idoc or errors the opportunity document created(application level errors), I need to send an outbound Idoc containing complete inbound Idoc data with certain rejection codes.
Can some body let me know the best way to achieve this. I
If this can be achieved through workflow, please provide the complete details on how to go about this.
Thanks In Advance,
KiranHello,
Consider this scenario, I need to create an opportunity document through Idoc inbound in CRM 4.0. There are certain validations done at the XIF layers as well as the application layer.
In case if there are any errors in the Idoc or errors the opportunity document created(application level errors), I need to send an outbound Idoc containing complete inbound Idoc data with certain rejection codes.
Can some body let me know the best way to achieve this. I
If this can be achieved through workflow, please provide the complete details on how to go about this.
Thanks In Advance,
Kiran -
PI 7.4 - interface from ECC(idoc) JDBC, idoc not making it from sm58 '
Hi Experts,
I've got an interface which works in our dev and 2 of our test systems but NOT the 3rd test system. It doesnt work in our live system either. (essentially its a split receiver determination - goes to both jdbc and a file).
I've reintroduced the config from the dev system to the 3rd test system and overwritten its ico/scenario in the hope that it might work - it didnt make any difference as was getting the first error below in bold.
I've checked all RFC connections, destinations, partner profiles and ports, all seem in order and mirror systems that work, bar the naming conventions.
I've checked The FM version, its the same version as the system which works.
In sm58 I was originally getting the error 'Commit fault: ASJ.ejb.005043 (Failed in component:sap.com/com.sap.aii.ad', upon 'googling' this error it was suggested on SCN to essentially delete old config and reimport / rebuild the interface (Commit fault: ASJ.ejb.005043) . I've tried to reimport the config scenario / ico, i then deleted the config scenario and reimported it. This hasnt worked.
I have had our Basis team double check the NWA settings, and the ResourceAdaptor settings were reset.
When re running the trfc in sm58, i now get the error ' Failed to resolve repository reference @XI_IDOC_DE FAULT_DESTINATION_DEV'
Would appreciate some feedback as to what to try next..Hi George,
We have seen this issue sporadically too while deploying to our QA system. What I have generally done in the past to get it working is the following (I have run all the steps because I don't know if they are all required to get it going again):
1. Open ID and clear the SLD data cache
2. Open sender system in ID and do compare of adapter specific identifiers with SLD and then apply
3. Deactivate sender IDoc channel and then reactivate (I would double check your destination in the settings also)
Hopefully this will help.
Regards,
Ryan Crosby -
hello experts !! could u plz give me some idea or step by step help for creating IDoc to IDoc data transfer through ALE.
My scenarion is like the following:
there will be two client in two R/3 system..(Sending and receiving)....
in sending system i want to insert data in a particular table....
that data will be automatically updated in receiving system..
plz help meeeeeeee
thanks...
points will be rewarded.......Hi Soumya,
Follow the process as below
Outbound:
Step 1. Application document is created when transaction is saved.
2. Message control is invoked.
3. Messages are processed by system.
4. Messages are Edited (if desired).
5. Output (ALE / EDI) is checked
6. Validate against Message control record from Partner Profile
7. Application Document is saved.
8. Entry NAST table is created for every selected output program
along with Medium & Timing.
9. Check for Process Immediately .
If (yes)
Determine Processing Program from TNAPR Table.
ELSE
Execute RSNASTED Program.
10. Read Partner Profile to determine Process Code.
11. Process Code points to the Function Module & Invoked.
12. IDoc is generated.
13. Check for ALE Request.
if (Yes)
Perform Filters, Conversions, Version Changes etc.
Else.
IDoc is stored in DATABASE.
INBOUND:
Step 1. EDI Subsystem creates an IDoc file from EDI Messages
2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.
3. Data in Control Record is validate against the Partner Profile.
4. IDoc is generated in Database and syntax check is carried out.
5. IDoc file is deleted once file read.
6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
7. Check for Process Immediately.
If NO
Execute RBDAPP01 Program
Else
Read Process Code from Partner Profile
Process Code Points to Function Module
Application Document Posted.
further help:
check url
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/ale/configuration.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapdevelopment.co.uk/training
And also u can get lots of inof from the below link.
http://www.sapgenie.com/ale/why_ale.htm
Just follow the procedure
Sending System(Outbound ALE Process)
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Create Model View
Tcode BD82 ? Generate partner Profiles & Create Ports
Tcode BD64 ? Distribute the Model view
Message Type MATMAS
Tcode BD10 ? Send Material Data
Tcode WE05 ? Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE ? for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 ? Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 ? Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Create Model View
Tcode BD82 !V Generate partner Profiles & Create Ports
Tcode BD64 !V Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 !V Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 !V Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 !V Send Material Data
Tcode WE05 !V Idoc List for watching any Errors
STEP 1)a Goto Tcode SALE
Click on Sending & Receiving Systems-->Select Logical Systems
Here Define Logical Systems---> Click on Execute Button
go for new entries
-System Name : ERP000
-Description : Sending System
-System Name : ERP800
-Description : Receiving System
press Enter & Save
it will ask Request
if you want new request create new Request orpress continue for transfering the objects
B) goto Tcode SALE
Select Assign Client to Logical Systems-->Execute
000--> Double click on this
Give the following Information
-Client : ERP 000
-City :
-Logical System
-Currency
-Client role
Save this Data
Step 2) For RFC Creation
Goto Tcode SM59-->Select R/3 Connects
Click on Create Button
RFC Destination Name should be same as partner's logical system name and case sensitive
to create the ports automatically while generating the partner profiles
give the information for required fields
RFC Destination : ERP800
Connection type: 3
Description
Target Host : ERP000
System No:000
lan : EN
Client : 800
User : Login User Name
Password:
save this & Test it & RemortLogin
STEP 3) Goto Tcode BD64 -- click on Change mode button
click on create moduleview
short text : xxxxxxxxxxxxxx
Technical Neme : MODEL_ALV
save this & Press ok
select your just created modelview Name :'MODEL_ALV'.
goto add message type
Model Name : MODEL_ALV
sender : ERP000
Receiver : ERP800
Message type :MATMAS
save & Press Enter
STEP 4) Goto Tcode BD82
Give Model View : MODEL_ALV
Partner system : ERP800
execute this by press F8 Button
it will gives you sending system port No :A000000015(Like)
STEP 5) Goto Tcode BD64
select the modelview
goto >edit>modelview-->distribute
press ok & Press enter
STEP 6) goto Tcode : BD10 for Material sending
Material : mat_001
Message Type : MATMAS
Logical System : ERP800
and Execute
STEP 7)goto Tcode : BD11 for Material Receiving
Material : 100-300
Message Type : MATMAS
and Execute --> 1 request idoc created for message type Matmas
press enter
Here Master Idoc set for Messge type MATMAS-->press Enter
1 Communication Idoc generated for Message Type
this is your IDOC
Change Pointers
how to change the description of a material using ALE Change Pointers.
I will give the following few steps
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.
select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
ALE/IDOC Status Codes/Messages
01 Error --> Idoc Added
30 Error --> Idoc ready for dispatch(ALE Service)
then goto SE38 --> Execute the Program RBDMIDOC
29 Error --> ALE Service Layer
then goto SE38 --> Execute the Program RSEOUT00
03 Error --> Data Passed to Port ok
then goto SE38 --> Execute the Program RBDMOIND
12 Error --> Dispatch ok
Inbound Status Codes
50 Error --> It will go for ALE Service Layer
56 Error --> Idoc with Errors added
51 Error --> Application Document not posted
65 Error --> Error in ALE Service Layer
for 51 or 56 Errors do the following steps
goto WE19 > give the IDOC Number and Execute>
Press on Inbound function Module
for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
Regards,
Satish
Maybe you are looking for
-
Calling Multiple forms for a single Output Type in Smartforms
Hi SAP Gurus.. I want to call 2 smartforms simultaneously for a Single O/P type. But the problem is that My Driver Program in Standard. I cannot edit the Driver form. Whatever I need to do I can do it only in the Smartforms. Please help me out in thi
-
Hi, I published a RFC/Webservice in 6.20. I have successfully tested using an XMLSPy tool. Now I asked my friend in WEB APP team who has a RAD(Rational App. Devlopment) to consume my webservice by providing teh WSDL file. HE is getting 'Unable to des
-
Owners PS CS3/4 and LR 2.x raw processing
Bearing in mind the number of issues being reported about LR 2.x. Which would be the preferred program, for owners of both PS CS3/4 and LR 2.x, in carrying out their raw conversion, ACR or LR Develop Module.
-
Items in Subfolder don't show in Parent foler
In the Library under Folders, let's say I have a Folder with 10 images called "Orignal", I right-click (or click the plus icon) to * Create folder inside Original* and I move 5 of the 10 images into the new subfolder, ok? Now, the Parent folder only
-
We have an Xserve (G5) running OS 10.3.7. We keep all server apps on the 80GB harddrive that came with the server and we are using a 250GB drive in bay 1 for storage. We're running out of room on the 250GB drive and we have a second drive (500GB) in