N IDOCS OF SAME TYPE TO A FLAT FILE
HI EXPERTS,
I have a scenario in which i have to receive IDOC and retrieve the value of a particular field.Giving the value in this field as input parameter to an RFC call get the number of IDOCs sent with this value(of the particular field).
Then i have to append all these similar type of IDOCs into a single file (within a paricular timestamp say 10 minutes).If all the IDOCs does not come in the particular timestamp A clarification case is to be raised.
Then this file is to be wrapped in a MIME structure using HTTPS and sent to the receiver.I need help in this regard.
i worked out the solution with steffans blog
Similar Messages
-
Two idocs of same type for each line item
I am new to SAP PI and seeking your help in the following scenario
legacy -> SAP PI -> branched to two idocs in ECC
The scenario is that a fixed length flat file coming from Legacy wil contain some line items but each line will be a separate invoice ..the twist . since it is a financial posting each invoice(line) has to be posted twice in the same IDOC but different logics which implies that for each line in the file there will be two IDOCS created in ECC of the same type, where one would be the AR posting and the other would be the AP posting
How can i make this happen without BPM ??
I have referred to a blog 1 : n possible in PI without BPM but here it is a combination of 1:n and also splitting of the line and posting it to two IDOCS simultaneously
since the transformation logics are different will I have to create two mappings but how and where to use them ??
Can I please have someone help me with the steps in ESR ad ID
Kindly help
Thanks
RohanThanks Prateek i have done that but
" Map the occurrence of line items to the node Idoc at the target structue and then multiple idocs will be created "
is what iam unable to do
In the mapping i have to create two idocs per line item and this is creating just one
my source structure is like this
MT_abc 1.1
Invoices 1..unbounded
field 1
field 2 etc
and the target is
ACC_DOCUMENT02 1..1
IDOC 1.unbounded
and i have mapped invoices to IDOC
now for testing in the test tab of mapping
how do i test if i will have two IDOC if i get one line item ??
Edited by: RohanS on Jun 18, 2009 2:06 PM
Edited by: RohanS on Jun 18, 2009 2:08 PM -
Inbound idoc creation by reading data from flat file in same system
Hi..
I have a flat file on my application server. I know the idoc type , message type and the FM to post the application document in SAP at the end when an idoc is created.
Can someone tell me how do i create an idoc in sap reading the flat file data on application server and what setting do i need to make later once idoc is created to post the application document using hte existing FM.
Appreciate your helpYou need to use FM <b>MASTER_IDOC_DISTRIBUTE</b>
REG_CONTROL-MESTYP = 'ISU_MR_UPLOAD'.
REG_CONTROL-IDOCTP = 'ISU_MR_UPLOAD01'.
REG_CONTROL-RCVPRT = 'LS'.
REG_CONTROL-RCVPRN = 'ZALE'.
LOOP AT TABLE_LECTURA.
ZMENSAJE-MRIDNUMBER = TABLE_LECTURA-NUMORDEN.
ZMENSAJE-METERREADER = TABLE_LECTURA-IDLECTURISTA.
IF TABLE_LECTURA-PRIMERVOLUMEN NE SPACE.
VOLUMEN = TABLE_LECTURA-PRIMERVOLUMEN.
ELSEIF TABLE_LECTURA-PRIMERVOLUMEN NE SPACE.
VOLUMEN = TABLE_LECTURA-SEGUNDOVOLUMEN.
ELSE.
VOLUMEN = TABLE_LECTURA-TERCERVOLUMEN.
ENDIF.
IF VOLUMEN EQ SPACE.
VOLUMEN = '0'.
ENDIF.
ZMENSAJE-READINGRESULT = VOLUMEN.
ZMENSAJE-MRREASON = TABLE_LECTURA-NOTALECTURA.
ZMENSAJE-ACTUALMRTIME = TABLE_LECTURA-HORALECTURA.
ZMENSAJE-ACTUALMRDATE = TABLE_LECTURA-FECHALECTURA.
I_EDIDD-SEGNAM = 'E1BPEABLU'.
I_EDIDD-SDATA = ZMENSAJE.
APPEND I_EDIDD.
ENDLOOP.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = REG_CONTROL
TABLES
COMMUNICATION_IDOC_CONTROL = I_COMM_IDOCS
MASTER_IDOC_DATA = I_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5.
Greetings,
Blag. -
I am using a flat file as a target and when I define column types as anything other then string I get the following error on execution
000 : null : com.sunopsis.jdbc.driver.file.a.i
com.sunopsis.jdbc.driver.file.a.i
at com.sunopsis.jdbc.driver.file.a.d.setDate(d.java)
at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
at com.sunopsis.sql.SnpsQuery.addBatch(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)hi lpantuso ,
suppose u want to transfer file data like
xxxx 1111 12-01-2005
yyyy 2222 12-03-2007
zzzz 3333 01-05-2007
to another blank file so you have do folloowing steps
craete file data server for individual data server suppose you r developing application on ur desk to so create single file dat server in topology manager with proper jdbc url and driver name as
Jdbc driver as : com.sunopsis.jdbc.driver.file.FileDriver choose from drop down menu
and add url as: jdbc:snps:dbfile
now for each different folder create physical schema with the schema and work schema name as the location of the folder .
click on context tab add the proper logical schema name
come to designer window
Create individual model for each physical schema (for each folder I can say)
Use the proper logical schema name (while you'll select technology as file all the logical schema related to the technology wil be displayed just select ur logical schema)
than create individual datastore for each file (you can create two data store at max for each file).
assuming you r using delimited file.
while reversing existing source file you will have all the columns of the file
change data type and size of the fields.
For the target File datastore file should be there wid blank structure so add column wid proper data type, for second field use numeric and for date use string as datatype .Size must be appropriate for the target file otherwise you'll have warning at designing time.
create an interface
use Global context with "Sunopsis memory engine" as staging area other than target.
then map the source and target file
at Flow tab
choose
LKM File to SQl for source area
NO LKM is there for Staging area
IKM SQL to file append for target (If these are not automatically updated)
Then try to execute,it's working
Note : If you want to transfer table data to a file then for date type data you have to check following things
1) at the time of mapping of date type from table to file interface use
to_char(<SourceTableNameAlias> . <columnName>) instead of
<SourceTableNameAlias> . <columnName>
and date type data field of the target file should be String type............. -
Multiple IDOCS of same message type To Single File
Hi Sap All.
here i have got a tricky situation of sending Multiple IDOC's of same type to a Single File via PI.
the Integration architect has created an Integration Gudeline of how to do this.
from the SAP-ECC side the follwing below are the steps thatr he mentioned
To allow IDOCu2019s to be processed sequentially in a queue, the queue processing option on the partner profile must be selected. In addition the rule name which is used to create queue names must be specified.
NB On the partner profile (for the partner / message type) you must also set the output mode as collect IDOCu2019s (it cannot be set to transfer immediately) u2013 This means the IDOCu2019s are created but not sent to out (to SAP PI)
As standard there are two rule names delivered CONSTANT:EDIQUEUE and FIRST_16_OF_MESTYP. These rule names are linked to a SAP function module and therefore custom queue names can be build either as an u201Chardcodedu201D name or based on the data in the IDOC.
The program RSEOUT00 should be run to transfer the IDOCu2019s to PI. The IDOCu2019s will be placed in the SAP ERP qRFC (rather than the standard RFC)
My Questions :
1. how and where we can select the Queue Processing option on partner profile in SAP-ECC as mentioned above
2.how and where we can define the Rule name as mentioned above
3.how and where we can set the output mode as Collect IDOC's in SAP-ECC as mentioned above
4.what does the EDIQUEUE and FIRST_16_OF_MESTYP will do and how they linked to SAP Function modules
will be waiitng for a the best solutions.
Regards.
Varma/people/michal.krawczyk2/blog/2009/05/21/xipi-collecting-idocs--possible-ways-with-pros-and-cons--5-ways - you will need to do a collect
-
Doubts in SAP(Idoc)-XI-Flat file scenario
Dear All,
I am sending Delivery Idoc from R/3 and I am able to view the Idoc in XI in transaction IDX5. Also i m able to see the XML structure with the data of the idoc in SXMB_MONI.
Now as per my scenario I have to download this to a flat file from XI.
My question is, should I have to do the creation of Data types, message types, mapping interface & interface mapping in IR or should I directly do the designing in the ID.
waiting for your reply.
Warm regards,
N.JainHi,
DT, MT, MI : you will create these things for receiver flat file only.
First create
In Integration Repository :
1. Import structure of IDOC in your scenario, In imported objects  IDOCs
a. In Interface Objects
1. Create Data type for your flat file
2. Create Message Type
3. Create Message Interface (inbound Asy.)
b. In Mapping Objects
1. Message Mapping : IDOC to Message Type of Flat File.
2. Create Interface Mapping : IDOC to Flat file by using Message Mapping which you have created.
Make activate all these things.
In Integration Directory :
1. Create Communication channel for File Receiver.
2. Sender Communication channel is not required.
3. Create Receiver Agreement.
4. Sender Agreement is not required.
5. Interface Determination
6. Receiver Determination
At sender side you will take your IDoc and at receiver side you will take your flat file.
It can help you,
Regards,
Sandeep Kaushik -
Suggesstions on flat file to IDOC
Hi,
Help me on following topics,
1) What is the use of port in program RSEINB00. I want this program to read a flat file and convert it into IDOC. How does this program recognize to which IDOC format it has to convert the flat file.
2) what is the use of file port and ABAP port when to use them. My requirement is to download a flat file or CSV flie into the customer system through FTP.Can I specify the path in the directory itself or do i need to write a seperate program for this.
3) what is the use of function module in file port.Is it used to generate file name alone or file itself.Can we write a own function.
Thanks & Regards,
Kaarthik.kKarthik,
You know what you could do.. To get the input file format
First download the MATMAS IDOC or any idoc for that matter to a flat file, using the standard transaction BD10.
Then see the format.
As a third step upload the same file as input file with minimal changes to the data keeping the format same.
This way you can figure out how the system is able to fetch all the configuration details.
Hope this helps.
Rgds,
HR -
Convert flat file to Idoc format
Due to some security reasons , the ALE scenario for material master is not allowed directly between 2 SAP systems
So the SAP system A is sending a flat file (not in Idoc format)
From SAP system B , we need to do an Inbound process to post the Idocs with following rough steps
1) Flat file upload
2) Flat file -> Idoc format conversion (EDI subsystem is not existing in this scenario and so this step has to be done within SAP)
3) Idoc processing
Even though this scenario can be accomplished without using Idocs ,
for better monitoring and reprocessing options it is required that Idocs need to be used.
Please explain the detailed steps for the above scenarioHi,
This sounds very much lie complicating things unnecessary...Are this 2 SAP systems of the same company ?
Why would using IDOCS be more insecure then using flat files ?
If the purpose is to have a manual check before upload, you can achieve the same with IDOCS.
Please add some background to the process,
regards
Dirk -
Send IDOC to flat file without mapping will it possible???
Hello everybody,
Iwould like to know, We have middleware tech is Webmethods. I want to send IDOC from SAP R/3 to flat file in Legacy system. how to do that? What willbe the structure of Flat file.hi
Create a FILEPORT uing transaction WE20 and assign the fileport to your outbound message type in processing option, you can give the physical path in fileport and create the flat file format of IDOC.
hope this helps
regards
Aakash Banga -
Convert IDOC to flat file - How to guide
Hello,
I have found the how to guide for converting IDOCs to FlatFiles via ABAP Mapping.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
What is not clear to me. This sounds like I do not need a message type for the flat file with a full implemented structure corresponding to the source IDOC.
Is this right?
Or it is really necessary to create a mess.type with data type for rebuilding the IDOC structure in the flat file!
Can anyone help?
Best regards
DirkDirk,
Well, am not exactly sure if my reasoning is technically correct, but here it goes,
Java Mapping and ABAP mapping takes the Input Source as an InputStream and return the output also as Streams. These streams are not validated against the source and the target strucutres.
In the case of XSL, the only requirement is that theinput / output should be a well formed XML content.
Graphical Mapping produces a Java code internally and I guess the code has a validation check against the source / target schema.
Regards,
Bhavesh -
How To Convert IDOC to FLAT File ?
Dear Expert,
My requirement is to convert the IDOC to FLAT File using XI. How can i do this. I have gone thru the Guide How to convert IDOC to Flat file using ABAP mapping but it does not talk about what are all the stpes i need to do in IR & ID.
I am ready to use ABAP mapping since i am an ABAPER.
Is it recommended to use ABAP mapping since we expect daily 500 IDOCs to be converted to a flat file & transfer this flat file to some FTP location.
Can anybody tell me the stpes how to do this in XI. The steps i am expecting like how to define the Data Type / Message type / Mapping etc & how to configure the channel ?
The Flat file i want to convert should look like the way IDOC file gets created in FILE FTP port in SAP.
Regards,
UmeshI think there is some confusion... Let me explian my problem once again.
I want to convert the Shipment IDOC as it is the moment the shipment documents gets created in R/3. I dont want to collect many IDOCs & make as single file. For each IDOC it should create a Flat File.
Secondly if i have to MAP the whole IDOC the graphical mapping is too difficult.
So instead of that can i use ABAP/XSLT/JAVA whichever is easy. ?
Since i am ABAPER i can use ABAP mapping.
The Output file should look like as below.
EDI_DC40 9000000000011785526620 3012 OILSHI01 OILSH1 SAPP01 LS SAPCLNT900 A000000018LS WBIMQSI 20071031161506 20071031161506
E2OILSH001 90000000000117855260000010000000250 1011537344 1101 1 300X1 TRKGMKG 0202KG KG X ZTLF X XX 000 BLX X X60002200710310000002007103100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 E2OILSA 9000000000011785526000002000001031011537344000001SP 0000201496000000000000000000 00 00 V E2OILSA 9000000000011785526000003000001031011537344000002SP 0000201496000000000000000000 00 00 S
E2OILSV 900000000001178552600000400000103MH04CG6052 LPBW50D62401033 000020149601KG KGM 35200.00000 17200.00000 18000.00000 0.000 0.000 0.000 DLLPGB220071031000000 00000000000000000000000000000000000 0000XX 6000AAAA0.00000 0.00000 17200.00000 35200.00000 18000.00000 MH04CG6052 new bulk tender approved rs LPG Bulk Lorry - WR Refinery TPP BABA TRANSLINES kg kg 0.000 0.00 0.00 E2OILSC 9000000000011785526000005000004041 001 18000.000000 18000.000000 35200.000000 0.000000 0.000000 KG E2OILSQ001 9000000000011785526000006000005050011 MH04CG6052MH04CG60521J 05041089055000 00000118000.0000000 KG 18000.000000 18000.000000 6000V04 18000.000 KGM18000.000 KGM00000000 V 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0001 E2OILS2 9000000000011785526000007000004040001000001000200020000.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 XX0000000000000000000000000000 XX0504108905J5000 PUNE LPG BOTTLING PLANT START 0001 1END 0001 10.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Pl. Help me its Urgent.
Regards,
Umesh -
Not Able to Pass IDOC greek characters to Flat File?
Hi Experts,
I am working on IDOC to Flat file scenario where IDOC is passing greek characters but Flat file has ???????????(question marks)
Do I need to do some configurations to get actual greek letters?
Thanks
RajeevHi,
>>I am working on IDOC to Flat file scenario where IDOC is passing greek characters but Flat file has ???????????(question marks)
Try writing the file in bin mode.
Try this content type ISO-8859-7
Regards
Suraj -
How to genereate multiple IDOCs from multiple rows in a single flat file
HI,
I am working on a scenario where I need to genereate a IDOC per one row in a flat file.
I created DT of following strcuture:
DT_TYPE
--DETAILS -
0..Unbound
F1------0..Unbound
F2------0..Unbound
F3------0..Unbound
IDOC is
ZIDOC
IDOC----1..1
-BEGIN-Required
-SEGMENT1---1..1
-SEGEMENT2-1..1
-SEGMENT3-1..999
To create multiple IDOCs if there are multiple rows in a flat file in MM i choosed occurances as 0..unbound in Signiture tab
Source structure:
Messages------1...1
-Message1--1....1
DT_TYPE------0..Unbound
DETAILS -
0..Unbound
F1------0..Unbound
F2------0..Unbound
F3------0..Unbound
Target Strcuture:
Messages----1....1
-Message--1....1
ZIDOC----1....1
IDOC------1..1
BEGIN---Required
SEGMENT1-----1..1
SEGEMENT2---1..1
SEGMENT3---1..999
I am unable to generate two IDOCs if there are two rows:
Am I missing some thing?
Thanks
RajeevHI,
I am working on a scenario where I need to genereate a IDOC per one row in a flat file.
I created DT of following strcuture:
DT_TYPE
--DETAILS -
0..Unbound
F1------0..Unbound
F2------0..Unbound
F3------0..Unbound
IDOC is
ZIDOC
IDOC----1..1
-BEGIN-Required
-SEGMENT1---1..1
-SEGEMENT2-1..1
-SEGMENT3-1..999
To create multiple IDOCs if there are multiple rows in a flat file in MM i choosed occurances as 0..unbound in Signiture tab
Source structure:
Messages------1...1
-Message1--1....1
DT_TYPE------0..Unbound
DETAILS -
0..Unbound
F1------0..Unbound
F2------0..Unbound
F3------0..Unbound
Target Strcuture:
Messages----1....1
-Message--1....1
ZIDOC----0....unbound
IDOC------1..1
BEGIN---Required
SEGMENT1-----1..1
SEGEMENT2---1..1
SEGMENT3---1..999
I am unable to generate two IDOCs if there are two rows:
Am I missing some thing?
It isnt possible with out BPM?
Thanks
Rajeev -
Proxy to File scenario - IDOC as an flat file
Hi,
I am working on ABAP Sender Proxy to File scenario. The target structure in the message mapping is SHPMNT05 IDOC and the output of the file needs to be in the text format and then the file will be send to an EDI subsystem.
Currently, EDI subsystem gets the IDOC from ERP system as a flat file and expects the similar kind of file from XI system
The requirement is to have all the fields of the IDOC in the target file. If data does not exist for a particular field, then there should be a space for that field in the text file.
I would like to know if there is any other standard way of executing this scenario apart from using File Content conversion. In case if we have to use FCC, how difficult it would to be implementing the scenario. Please note that the output file needs all the fields of IDOC in it.
Regards,
Sakthi
Edited by: Sakthi on Sep 26, 2008 11:24 AMHello Sakthi,
By coding in proxy populate the idoc structure if it is difficult to handle thru Content conversion parameters then create an intermediate structure and populate that structure by concatenating the fields from idoc segments. If the fields are not having the values then add blank spaces as per length of the field.
You can configure the file channel and content converison parameters for the intermediate structure.
Hope it will helps to you.
Cheers
Veera -
Income Statement Report from Flat File
Dear Gurus,
I'm in the process of creating an INCOME STATEMENT report from Flat File as for my learning purpose , can you please help me where to start in order to create the Flat File and how many KEY FIGURES & CHAR do I need.
Thanks,
-NehaHi,
As this is for your learning purpose, create the fields as per your requirement. Then create info objects of the same type in BI. Then you try to load the info cube from the flat file.
for example: if my req is to have 4 fields like student name, marks, grade as my info objects. i have create the same fields in the flat file.
Note: you can create the flat file in excel and save it as csv format.
Edited by: arthishri on Sep 20, 2010 1:46 PM
Maybe you are looking for
-
Did up date for 10.7.4 to 10.7.5 and update for Aperture and now Aperture doesn't open. How do I fix?
-
Can we run a query with variable screen at start up in Bex Analyzer
Hello all, I have a query which asks for fiscal year and posting period at the start of query run. But when I run the query in analyzer, it gives me this error all the time. "Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION System error in
-
Can't Install iTunes 10.6.1 on Windows 7 64-Bit
I've tried repeatedly. The installation verifies, unpacks, and then installs to approximately 60% and then -- nothing. I can wait for twenty minutes and there's no further progress. Meanwhile, the entire system has slowed to a crawl and has become to
-
Regarding Creation of Product group
Hi SAP Guru, I am being Unable to create a product group at new , although I have done it and run at other client.Also Please let me know the Views to select. As per My knowledge I have selected only 05 views , basic, MRP-1,2,3,4.... Need not to sele
-
I want to use iChat video and file sharing with Windows users
Nowadays, iChat is compatible with AOL/AIM, Google Talk, Jabber, Mac.com and MobileMe instant messaging services. I know that Yahoo Messenger support will be available soon in Mac OS X Lion. I tried using AOL/AIM and Google Talk natively in iChat in