BDC for ME21N (Flat file format)

Hello,
     I have to write a BDC for ME21N(stock transfer).... Someone pls give me the format of flat file... we need separate files for header and items or only one file is enough??? pls someone send me the format and code......
my email id is [email protected]
Thanks in advance...
Regards,
Maya.

Hi
see this and do accordingly
REPORT zmm_bdcp_purchaseorderkb02
NO STANDARD PAGE HEADING LINE-SIZE 255.
Declaring internal tables *
*-----Declaring line structure
DATA : BEGIN OF it_dummy OCCURS 0,
dummy(255) TYPE c,
END OF it_dummy.
*-----Internal table for line items
DATA : BEGIN OF it_idata OCCURS 0,
ematn(18), "Material Number.
menge(13), "Qyantity.
netpr(11), "Net Price.
werks(4), "Plant.
ebelp(5), "Item Number.
END OF it_idata.
*-----Deep structure for header data and line items
DATA : BEGIN OF it_me21 OCCURS 0,
lifnr(10), "Vendor A/c No.
bsart(4), "A/c Type.
bedat(8), "Date of creation of PO.
ekorg(4), "Purchasing Organisation.
ekgrp(3), "Purchasing Group.
x_data LIKE TABLE OF it_idata,
END OF it_me21.
DATA : x_idata LIKE LINE OF it_idata.
DATA : v_delimit VALUE ','.
DATA : v_indx(3) TYPE n.
DATA : v_fnam(30) TYPE c.
DATA : v_count TYPE n.
DATA : v_ne TYPE i.
DATA : v_ns TYPE i.
*include bdcrecx1.
INCLUDE zmm_incl_purchaseorderkb01.
Search help for file *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
START-OF-SELECTION.
To upload the data into line structure *
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = it_dummy.
Processing the data from line structure to internal tables *
REFRESH:it_me21.
CLEAR :it_me21.
LOOP AT it_dummy.
IF it_dummy-dummy+0(01) = 'H'.
v_indx = v_indx + 1.
CLEAR it_idata.
REFRESH it_idata.
CLEAR it_me21-x_data.
REFRESH it_me21-x_data.
SHIFT it_dummy.
SPLIT it_dummy AT v_delimit INTO it_me21-lifnr
it_me21-bsart
it_me21-bedat
it_me21-ekorg
it_me21-ekgrp.
APPEND it_me21.
ELSEIF it_dummy-dummy+0(01) = 'L'.
SHIFT it_dummy.
SPLIT it_dummy AT v_delimit INTO it_idata-ematn
it_idata-menge
it_idata-netpr
it_idata-werks
it_idata-ebelp.
APPEND it_idata TO it_me21-x_data.
MODIFY it_me21 INDEX v_indx.
ENDIF.
ENDLOOP.
To open the group *
PERFORM open_group.
To populate the bdcdata table for header data *
LOOP AT it_me21.
v_count = v_count + 1.
REFRESH it_bdcdata.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0100',
' ' 'BDC_CURSOR' 'EKKO-LIFNR',
' ' 'BDC_OKCODE' '/00',
' ' 'EKKO-LIFNR' it_me21-lifnr,
' ' 'RM06E-BSART' it_me21-bsart,
' ' 'RM06E-BEDAT' it_me21-bedat,
' ' 'EKKO-EKORG' it_me21-ekorg,
' ' 'EKKO-EKGRP' it_me21-ekgrp,
' ' 'RM06E-LPEIN' 'T'.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '/00'.
MOVE 1 TO v_indx.
*-----To populate the bdcdata table for line item data
LOOP AT it_me21-x_data INTO x_idata.
CONCATENATE 'EKPO-EMATN(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-ematn.
CONCATENATE 'EKPO-MENGE(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-menge.
CONCATENATE 'EKPO-NETPR(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-netpr.
CONCATENATE 'EKPO-WERKS(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-werks.
v_indx = v_indx + 1.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '/00'.
ENDLOOP.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '=BU'.
PERFORM bdc_transaction USING 'ME21'.
ENDLOOP.
PERFORM close_group.
End of selection event *
END-OF-SELECTION.
IF session NE 'X'.
*-----To display the successful records
WRITE :/10 text-001. "Sucess records
WRITE :/10 SY-ULINE(20).
SKIP.
IF it_sucess IS INITIAL.
WRITE :/ text-002.
ELSE.
WRITE :/ text-008, "Total number of Succesful records
35 v_ns.
SKIP.
WRITE:/ text-003, "Vendor Number
17 text-004, "Record number
30 text-005. "Message
ENDIF.
LOOP AT it_sucess.
WRITE:/4 it_sucess-lifnr,
17 it_sucess-tabix CENTERED,
30 it_sucess-sucess_rec.
ENDLOOP.
SKIP.
*-----To display the erroneous records
WRITE:/10 text-006. "Error Records
WRITE:/10 SY-ULINE(17).
SKIP.
IF it_error IS INITIAL.
WRITE:/ text-007. "No error records
ELSE.
WRITE:/ text-009, "Total number of erroneous records
35 v_ne.
SKIP.
WRITE:/ text-003, "Vendor Number
17 text-004, "Record number
30 text-005. "Message
ENDIF.
LOOP AT it_error.
WRITE:/4 it_error-lifnr,
17 it_error-tabix CENTERED,
30 it_error-error_rec.
ENDLOOP.
REFRESH it_sucess.
REFRESH it_error.
ENDIF.
CODE IN INCLUDE.
Include ZMM_INCL_PURCHASEORDERKB01
DATA: it_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA: it_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: E_GROUP_OPENED.
*-----Internal table to store sucess records
DATA:BEGIN OF it_sucess OCCURS 0,
msgtyp(1) TYPE c,
lifnr LIKE ekko-lifnr,
tabix LIKE sy-tabix,
sucess_rec(125),
END OF it_sucess.
DATA: g_mess(125) type c.
*-----Internal table to store error records
DATA:BEGIN OF it_error OCCURS 0,
msgtyp(1) TYPE c,
lifnr LIKE ekko-lifnr,
tabix LIKE sy-tabix,
error_rec(125),
END OF it_error.
Selection screen
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS session RADIOBUTTON GROUP ctu. "create session
SELECTION-SCREEN COMMENT 3(20) text-s07 FOR FIELD session.
SELECTION-SCREEN POSITION 45.
PARAMETERS ctu RADIOBUTTON GROUP ctu. "call transaction
SELECTION-SCREEN COMMENT 48(20) text-s08 FOR FIELD ctu.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) text-s01 FOR FIELD group.
SELECTION-SCREEN POSITION 25.
PARAMETERS group(12). "group name of session
SELECTION-SCREEN COMMENT 48(20) text-s05 FOR FIELD ctumode.
SELECTION-SCREEN POSITION 70.
PARAMETERS ctumode LIKE ctu_params-dismode DEFAULT 'N'.
"A: show all dynpros
"E: show dynpro on error only
"N: do not display dynpro
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 48(20) text-s06 FOR FIELD cupdate.
SELECTION-SCREEN POSITION 70.
PARAMETERS cupdate LIKE ctu_params-updmode DEFAULT 'L'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) text-s03 FOR FIELD keep.
SELECTION-SCREEN POSITION 25.
PARAMETERS: keep AS CHECKBOX. "' ' = delete session if finished
"'X' = keep session if finished
SELECTION-SCREEN COMMENT 48(20) text-s09 FOR FIELD e_group.
SELECTION-SCREEN POSITION 70.
PARAMETERS e_group(12). "group name of error-session
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 51(17) text-s03 FOR FIELD e_keep.
SELECTION-SCREEN POSITION 70.
PARAMETERS: e_keep AS CHECKBOX. "' ' = delete session if finished
"'X' = keep session if finished
SELECTION-SCREEN END OF LINE.
PARAMETERS:p_file LIKE rlgrap-filename.
at selection screen *
AT SELECTION-SCREEN.
group and user must be filled for create session
IF SESSION = 'X' AND
GROUP = SPACE. "OR USER = SPACE.
MESSAGE E613(MS).
ENDIF.
create batchinput session *
FORM OPEN_GROUP.
IF SESSION = 'X'.
SKIP.
WRITE: /(20) 'Create group'(I01), GROUP.
SKIP.
*----open batchinput group
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = GROUP
USER = sy-uname.
WRITE:/(30) 'BDC_OPEN_GROUP'(I02),
(12) 'returncode:'(I05),
SY-SUBRC.
ENDIF.
ENDFORM. "OPEN_GROUP
end batchinput session *
FORM CLOSE_GROUP.
IF SESSION = 'X'.
*------close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
(12) 'returncode:'(I05),
SY-SUBRC.
ELSE.
IF E_GROUP_OPENED = 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /.
WRITE: /(30) 'Fehlermappe wurde erzeugt'(I06).
ENDIF.
ENDIF.
ENDFORM. "CLOSE_GROUP
Start new transaction according to parameters *
FORM BDC_TRANSACTION USING TCODE TYPE ANY.
DATA: L_SUBRC LIKE SY-SUBRC.
*------batch input session
IF SESSION = 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = it_BDCDATA.
WRITE: / 'BDC_INSERT'(I03),
TCODE,
'returncode:'(I05),
SY-SUBRC,
'RECORD:',
SY-INDEX.
ELSE.
REFRESH it_MESSTAB.
CALL TRANSACTION TCODE USING it_BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO it_MESSTAB.
L_SUBRC = SY-SUBRC.
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
ENDIF.
Message handling for Call Transaction *
perform subr_mess_hand using g_mess.
*-----Erzeugen fehlermappe
IF L_SUBRC <> 0 AND E_GROUP <> SPACE.
IF E_GROUP_OPENED = ' '.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = E_GROUP
USER = sy-uname
KEEP = E_KEEP.
E_GROUP_OPENED = 'X'.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = it_BDCDATA.
ENDIF.
REFRESH it_BDCDATA.
ENDFORM. "BDC_TRANSACTION
Form subr_bdc_table *
text
-->P_0220 text *
-->P_0221 text *
-->P_0222 text *
FORM subr_bdc_table USING VALUE(P_0220) TYPE ANY
VALUE(P_0221) TYPE ANY
VALUE(P_0222) TYPE ANY.
CLEAR it_bdcdata.
IF P_0220 = ' '.
CLEAR it_bdcdata.
it_bdcdata-fnam = P_0221.
it_bdcdata-fval = P_0222.
APPEND it_bdcdata.
ELSE.
it_bdcdata-dynbegin = P_0220.
it_bdcdata-program = P_0221.
it_bdcdata-dynpro = P_0222.
APPEND it_bdcdata.
ENDIF.
ENDFORM. " subr_bdc_table
Form subr_mess_hand *
text *
-->P_G_MESS text *
FORM subr_mess_hand USING P_G_MESS TYPE ANY.
LOOP AT IT_MESSTAB.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = it_messtab-msgid
LANG = it_messtab-msgspra
NO = it_messtab-msgnr
v1 = it_messtab-msgv1
v2 = it_messtab-msgv2
IMPORTING
MSG = P_G_MESS
EXCEPTIONS
OTHERS = 0.
CASE it_messtab-msgtyp.
when 'E'.
it_error-error_rec = P_G_MESS.
it_error-lifnr = it_me21-lifnr.
it_error-tabix = v_count.
APPEND IT_ERROR.
when 'S'.
it_sucess-sucess_rec = P_G_MESS.
it_sucess-lifnr = it_me21-lifnr.
it_sucess-tabix = v_count.
APPEND IT_SUCESS.
endcase.
ENDLOOP.
Describe table it_sucess lines v_ns.
Describe table it_error lines v_ne.
ENDFORM. " subr_mess_hand
Regards
Anji

