Need to create sale order from the flat file & mail has to be sent

Hi Experts,
          I have a requirement to create a sale order from a flat file and once the oder is created, mail has to be sent to customer as well as to internal user with the order details. I want to know how this process can be implemented and what adapters are needed to execute this.
it would be very helpful, if i get an step-by-step procedure.
Points assured for any helpful answers.
Thanks in Advance
Jai

HI Jai,
You need to create two interfaces as file will be sending the Sales oreder details that you need to capture in IDOC or RFC and then have to trigger to create the sales order. For this Standard BAPIs are also available.
These RFC or BAPIs will response with Sales order details that you need to divert to Mail adapter with the use of BPM and also have to go for Async to Sync bridge.
File -
>XI (BPM) ---> BAPI/RFC  (Request)
MailAdapter <- XI (BPM) <--- BAPI/RFC (Response)
For this refer below links for step by step
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] - File to Mail
/people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm - Walk through BPM
/people/siva.maranani/blog/2005/05/22/schedule-your-bpm - Schedule BPM
/people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - Use of Synch - Asynch bridge in ccBPM
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] - Use of Synch - Asynch bridge in ccBPM
If you will use IDOC then In IDOC inbound processing you need to trigger for Sales order creation and then have to send the Sales Order generated IDOC as an Outbound to Mail Adapter
Flat file -
> XI ---> IDOC
IDOC -
> XI ---> Mail
This will be bit easy scenario to develope as compare to using BAPI with BPM
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping - Any flat file to any Idoc
configuring IDOC-XI-Mail scenario using following web-log:
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
/people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u - Triggering Email from folder
Thanks
Swarup

