How to create a inbound IDOC from flat file in Application server

HI All
Our requirement is to create the Inbound idocs from a flat file from application server with in R/3
Could any body please let me know the steps required for this.
Thanks
Malli

1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
and then call function
CALL FUNCTION 'INBOUND_IDOC_PROCESS'
    TABLES
      IDOC_CONTROL       =  i_edidc
      IDOC_DATA          =  i_edid4.

Similar Messages

  • How to create an inbound Idoc from an inbound IDoc in same client

    How to create an inbound Idoc from an inbound IDoc in same client
    Idoc will come from XI as an inbound idoc to SAP, now I have to read this inbound Idoc and split it into Several Inbound Idocs and now needs to be posted in the same client.
    please let me know the procedure..
    Thanks in advance,
    Sagar

    Hi Sagar,
    Develop a cusom Z-Inbound function module, configure the Z-FM to trigger when idoc is recieved from XI. In your Z-Inbound function module split the idoc (Recieved from XI)  into respective Idocs and Using MASTER_IDOC_DISTRIBUTE post the IDOCs into the same system.
    Thanks & Regards

  • Inbound idocs with flat file

    Hi
    Iam creating INBOUND IDOCS from flat file ...so my sending and recieving systems are same...
    In WE20 i have setup the logical system and assigned inbound parameters with message type and proces code.
    Iam using IDOC_INBOUND_ASYNCHRONOUS to create the inbound IDOCS but iam getting the error
    EDI: Partner profile inbound not available
    It looks like iam missing some settings here..
    Please let me know what checks i need to make sure to get rid of this error and post the idoc.
    Thanks
    Govi

    Hello,
    You need to create partner profile in WE20 transaction code.
    For more details follow the link: [creating PARTNER PROFILE|http://help.sap.com/saphelp_nw04/helpdata/en/2d/f371e4d24a11d289810000e8216438/frameset.htm].
    Hope this resolves your issue!
    Thanks,
    Augustin.

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

  • Creating BOM using BDC :How to display no of records from flat file under

    Hi,
          How to display no of records from flat file under one (Alternative BOM) vertically.
        When i execute, the records are replacing one by one.
    Here my coding:
    report ZBOM1
           no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: BEGIN OF bdc OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
          END OF BDC.
    DATA: BEGIN OF BDC1 OCCURS 0,
           idnrk(18),
           MENGE(18),
           MEINS(3),
           postp(1),
          END OF bdc1.
    DATA: BEGIN OF BDCDATA OCCURS 0,
             matnr(18),
             werks(4),
             stlan(1),
             idnrk(18),
             MENGE(18),
             MEINS(3),
             postp(1),
             posnr(4),
          END OF BDCDATA.
    data: ibdcdata type  standard table of bdcdata WITH HEADER LINE.
    *start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
       FILETYPE                       = 'ASC'
       HAS_FIELD_SEPARATOR            = ','
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                     =
      HEADER                         =
      TABLES
        DATA_TAB                      = BDCDATA
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *perform open_group.
    loop at bdcdata.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                  'SOFTDRINKS'.
    perform bdc_field       using 'RC29N-WERKS'
                                  'WIND'.
    perform bdc_field       using 'RC29N-STLAN'
                                  '1'.
    perform bdc_field       using 'RC29N-DATUV'
                                  '16.09.2008'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSTP(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    perform bdc_field       using 'RC29P-IDNRK(01)'
                                  BDCDATA-IDNRK.
    perform bdc_field       using 'RC29P-MENGE(01)'
                                  BDCDATA-MENGE.
    perform bdc_field       using 'RC29P-MEINS(01)'
                                  BDCDATA-MEINS.
    perform bdc_field       using 'RC29P-POSTP(01)'
                                  BDCDATA-POSTP.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                   BDCDATA-POSNR.            "'0010'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  BDCDATA-IDNRK.             "'15'.
    perform bdc_field       using 'RC29P-MENGE'
                                  BDCDATA-MENGE.             "'1'.
    perform bdc_field       using 'RC29P-MEINS'
                                  BDCDATA-MEINS.             "'ml'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    *perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
    REFRESH IBDCDATA.
    endloop.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR iBDCDATA.
      iBDCDATA-PROGRAM  = PROGRAM.
      iBDCDATA-DYNPRO   = DYNPRO.
      iBDCDATA-DYNBEGIN = 'X'.
      APPEND ibDCDATA .
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR iBDCDATA.
        iBDCDATA-FNAM = FNAM.
        iBDCDATA-FVAL = FVAL.
        APPEND iBDCDATA .
    ENDIF.
    ENDFORM.

    Hi,
    the BDCDATA structure must be fnam, fval,dynbegin,dynpro,program.
    You have to declare like this and pass this in your CALL TRANSACTION statement.
    Please give some other table name for BDCDATA you declared for and also for IBDCDATA.

  • How to Post a file(Flat File ) into Application server of the XI(AL11)?

    How to Post a file(Flat File ) into Application server of the XI(AL11)?
    Best Regards,
    Jose

    Hi,
    1) goto SXDA_TOOLS Transaction code
    2) Provide the Following details
    Object Type : DXPROJECT
    Program Type: BAPI
    Program/Method: CREATE
    3) Click on Copy Button
    4) Select the Source as Presentation Server
         a) Select  the File where you saved in your Local machine
    5) Select the Target as Application server
         a) Check the check box Remote Server
         b) Select the File type as Physical
         c) In File name give /usr/sap/SSD/DVEBMGS00/work\Your file name (This the Server path                                                                               
    Where the file is going to save)
    6) Click on Continue
    Go to AL11 and check whether the File has been create in the following path  /usr/sap/SSD/DVEBMGS00/work
    Provide this path in the Communication channel path when you select the Transport Protocol as NFS and you place the file in AL11 directory.
    Regards
    Seshagiri

  • Creation of Flat file in Application Server

    Hi,
    Can you please clarify what is Logical file path and Physical file pathe.
    Also how to create a flat file in Application Server with Logical and Physical file paths.
    Thanks

    Hi Yasaswini,
    Physical file is what you see from the OS level.
    Logical file is what ABAP code can call certain functions to read/write.
    Transaction FILE would link them together. Typically the logical path ends with "<FILENAME>", and the logical file refers to the logical path. You can check the help for more info.
    http://help.sap.com//saphelp_erp2004/helpdata/EN/8d/3e4edc462a11d189000000e8323d3a/frameset.htm
    Good luck,
    Victor

  • Putting Flat file on Application Server

    Hi,
    I am using following report to transfer a flat file to application server.
    REPORT  Z_DOWNLOAD.
    PARAMETERS: P_FILE       LIKE IBIPPARMS-PATH,
               P_FILE1(100) default '/usr/sap/put' lower case.
    DATA: WS_FILE TYPE STRING.
    DATA: BEGIN OF T_DATA OCCURS 0,
           RECORD(200),
         END OF T_DATA.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
      FILE_NAME           = P_FILE
    START-OF-SELECTION.
    WS_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
       FILENAME                      = WS_FILE
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
    TABLES
       DATA_TAB                      = T_DATA
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Creating the file at Appl ...........
    OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
    if sy-subrc ne 0.
    message e000(--) with 'Error in opening file'.
    endif.
    Trasfer the records to file.............
    loop at t_data.
    transfer t_data to p_file1.
    endloop.
    close dataset p_file1.
    if sy-subrc eq 0.
    write: / 'Written the files at ', p_file1.
    Now when I am uploading Flat file1 with following data it gets updated but when I use Flat file2, it does not work.
    Please help me out..
    I am posting the data of both flat files.
    Flat file1:(File getting transferred successfully to application server)
    1,NPOBL,ABC
    1,NPOBL,CDE
    1,NPOBL,FGH
    Flat file2: (Getting error when trying to transfer this file on application server)
    DS04,1,NPOBL,200,CREATE1,NEW YORK,X
    DS04,1,NPOBL,200,CREATE2,NEW YORK,X
    DS04,1,NPOBL,200,CREATE3,NEW YORK,X
    <b>Please help me out...</b>
    -Tushar

    hi Rajesh,
    I guess your in ternal table is not able to hold the data as is of 200 characters ... try increasing the length ..
    DATA: BEGIN OF T_DATA OCCURS 0,
    RECORD(2000),
    END OF T_DATA.
    Regards,
    Santosh

  • How to provide the F4 functionality to the files on application server

    Hi,
    How to provide the F4 functionality to the files on application server at selection screen.as it is F4_FILENAME for files on desktop , is there any Function module for this purpose also. I did a search in R/3 but didnt get any FM .Please advise.
    Regards,
    sam.

    You can get to it  using frontend class CL_GUI_FRONTEND_SERVICES if you know the host name and have the correct permissions, for example, this program works great for me in my system.
    report zrich_0001 .
    data: ifiletable type filetable.
    data: xfiletable like line of ifiletable.
    data: rc type i.
    parameters: p_file1 type localfile default'\sapprdusr'.
    at selection-screen on value-request for p_file1.
    call method cl_gui_frontend_services=>file_open_dialog
       EXPORTING
    *    WINDOW_TITLE            =
    *    DEFAULT_EXTENSION       =
    *    DEFAULT_FILENAME        =
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = '\sapprdusr'
    *    MULTISELECTION          =
      changing
        file_table              = ifiletable
        rc                      = rc
    *    USER_ACTION             =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        others                  = 4.
    read table ifiletable into xfiletable index 1.
    if sy-subrc = 0.
      p_file1 = xfiletable-FILENAME.
    endif.
    Regards,
    Rich Heilman

  • Create inbound invoice from flat file

    Hi Folks,
    for periodic creation of PO invoice from flat file, what would be the best way to go?
    Thanks and Rg. Jimbob

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • Inputs requried to create purchase order report from flat file

    inputs requried to create purchase order report from flat file

    At a guess, I'd say purchase order data.
    If you don't give us a clue what you are actually trying to do we can't really help you too much.
    Do you want to call a BAPI?  Do a BDC?  Use an IDOC?  Or just generally muck up the system by doing inserts into the purchasing tables?
    No doubt if you tell us, you'll get lots and lots of suggestions.
    Gareth.

  • Inbound IDOC Format (Flat File)

    Hi,
    I'm using SAP CRM Middleware for communication between CRM and Legacy System.
    I have configured Outbound IDOCs and I see something like this:
    EDI_DC40  2200000000000000023700 3012  CRMXIF_PARTNER_SAVE_M01                                     CRMXIF_PARTNER_SAVE_M
    E201CRMXIF_PARTNER_COMPLEX000 220000000000000002300000100000001CRMXIF_PARTNER_COMPLEX
    E201CRMXIF_PARTNER_HEADER000  220000000000000002300000200000102CRMXIF_PARTNER_HEADER         BusinessPartner                 U
    E201CRMXIF_PARTNER_KEYS000    220000000000000002300000300000203CRMXIF_PARTNER_KEYS           0000000014488DDB8AD891249EE10080010A6CA883
    The questions are:
    I need to know how do the following information must be filled in an Inbound IDOC:
    The first characters I understand that corresponds to the Structure name, IDOC Number, IDOC Line...
    So I need how do fields like IDOC number must be filled in an Inbound IDOC
    Thanx in advance..
    BTW. I'm expecting IDOCs as flat files so I need to explain to the Legacy Technician how to fill this fields.

    Hi,
    Go to transaction WE30 and give the IDoc basictype name CRMXIF_PARTNER_REL_SAVE_M01 and press the view-button (or press F7 key).
    This information you will need.
    The records are builded using the following structure:
    1st record contains control record information and follows the structure of table EDIDC.
    Starting at where "220" is given (this is the CLIENT), it is followed by the IDoc number field DOCNUM (16 digits) and so on. Not all fields must be filled, only those that are used for inbound messaging. Keep here in mind: Less fields filled will probably work better (because SAP will add its own details on arrival of the IDoc).
    All following records follow the structure of table EDID4 upto the field: HLEVEL (Hierarchy level, identical to the level found in WE30).
    Thereafter it is followed by the name of the segment (including spaces) and after this it will follow the exact structure of the segment.
    To view a sample, just generate a dummy (test) IDoc and use transaction WE19 to fill in the fields after changing to the correct IDoc type.
    Hope this helps you out.
    Regards,
    Rob.

  • MBGMCR02 inbound posting from Flat file

    hello Friends ,
    i am posting MBMCR02 Inbound idoc for oil materils .
    it is giving an error status 51 "Material does not exists or not active "
    i am trying to post in WE 19 and through my program also .
    it is an inbound idoc program processed from flat file .
    i am trying to post the goods receipts against PO.
    can any one suggest any solution.
    thanks
    Anant

    1. Read the file using OPEN DATASET and read and fill up the segment info and fill the EDIDC header data
    and then call function
    CALL FUNCTION 'INBOUND_IDOC_PROCESS'
        TABLES
          IDOC_CONTROL       =  i_edidc
          IDOC_DATA          =  i_edid4.

  • Create the Product Catalog from Flat file

    Hi,
    We have a requirement to create the Product catalog (CRM) from flat file data. We have the required data like Product catalog ID, description, sub areas and products are present in the Exel file. Now we need to create product catalog automatically using the report. Can u give me any pointers on what FM and BAdis to be callled in this report?.
    Thanks and Regards,
    S Reddy

    Link:[Create product basic Data|http://esoadocu.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DDC84252E3AEF0F1AA5A001A64D3F460&id=8C145DB8CF3A11DC2B8D000F20FCB6A9]

  • How to avaoid space while reading from flat file

    Dear all
    I am using forms 10g.
    I am reading data from flat file using Text_io.
    In my exception part i have written like this
    EXCEPTION
      WHEN no_data_found THEN
          CLIENT_TEXT_IO.Fclose(in_file);But if in my last line from the flat file is some other characters then it is taking that also .
    How can i avoid it ?
    Note :- Other characters means you cannot see like this , when you press SHOW ALL CHARACTERS button in the NOTEPAD++ then it will show ...

    My File is like this ABC . There is no extension like ABC.txt .
    And in the file if the last line if blank space is there then it is coming to exception part , but if TAB is there then it is not coming .

Maybe you are looking for

  • Combine Columns From Separate Arrays Into One Formatted Table

    What I'm trying to do is make two WMI queries with 2 different classes for a list of machines and then patch the columns together into one single array that is formatted as a table with columns and rows. I seem to keep banging my head against the wal

  • Please help centering website!!

    Hello, After researching and getting lost with so many different responses, I figured I'd ask myself to get the response I needed. I use Dreamweaver CS 5.5 and I am having a ton of trouble figuring out how to make it so my website is centered on all

  • Are there any self-service tools that enable business users to insert, update, and delete data in SQL Server without using SSMS?

    Our IT department spends way too much time maintaining simple reference tables that could easily be maintained by business users, if they had some simple tools that gave them limited access to only the tables they need.  Looking for something other t

  • Mail not sent using SO_NEW_DOCUMENT_SEND_API1

    Hi, I am using report RSCONN01 after the FM SO_NEW_DOCUMENT_SEND_API1 to send email. Eg: submit rsconn01 with mode = 'INT'                 with output = 'X'                 and return. But this report gives a popup which is creating a problem. Is the

  • How to generate Unique Seq Id in BPEL

    Hi All, How can we generate a unique seq Id in BPEL. One way is to use "*orcl:generate-guid()*" . Are there any other ways by which we can generate the unique seq id. please send me some sample piece of code if any for example. Regards Narendra Mail