Similar Messages

  • 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>

  • New EDI Implementation - Flat File format for SPSI in eCommerce Gateway

    Hi,
    we are trying to setup EDI with a business partner, goal is to import a DELFOR message into Oracle Order Management. Plans are: translate the inbound message into the SPSI flat file format, load it through eCommerce Gateway / Release Management into Order Management.
    For this purpose I'd like to test to the import of a SPSI flat file into eCommerce Gateway / Release Management, however I have difficulties to get a proper flat file. Is there a way to generate example flat files somehow? I tried to generate my own flat file, based on the Oracle manuals, but how can I be sure that the format is correct (besides of running the import program)? Any advice on this?
    Or is there a better way, e.g. through XML files?
    Thanks in advance,
    David.

    Hi, thanks for the response.
    Yes I use that report already to get the details of the flat file. But what I am missing is for example which records are repeated, e.g. for every 4000 record, do I need one 0010 record, or can I put multiple 4000 records within one 0010 record?
    regards,
    David.

  • Standardize a flat file format w.r.t OWB

    Hi Pat,
    or anyone,
    Can u help me to standardize a flat file format with respect to OWB?
    I have 15 financial source systems. The client agreed in giving the data in csv format. Now I need to standardize the feed file so that it would be easy for me handle it in OWB. Please note depending on my standardization the client would give me the data and in turn it would be easy for me to handle it OWB External Tables. The records size for a single feed file is 1 million. So my questions are
    1.How should I standardize a date field in flat file?. Please note target date field is default date in Oracle.
    2.How should I standardize an address field? I.e. normally here I have 3 address fields. But I want the output in 1 field. What is the best possible methodology to do this? Or can I handle this issue in OWB front.
    3.How should I standardize a feed file name (generic)?
    4.How should I standardize a feed file folder (generic)? Please note the folder will reside in UNIX environment. The concept is, there would be respective folders in UNIX and the feed files would automatically fall into these respective folders in a fortnight basis. So what should I do to achieve this? I know I have to write a shell script for the automatic process. If so how will I do this and schedule it.
    5.And w.r.t above question, how will I tell OWB to go and fetch the files in those folders. I know it is done while mapping. But my question is Is that the only best way I can achieve it?
    6.If I left anything related to feed file, please tell me?
    Please note that based on my standardization, the client would extract the data and give it to me. So if I standardize the feed file which would be easy for me to handle it in OWB, then that would be a great success. And also note this is for a long run. Minimum 10 years.
    Regards,
    rem.

    Good afternoon Rem,
    It's all very theoretical indeed, talking about standards and all. I'll try to answer some of your questions according to my experiences.
    @1, Usually we load flat files into external tables using varchar2-fields only, occasionally number fields; dates however are always loaded into varchar2's and then when reading the external table into the staging area they are converted to Oracle dates using a simple TO_DATE transformation.
    @2, I don't think there's a real standard for that, it should simply meet YOUR needs, so when loading EXT into STG simply perform a transformation concatenating those 3 fields to form one.
    @5, you have to register the location where you have defined your flat files, this should be some Unix location; after that the connector between EXT and STG will know what to do when running the mappings from EXT to STG (thus: no other action is needed to 'tell OWB' where to fetch data from flat files).
    As far as I know there a no standards in naming conventions for files and folders, just go with what seems logical/practical in your situation.
    Regards, Patrick

  • Flat file format - importing vs typing it out

    Hi.  I've heard there is a way to import the format (rather that typing it out in connection mgr) of a fixed width flat file.  What r the general steps or where is there a set of instructions online?  I generally have a txt doc with column
    names (lots of them) , widths etc that I would use for import and could easily transfer them to a spreadsheet if necessary.   So far the word import is bringing up a lot of unwanted subject matter in my web searches.   I am spending a lot
    of time typing out flat file formats in conn mgrs and am thinking it may be worth a look at ssis's ability to "import" a format.   We generally land our data in "untyped" staging tables 1st so ssis could assume everything is string.  
    I dont really want to read my records as one long string and parse them later.

    thx.   I suppose I can write and share with the community some general t-sql that generates the following but would like to know a couple of things. 
    First, is any old guid ok in each of the places where a guid is indicated?  I would generate a new one for each guid.
    Second, what is the locale id?
    Of course i would only paste the results in a pkg (dtsx file) that doesnt reference the cols (beyond the connection stuff) yet.
    What gotchtyas am I looking at if i try this with the intention of pasting the generated code over the top of what ssis already generated (inside the dtsx file) in a one column connector created the usual way?
    <DTS:ConnectionManagers>
    <DTS:ConnectionManager
    DTS:refId="Package.ConnectionManagers[Flat File Connection Manager]"
    DTS:CreationName="FLATFILE"
    DTS:Description="ZZZZZZ"
    DTS:DTSID="{some guid}"
    DTS:ObjectName="Flat File Connection Manager">
    <DTS:PropertyExpression
    DTS:Name="ConnectionString">@[User::fileName]</DTS:PropertyExpression>
    <DTS:ObjectData>
    <DTS:ConnectionManager
    DTS:Format="FixedWidth"
    DTS:LocaleID="1033"
    DTS:HeaderRowDelimiter="_x000D__x000A_"
    DTS:RowDelimiter=""
    DTS:TextQualifier="_x003C_none_x003E_"
    DTS:CodePage="1252"
    DTS:ConnectionString="c:...">
    <DTS:FlatFileColumns>
    <DTS:FlatFileColumn
    DTS:ColumnDelimiter=""
    DTS:ColumnWidth="2"
    DTS:MaximumWidth="2"
    DTS:DataType="129"
    DTS:ObjectName="XXXXX"
    DTS:DTSID="{some other guid}"
    DTS:CreationName="" />
    <DTS:FlatFileColumn
    DTS:ColumnDelimiter=""
    DTS:ColumnWidth="2"
    DTS:MaximumWidth="2"
    DTS:DataType="129"
    DTS:ObjectName="YYYYYY"
    DTS:DTSID="{some other guid}"
    DTS:CreationName="" />

  • PO Idoc in Flat File format

    Hi all,
    I am able to generate the PO Idoc in Flat file format using standrad FM IDOC_OUTPUT_ORDERS. but the Flat file appearing is not in a appropriate format.
    I'm looking to generate the Flat file in such a way that there will be only one line for each Idoc Segment.( with Line termination).
    How to Achieve this.
    Regards,
    S Anand

    Resolved.
    we can use CG3Y transaction.
    Regards,
    S Anand

  • Flat file format

    Hi all
    What is mean by ASCI format for the flat file
    any eg to show?
    Name | Age | Hobby | Contact
    john;23;soccer;123456
    do u mean by ASCI format above?

    gary,
    American Standard Code for Information Interchange (ASCII), generally pronounced ask-ee , is a character encoding based on the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that work with text. Most modern character encodings — which support many more characters — have a historical basis in ASCII.
    Work on ASCII began in 1960. The first edition of the standard was published in 1963,[1] a major revision in 1967, and the most recent update in 1986. It currently defines codes for 128 characters: 33 are non-printing, mostly obsolete control characters that affect how text is processed, and 95 are printable characters.
    Regards,
    Karthik

  • Flat file formats

    What are the flat files formats accepted for import and export in mdm?
    How MDM recognize the document type/mapping to perform of incoming file (file name, folder) ?
    What are the flat file format for export (delimited, structured, XML) ?
    Does MDM handle Header in a flat file (import and export) ?
    Does MDM handle several line definition in a flat file (import and export) ?

    Hi Joesph,
    Here are answers to your questions:
    <b>Ans 1--></b> As previously told by adhappan ,you can import data using import manager from the following formats:
    Access--Means From  microsoft access
    Excel -- From an excel file
    ODBC--this is generally used to import data from a  flat file.BY flat file i mean to say a tab comma seperated "csv " file or a ".txt "file.
    Port--to import data from a port .In mdm, port actually refers to a directrory
    XML--from an xml file
    XML Schema-- this is used when you try to import data from a file whosr structure you have predefined in console using an xsd file.
    <b>Ans 2--></b> we specify the file format while connecting to source by mentioning it in the <b>type</b> properties.and mapping is performed in the import manager in the map value tab.
    <b>Ans 3--></b>When you import or export a flat file then data in the first  line of file is considered as header.
    <b>Ans 4 --></b> As i previously told ,MDM will handle header.
    <b> Ans 5 --></b>MDM does not handle several line definition of header.
    Hope it will help you.<b> Please remark if it really helped you</b>.
    Thanks,
    <b>Shiv Prashant Dixit</b>

  • HOW MANY TYPES OF FLAT FILE FORMAT

    hi gurus......
    Basically there r 3 types of flat file format
    ASC
    DAT
    BIN
    i am correct or wrong???
    what is the difference between these formats?

    Hi,
    you are right.
    This is from the documentation available in GUI_UPLOAD func.module:
    'BIN'.
    The system reads a binary representation of the internal table from the
    file. The data is neither converted nor interpreted in this case.
    Usually, reasonable results are obtained only if the internal table
    consists of a single column of type 'X'.
    'DAT'
    The components of the internal table are filled from the file. If the
    table contains several columns, the entries in the file must be
    separated by tabs. No conversion exits are performed. eg: .TXT with tab delimited
    The following applies for the different data types:
    I or N or P or F
    The numbers must be formatted according to the decimal representation
    defined in the user settings.
    D
    The date must be formatted according to the date format defined in the
    user settings.
    T
    The time must be formatted as hh:mm:ss.
    'ASC'.
    The components of the internal table are filled from the file. Only
    data types with fixed length are allowed. The data must be contained
    in the file in its full length. eg: Like ·TXT or ·CSV files
    Anirban

  • How to create a dynamic SSIS package for multiple flat file destinations

    Hi,
    I have to create a ssis package which has single data flow task and inside that I have 23 source (sql- select * from - statements)- destination (flat files, 23 distinct) connection.
    Now for each product I have to create separate SSIS package (i.e. if prod=abc then these read select * from abc_tables and 23 abc_ txt files)
    I want to do it dynamically, means only single package and inside that variables will take select * values for each source-dest connection (so i believe 23 variables) and same for destination flat files.
    Let me know. :)
    ANK HIT - if reply helps, please mark it as ANSWER or helpful post

    Sorry It seems you're contradicting yourself. you say I know my source and dest structure and the you're
    asking all I want is to have a dynamic structure
    what does that mean?
    and reading your next sentence
    I want to run a package for 5 products, instead of creating 5 ssis packages with 23 source- dest connection, I would
    like to have one with only 23 source- dest connections 
    What I feel is what you're looking for is to  have a looping structure to loop through each of the 5
    products.
    In that case what you could do is this
    1. Create a object variable in SSIS 
    2. Use a Execute SQL Task to populate the variable with all available products (I think you'll have a master table for that). Set ResultSet property to Full ResultSet and then in ResultSet tab map Object variable to 0 th index
    3. use a ForEachLoop container with ADO .NET recordset enumerator and map to object variable. Create a variable of datatype same as that of Product identifier field to get individual values out
    4. Inside loop create your data flow task with 23 source destination connection. In the query part use a parameter for product field and map it to the variable containing product value to get only data for the product.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Steps for performing Flat file to XML

    hey,
    does any one have steps for performing flat file (.csv) to XML conversion. how is the mapping in the design performed.
    kalyan.

    Kalyan,
    Consider my example, I have input file as csv structure and want it to convert into .xml file thats it.
    Input file
    J,24
    P,22
    I want the output file like
    <Emp_Details>
      <F1>J</F1>
      <F2>24</F2>
    </Emp_Details>
    <Emp_Details>
      <F1>P</F1>
      <F2>22</F2>
    </Emp_Details>
    I doesn't know whether the above matches exactly ur reqmt, but there is the option.
    Step 1 : Create Scenario & Business service
    http://www.flickr.com/photo_zoom.gne?id=699386732&size=o
    Step 2: Create sender & receiver comm.channel
    http://www.flickr.com/photo_zoom.gne?id=699386698&size=o
    http://www.flickr.com/photo_zoom.gne?id=699386664&size=o
    Step 3:Create all the objects in ID and cross verify below  whether u've created everything.
    http://www.flickr.com/photo_zoom.gne?id=699386690&size=o
    Step 4: Activate and run the interface.
    Your results :
    http://www.flickr.com/photo_zoom.gne?id=699386686&size=o
    Hope it helps!!!
    Best regards,
    raj.

  • BDC for ME21N Transaction

    Dear All,
    I have a requirement to create PO using transaction ME21N. I had written a code to create PO using BDC for transaction ME21. But the user wants it to be modified to ME21N. The user wants the PO created in the foreground like the one i created fro ME21. But is it possible to use BDC for ME21N or is there any other way i can change the BAPI to foreground processing like in BDC?
    Regards,
    Karthik

    Hi Raghavender,
    This is a report to display and validate the RFQ's. And once the user selects the RFQ and clicks on Create PO from RFQ push button, it should go to transaction 'ME21N' with values from RFQ. ( similar to what we do in ME21N, when we drag RFQ from the documents overview and drop it into cart, the values are populated). I want the similar functionality to happen when the user clicks on clicks on Create PO push button. But it should happen only in the foreground and not background.
    Regards,
    Karthik

  • Can we handle content convertion for TabDelimiter flat file in JMS

    Hi,
    Is it possible to handle content conversion for TabDelimiter flat file in JMS (Not in FILE adapter).
    If possible .. can you please explain.
    Regards,
    Siva.

    Hi, Siva:
    Yes, this is possible.
    The way that JMS adapter to handle content cnversion is similar to the way file adapter does.
    Different from file adapter, you do not have to specify "Content Conversion" as transport protocol, you need to use transformation bean (localejbs/AF_Modules/MessageTransformBean) in Module tab.
    Check page 23 of the following link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a05b2347-01e7-2910-ceac-c45577e574e0
    Liang

  • Convert amount from flat file format to user format

    hi,
    how to convert amount from flat file format to user specific format.
    input:  1000.00
    output: 1.000,00 (user specific)
    thanks in advance

    move that value to a type WRBTR variable
    and use write statement.
    data v_wrbtr type wrbtr.
    data v_char(20).
    v_wrbtr = 1000.
    write v_wrbtr to v_char.
    v_char will contain the amount in user format.
    Prerequsite, go to SU3 transaction.
    Defaults tab, chose the decimal notation .
    Regards,
    Ravi

  • Sender Idoc_AAE Adapter for flat file format

    I have been given to develop a Scenario where in  an Idoc in a flat file (.txt) format needs to be sent from ECC system to a Bank SFTP server . NO ESR objects are involved ,just pick and place .Kindly Explain the configuration on the Sender Idoc_AAE Adapter .

    Hi Srinath,
    Please refer the below blogs for IDOC_AAE configuration
    How to create and configure Sender Idoc AAE Scenario - PI 7.3
    refer the below blog for IDOC to file scenario (with IDOC_AAE)
    IDOC_AAE To File with all Configurations
    to convert IDOC XML to IDOC flat you need to create JCA in NWA. Please refer the below blog
    Converting IDoc XML to Flat File and Vice-Versa
    regards,
    Harish

Maybe you are looking for

  • Oracel Service does not start

    I create a service and it starts at times and would'nt at other times. In my services window, all I see is a 'starting' but it never starts. Where should I look. Please help. Thank you.

  • To include  a  value '#' in users filter vaue selection

    Hi Gurus, Thanks a lot for the continuous help from all of you and Again I am looking for ur valuable suggestions for my follwing problem : In my query I have a characteristic RunID which is included in the Free Characteriostics. according to the Fun

  • ME21N Copy header Z delivery date on to item level

    Dear Friends, We add one field for expected date of arrival in header of ME21n. My requirement is whenever we put this value and press enter it should reflect item level delivery date . How can we achive this thing. Any help will be highly Appricated

  • Error starting up WebLogic domain

    I keep getting the following error every time I try to start my WebLogic 64bit domain: Java(TM) Platform SE binary has stopped working Problem signature: Problem Event Name:     BEX64 Application Name:     java.exe Application Version:     1.6.0.20 A

  • Vimeo play button not responding

    Hi, None of my vimeo video's seem to be working off my website. They used to work fine but ever since updating to Firefox 18.0, the play buttons have stopped responding. You can view the issue at the below link: http://www.glengranttasting.com/en-us/