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
Similar Messages
-
Creating a flat file in the IDOC format
Hi everybody,
Need help.....urgently. Can somebody please tell me how to create a flat file in the IDOC format? I am creating a bill of lading/Documentary payments (EDI 858) and can't figure out a way to write the data generate through the report in a flat file in IDOC format. My deadline is right around the corner and I need help.
Thanks,
MHi Minal,
I still don't understand your question.
So, you have a report which selects data and puts it into an internal table. This part looks fine.
You want to create a flat file? Ok, to create a flat file on the application server then use the commands OPEN DATASET, TRANSFER, and CLOSE DATASET. To create a flat file on the presentation server then use the FM GUI_DOWNLOAD (or the GUI class, I forgets its name for the moment).
In both cases you should build up an internal table which has the exact structure required for your (EDIFACT?) EDI message, and then use the appropriate method to write the file.
If the following steps are manual then there is nothing more for you to do.
I don't see any need to use Idoc technology, or make any reference to it in your solution.
I hope that helps. If not, please be more specific when asking your questions.
Brad -
Error while uploading data from a flat file to the hierarchy
Hi guys,
after i upload data from a flat file to the hierarchy, i get a error message "Please select a valid info object" am loading data using PSA, having activated all external chars still get the problem..some help on this please..
regards
Srithere is o relation of infoobject name in flat file and infoobjet name at BW side.
please check with the object in the BW and their lengths and type of the object and check your flat file weather u have the same type there,
now check the sequence of the objects in the transfer rules and activate them.
there u go. -
Delete flat file from the local drive after downloading in the program
how to <b>delete flat file from the local drive after downloading in the program</b>
I am using gui_upload to upload flat file data in internal table. and after that i dont want that flat file in the disk. i want to delete it.Once the file has been uploaded into the internal table call the<b> FILE_DELETE </b>method of the class <b>CL_GUI_FRONTEND_SERVICES</b>.
DATA: v_rc TYPE i.
CALL METHOD cl_gui_frontend_services=>file_delete
EXPORTING
filename = 'C:\TEMP\MATERIAL.TXT'
CHANGING
rc = v_rc
EXCEPTIONS
file_delete_failed = 1
cntl_error = 2
error_no_gui = 3
file_not_found = 4
access_denied = 5
unknown_error = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards
Kathirvel -
Error while loading Flat file to the table (ORA-00936: missing expression)
lat file Hi Gurus
Receiving the following error while trying to load of flat file to the database :
ODI-1228: Task test_file_load (Integration) fails on the target ORACLE connection DEMO_STAGE.
Caused By: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)
The file which I have tried to load is : SRC_SALES_PERSON and teh table structure is
CREATE table "TRG_SALES_PERSON"(
"SALES_PERSON_ID" NUMBER(8,0) NOT NULL,
"FIRST_NAME" VARCHAR2(80),
"LAST_NAME" VARCHAR2(80),
"DATE_HIRED" VARCHAR2(80),
"DATE_UPDATED" DATE NOT NULL)
Knowledge module used are
LKM File to SQL
IKM SQL Incremental Update
We rae using ODI 11g R2 ...
Thanks and reallty appreciate any help in thsi regard.HI there,
I am facing the same issue while loading data from SRC_SALES_PERSON(flat file) to TRG_CUSTOMER.
I dont see any errors in the steps however the data is not laoded finally. Here are the sql commands
**On source**
select ID C11_ID,
LASTNAME C9_LASTNAME
from TABLE
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=SRC_SALES_PERSONSNP$CRLOAD_FILE=D:\Pratima\Softwares\ODI\ofm_odi_companion_generic_11.1.1.5.1_disk1_1of1[1]\demo\oracledi-demo\oracledi\demo\file/SRC_SALES_PERSON.txtSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=IDSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=11SNP$CRPRECISION=11SNP$CRACTION_ON_ERROR=0SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=FIRSTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=12SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LASTNAMESNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=62SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=DATE1SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=112SNP$CRLENGTH=20SNP$CRPRECISION=20SNP$CR$$SNPS_END_KEY*/
On Target
insert into STAGING.C$_0TRG_CUSTOMER
C11_ID,
C9_LASTNAME
values
:C11_ID,
:C9_LASTNAME
The actual code at source fails however the step is in green.
Thanks in Advance,
Pratima -
What is the best way to export the data out of BW into a flat file on the S
Hi All,
We are BW 7.01 (EHP 1, Service Pack Level 7).
As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
Thanks in advance,
- ShashiHello Shashi,
some comments:
1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
For completeness, here's the most recent documentation which also lists other options:
http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
Regards,
Marc
SAP Customer Solution Adoption (CSA) -
Attaching a flat file to the Document Number
Hi,
I want to attach a flat file to the Document Number generated .
Please follow the steps :
1) Goto transaction FB03.
2) Enter into it by giving a document number.
3) At the Document overview screen you will find the 'Services for Object' button(Left side upper part of the screen)
4) When you click it you will find Create-> Create attachment will be there where you can browse and upload a flat file that tags tagged to the Document number.
Is there any FM to do this activity.
Thanks in AdvanceHi Raja,
I have used the function module
'BDS_BUSINESSDOCUMENT_CREATEF' with the following parameters .
Export:
LOGICAL_SYSTEM = 'LS_TSX100'
CLASSNAME = 'BUS6035'
CLASSTYPE = 'BO'
CLIENT = '100'
OBJECT_KEY = 'SE1201000000012006'
Tables:
Files-directory = 'C:\'
files-filename = 'POSTING.TXT'.
After that I have committed it .
The file doesn't get attached . I went into the FB02 and entered the accounting number(100000001) and checked but it has not got attached .
Please help me . -
How to read a flat file from the batch
Hi,
We have a requirement to read a flat file in the custom java batch in ETM2.2. We have the file at a specific location.
can some one let me know what are the various options, we have to read a flat file.
Thanks,
Sharath Kumar G.Is it referring to some "Process X" batch?
And why MPL/XAI with or without Configuration Tools should not be used to do this and a custom Java batch is required? -
How we create a flat file on the application server
hi,
how we create a flat file on the application servere,this file have the header data and corresponding item data also.
i.e. how we use the AT NEW and ATEND. statement in this file creation.
pls send me some code related to this.
thanks,
vipinHi Grafl,
Chk this link
Folder creation in AL11 using ABAP program
try this code.This works on UNIX servers
data: unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
dir = unixcom = 'mkdir mydir'. "command to create dir
"to execute the unix command
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
<b>Reward Points if Useful</b>
Regards
Gokul -
Hi experts,
I have a bit of a problem here wit a flat file to IDOC interface.
My input CSV file structure (shortened) is as follows -
<?xml version="1.0" encoding="UTF-8"?>
<ns0:POINBOUND_MT xmlns:ns0="urn:xx:xi:dwn:xx:pf:xxx:poinbound:100">
<Record>
<Row>
<PO_HEADER_ID/>
<TYPE_LOOKUP_CODE/>
<LINE_NUM/>
<AMOUNT_LIMIT/>
</Row>
</Record>
</ns0:POINBOUND_MT>
the target side is an idoc - PORDCR1.PORDCR102.
in the input file, for each row the PO_HEADER_ID field will have repeated values. the structure for eg.-
PO_HEADER_ID < other fields> < otherfields> ...
12345 <other fields>..<.. >
12345 <other fields>..<..>
12345 <other fields>..<..>
56789 <other fields>..<..>
56789 <other fields>..<..>
Now i need two idocs ( 2 distinct header values) on target side - the 1st idoc will have first 3 line items and 2nd idoc will have the last 2 line items. have already edited the IDOC in xsd format to make it unbounded.
<b><u>Problem</u></b> - i am able to create two idocs by handling contexts(splitbyvalue and a UDF), but with the line items its not working i.e. <u>the first idoc gets the 3 line items created but the 2nd idoc does not have any!</u>
my mapping for line items is -
PO_HEADER_ID <-> splitbyvalue(value changed) <-> count <---> UDF (for result.addvalue using count) <-----> lDOC LINE_ITEM node.
This logic does not work incase i need to create more than one idoc on the target side, it only works for the first idoc..so wat can i do??
Plz help.
thnx in advance!
Raju.Hi Raju,
check these links...
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/877c0d53-0801-0010-3bb0-e38d5ecd352c
Sachin -
Different formats of the flat file for the same target
In our deployment, we use plugin code to extract the csv files in the required format. The customers are on same version of datamart, but they are on different versions of source database - from 3.x to 4.5 depending on which version of application they are using. In 4.0, we introduced a new column email in the user table in the source database. Accordingly, plugin will add the field in the csv file. But not all the customers will get the upgraded version of plugin at the same time. So ETL code needs to decide which data flow to process depending on the format of the csv file to load data to the same target table. I made the email field in the target table nullable but it still expects the same format of the csv file with delimiter for null value.
Need help to achieve this. Can I read the structure of the flat file in DS or get the count of delimiters so that I can use a conditional to use different data flow based on the format of the flat files.
Can I make the email column in the flat file optional?
Thanks much in advance.You can add an email column that maps to null in a query transform for the source that does not contain this column.
Or else you can define two different file formats that map to the same file. One with the column and one without -
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. -
Flat File to Delivery IDOC scenario
Dear All,
I am having one scenario in which I am having the flat file (.txt) of the Delivery Idoc and now I want to convert that flat file into a Delivery Idoc with the required data.
Kindly suggest me some good blogs which gives the step by step process for doing this scenario.
Warm Regards,
N.JainHey Nishu,
You have to use File Content Conversion Paramters to acheive this.
http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
You can Follow the following blogs
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
Or juz post your sender datatype structure some one might give u exact fcc params.
Hope itz Helpfull.
<b>Cheers,
*Raj*
*REWARD POINTS IF FOUND USEFULL*</b> -
FM to create a flat file in given IDOC type format
Hi,
I need to create a flat file having IDOC format.
I have data in some other source file.
Which function module can be used for the same?
Could you pls provide some sample code?
Appreciate the help.
Thanks.
-ShreyasMy Exact requirement is:
I have some data in a source file.
Now I want to create a flat file while which should be in a standard IDOC format(WMMBID02) so that I can process it later using IDOC processing say EDI_DATA_INCOMING or any appropriate FM which will process IDOC later.
I dont want IDOC to be created in the system right now. I just need to reformat my source file into a standard IDOC format flat file.
Maybe you are looking for
-
Convert Milliseconds into specified format
HI, How to convert System.currentMillis() into yyyy-mm-dd HH:MM:SS:SSS format? PLease give me a solution Thanks
-
Have 2 gmail address do i need another profile to add a yahoo email account?
I have several questions: i have 2 gmail accounts and receive email for each in different tabs in T.bird. It works great. I want to add a YAHOO address and create a third tab in the client for sending and receiving yahoo mail. Do I need a new profile
-
HT5147 How do I assign a NOTE to a button?
Hello, I want to assign a note to a button. I would like to set it up where I press a button and it plays the note B on the Cello Tremello sound that will continue until I stop it by pressing the button again (toggle). This will free me up to use b
-
Erratic Trackpad solution!!
My 2 year old MB's trackpad has been erratic the past few days after installing the latest Security Update. It would grab files & move them around; delete items from my Dock or Finder; couldn't enter items into Excel cells, etc. I called Apple Care &
-
I have apparently wiped out my iPhone 4 contacts list, my apps, and my photos when I synced with iTunes. Maybe I clicked the wrong button, but I just wanted to download the photos from my phone to my computer. Is there any way to restore my previou