BAPI for sales order creation with Reference
Hello Experts,
I have a order, with its reference I have to create a new sales order.
Am looking for BAPi, with which I can create a sales order with a Reference order (which is in my hand), so I checked SE37 with wild cards, but I did not find any!!
1) Pls. let me know a BAPI
2) And just like that I do not want to create a new order with the reference(existing) order, I have to change the PO number & order Reason(2 fileds) in newley creationg order, pls. let me know How to do it
Thank you
Hi,
First try to pass these two parameters to BAPI_SALESORDER_CREATEFROMDAT2
ORDER_HEADER_IN-REFDOCTYPE = Your Sch. Agreement No. (Please Check) and
ORDER_HEADER_IN-SD_DOC_CAT = 'E'.
If the above doesnt work ,than try using BAPI "BAPI_SALESDOCUMENT_COPY"
I hope you are working in SAP R/3 4.6C and above version because i am not sure whether this BAPI is available in lower version.
Let us know if this helps you..
Rgds,
Mayank
Similar Messages
-
Is there any BAPI available for sales order creation with reference?
Hi Experts,
My requirement is to create sales order with reference for order type.
Now my billing document number already contains the two items
one is correct and another is zero quantity.
I want to create order with reference of billing document but not with zero quantity item.
Which BAPI I should use and what to pass to ignore zero quantity item?
Regards,
RHHi Ronny,
Try using BAPI_SALESORDER_CREATEFROMDAT2
Regards,
Shraddha -
BAPI for Outbound Delivery Creation with reference to Sales Order
Dear all,
I'm on R/3 4.6B platform and to develop an RFC for outbound Delivery creation instead of using the standard VL01N transaction.
I've review BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N thread which suggest BAPI_DELIVERYPROCESSING_EXEC .
However, in 4.6B, that function module doesn't exist. Appreciate any suggestion and or workaround.
Thanks.
Steven
Edited by: Steven Khoo on Mar 25, 2010 7:13 AM
Edited by: Steven Khoo on Mar 25, 2010 7:14 AMNot required anymore
-
BAPI for Outbound Delivery Creation with reference to Sales Order - VL01N
Hi Everybody,
We are in ECC 5.0 version.
I want to create a enhancement for Outbound Delivery Creation with reference to a Sales Order.
Is any BAPI available for this ?
Any input on this will be very much helpfull.
Please suggest any BAPI available for this, or should I go for BDC using VL01N or VL04 ?
Thanks in advance.
regards,
Nagarajan.JHi Nagarajan,
The BAPI BAPI_DELIVERYPROCESSING_EXEC meets your requirement. You can create delivery with reference to sales order.
The below is the sample code...
data:lt_request like bapideliciousrequest
occurs 0 with header line,
lt_createditems like bapideliciouscreateditems
occurs 0 with header line,
lt_return like bapiret2
occurs 0 with header line.
lt_request-document_type = 'A'.
lt_request-document_numb = vbeln.
lt_request-document_item = posnr.
lt_request-material = matnr.
lt_request-plant = werks.
lt_request-stge_loc = lgort.
lt_request-quantity_base__uom = base_uom_qty.
lt_request-delivery_date = sy-datum.
append lt_request.
call function 'BAPI_DELIVERYPROCESSING_EXEC'
EXPORTING
DELIVERY_EXTEND =
TECHN_CONTROL =
tables
request = lt_request
createditems = lt_createditems
return = lt_return.
loop at lt_return where type = 'A'
or type = 'E'.
exit.
endloop.
if sy-subrc <> 0.
Use the BAPI for Commit
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'H'.
endif.
Thanks
Ramakrishna -
Regarding bapis for sales order creation and modification
Hi,
I am trying to create a syncbo for sales order creation, modification and display. The bapis that I am using are
1.BAPI_SALESORDER_GETLIST
2.BAPISDORDER_GETDETAILEDLIST
3.BAPI_SALESORDER_CREATEFROMDATA1
4. BAPI_SALESORDER_CHANGE
Am I using the correct bapis. When I tried to create a syncbo it gave the following errors
BAPISDORDER_GETDETAILEDLIST does not have RETURN parameter in export or tables parameter
RETURN parameter in Create BAPI Wrapper should refer to structure BAPIRET2
RETURN parameter in GetList BAPI Wrapper should refer to structure BAPIRET2
GetDetail BAPI Wrapper does not have RETURN parameter in export or tables parameter
No Export parameter referring to header structure exists in GetDetail BAPI Wrapper
No Import parameter referring to header structure exists in Create BAPI Wrapper
No Import parameter referring to header structure exists in Modify BAPI Wrapper
No Import parameter referring to a field of header structure exists in GetDetail BAPI Wrapper
No Export parameter referring to a field of header structure exists in Create BAPI Wrapper
No Tables parameter referring to item structure exists in Create BAPI Wrapper
No Tables parameter referring to item structure exists in Modify BAPI Wrapper
I am informed that the above bapis are standard bapis.
I am not sure as to why I am getting the errors.
Does the syncbo require the bapi's to be in a specific format.
What would be the header and item structures for sales order bapis
Regards
Raja SekharHi Raja,
ya , for creating Sync BOs ,our BAPI wrappers must satisfy certain conditions..
just go through this link.
u can use the standard BAPIs of SALES Order in ur Custom BAPI Wrapper
http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/smartsync/what_is_a_bapi_wrapper.html
the RETURN must be of type BAPIRET2..
Regards
Kishor Gopinathan -
Sales Order Creation with reference to Contract
Hi all ,
Existing Setup in the System:
1) I have a contract created with a validity period of 30 days. When i create sales order with reference to contract, then i get a pop-up box, from the box i can select my contract.
2) I have a Lead time configured as 5 days for the Sales document type , I,e when I create sales order I can see my Requested delivery date is always system date + 5 days.
3) I have a Pricing date configured as Todays date. Therefore when I create sales order I can see pricing date becomes the system date.
Execution of Sales Order:
4) When I create Sales Order with reference to contract document. Always Requested Delivery date is compared with Contract Validity Dates.
Example: Contract Validity 01/03/2008 - 31/03/2008
Sales Order: Sales Order Creation date -> 19/03/2008, Pricing Date: 19/03/2008 Requested delivery date 24/03/2008.
REQUIREMENT IS:
But my requirement is when i create Sales Order it should consider System date or Pricing Date( since pricing date is today date) for to compare with contract validity dates.
Can it be done with standard config or do we need to some type of custom? Appreciate your help
ThanksHi ,
As said when I create Sales Order with reference to contract document. Always Requested Delivery date on Sales Order is checked against Contract Validity Dates.
But i want Pricing date in Sales Order should be checked against Contract Validity Dates.
Can someone suggest me on this? -
BAPI for Sales Order Creation.
Hello gurus,
I want to create a sales order using BAPI.
I have tried some BAPI's like BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPI_SALESDOCU_CREATEWITHDIA.
But I am not able to update the Miscellaneous Information like Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
Is there any other BAPI thru which i can update these fields while creation of Sales Order.
The Fields which I can provide to BAPI as import parameter is:
Order Type(VBAK-AUART),
Contract(VBAK_VGBEL),
SALES Org (VBAK-VGORT),
Dist Channel(VBAK-VTWEG),
Division (VBAK-SPART),
Open Quantity (VBAK-KWMENG)
Plant(VBAP-WERKS)
Storage Location (VBAP-LGORT)
Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
Thanks In Advance,
Points will be rewarded for Best Solution......
Yogesh Sharmahi,
I can give u a suggestion .. try it ..
its a quite a long process....
in BAPI_SALESORDER_CREATEFROMDAT2
there is a table EXTENSIONIN...
here u can add append structure and carry on ur sales order creation
Follow the process
Customer Enhancement for VBAK, VBAP, VBEP
Description
You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
Technical information about Customer Enhancements
The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
CFIELD1, CHAR 10
CFIELD2, CHAR 3.
The customer also requires that these two fields can be maintained with the BAPI.
1. Maintain structure CUTEST in table VBAP
2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
Field name Data element
CFIELD1 CHAR1
CFIELD2 CHAR1
3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
5. Adjust the following structures for customer enhancements to table VBAK:
a) VBAKKOZ
b) VBAKKOZX
c) BAPE_VBAK
d) BAPE_VBAKX
6. Adjust the following structures for customer enhancements to table VBEK:
a) VBEPKOZ
b) VBEPKOZX
c) BAPE_VBEP
d) BAPE_VBEPX
7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
For example:
You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
The following entries are expected:
Import: BAPIVBELN-VBELN = '0000004711' Document number
BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header
Tables: BAPISDITM-ITM_NUMBER = '000020' Item number
BAPISDITMX-ITM_NUMBER = '000020' Item number
+ BAPISDITMX-UPDATEFLAG = 'U' UPDKZ for item
You must complete the EXTENSION table as follows:
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 X
Further Information
You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
Notes
You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
At the moment, you can use the BAPI to store enhancements in the following structures:
VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
If you also want to work with checkboxes, each X-structure must also contain an append structure.
For example:
A customer has created an order and wants to include the material long text (50 digits long).
The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
Because the VBELN is normally blank when you create an order, the data can look like this:
STRUCTURE |BAPE_VBAP
VALUEPART1 | 000010Customermateriallongtext50
VBELN POSNR ZMAT50 -
Sales order creation with reference to quote using BAPI
Hi All,
I am trying to create a sales order with reference to quote using BAPI BAPI_SALESORDER_CREATEFROMDAT2.
I am passing the Quote number and preceding doc.category (B) at the header level and
at item level I am passing the quote number and the line item number in the quote for REF_DOC and REF_DOC_IT.
The order is created but there seems to be some issue with the document flow.
I do not see the Reference Doc number at the header level from the Sales order document flow whereas I can see the Reference Doc for each line item.
In VBFA I can see the Ref.Doc number at the header level along with the Ref.Doc at the line item level.
Why do you think it is not showing at the header level from Sales Document Document Flow?
Is there any bug in the standard BAPI or is there any OSS note?
Any answer would be greatly appreciated.
Thanks
Sandeephi,
Are you giving different quotation numbers in the different line items, if that is the case you will not get that in the header document flow, as it cann't point to all the quotations.
Thanks,
Mahesh. -
Problem in Sales Order Creation with reference to Contract
Hi All,
We had enhanced Contracts (VA41) by adding fields thru append structures in VBAP and the same is provided in the "Additional Data B" tab at the item level.
The Z fields are populated with data and gets saved along with the contracts line items.
But when a sale order is created with reference to a contract, the data in the Z fields (maintained in Append Structures) of the contract are not getting copied to the line item of Sales orders.
Should a routine be necessarily written for copying Z fields from contract to Sales orders or Copy control must be set up for Z fields separately?
Any info on this would help.
Thanks,
K.V.VenkatasubramanianHi VJ,
The copying from Contract to Orders worked. I copied the standard routine (151) in data transfers and added the code to transfer Z fields from work area CVBAP to work area VBAP and attached the same in the copy control. It works!!!
Thanks for the help VJ.
Cheers,
Venkat -
Sales Order Creation with reference to Quotation using FM IDOC_INPUT_ORDERS
HI Guru's,
I've a requirement to create the sale order from the quotation.
For this we are using the FM "IDOC_INPUT_ORDERS".
Here my problem is i'm able to create the sales order with the custom program, but if i made any changes to the quotation Header
(Ship-to party address) before creating the sales order, it is not reflecting into the sales order header level (ship-to party address).
What i was thinking is we are not using the Quotation as reference to create the sales order while filling the segments.
Could you please tell me which segment do i need to use fill the reference document number (quotation) at header level.
one more problem, if i change ship-to party of one line item, it is affecting the other line items also.
Please guide me what to do???
Thanks,
Adi.HI Ramesh,
Question:
Could you please tell me which segment do i need to use fill the reference document number (quotation) at header level.
Sol: use segment E1EDK02
Segment type E1EDK02 IDoc: Document header reference data
QUALF 011 : Referenced Document Number
BELNR XXXXX IDOC document number
DATUM 20100121 IDOC: Date'
what i've used in my program
I'm using the E1EDK02 segment as you mentioned above.
le1edk02-qualf = '011'.
e1edk02-belnr = Quotes-vbeln.
Question:
Here my problem is i'm able to create the sales order with the custom program, but if i made any changes to the quotation Header
(Ship-to party address) before creating the sales order, it is not reflecting into the sales order header level (ship-to party address).
Sol: Check you custom code .. whether you are bringing write address to segement or not
(if you change any address in Quotation then Address master is added with new entry with new address no )
In my program..
I'm passing the partner numbers and partner types (WE & AG) to the segment "E1EDKA1". (Ship-to & Sold-to).
What i was thinking is the above segment is causing the problems, because if we reference the Quotation, we should not pass the Ship-to and sold-to numbers, it should take all those from quotation.
I've tried to comment the code which we have written for that segment "E1EDKA1", it is giving me the error saying that
Customer numbers can't be determined for the document number..
Please guide me how to solve this problem..
Thanks,
Adi. -
Sales order creation with reference to a contract....urgent
Hi all,
I am creating a sales order with reference to a contract, but purchase order no. and date are not copying to the sales order due to standard sap settings, is there any solution to copy these two from contract to order ?
Useful solutions will be rewarded.Hi Jithendra,
You need to edit the copy control settings. Path
IMG Screen/Sales & Distribution/Sales/Maintain Copy control for Sales Documents.
In this Goto Copying Control for Sales Documents to Sales Documents. And you need to change the header settings for the given selection.
I think this might help you.
Regards,
Sreekanth -
Need no document flow update for sales order create with reference
Dear All.
We would like to have the ability to create a sales order with reference to another sales order, and have the document flow of the sales order not updated.
Unlike the case of a standard create with reference where the documents are linked, in this case there is no relationship between the documents. The first document is just acting like a template for the remaining documents, to save time during order entry.
We have turned off update of document flow at the line item level.
But I don't see a way for us to turn this off at the header (document level). So wondering if there's another way to turn this off, or possibly through user-exit or VOFM requirement?
Has anyone else done this?
I think that CRM has this functionality, but we're still entering orders through ERP-SD.
Many Thanks!Hello Colleague;
The issue you have reported is SAP standard. The checkbox "Update Document Flow" (V_TVCPAAP-UPFLU) controls document flow at item level. If this checkbox is set to blank, there will be no document flow at item level.
However, the document flow cannot be completely turned off - if the 'update document flow' indicator is blank, you will still see an entry in the document flow, but there will be no update to table VBFA (Sales Document Flow) and the document flow of the predecessor will not be updated at item level (no record in VBFA at item level).
The reason is that the system checks VBAP (Sales Document: Item Data) for fields VGBEL (Document number of the reference document) and VGPOS (Item number of the reference item) for values. You will always have document flow information on header and item level in the successor because it stores this information in table VBAP.
Related with this issue, you can find a Note 53383 for your review.
I hope it can clarify the case.
Regards
Ruy Castro -
Sales order creation with reference to check quantity according reference
Hi,
I create return sales order with reference. But the problem is that system can not check the quantity of creation sales order according reference quantity now. I want the system check the quantity according reference sales order quantity and do not allow to put sales order quantity more than reference sales order quantity.
Thanks.hi,
please check the below thread
Return Quntity is more the sales Quantity?
this may help you
regards
senya -
Pricing condition redetermination for sales order created with reference
Hi,
Are there any exit or routines that can be used to redetermine MWST pricing condition alone when creating sales order with reference to another sales order? The pricing from preceeding sales order is copied but we need only MWST to be redetermined after saving the order
This is because we are making changes so that while saving the sales order the material tax classification is defaulted to M based on some conditions so that MWST picks up the value M
Regards,
VinHello Vinod ,
did you tried following options :-
1.Using Exit ( MV45aFzz) and re calculte pricning using FM 'PRICING'.
2.or Using Copy Control (Tcode : VOFM ) while creating order with Ref.
regards
Prabhu -
BAPI for Sales Order Creation from Third-party Application
Hi,
I need to create a Sales order in a SAP system from a third-party applications. Please provide the list of BAPIs/Interfaces that are involved in creation of Sales Order.Hi,
Check this link, explains step by step.
http://abaplovers.blogspot.com/2008/02/bap-sales-order-create.html
Thanks,
Krishna
Maybe you are looking for
-
Hi, we30- i have created the custom idoc WE81 : for message type creation we82- assigned it to custom message type SE37: created a BAPI function module - no coding in the source i would like to just generate idoc in R/3. WE57 : to assign a BAPI funct
-
How can I get my CS5 tool bar to appear?
The tool bar in my CS5 extended doesn't appear (all of a sudden) and I definitely need it! What can I do to fix this coach?
-
Steve - question on example #124
Steve, I've set up and run example #124 from your adf samples site. If I understand how it's supposed to work, then I think there's an issue with that example. When I first run TestPage, the page displays the first record (Id = 1) that was inserted v
-
what if you did not have a rescue e-mail when you initially setup your account and cannot remember security question answers
-
We have an error message 150-30
We have a problem. We can not access to the Adobe photoshop 5.0 corrector. We have a message 150-30. What is the solution?