Consecutive salesorder and delivery creation error

Hi all,
I am using two functions one to create salesorder
and one for delivery which i use the salesorder number which is created b4.
These are :
'BAPI_SALESORDER_CREATEFROMDAT2'
'RV_DELIVERY_CREATE'
They work great when i use them seperately. (Not in the same program)
When i make two perform actions like
  PERFORM SALESORDER_CREATE.
  PERFORM DELIVERY.
It creates sales order and gives me the number and i put it to delivery and it also enters the creation sequence. But in
program LV45VF0V
line :  INSERT VBUK FROM TABLE DA_XVBUKI.
It gives me dump because of duplicate data.
How can i pass this error. I tried free memory but i couldnt manage it.
Thanks a loT!

Just a guess, could you try with FM RV_DELIVERY_INIT before calling FM RV_DELIVERY_CREATE.

Similar Messages

  • Very urgent : shipping point and delivery creation date

    Hi :
    I have a custom table with fields :
    belnr, posnr, btyp, aufnr, ebeln, ebelp, livbeln, liposnr,matnr,wadat,kunnr,werks,bmeinh,getri,inaktiv,wabukz,erdat,aedat,loekz.
    Custom Transaction with fields :
    vbeln (field name belnr) , aufnr, delivery vbeln ( field name livbeln ),werks, mat .avail.dat ( mbdat ), transport.plan date(tddat),
    matnr, and sales order item (posnr).
    I have to select sales order , item from custom table based on plant (werks) shipping point , and delivery creation date.
    how can i relate shipping point and delivery creation date to my query.
    For delivery creation date, it should be selected based on current date+-2 and should choose MBDAT OR TDDAT which ever is earlier based on current date.
    I would appreciate if anyone can give me som idea and full points r rewarded.
    Thx.
    Rag

    Hi,
    Try this:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    regards,
    Anji

  • Shipping point and delivery creation date

    Hi :
    im selecting sales orders , items and schedule line
    from a custom table based on plant, shipping point and delivery creation date. 
    Is there any relation between Schedule lines and delivery creation date.
    For delivery creation date d_date = SY-DATUM,  and should select Mat Avail dt MBDAT or Trans. planning dt TDDAT which ever comes earlier.
    vbep-edatu = itab-d_date.
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep on a1posnr = vbepposnr
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    can anyone help me with this select statement.
    Thanks.
    Raghu

    Hi,
    Try this:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on vbapvbeln = vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    regards,
    Anji

  • Is it possible to customize the ARUN table (J_3ABDBS) and delivery creation program (transaction VL04) in SAP?

    I am a student, pursuing MBA and currently doing internship with a big fashion and lifestyle company in India. I am stuck at a place where i need help.
    We are planning to give customer the control over the time of delivery of their orders as per their convenience. For that I am exploring the possibility of modifying the ARUN table in such a way that an extra column is added into the ARUN table. this field will contain a flag value (1/0) where '0' will indicate that the customer wants to block delivery for the specific items.
    at the time of delivery creation, transaction VL04 should check this flag value for every item. So when we try to create delivery for a whole order in one go, the delivery for the items with '0' flag value shouldn't be created.
    basically, my whole purpose is to enable our SAP system to create delivery on item level instead of on order level.
    Ques:
    1. Is it at all possible to do what i am thinking of?
    2. has any company customised the ARUN table and delivery creation program before?
    3. If we go ahead with this customisation in-house, will the SAP pull back the maintenance support on account of tempering with base programs?
    4. Also, please suggest other ways to do what i am trying to do?

    you can use the Tables SRRELROLES and IDOCREL
    if it is inbound delivery the use the business object BUS2015(outbound use LIKP)
    first get the ROLEID using the Delivery number as Objectkey(business obecjt BUS2015/LIK) from the SRRELROLES,
    then pass the ROLEID to the table IDOCREL to ROLE_A , get the ROLE_B,
    use this ROLE_B supply to ROLEID of SRRELROLES table(business object as IDOC, )
    get the objkey which is nothing But IDOC.

  • Sales orders and delivery creation

    Hi :
    im selecting sales orders , items and schedule line
    from a custom table based on plant, shipping point and delivery creation date.
    Is there any relation between Schedule lines and delivery creation date.
    For delivery creation date d_date = SY-DATUM, and should select Mat Avail dt MBDAT or Trans. planning dt TDDAT which ever comes earlier.
    vbep-edatu = itab-d_date.
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep on a1posnr = vbepposnr
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    can anyone help me with this select statement.
    Thanks.
    Raghu

    Hi,
    Modify the Selec as below:
    select a1belnr a1posnr vbep~etenr into corresponding fields of table itab from a1 inner join vbap
    on a1belnr = vbapvbeln
    inner join vbep
    <b>on  vbapvbeln =  vbepvbeln and vbapposnr = vbepposnr</b>
    where a1~werks = p_werks
    AND vbap~vstel = p_vstel
    AND vbep~edatu = p_edatu
    AND (vbep~mbdat <= p_edatu OR
    vbep~tddat <= p_edatu ).
    Regards,
    Anji

  • RFC For Order and Delivery creation in SD from CRM - text not getting copie

    Hi
    I am trying to find out how the order and delivery is created in R3 if I create a return order in CRM, as we have one issue in which the text is not being copied to delivery??
    Thanks in advance
    Sameer

    Please check if you have any custom code/user exit in ECC which uses transaction code (VA01 , VA02 or VA05 etc) prior to invoking credit checks. 
    Orders created via CRM will not have transaction code set (SY-TCODE).

  • Serial Nos and Delivery Creation

    Hi,
    We are using SAP Business One 2005 A SP 01 PL 08.
    We have created a Sales Order in which we have an item which is a managed by serial nos. We now try to convert this sales order into a delivery note and when we do so we are asked to select the serial nos. We selected the serial nos and when the delivery is created the following error occurs.
    Error No: -10, Message:  [DLN1.WhsCode][line: 0] , 'The selected quantity of batch/serial numbers is greater than the open quantity.'
    Actually the quantity that we have in the Sales Order and the Serial nos selected are one and the same.
    This is the code that we use to create the delivery note. (Assuming there is only one Line in the Sales Order)
    Dim oSO As SAPbobsCOM.Documents
    Dim oDlv As SAPbobsCOM.Documents
    oSO = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
    oDlv = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
    ' iSoDocEntry contains Sales Order no
    If oSO.GetByKey(iSoDocEntry) = True Then
    oDlv.CardCode = oSO.CardCode
                    oDlv.DocDueDate = oSO.DocDueDate
                    oDlv.Comments = "Based on Sales Order " & iSoDocEntry & "." & oSO.Comments
                    oDlv.Address = oSO.Address
                    oDlv.ShipToCode = oSO.ShipToCode
                    oDlv.Address2 = oSO.Address2
                    oDlv.AgentCode = oSO.AgentCode
                    oDlv.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
                    oDlv.DocumentSubType = SAPbobsCOM.BoDocumentSubType.bod_None
    oDlv.Lines.BaseLine = iRowNo
    oDlv.Lines.BaseType = SAPbobsCOM.BoAPARDocumentTypes.bodt_Order
    oDlv.Lines.BaseEntry = iSoDocEntry
    Dim objSerialNum As SAPbobsCOM.SerialNumbers
    Dim sSerialNumbers(), sSysSerialNumbers(), sInternalSerial() As String
    Dim iCount As Integer
    objSerialNum = oDlv.Lines.SerialNumbers()
    sSerialNumbers = sSupSerial.Split(",") ' Contains the List of Supplier Serial Nos value of the Selected serials
    sSysSerialNumbers = sSysserial.Split(",") ' Contains the List of Sys Serial value of the selected serials
    sInternalSerial = sInternal.Split(",") ' Contains the List of Internal Serial value of the selected serials
    For iCount = 0 To sSysSerialNumbers.Length() - 1
    objSerialNum.InternalSerialNumber = sInternalSerial.GetValue(iCount)
    objSerialNum.ManufacturerSerialNumber = sSerialNumbers.GetValue(iCount)
    objSerialNum.SystemSerialNumber = sSysSerialNumbers.GetValue(iCount)
    objSerialNum.SetCurrentLine(iRowNo)
    objSerialNum.Add()
    Next
    end if
    iReturnValue = oDlv.Add()
    Here when we trap using Getlasterror the error that we got is mentioned above.
    Any help is welcome
    thanks in advance
    Ganesh.

    Hi Aleksey,
    I checked that and there is enough quantity for the warehouse. When we added the same through SAP without using the Add on that we have created and the delivery is created properly. So we have enough quantity of the item in the warehouse.
    Thanks
    Ganesh

  • Delivery creation error

    Hi,
    I have done a sales order using tcode VA01. while doing delivery through VL01n, one of the items in the sales order is not coming in delivery posting screen . what may be the reason behind this ?
    Regards,
    anindita

    We are not having any schedule line aggrements. An exit gets fired while doing our sales order and in this, the contract data of the customer is checked. I have checked the contract and it seems to be ok.
    Regards,
    Anindita

  • 11.2.0.3 Windows DB install of dbconsole , repos and service creation error

    Hello all,
    I am stumped at this error when recreating the repository on a windows 2008 server install of the dbconsole for a active database. It seems that it's not able to create or delete the service even after deconfiguring it. any ideas ? the install account is part of the windows admin group locally.
    D:\app\oracle\rdbms\11.2.0.2\xxxxxxxx\BIN>emca -config dbcontrol db -repos create
    WARNING: Error executing CMD /C D:\app\oracle\rdbms\11.2.0.2\cxxxx\bin\nmesrv
    ops.exe delete OracleDBConsolexxxxxxxxx
    Oct 10, 2013 2:02:01 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
    WARNING: Error executing CMD /C D:\app\oracle\rdbms\11.2.0.2\xxxx\bin\emctl.
    bat deploy dbconsole -d xxxxD:\app\oracle\rdbms\11.2.0.2\xxxxx\xxx
    SEVERE: Error instantiating EM configuration files
    thank you !

    hi TSharma ...nothing in reply ?!

  • Download Helper, even with paid converter upgrade, gives "Invalid Capture File" errors and will not record audio, with "File Creation Error - Unable to rename/copy audio file" Error.

    Download Helper Screen Capture worked to capture video if the default "no audio" option is active. But, no audio. The "speakers" or "microphone" audio options are confusing....the audio to be captured is from the video, so what do you choose? With either "speakers" or "microphone" selected, the captured file has poor audio and no video. Re-capture efforts (speakers) get "Invalid capture file error" and "File Creation error- Unable to rename/copy audio file"
    The paid upgrade of "Converter" doesn't work.
    Instructive documentation - not very good.
    Suggestions - Need time delay between initiation of "Record" and starting the video to be recorded.
    Could use timer tracking of the record process.
    Are there operating system limitations? (Have Windows XP Pro)

    That is an issue for the developer of that Download Helper.

  • Shipping point , delivery creation date

    Hi :
      I have a custom table with fields :
    belnr, posnr, btyp, aufnr, ebeln, ebelp, livbeln, liposnr,matnr,wadat,kunnr,werks,bmeinh,getri,inaktiv,wabukz,erdat,aedat,loekz.
    Custom Transaction with fields :
    vbeln (field name belnr) , aufnr, delivery vbeln ( field name livbeln ),werks, mat .avail.dat (  mbdat ), transport.plan date(tddat),
    matnr, and sales order item (posnr).
    I have to select sales order , item from custom table based on plant (werks) shipping point , and delivery creation date.
    how can i relate shipping point and delivery creation date to my query.
    For delivery creation date, it should be selected based on current date+-2 and should choose MBDAT OR TDDAT which ever is earlier based on current date.
    I would appreciate if anyone can give me som idea and full points r rewarded.
    Thx.
    Rag

    Hi Pankaj,
    Please try to use BAPI 'BAPI_DELIVERYPROCESSING_EXEC' for creating delivery form sales order , you can pass value and create delivery.
    you can refer below code, it may be helpfull for you to create delivery.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
      zmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr zmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-zmeng.
      t_request-quantity_base__uom  = t_vbap-zmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
         TABLES
              request      = t_request
              createditems = t_created
              return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    Regards,
    Prasenjit

  • Bapi for creation of delivery by using SO,shipping point,delivery creation date

    Hi experts,
    I am looking for bapi that takes sales order,shipping point and delivery creation date and generates delivery.
    I have tried with bapi GN_DELIVERY_CREATE but i am not able to understand whether this bapi is used for inbound or outbound deliveries.If this bapi is ok then what are the mandatory fields for this bapi.
    Regards,
    Pankaj Jain

    Hi Pankaj,
    Please try to use BAPI 'BAPI_DELIVERYPROCESSING_EXEC' for creating delivery form sales order , you can pass value and create delivery.
    you can refer below code, it may be helpfull for you to create delivery.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln LIKE vbap-vbeln,
            posnr LIKE vbap-posnr,
      zmeng LIKE vbap-kwmeng,
            matnr  LIKE vbap-matnr,
            werks  LIKE vbap-werks,
          END OF t_vbap.
    DATA: t_request TYPE STANDARD TABLE OF bapideliciousrequest
          WITH HEADER LINE.
    DATA: t_created TYPE STANDARD TABLE OF bapideliciouscreateditems
          WITH HEADER LINE.
    DATA: t_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    SELECT vbeln posnr zmeng matnr werks
           INTO TABLE t_vbap
           FROM vbap
           WHERE vbeln = v_vbeln.
    LOOP AT t_vbap.
      t_request-document_numb = t_vbap-vbeln.
      t_request-document_item = t_vbap-posnr.
      t_request-quantity_sales_uom = t_vbap-zmeng.
      t_request-quantity_base__uom  = t_vbap-zmeng.
      t_request-id = 1.
      t_request-document_type = 'A'.
      t_request-delivery_date      = sy-datum.
      t_request-material = t_vbap-matnr.
      t_request-plant = t_vbap-werks.
      t_request-date = sy-datum.
      t_request-goods_issue_date = sy-datum.
      t_request-goods_issue_time = sy-uzeit.
      APPEND t_request.
    ENDLOOP.
    CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
         TABLES
              request      = t_request
              createditems = t_created
              return       = t_return.
    READ TABLE t_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      MESSAGE e208(00) WITH 'Delivery creation error'.
    ENDIF.
    COMMIT WORK.
    Regards,
    Prasenjit

  • Converting Delivery Creation Date/Time into the Local Date/Time

    Hi
    I have two fields like 'Delivery Creation Date' and 'Delivery Creation Time' in ECC system . My user wants the Delivery Creation Date / Delivery Creation Time in Local time of Plants .
    For example :
    Delivery    Plant       DelivCreationDate       DelivCreationTime   DelivCreationDate(Local)   DelivCreationTime(Local)
    312456          1650               11/2/2007                     4:30                          11/2/2007                          3:30
    Here the Plant 1650 is in Mexico . The above delivery is created in Canada in ECC system according to the candain time .
    But user wants to convert the Candain Delivery Creation Date and Time into the Local Date/Time of specific plant .
    So we need to convert the  Candain Delivery Creation Date and Time into Mexico timings .
    How can it is possible this one and user wants to automate this process .
    Please let me know
    Mubeen

    DATA :
    timestamp like TZONREF-TSTAMPS,
    time like sy-uzeit,
    date like sy-datum.
    The following function module is used to convert the
    time and date into GMT timestamp
    CALL FUNCTION 'IB_CONVERT_INTO_TIMESTAMP'
    EXPORTING
    i_datlo = <source_fields>-delivery_date
    i_timlo = <source_fields>-delivery_time
    I_TZONE = CAD'
    IMPORTING
    E_TIMESTAMP = timestamp.
    The following function module is used to convert the
    above obtained timestamp to MEX  timezone date and time.
    CALL FUNCTION 'IB_CONVERT_FROM_TIMESTAMP'
    EXPORTING
    i_timestamp = timestamp
    I_TZONE = MEX
    IMPORTING
    E_DATLO = date
    E_TIMLO = time.
    CAD and MEX are variables i have used...
    the challenge is to find the canadian and mexican time zone....CAD and MEX.
    which you can get by performing a lookup in table T001W and passing country as parameter.

  • Error while delivery creation

    hi,
      i am getting an error while delivery creation for qty 2.The error is "Only 0 EA of material xxxx available".
    The schedule line cat in this case is cp and avalibility check is carried out and confirmed qty is given on some date ahead.
    User then runs the MRP and PR is created .
    Then the user creates a PO but not with ref to the PR created from above,instead the user creates a SO assigned PO and then creates GR which is SO assigned.
    Now when the user is trying to create delivery the erroe is "Only 0 EA of material xxxx available".
    Pl tell me why am i getting this error inspite of having the qty against the SO?
    Is it because a PR is generated from the MRP run for tht order and we have no GR agaist tht PR?Where do u i check this setting

    Hi,
    In SAP there is no stock available for that material. That is the reason it is showing that message..
    Please check MMBE t.code  stock overview for that material. I  think sales order scheduleline date is showing some other date.becuase today there is no stock so u will be not able to create any delvery. So please create delivery only on confirmed schdulines date....
    Other wise do stock posting and then do availability check then try to create delivery...
    Regards
    sankar
    Edited by: sankar sankar on Jul 1, 2008 1:10 PM

  • Delivery Note to Subcontract creation error "Essential transfer parameters

    Hi
    I am facing issue in return delivey
    Delivery Note to Subcontract creation error "Essential transfer parameters are missing in record:000001".
    Could you please let me know the casue of this error and where exactly i can see error.
    Regards
    vikcy

    Hi Vicky,
                   Check If the Customer number(Plant) has been maintained in the vendor master record control data and the vendor should also be maintained in the customer master data. Once you maintain this system determines the shipping point based on the  customer master and the shipping data missing. Kindly try delivering after maintaining these and let me know If you need any more information on this.
    Regards
    Ram Pedarla

Maybe you are looking for

  • Can I fit a firewire card to my F4T60EA laptop?

    Is it possible to fit a firewire card to the above laptop? If not how can I connect to a firewire camcorder

  • Need 23.976 frame rate!

    I'm producing music for a television show at the new HD standard of 23.976. Moving back and forth between Pro Tools is a nightmare because Logic doesn't support the video frame rate. Any suggestions? (Besides ditching Logic altogether) Thanks, Nathan

  • Reports User Point of View Question

    I created a report that has two grids and the databases are both essbase cubes and have the same dimension names. I am working with Hyperion Reports 9.3. I wanted to link the User Point of View, so that all the user had to do was click on: 1. Period

  • Export from CS4 to Matrox MX02 LE to Betacam deck

    Hi, I'm attempting to export a sequence to tape. I think I have all my inputs and outputs set up right but I can't seem to record my sequence onto tape. I have no problem capturing footage from tape but going the other way won't seem to work. I have

  • Syncing iPhone to both MobileMe *and* Mac w/ merged data

    I'm almost sure I've gotten this working before, but for the life of me, I can't seem to figure it out now. I want to sync my contacts and calendar to both my MobileMe account and my computer (which also syncs to my MobileMe account) without having t