Similar Messages

  • Create Sales order from Internal Purchase Order using IDOC

    Hello Friends,
    I have requirement to create Sales Order from Internal Purchase Order Using IDOC.
    Backgorund, we have already configured IDOC orders05 to create Sales Order from external Purchase order from Inbound IDOC, and it is working fine.
    Now we have new requirement to create Sales Order from our own Purchase order, i.e. When PO is created in one plant corresponidng sales order automatically must needs to create in another Plant with respect PO.
    I m trying to design a solution for above problem as follows,
    1.create an Inbound Idoc from PO, by creatiing one new message type on PO save.
    2.Process that Inbound  IDOC same as it is from external PO.
    3.Once processed Sales order will create.
    Please help me in step 1. to create Inbound IDOC from PO.
    If you want any further clarification please write me.
    Thanks,
    Mahesh

    I had done a similar scenario before and we achieved it through SAP XI. The problem is with the control record. When we create a ORDERS IDOC from a PO the control record will be for outbound transmission. We sent the file to XI and XI resent it back with some data parsing and a new inbound control record. This way it went neat outbound and inbound.
    I'm not sure what kind of architecture you have. If you have to do it within your ECC/R/3, then you could create the outbound IDOC to a new port and write a fresh RFC to pick it up from the same folder and create a new control record for inbound processing.
    I haven't tried this; but there is a "processing w. trigger (inbound)" option on the outbound process code. May be you can explore into that a bit more.
    I'm sure there could be better approaches to handle this within ECC so if you stumble on any, do write back. I would like to know to update my knowledge .

  • FM to create Sales Order from reference billing document

    Hi,
    I need to create a sales order from a reference billing document. Please tell me if there is any function module/BAPI to do that.
    Thanks in advance for the help
    Regards,
    Varun

    Hi
    <b>SD_SALES_DOCUMENT_COPY</b> copy Sales Doc into new one with the required Sales Doc Type (VBAK-AUART) for further creating.
    <b>SD_SALES_DOCUMENT_SAVE</b> create Sales Doc from the copied document
    create subsequent document
    REPORT Z.
      data: w_auart like vbak-auart,  "current SalesDoc type
            w_auara like tvak-auara,  "Subsequent SalesDoc type
            w_vbak  like vbak.
      parameter p_vbeln like vbak-vbeln.
    at selection-screen on p_vbeln.
      SELECT SINGLE auart FROM vbak into w_auart
        WHERE vbeln = p_vbeln.
      if sy-subrc <> 0.
        message e398(00) with 'Sales Doc' p_vbeln 'not found'.
      endif.
    start-of-selection.
      SELECT SINGLE auara FROM tvak into w_auara
        WHERE auart = w_auart.
      if sy-subrc <> 0 or w_auara is initial.
        message e398(00) with 'Subsequent type not defined for' w_auart.
      else.
      1. copy
        CALL FUNCTION 'SD_SALES_DOCUMENT_COPY'
             EXPORTING
                  i_auarn       = w_auara
                  i_vbeln       = p_vbeln.
      2. paste
        CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
             IMPORTING
                  evbak         = w_vbak.
      3. commit
        COMMIT WORK.
      4. report
        write: / 'Sales Doc', w_vbak-vbeln, 'created.'.
      endif.
    regards
    vinod

  • Error determining posting period(infostructure S008,Variant Z2,RC3) while creating Sales orders from Inbound IDOCS

    Hello,
    I am getting this Error message"error determining posting period(infostructure S008,Variant Z2,RC3)" while creating Sales order from Inbound Idocs in the IDOC,which is affecting sales order creation.
    While viewing this Info structure S008, I could see no records have been maintained. Wanted to know the reasons behind this Hard error?
    Is it something related to Date Field used in the Update Rules for this Infostructure which is causing this posting period error?
    Appreciate your inputs on this.
    Thanks and Regards
    Mohammed Roshan

    Thank you Jelena,I checked the Ship. Delivery dates in the IDOC which are for Current Fiscal Year- 20140703 and 20140711,Could there be any other reason for this error?
    Could it be an issue with e Update rule in this Infostructire S008
    Secondly when we try change the update rule thru MC25 for this Infostructure S008,It gives a message"
    "Maintenance of SAP standard updates not allowed"
    Kindly advice
    Thanks and Regards
    Mohammed Roshan

  • Creating sales order from contract ISA R/3 Edition

    Hi Forum,
    Our scenario are
    1 - customer select product from catalog and place order from internet
    2 - sometimes, customer already have a contract with us (created earlier manually on SAP) and want to create sales order from internet referencing a SAP-contract.
    For scenario No.1 - we can use standard SAP
    For scenario No.2 - is there any standard way to do so? or we have to do customization?
    Any suggestion are welcome.
    Thanks a million.!!

    Hello
    "Contract Processing" is not supported out-of-the-box in ISA R/3 edition.
    However, you have a good news. The OSS Note [788245 |https://service.sap.com/sap/support/notes/788245]- "ISA R/3 4.0: contract processing", explains how to implement this feature on a project basis.
    We have implemented this feature successfully at few customers.
    Hope this helps.
    Easwar
    http://www.parxlns.com

  • BAPI:Create sales order from an existing open sales order for open items

    Dear All,
    Could any one suggest me any BAPI that can create sales order from an existing OPEN sales order for OPEN items. since we are closing all open orders and creating new orders with reference to existing open orders.   please suggest, its would be great help.
    Regards,
    Reddy

    hi suresh,
    we are changing tax procedure from formula to condition based, so this is the reason we have close all the open orders and recreate in TAXINN procedure, it is going to be large number of records( open orders), so....
    Regards,
    Reddy

  • Create sales order from multiple quotation

    Hi All,
    How we can create sales order from multiple quotation what is transaction code for this.
    Ahmed

    Hi Ahmed,
    There are two options.
    1. For creating Sales Order with ref to too many Quotations:
    Go to T. Code VA26 and enter the Doc Date or Quotation Valid to Date and Sold to party, Quotation Type to get all the outstanding Quotations for that particular Sold to Party. Then Select the required quotations and then select Follow-up actions button to create Single Sales Order.
    2. For less number of Quotations:
    You can simply go by referring each quotation by placing the cursor in alternate line item in sales order by selecting "Create with ref" button.
    Hope this will solve your problem.
    Ravi.

  • Creating reconciliation events from a flat file--a design question

    Hello,
    I am currently evaluating an existing OIM implementation to rebuild it using OIM 11g and have a question regarding the ideal method to create reconciliation events from a flat file.
    The current implementation is using a web service call to process a flat file and creates the reconciliation events. This runs every hour.
    Although this looks cool but I thought there was no need to go to the extent.
    If OIM cannot consume the flat file directly, meaning if it needs some data massage, I can always load the data from the flat file into an external table, write a pl/sql procedure to transform the data and put it into a temporary global table and create reconciliation events like that.
    What would be the ideal method to load data from a flat file into OIM?
    THanks
    Khanh

    If it's a flat file, then have you looked at GTC option? And why any staging in between? OIM can read flat files just fine either through GTC or write up your own recon code.
    -Bikash

  • Error while loading  data into External table from the flat files

    HI ,
    We have a data load in our project which feeds the oracle external tables with the data from the Flat Files(.bcp files) in unix.
    While loading the data, we are encountering the following error.
    Error occured (Error Code : -29913 and Error Message : ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: un) while loading data into table_ext
    Please let us know what needs to be done in this case to solve this problem.
    Thanks,
    Kartheek

    Kartheek,
    I used Google (mine still works).... please check those links:
    http://oraclequirks.blogspot.com/2008/07/ora-29400-data-cartridge-error.html
    http://jonathanlewis.wordpress.com/2011/02/15/ora-29913/
    HTH,
    Thierry

  • Process chains from the flat file by using filezilla client version in  BI

    Hi experts,
    please let me know how to create the process chains from  flat file by using filezilla client version.
    so far, I didn't work with file zilla FTP. can anybody give detailed step by step procedure to find the flat files and download them and creating process chains from that flat file.
    Thanks & Regards,
    Babu..

    Hi,
    Check these:----
    Process chain configuration for Flat file loading
    http://wiki.sdn.sap.com/wiki/display/BI/Howtowriteroutinetofetchcurrentday%27sfilename
    Regards,
    Suman

  • How to create planned order from the sales order for a processing item

    In the MTO sceanrio, assembly order is created directly from the sales order. I would like to create a planned order from the sales order.
    I tried the Planning strategy group 81 in the material master but it didnt work.
    Could you please let me know how to do it? Is it Schedule line config that controls whether planned order is created?
    Thanks
    Harish

    Narayana,
    Planning strategy 82 is the best & standard way of getting production order created on sale order create.
    just assign this strategy  in MRP 3 view under strategy group.
    If not then using sale order reqt type ( KMFA- Assembly with production order) & assigning this to your sale order item category is also another way to create prodcution order without using planning strategy in material master.
    Follow steps in SPRO-->Sales & dist --> basic functions >avail check &transfer of requirements> transfer reqts-->determination of reqt type using transaction
    Here you may select the item category you in sale orders & assign KMFA to your item category. this will then give option in sale order create to change reqt type to KFMA for assebly orders.
    If you need KFMA to be default assign it to Item cat/ MRP type ( PD) combo.
    Regards
    Ritesh

  • Create Sales order from a Purchase order through IDOCs in the same system

    Hi,
    I have been trying to create Sales ordes in the same SAP system, through the Purchase order generated.
    The Purchase order generated, passes the information through an outbound I DOC to a SO inbound I doc, I am getting the following error
    Partner number A2815 for customer 2815 , partner function WE does not exist.
    Message no. VG140
    but in my case the ship to party (partner function WE) is the same as Sold to party (partner function AG)
    can any body please help how to map it
    Sreeram P

    Hello Sreeram ,
    See note 1339290, which corrects the parameters of error message VG140.
    Also, the sold to party (SP) is determined in several ways:
    1. If the sender partner in the control record is a logical system (LS), an E1EDKA1 segment with the SP must be sent.
               E1EDKA1-PARVW = AG
               E1EDKA1-PARTN = valid partner in the receiving system
    Otherwise the system takes the partner number from the control record into the field E1EDKA1-PARTN and this is not a valid partner.
    2. If the sender partner in the control record is a SP, we take this SP from the sender partner into the sold-to party number. Excepted another SP was sent in the segment E1EDKA1-PARNR, then the SP from the control record has no effect.
    The E1EDKA1 segment for the SP should be sent always before the E1EDKA1 segment of the ship-to party (SH).
    Regards,

  • Creating Sales Orders from Quantity Contract - ORDERS05 IDOC

    Hi,
    I have created a Quantity Contract in ECC. Now I want sales orders to be created w.r.t to the Contract through ORDERS05.
    Can anyone suggest which IDOC Segment and Qualf i have to populate to achive the same.
    Also say once I am able to achive the creation of Release Orders from the Contract through ORDERS05. If I surpass the Qty of the Contract . The IDOC should be have a field for notifying the same.
    REgards,
    BInayak

    Hello Binayak
    You  may use the following segment and fields for reference data:
    Segment: E2EDK02
    Fields:
    QUALF : IDOC qualifier reference document - I think for contracts this is '001'.
    BELNR : IDOC document number
    POSNR : Item number
    As per a flag to indicate that the contract quantity is surpassed, I doubt there will be anything like that becasue is an Idoc is before you created the order and how will the system know you have surpassed until an order is entered?
    I think you need to use 'completion rule' and copy control 'update document flow' features to work on this.
    Hope this helps.

  • Problem in Creating Sales Order From One DB to another DB

    Hello All,
    I am trying to create a Sales Order in another database from the current database based on the Purchase Order but while creating the sales order system is throwing an error " In "To Whse" enter valid values [ZAPp 0] "
    My Code for Creating Sales Order in another DB are as follows :-
                 '==== Connect To another SAP Company ====='
                '=====================================
                Dim oCompany_DB As New SAPbobsCOM.Company
                oCompany_DB.Server = "OSL_SERVER"
                oCompany_DB.LicenseServer = "OSL_SERVER"
                oCompany_DB.UseTrusted = False
                oCompany_DB.CompanyDB = Database_Name
                oCompany_DB.UserName = SAPUserName
                oCompany_DB.Password = SAPPassword
                oCompany_DB.DbUserName = DBUserName
                oCompany_DB.DbPassword = DBPassword
                oCompany_DB.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005
                lRetCode = oCompany_DB.Connect()
                If lRetCode <> 0 Then
                    oCompany_DB.GetLastError(lErrCode, sErrMsg)
                    If (lErrCode <> -4006) Then
                        Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
                    End If
                End If
    '===== Creating the Sales Order ====='
    '================================
      Dim oOrder As SAPbobsCOM.Documents = oCompany_DB.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                Dim DocDueDate As String = oRecord.Fields.Item("DocDueDate").Value
                oOrder.DocDueDate = DocDueDate
                oOrder.CardCode = Customer
      While Not oRecord.EoF
                    Dim ItemCode As String = oRecord.Fields.Item("ItemCode").Value
                    Dim WhsCode As String = oRecord.Fields.Item("WhsCode").Value
                    Dim Quantity As Double = oRecord.Fields.Item("Quantity").Value
                    Dim Price As Double = oRecord.Fields.Item("Price").Value
                    Dim Discnt As Double = oRecord.Fields.Item("DiscPrcnt").Value
                    Dim TaxCode As String = oRecord.Fields.Item("TaxCode").Value
                    oOrder.Lines.ItemCode = ItemCode
                    oOrder.Lines.WarehouseCode = WhsCode
                    oOrder.Lines.Quantity = Quantity
                    oOrder.Lines.Price = Price
                    oOrder.Lines.DiscountPercent = Discnt
                    oOrder.Lines.TaxCode = TaxCode
                    oOrder.Lines.Add()
                    oRecord.MoveNext()
                End While
                lRetCode = oOrder.Add
                '=== Check For Error if any ===='
                If lRetCode <> 0 Then
                    oCompany_DB.GetLastError(lErrCode, sErrMsg)
                    If (lErrCode <> -4006) Then
                        Class_InterCmp_Main.SBO_Application.MessageBox(sErrMsg)
                    End If
                End If
                oCompany_DB.Disconnect()
    When i execute the above code company gets connected but sales order not getting added in another company.
    Thanks,
    Amit

    You can not do it the alternate way Kevin suggests, direct DB inserts are prohibited by SAP and can corrupt your DB, particularly because unlike what most people think, all SAP documents affect more than just their own tables (e.g. the numbering table, the history tables).
    Are you getting any error message, or is it returning 0?
    If it is returning 0, then check is the document actually going to the newly created database or maybe somehow going to old one.
    If it isn't returning 0, what is the error code and message.
    Edit:
    Also I do see an error in your code. As it stands, you are adding an empty line to the end of every order. This can cause problems for SAP.
    Dim counter As Integer = 0
    If counter <> 0 Then 'Not equals 0, forum hides lt & gt symbols.
    oOrder.Lines.Add()
    End If
    counter = counter + 1
    oOrder.Lines.ItemCode = ItemCode
    oOrder.Lines.WarehouseCode = WhsCode
    oOrder.Lines.Quantity = Quantity
    oOrder.Lines.Price = Price
    oOrder.Lines.DiscountPercent = Discnt
    oOrder.Lines.TaxCode = TaxCode
    Edited by: njmog1 on May 9, 2011 10:14 AM

  • BAPI_PO_CREATE1 not able to create PO's for multiple rows from the flat fil

    Hi
    i am uploading PO's from a flat file into SAP using the BAPI_PO_CREATE1. Everything works fine if the flat file hast only one record.
    if the flat file has more than one record then while loading the second record the BAPI returns a error message. I am calling the BAPI in a loop.
    The strange thing is that if i load the second record individually the program is able to create the PO. So only when i have multiple records in the flat file i am unable to load the PO into SAP. I debugged and checked all the internal tables passed to the BAPI. All seems to have the data correctly but still the BAPI fails.
    any idea where i am going wrong?
    the code looks something like this.
    LOOP AT HEADER_ITAB.
       PERFORM FILL_HEADER_RECORDS.
    LOOP AT ITEM_ITAB WHERE EBELN eq HEADER_ITAB-EBELN.
         PERFORM FILL_ITEM_RECORDS.
    ENDLOOP.
      PERFORM CERATE_PO_VIA_BAPI.
    ENDLOOP.

    What is the error message. Are you trying something like this:
        LOOP AT T_DATA1.
          AT NEW LIFNR.
            READ TABLE T_DATA1 INDEX SY-TABIX.
            PERFORM INIT_TABLES.
            PERFORM FILL_DATA.
    --Call the BAPI to create PO
            PERFORM CREATE_PO.
          ENDAT.
        ENDLOOP.
    FORM CREATE_PO .
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          POHEADER                     =   POHEADER
          POHEADERX                    =   POHEADERX
        POADDRVENDOR                 =
        TESTRUN                      =
        MEMORY_UNCOMPLETE            =
        MEMORY_COMPLETE              =
        POEXPIMPHEADER               =
        POEXPIMPHEADERX              =
        VERSIONS                     =
        NO_MESSAGING                 =
        NO_MESSAGE_REQ               =
        NO_AUTHORITY                 =
        NO_PRICE_FROM_PO             =
       IMPORTING
         EXPPURCHASEORDER             =  EXPPURCHASEORDER
         EXPHEADER                    =  EXPHEADER
         EXPPOEXPIMPHEADER            =  EXPPOEXPIMPHEADER
       TABLES
         RETURN                       =  RETURN
         POITEM                       =  POITEM
         POITEMX                      =  POITEMX
        POADDRDELIVERY               =
         POSCHEDULE                   =  POSCHEDULE
         POSCHEDULEX                  =  POSCHEDULEX
         POACCOUNT                    =  POACCOUNT
        POACCOUNTPROFITSEGMENT       =
         POACCOUNTX                   =  POACCOUNTX
        POCONDHEADER                 =
        POCONDHEADERX                =
         POCOND                       =  POCOND
         POCONDX                      =  POCONDX
        POLIMITS                     =
        POCONTRACTLIMITS             =
        POSERVICES                   =
        POSRVACCESSVALUES            =
        POSERVICESTEXT               =
        EXTENSIONIN                  =
        EXTENSIONOUT                 =
        POEXPIMPITEM                 =
        POEXPIMPITEMX                =
        POTEXTHEADER                 =
          POTEXTITEM                   = POTEXTITEM
        ALLVERSIONS                  =
         POPARTNER                    =  POPARTNER
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT   = 'X'
        IMPORTING
          RETURN = RETURN1.
      DATA: L_NAME TYPE LFA1-NAME1.
      CLEAR L_NAME.
      SELECT SINGLE NAME1
               FROM  LFA1
               INTO L_NAME
               WHERE LIFNR = POHEADER-VENDOR.
      LOOP AT RETURN.
        WRITE : / RETURN-TYPE,
                  RETURN-ID,
                  RETURN-MESSAGE.
        WRITE : '--> For vendor:',
                 POHEADER-VENDOR,
                 L_NAME.
      ENDLOOP.
    ENDFORM.                    " CREATE_PO

Maybe you are looking for

  • How to access my iwork through icloud drive

    Could you please tel me how I can access my iwork from icloud drive using an ipad? please!

  • Can I use two different cards in the store

    I have a small business and need to purchase some apps with my business credit card and then be able to buy my personal apps with my own credit card.  How can I do this?  Do I have to set up a seperate account for my business purchases?

  • SCOM 2012 R2 database in-place upgrade SQL 2008 R2 to SQL 2012

    Hello, I intend to upgrade my SCOM SQL 2008 R2 environment to SQL 2012. I have (of course) an OPS, DWH and Reporting Services instances/databases. When I run the Update Advisor I run in to several issues. Has someone had experience with an in-place S

  • Problem printing with laserjet 3055 AIO

    We have 3 or 4 3055 AIOs within our school district, and one is giving us a real headache.  It is constantly asking us to insert pages.  When I went to look at it (I'm a tech at the district), the LCD read READY MANUAL and it was only pulling from th

  • Web Logic Server Environment & Macromedia Studio MX

    I wanted to ask you if anyone could help me find some information about working with our WebLogic 6.1 web servers and Macromedia Studio MX products such as Dreamweaver MX, Flash MX, and ColdFusion MX. For right now I'd like to get up and going with D