Mapping IDoc--Flat file
Hi,
I ahve a following mapping requirement.
map E1EDK02-BELNR if QUALF=009 .
Source field is BELNR and target is Billing document number.
I have done mapping as follows.
Map QUALF and constant[009] to equalsS function fron text function.Then output of the above is mapped to if condition and BELNR is mapped to then condition.Output of if then condition is apped to billing document nymber.
I am getting the following error.
RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:MT_BillingDocuments/PONumber. The message is: Exception:[java.lang.IllegalArgumentException: Cannot cast 01 to boolean] in class com.sap.aii.mappingtool.flib3.Bool method or[01, 17, com.sap.aii.mappingtool.tf3.rt.Context@1cb2d89]
Hi,
The value which is mapped to PO Number
is throwing an Exception.
please copy the payload from moni..
and try to test it at message mapping.
warm regards
mahesh.
Similar Messages
-
IDoc flat file over AS2 adapter to IDoc adapter
Hi,
The scenario is IDoc flat file(.txt) over AS2 adapter to IDoc adapter. Could anyone help on how to convert the IDoc flat file to xml in AS2 adapter to execute the mapping further? we are using PI 7.0.
Thanks in advance!
-zameerHi,
Since you are on Pi 7.0, you would not be able to use the modules for this in PI 7.1.
You would need to refer this document for converting from Idoc flat to XML
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a?quicklink=index&overridelayout=true
In your sender AS2 adapter, you can pass the file as is to an abap mapping which will do the conversion to Idoc xml. the output of the abap mapping goes to your message mapping then for conversion.
Another option would be to use a custom adapter module in the sender AS2 adapter to call the Aabap mapping to do the conversion into Idoc xml.
The custom adapter module would do a JCO/RFC call which will do the conversion before passing the data back to the adpter module.
Regards -
I am receiving flat file in SFTP Server which need to be posted into SAP (No mapping involved)
What will be the best approach ?
1. I tried using IDOCFlatToXmlConvertor (The limitation in the format of source file. The parent and child node relationship should be explicitly mentioned in IDoc flat file which legacy system is not able to do) - Any workarounds ?
2. I moved the Idoc flat file into SAP application server. Now need to schedule job using program RSEINB00
3. File Content Conversion
Any other better solution ? Appreciate your help.
Thanks and regards,
Jose AugastineFor converting Idoc Flat file to idoc xml, ABAP mapping is one of the feasible option.
-
Picking a IDOC Flat File stored in SAP R/3 Application Server by SAP PI
Hi,
Can SAP PI pickup a IDOC Flat File stored in SAP R/3 Application Server Directory and send it back as an Inbound IDOC.
Scenario:
We have a data in the EXCEL Sheet, which will be used to a fill an IDOC and the IDOC will be just save in the SAP R/3 Application Server Directory, but can not be triggered due to its peculiar behavior. Afterwards, SAP PI should pole the SAP R/3 and pick up that IDOC Flat File from the R/3 Application Server and send it back to the SAP R/3 as an Inbound IDOC.
For Ref: IDOC does not have a Outbound Process Code, thus can not be triggered and send to SAP PI. It is always used as a Inbound IDOC in SAP R/3 system.
Regards,
SaurabhSAP PI should pole the SAP R/3 and pick up that IDOC Flat File from the R/3 Application Server
If SAP PI = 7.11 --> /people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
send it back to the SAP R/3 as an Inbound IDOC
why to send some information again into R3 which it already has? cant some internal code in R3 read the info from excel and then update the IDOC directly? -
Hi,
I have a requirement wherein we have to read the IDOC flat file and post it as IDOC to SAP using XI. I understand we have to use the Flat File Sender adapter and the IDOC Receiver Adapter. On the Sender Side we have to define the Content Conversion to convert the IDOC Flat File to IDOC XML. Writing File Content Conversion for the IDOC Flat File would be very tedious because of the number of fields and fixed structure of the flat file.
I have don through the following guide Section 3.2 where it talks abt converting IDOC to IDOC XML using reportRSEINB00.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20convert%20between%20idoc%20and%20xml%20in%20xi%203.0.pdf
I am not clear how to invoke this report in the Flat File Sender adapter. Also is there any other approach.
Thanks
Rajeev GuptaHi Rajeev
You have a flatfile at the sender side so you dnt have any feasiable option to do other than FCC....FCC is not a tediuos one...if you can provide the strucutrre we will help you out...
Check out you have a fixedlength file or piple separated one....
In the functional design how many fields re present and buil the DT,MT MI accoprdingly.....
you have to just use some conecnt conversion parameters that's it...
item.fieldSeparator
item.endSeparator
item.fieldNames
here item is your recordset name
let us know your strucutre
regards
Nisar -
Hi Experts.
I need the Idoc flat file for Delfor01(delivery schedule).
Advance Thanks.Hi Bala,
Follow the procedure
IDOC to XML Convertion using ALE Interface
1) Send an outbound IDOC data(MATMAS) to a flat file(XML) on client1(SENDER).
- Create File Port (WE21) of XML Type for outbound file.
- Specify the Physical directory and file under the Outbound File tab
- Maintain Distribution Model (BD64) for sender ->receiver system.
- Create Partner Profile (WE20) for logical system.
- You can use this program RBDSEMAT (t/code BD10) to generate IDoc MATMAS file(s).
_ Then you can FTP the file(s) to receiver system.
2) Upload the flat file as an IDOC on the inbound sytem
which is Client2(RECIEVER).
- Create File Port (WE21) for inbound file.
- Maintain Distribution Model (BD64) for receiver -> sender system.
- Create Partner Profile (WE20) for logical system.
- You can use this program RSEINB00 to upload IDoc MATMAS file(s).
A sample scenario for idoc generation
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
Now go to the physical directory and check your idoc converted as an XML File.
Note enter required message type
OR try this
Just pass the IDoc Document no in the FM - IDOC_XML_TRANSFORM.
IDOCS_OUTPUT_IN_XML_FORMAT
IDX_IDOC_TO_XML
it will transform the IDoc in XML format
Regards,
Sridhar -
Converting Idoc flat file representation to XML
Hi ,
I went through the guide for How To Convert Between IDoc and XML in XI 3.0. I'm concerned with the second part of the guide which says convert from falt file representation of Idoc to XML. Can anyone tell me what are the other design and configuration objects to be created for this scenario ( message types,interfaces, mapping , etc )
Also which step of the pipeline does the converted XML goes to ?
The program also expects a filename, what if I want to pass the file name dynamically ? Any ideas on this one.
Hope someone replies this time.........:)
Thanks for you help and improving my knowledge
Thanks
Advait Gode.Hi Advait,
Let me give you a small overview on how inbound IDOCs work before answering your question-
The control record is the key in identifying the routing of the IDOC. If you try to think IDOCs as normal mails(post), the control record is the envolope. It contains information like who the sender is and who the receiver should be and what the envelope contains (no different than receiving mails/letters by post).
Then the data records contain the actual data, in our example would be the actual letter. The status records contain the tracking information.
Traditionally SAP's IDOC interface (even before XI comes in picture) has utility programs to post incoming IDOCs in to SAP. One such program is RSEINB00 which basically takes the IDOC file name and the port as input. This program opens the file and posts the contents to the SAP IDOC interface (which is a set of function modules) via the port. The idea is to read the control record and determine the routing and further posting to application. Note that one information in the control record is the message type/idoc type which decides how the data records need to be parsed.
Now in XI scenario, what happens if we receive data as flat file? Normally, we use flat file adapter and in the file adapter we provide information on how to parse the file. But, if the incoming file is flat and in IDOC structure, why do we have to configure the file adapter, when the parsing capability is already available using RSEINB00/Standard IDOC interface.
This the reason, the guide suggests you to use RSEINB00. Now, your concern is what if you need to provide a dynamic filename. My idea is to write a wrapper program. This would be an ABAP program in your integration engine. This program will determine the file name (based on a logic which should be known to you) and then call program RSEINB00 using a SUBMIT/RETURN. You would then schedule this ABAP program in background to run in fixed schedules.
There are other ways of handling your scenario as well but from limited information from your request, I will stop with this now. Post me if you have any more queries.
KK -
Send Idoc flat file message in JMS receiver adapter
Hello,
I am working on a scenario where we send Delvry 03 idoc from ECC to external system. To external system, we send the whole Idoc in flat file structure through JMS queue. I have used Idoc to flat file program in my interface mapping and have configured JMS receiver adapter with just default Module configs but, I am getting an error in communication channel monitoring for the messages.
Please note that Idoc xml to flat file structure conversion is already done in the mapping, I need to just pass this idoc flat structure in the jms adapter. Hence ther eis no content conversion i nthe adapter..
Please give some inputs..Here are the modules in my receiver adapter and nothing else..
SAP XI JMS Adapter/ConvertMessageToBinary
SAP XI JMS Adapter/SendBinarytoXIJMSService
The error I get is in audit log
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: No transition found from state: ERROR, on event: process_commence for DFA: CC_JMS_R:ca336a6689f837da8bd3387140fc4447
in turn the message has this error if I open the message
Whitespace is not allowed at this location. Error processing resource 'http://host:port/mdt/messageconten...
and it shows one of the lines from idoc..flat file
Any idea is greatly appreciated..Thank you..ThanujjaThe difference in what I suggest is that it is way simpler.
Maybe you did not understand this, so will try to explain it better. Its not the best thing to do, but if JMS adapter doesn't budge then you can give it a shot.
1. You continue to use the ABAP mapping in your interface mapping to map the Idoc xml to Idoc flat.
2. Write a Java Map that will take the output of the ABAP mapping ; and then create a XML output which would be something like,
<Root>
<Idoc_Flat>
<Data>ABAP Mapping Output<Data>
</Idoc_Flat>
</Root>
3. Now use the simple content conversion in the JMS adapter to convert this to flat file.
Regards
Bhavesh -
How to read an IDOC flat file and send it to XI
Hi,
I'm looking for a way to read a complicated Idoc structured flat file sent to XI by a legacy system and then pushing that data to and R/3 system. Can anyone recommend a good technique?
Thanks,
Steevehi steven....
this shud help u...
for FileXIIDoc
File->XI->IDOC (how to start?)
also check this blog for specifying adapter specific identifiers in this scenario
These are steps to follow:
STEPS IN DESIGN
1. Import idoc from the SAP System (SAP02) through imported objects.
2. Create Data Type, Message Type, Message Interface for the Outbound File.
3. Create Message Mapping with file Message and idoc (Matmas04)
5.Create Interface mapping between File Interface and the idoc.
Steps to be followed in Creation of Technical and Business System
Technical System
In SLD, click on technical landscape->New Technical System->WebAS ABAP.
Business System.
1.Goto Business Landscape->New Business System->Name the business system.
2. Choose the technical system that needs to be attached->WebAS ABAP->Technical System Name.
Preconfiguration steps for transfer of data to IDOCS
1.Create a RFC Destination in SM59 of XI Server of type.
2.In transaction IDX1 ,create a port for the client of XI server.
3. The port has to be displayed in the idx2 transaction and we should be able to view the idocs which we imported through integration repository.
Steps in Configuration
1. Goto service without party, right click->Assign a business system.
2. Choose the business system to be added.
3. Create a File Sender Service with communication channel for the same.
4. Create an idoc receiver channel under the business system. Mention the RFC Destination and the port created for the same.
5. Mention the logical Name in the Service->Adapter Specific Parameters of both the File Sender Service as well as the business system.
6. Make the Sender Agreement for theFile Sender with communication channel.
7.Create the Receiver Determination and Interface Determination for the business system.
8.Create the Receiver Agreement for the Business system.
TCODES for File>XI>IDoc
SM59-rfc destination on recving side
IDX1-port on recving side
IDX2-load metadata
Bus. service adapter specific Identifiers-->Logical sys name (check this blog:/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system )
we05-IDoc status records
BD54-Create Partner Number
We20-Create Partner Profile
and also go thru this blog...
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
hope it helps....
regards...
vishal
/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system -
Simples for IDOC - Flat files (Formated) process
Hi all,
I m looking for same exemple showing how to create formated flat files from a standard IDOC.
Thanks in advance,
Fouad,hi,
have a look at this :
https://websmp102.sap-ag.de/~sapdownload/011000358700001795162005E/HowToIDocXMLToFlat.pdf
abap mapping from IDOC to flat file
all the code is inside the pdf
or you can generate a file from R3 directly
/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Hi Everyone:
We have a situation where we need to process an outbound IDoc through XI and create a flat IDoc file on a file server.
Everything works fine, but when file is created; it's in XML format. I have done the configuration in SXMB_ADM, so that it won't convert the IDoc to XML, but it still does i.e. segments and fields tags are added before and after the values. For example,
<Z1JBRS SEGMENT="1">
<CTEUSR>SOMEUSER</CTEUSR>
<CTEDTE>20000906</CTEDTE>
<CHEUSR>No User</CHEUSR>
<CHEDTE>00000000</CHEDTE>
<CHETME>000000</CHETME>
</Z1JBRS>
All I want is to create the same flat file that will get created if I use the "rfcexec"/"startrfc" criteria from SAP, which transfers the file to EDI Sub-System. Has anyone come across this situation? Any information / direction / suggestion will be appreciated.
Thanks,
JBHi,
If it Idoc is passing thru XI, then it will convert into xml as XI can understand xml format.,
So if you want to get flat file, you need to convert xml into flat structure,. For this you need to use option of "File Content Conversion" in File Reciever Communication channel. If so, you need to configure content conversion for this.
Refer this guide-
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
Regards,
Moorthy -
Graphic Mapping:IDOC to File-Avoid Error in Adapter Engine
Hi all,
I'm using Graphic Mapping in my IDOC to File scenario in which each segment in source IDOC will generate a ROW in target File with the condition: DATBI >= currentdate (and some other conditions)
I have a UDF and use the mapping function CREATEIF for this purpose:
DATBI -> UDF -> CREATEIF -> ROW
Problem scenario: In the source IDOC if all the segments have DATBI < currentdate then there is no ROW created, and I get the error in Adapter Engine
Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure ...
How can I avoid this?
I've tried to put this condition using XPATH in Interface Determination and got the error.
There is a way to use function current-date() in XPATH condition?
Thanks for your help,
ElaineHi all,
How can I "suppress the row node if condition fails"? I'm new in PI, so please give more details.
My FCC as follows:
Record Structure: Record, Row
Row.addHeaderLine 0
Row.fieldSeparator ,
Record.fieldSeparator 'nl'
Row.endSeparator ; 'nl'
It works fine if the condition satisfied.
In Message Mapping, I've use Test to double check my mapping, and in the scenario that conditions fails, there is no Row in the target message.
Please advise.
Thanks,
Elaine -
MAPPING USING FLAT FILE SOURCE MODULE
I created a mapping using a flat file as source and a dimension as target, I've already configure both modules and their locations.
When I try to deploy this mapping in the deploy manager, it generates the script for the control file and when I hit the deploy button it says that the deploy was succesfull, but I really don�t know what it did.
Does it put the file in my target schema?, what do I suposs to do next?Hi,
So,i don't have to manually run the sql loader from the command prompt???
All i have to do is Execute the map normally from the deployment manager and it will load the .ctl file itself.Ok great,i did so but i got the following error:
Starting Execution BM_DEBIT_CARDS_DAT_MAP
Starting Task BM_DEBIT_CARDS_DAT_MAP
C:\Documents and Settings\CORAL 2000\Desktop\Flat filesBM_DEBIT_CARDS_DAT_MAP.ctl (The file access permissions do not allow the specified action.)
RPE-01008: Recovery of this request is in progress.
RPE-01009: Completion of this task could not be completed due to an earlier system failure.
Completing Task BM_DEBIT_CARDS_DAT_MAP
Completing Execution BM_DEBIT_CARDS_DAT_MAP
So are there any permissions i should grant or what?
Dina Nagia -
OWB Mapping with Flat file as a Target.
Hi all,
we have created a mapping in OWB where we have source as a table.and the target is a flat file.
we have created a file module and we have given the local system path for the file.
when we deploy and execute the mapping we get the error
"Invalid Path for target file, check UTL_FILE_DIR database parameter"
where do we have to specify the path?
Can any one please help in this reg.
Thanks in advance.The UTL_FILE_DIR is set in your init.ora file for your Oracle DB.
init.ora parameter doc: http://www.ss64.com/orasyntax/initora.html
In order to apply the change, you'll need to restart the DB too. -
Mapping a flat file to the iDoc OILLDD
Hi.
<b>I have a file with this structure after I got it from the fileadapter.:</b>
B Dataxxxxxxxxx
C Datayyyyyy
D Datazzzzzz
D Datazzzzzz
C Datayyyyyy
C Datayyyyyy
D Datazzzzzz
C Datayyyyyy
C Datayyyyyy
E Dataxxxxxxxxx
B
E
B
E
etc.
<b>I want to map this structure to the Idoc OILLDD which have this structure.:</b>
OILLDD01
IDOC
E1OILT1
E1OILT2
E1OILT3
E1OILT4
each B-Recor shall produce a new iDoc.
each C-Record shall make an E1OILT1-segment
each D-Record shall make an E1OILT3-segment(if the D-record exist)
My problem is.:
How can I make an new iDoc for each B-Records in the file.
I got the file tthrough the filadapter.
Hope someone can help me.
Thanks.The file from the file adapter have to be parsed using the File Content Conversion.
Now this converted XML will have the fields with value "A", "B","C" etc.
This can be then mapped according to ur requirements. U need to export the IDOC as XSD , change the occurrence and then reimport it in the external definitions.
Regards,
Prateek
Maybe you are looking for
-
How to schedule a job in SAP CPS
Hi, I am new to SAP CPS. So please tell how to schedule a job in SAP CPS. And which kind of job cam be schedule means BAP report. Thanks Anurodh
-
Getting Error while Publishing Web Application using weblogic workshop 10.2
Hi all, I am trying to create a simple webapplication using the weblogic workshop studio for weblogic. I have created a domain using the configration wizard. when i am trying to deploy the newly created dynamic web project EAR in to the server, its t
-
Error while copying company code
Hi While copying company code from 0001, following error is giving. Can you please tell me how to go ahead with that: Message no. TK455 Diagnosis The value "12 " was entered in the field "REICHWEITE". This is not possible because it is a numeric fiel
-
Error 3259 while downloading Podcasts
I had the dreaded error 3259 show up on two of my computers one running vista and windows 7. I am running the latest version of I-Tunes. I noticed that others were having the same trouble. I tried everything that was suggested to correct the problem,
-
Install failed on redhat 8.0 Any ideas?
this is the error message i receive : I'm new to this *** Got java.lang.ExceptionInInitializerError: java.lang.SecurityException: Cannot access individual system properties. while trying to print stack trace j2sdkee-1_4-beta-linux.sh: line 354: 3098