BAPI_SALESORDER_CREATEFROMDATA
Hi All,
I am using the BAPI_SALESORDER_CREATEFROMDATA to create return sales order it is creating the return sales order but giving some wrong pricing and not giving document flow for the sales order.
Regards
Sagar
Hi
Give a try with this bapi BAPI_SALESORDER_CREATEFROMDAT1
If you face the same issue with this as well ,Could you please place your code ,so that some one can analysis the same and comeback to you
Cheers
Joginder.
Similar Messages
-
Problem With BAPI_SALESORDER_CREATEFROMDATA
Hi Gurus
i am creating sales order using this BAPI "BAPI_SALESORDER_CREATEFROMDATA" but i need to create posting date which is from the file .right now when ever i run the file that date is defaluting in vf02.i want create sales order and posting date in VF02 from the file .please can anyone tell me is any BAPi that i can use.you determine posting date using the nex bapi's:
1.- MR_PERIOD_DETERMINE'
2.- FI_PERIOD_DETERMINE and
3.- BAPI_CCODE_GET_FIRSTDAY_PERIOD -
BAPI_SALESORDER_CREATEFROMDATA( Qty is not geting confirm)
Hi,
I am using BAPI(BAPI_SALESORDER_CREATEFROMDATA) to create Sales Order. After Passing all input i can able to create
sales order. But order qty is not feting confirm in Schedule line. Pl help me to solve.
Thanksuse BAPI_SALESDOCU_CREATEFROMDATA1
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner. -
Problem in creating sales order using the FM BAPI_SALESORDER_CREATEFROMDAT
Hi Experts,
I have writen the below codes to create a sales order but it is showing the error message that ' sales order type OR is not defined'. Please help me.
data:itab_header like bapisdhead occurs 0 with header line,
itab_item like bapiitemin occurs 0 with header line,
itab_partner like BAPIPARTNR occurs 0 with header line,
itab_return like bapireturn1,
soldtoparty like bapisoldto occurs 0 with header line,
shiptoparty like bapishipto occurs 0 with header line,
salesdoc like BAPIVBELN-VBELN .
itab_header-doc_type = 'OR'.
itab_header-sales_org = '1000'.
itab_header-distr_chan = '10'.
itab_header-division = '00'.
append itab_header.
itab_item-material = 'M-01'.
itab_item-req_qty = '1'.
append itab_item.
itab_partner-partn_role = 'AG'.
itab_partner-partn_numb = '1000'.
append itab_partner.
clear itab_partner.
itab_partner-partn_role = 'WE'.
itab_partner-partn_numb = '1000'.
append itab_partner.
clear itab_partner.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
ORDER_HEADER_IN = itab_header
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = ' '
IMPORTING
SALESDOCUMENT = salesdoc
SOLD_TO_PARTY = soldtoparty
SHIP_TO_PARTY = shiptoparty
BILLING_PARTY =
RETURN = itab_return
TABLES
ORDER_ITEMS_IN = itab_item
ORDER_PARTNERS = itab_partner.
ORDER_ITEMS_OUT =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CCARD =
ORDER_CFGS_BLOB =
ORDER_SCHEDULE_EX =.
if itab_return-type ne 'E'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
IMPORTING
RETURN =
write: salesdoc.
else.
write: itab_return-message.
endif.Hello Dillip
The BAPIs BAPI_SALESORDER_CREATE... have certain limitations. In case of BAPI_SALESORDER_CREATEFROMDAT1 you can only create orders for business object 'BUS2032'.
If you have the RFC-enabled function module <b>SD_SALESORDER_CREATE</b> available in your system (which I doubt) then you should use this fm instead of the BAPIs.
Regards
Uwe -
BAPI_SALESORDER_CREATEFROMDATA availability check
Hi;
I´m using this bapi to place order sales, but the bapi doesn´t check the availability of material as the standar does, example, if i ask for 100 of a material and i only have 50, the bapi place 100, but with the availability check, the standar places 50.
How can i activate this option in the bapi.
Thanks on adavance
David Fúnez
Tegucigalpa, HondurasMake sure that you are specifying the same criteria via the BAPI call that are specified on the order create or that are determined during the order create through VA01 . It's common that the BAPI does not behave 'normally' in cases where the full set of data may not be specified. For example, does your BAPI call specify the plant, storage location, and shipping point explicitly? I've seen things like this happen before.
You can also pre-check the availability with BAPI_MATERIAL_AVAILABILITY. -
FM to get sales order details with billing document .
hi ,
is there any standard FM or BAPI to get the sales order details with input as billing document ?
i have the billing document number now i need to get the sales order number and its details ..
is that possible ..
i very well know how to get it by using query, i need standard FM.
Points will be awarded for sure , if it helps .
Thanks and regards
JKHere is the list of BAPIs
BAPI_QUOTATION_GETDETAILBOS
BAPI_INQUIRY_GETDETAILBOS
BAPI_SALESORDER_GETDETAILBOS
SALES ORDER->
BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
BAPI_ORDER_CHANGE_STATUS_GET Change status for order
BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
BAPI_SALESORDER_GETSTATUS Sales order: Display status
BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order -
Function Module for open Purchase Order & Sales Order?
Hi, commonly I read the data from tables and calculate the open quantity for sales order and purchase order, but I want to know, are there any standard function modules for getting the list of open "purchase order" and "sales order" respectively?
Thanks and Regards.hi Ren,
u can check all these bapi's related to salesorder
BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
May be this FM can help you
MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
Regards,
Naveen -
I need to create service entry sheet ( SES ) using input data from text file through BAPI_ENTRYSHEET_CREATE.
If the input contains service line items, which are not present in PO, it should be treated as an unplanned service and correspondingly 'unplanned' indicator is to be set on ML81N ( Service netry sheet ) display.
I want to make an entry unplanned if the input field external no. ( Field: BAPIESLLC-EXT_LINE ) is not matching with external no. field of corresponding purchase order to which the SES refers.
The BAPI works fine for all cases except one. If the unplanned service line contains field SERVICE_NO value which is matching with a SERVICE_NO in PO, it is invariable treated by BAPI as 'PLANNED'. ie. BAPI decides whenther a service line is planned or unplanned based on SERVICE_NO only.
For eg. Let a PO contains one service line with SERVICE_NO value 1008505.
If SES input file contains 2 service entries with SERVICE_NO value 1008505.
While creating SES, the BAPI should treat first entry as 'planned' and second line as 'unplanned'.
But while running the program, both lines are created as 'Planned' only, since SERVICE_NO value 1008505 exists in the PO.
I need to set the service line planned/unplanned through my prgram, overriding the automatic setting up of BAPI_ENTRYSHEET_CREATE.
Hope this clarifies my requirement.
Grateful if somebody cam provide a solution.
Thanks & Regards,
ManjuDo NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
Use BAPI_SALESORDER_CREATEFROMDAT1 .
To build a reference to your contract you have to supply ORDER_HEADER_IN.
Here´s a sample:
MOVE:
gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
gs_vbak-auart TO ls_bapisdhd1-refdoctype.
also gothrouh the links
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi -
Function module to retrieve the account number linked to an SD invoice item
Hi all,
I should retrieve the gl account number linked to a certain SD invoice item. The
program starts from VBRK and VBRP data. Is there a function module which
enables to get it starting from these header lines? I already used the function
module: RV_INVOICE_ACCOUNT_DETERM ( release: 4.0 ), but in some cases it
doesn't seem to function properly ( the export table TKOMV doesn't contain a
value for the SAKN1 field ). For the invoices for which the function isn't able to
retrieve the account number, the standard accounting analysis functionality returns
the following message: account determination carried out via KOFI type. So I'm
searching for a function module that's able to retrieve the account number in these
cases also.
Thanks in advance.
Adriano.Dear Adriano,
Try with Function Module 'SD_DETERMINE_ACCOUNT_INVOICE '.
Additional Info:
BAPIs related salesorder:
BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
FM:
MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
SD_SALES_ORDER_STATUS_WWW for complete details including the delivery information.
Hope this will help.
Regards,
Naveen. -
Creating sales order document with reference to billing document
I have to create sales order with reference to existing billing document. I have tried to following bapis.
1. BAPI_SALESORDER_CREATEed
I have successfully created document with following details.
-->ORDER_HEADER_IN:
DOC_TYPE = ZRK
SALES_ORG = 3000
DISTR_CHAN = 00
DIVISION = 00
ORD_REASON = 100
SD_DOC_CAT = L
CURRENCY = EUR
REF_DOC = 100000028
REF_DOC_CA = M
-->ORDER_ITEMS_IN:
ITM_NUMBER = 000010
MATERIAL = 701791
TARGET_QTY = 0000000001000
CURRENCY = EUR
REF_DOC = 100000028
REF_DOC_CA = M
-->ORDER_PARTNERS:
PARTN_ROLE = SP
PARTN_NUMB = W12001
COUNTRY = NL
by providing this input i am able to create the document but it is not picking up the net value. so i have passed some extra paramters in ORDER_ITEMS_IN
COND_TYPE = PNET
COND_VALUE = 14,56
COND_D_UNT = PC.
folowing error is occured: Condition PNET is missing in pricing procedure A V Z0000.
is it something related to configuration problem?
2.BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2
I have used same test data that is used for BAPI_SALESORDER_CREATEFROMDATA (where in i coudl succefully create doc). but here i encounterd following error.
Unpermitted combination of business object BUS2032 and sales doc. category L.
When i created manually using transaction : VA01
I could do the same by passing following inputs:
DOC_TYPE = ZRK
SALES_ORG = 3000
DISTR_CHAN = 00
DIVISION = 00
Reference document number.
Please suggest me right way of approach.Hi,
In SAP, when the sub-sequent document is existing , we can not cancel the preceeding document. Therefore if you want to cancel the billing document you need to calcel the documents which are created with reference to that.
Check and confirm.
Regards,
Ravi Duggirala -
Creation of sales order(Credit memo request) w.r.t invoice
Hi want to create a Credit memo request (sales order) with respect to a invoice.
Can any body suggest me a bapi or Fm which will directly create a sales order with input as invoice number?
Also all mandatory import export parameters to be filled?
Thanks in Advance,
Rohan.You should be able to use one of these BAPIs (depending on your release - the ...2 one is the lates and greatest, it seems):
BAPI_SALESORDER_CREATEFROMDAT1
BAPI_SALESORDER_CREATEFROMDAT2
BAPI_SALESORDER_CREATEFROMDATA
You'll find a lot of information on them anywhere, please use search. There is also a decent documentation available for each one of them.
The invoice reference will have to be entered as follows (note that it's always at line level):
order_items_in-ref_doc = <invoice number = VBRK-VBELN>.
order_items_in-ref_doc_it = <<invoice line number = VBRP-POSNR.>.
order_items_in-ref_doc_ca = 'M'. " or whatever category is applicable
Keep in mind though that BAPIs do NOT always work the same way as VA01. If, for example, you have the requirements and copy routines (VOFM), they might get bypassed when creating an order with BAPI.
Any follow-up questions I'd suggest to post in ABAP forum. Good luck! -
Hi,
In transaction VA01 we are able to create credit memo request (ZRCR order type) with order category K (credit memo). Is this possible to create this order using "BAPI_SALESORDER_CREATEFROMDAT2" and BAPI_SALESORDER_CREATEFROMDAT1 function module.?
If we try to excute using this function module, following return message is appearing. "Unpermitted combination of business object BUS2032 and sales doc. category K". Any one please give me solution.
Thanks in advance,
MuraliHi,
Using below FM we can create SD.
BAPI_SALESDOCU_CREATEFROMDATA
BAPI_SALESORDER_CREATEFROMDAT1
BAPI_SALESORDER_CREATEFROMDAT2
BAPI_SALESORDER_CREATEFROMDATA
Regards
Md.MahaboobKhan -
WBS element not populating at item level
Hi Gurus,
<br>I am trying to create a new sales order using the function module SD_SALESDOCUMENT_CREATE but when i pass a <br>value for the WBS element at item level it is not getting populated in the back end system.
<br>
<br> data :LT_RETURN TYPE TABLE OF BAPIRET2,
<br> LT_SALES_ITEMS_IN TYPE STANDARD TABLE OF BAPISDITM,
<br> LT_SALES_ITEMS_INX TYPE TABLE OF BAPISDITMX ,
<br> LT_SALES_PARTNERS TYPE TABLE OF BAPIPARNR ,
<br> LT_SALES_SCHEDULES_IN TYPE TABLE OF BAPISCHDL ,
<br> LT_SALES_SCHEDULES_INX TYPE TABLE OF BAPISCHDLX ,
<br> LT_SALES_CONDITIONS_IN TYPE TABLE OF BAPICOND ,
<br> LT_SALES_CONDITIONS_INX TYPE TABLE OF BAPICONDX,
<br> LT_SALES_CFGS_REF TYPE TABLE OF BAPICUCFG ,
<br> LT_SALES_CFGS_INST TYPE TABLE OF BAPICUINS ,
<br> LT_SALES_CFGS_PART_OF TYPE TABLE OF BAPICUPRT,
<br> LT_SALES_CFGS_VALUE TYPE TABLE OF BAPICUVAL ,
<br> LT_SALES_CFGS_BLOB TYPE TABLE OF BAPICUBLB ,
<br> LT_SALES_CFGS_VK TYPE TABLE OF BAPICUVK ,
<br> LT_SALES_CFGS_REFINST TYPE TABLE OF BAPICUREF ,
<br> LT_SALES_CCARD TYPE TABLE OF BAPICCARD ,
<br> LT_SALES_TEXT TYPE TABLE OF BAPISDTEXT ,
<br> LT_SALES_KEYS TYPE TABLE OF BAPISDKEY ,
<br> LT_SALES_CONTRACT_IN TYPE TABLE OF BAPICTR ,
<br> LT_SALES_CONTRACT_INX TYPE TABLE OF BAPICTRX,
<br> LT_EXTENSIONIN TYPE TABLE OF BAPIPAREX ,
<br> LT_PARTNERADDRESSES TYPE TABLE OF BAPIADDR1 ,
<br> LT_SALES_SCHED_CONF_IN TYPE TABLE OF BAPISCHDL2 ,
<br> LT_ITEMS_EX TYPE TABLE OF BAPISDIT ,
<br> LT_SCHEDULE_EX TYPE TABLE OF BAPISDHEDU ,
<br> LT_BUSINESS_EX TYPE TABLE OF BAPISDBUSI ,
<br> LT_INCOMPLETE_LOG TYPE TABLE OF BAPIINCOMP ,
<br> LT_EXTENSIONEX TYPE TABLE OF BAPIPAREX ,
<br> LT_CONDITIONS_EX TYPE TABLE OF BAPICOND ,
<br> LT_PARTNERS_EX TYPE TABLE OF BAPISDPART ,
<br> LT_TEXTHEADERS_EX TYPE TABLE OF BAPISDTEHD ,
<br> LT_TEXTLINES_EX TYPE TABLE OF BAPITEXTLI ,
<br> LT_BATCH_CHARC TYPE TABLE OF BAPIBTSEL ,
<br> LT_CAMPAIGN_ASGN TYPE TABLE OF BAPISDCA ,
<br> LT_CONDITIONS_KONV_EX TYPE TABLE OF KONV .
<br>
<br> DATA: LV_SALESDOCUMENT_EX TYPE BAPIVBELN-VBELN,
<br> LT_SALES_HEADER_OUT TYPE BAPISDHD,
<br> LT_SALES_HEADER_STATUS TYPE BAPISDHDST.
<br>
<br> DATA: LV_VALUE_SALESDOCUMENT TYPE BAPIVBELN-VBELN,
<br> LT_SALES_HEADER_IN TYPE BAPISDHD1,
<br> LT_SALES_HEADER_INX TYPE TABLE OF BAPISDHD1X,
<br> LT_SENDER TYPE TABLE OF BDI_LOGSYS,
<br> LV_BINARY_RELATIONSHIPTYPE TYPE BRELTYP-RELTYPE,
<br> LV_INT_NUMBER_ASSIGNMENT TYPE BAPIFLAG-BAPIFLAG VALUE 'R',
<br> LV_BEHAVE_WHEN_ERROR TYPE BAPIFLAG-BAPIFLAG VALUE ' ',
<br> LT_LOGIC_SWITCH TYPE TABLE OF BAPISDLS,
<br> LV_BUSINESS_OBJECT TYPE BAPIUSW01-OBJTYPE VALUE ' ',
<br> LT_TESTRUN TYPE TABLE OF BAPIFLAG-BAPIFLAG ,
<br> LV_CONVERT_PARVW_AUART TYPE BAPIFLAG-BAPIFLAG VALUE ' ',
<br> LV_STATUS_BUFFER_REFRESH TYPE BAPIFLAG-BAPIFLAG VALUE 'X',
<br> LV_CALL_ACTIVE TYPE CHAR4.
<br>
<br> DATA: WA_SALES_PARTNERS LIKE LINE OF LT_SALES_PARTNERS,
<br> WA_SALES_SCHEDULES_IN LIKE LINE OF LT_SALES_SCHEDULES_IN,
<br> WA_SALES_CONDITIONS_IN LIKE LINE OF LT_SALES_CONDITIONS_IN,
<br> WA_EXTENSIONIN LIKE LINE OF LT_EXTENSIONIN,
<br> WA_SALES_ITEMS_IN LIKE LINE OF LT_SALES_ITEMS_IN,
<br> WA_SALES_TEXT LIKE LINE OF LT_SALES_TEXT.
<br>
<br> LT_SALES_HEADER_IN-DOC_TYPE = 'ZSAL'.
<br> LT_SALES_HEADER_IN-SALES_ORG = '1000'.
<br> LT_SALES_HEADER_IN-DISTR_CHAN = '02'.
<br> LT_SALES_HEADER_IN-DIVISION = '01'.
<br> LT_SALES_HEADER_IN-PMNTTRMS = 'Z020'.
<br> LT_SALES_HEADER_IN-DUN_COUNT = '0'.
<br> LT_SALES_HEADER_IN-ADD_VAL_DY = '00'.
<br> LT_SALES_HEADER_IN-EXCHG_RATE = '0'.
<br> LT_SALES_HEADER_IN-BILL_DATE = SY-DATUM.
<br>
<br>data lv_kunnr type kunnr value '106475'.
<br>
<br>CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
<br> EXPORTING
<br> INPUT = lv_kunnr
<br> IMPORTING
<br> OUTPUT = lv_kunnr.
<br>
<br> WA_SALES_PARTNERS-PARTN_ROLE = 'AG'.
<br> WA_SALES_PARTNERS-PARTN_NUMB = lv_kunnr.
<br> APPEND WA_SALES_PARTNERS TO LT_SALES_PARTNERS.
<br>
<br> WA_SALES_PARTNERS-PARTN_ROLE = 'WE'.
<br> WA_SALES_PARTNERS-PARTN_NUMB = lv_kunnr.
<br> APPEND WA_SALES_PARTNERS TO LT_SALES_PARTNERS.
<br>
<br> WA_SALES_TEXT-ITM_NUMBER = '000010'.
<br> WA_SALES_TEXT-TEXT_ID = 'ZS01'.
<br> WA_SALES_TEXT-LANGU = SY-LANGU.
<br> APPEND WA_SALES_TEXT TO LT_SALES_TEXT.
<br>
<br> WA_SALES_TEXT-ITM_NUMBER = '000010'.
<br> WA_SALES_TEXT-TEXT_ID = '3010'.
<br> WA_SALES_TEXT-LANGU = SY-LANGU.
<br> APPEND WA_SALES_TEXT TO LT_SALES_TEXT.
<br>
<br> WA_SALES_SCHEDULES_IN-ITM_NUMBER = '000010'.
<br> WA_SALES_SCHEDULES_IN-REQ_QTY = '22'.
<br> APPEND WA_SALES_SCHEDULES_IN TO LT_SALES_SCHEDULES_IN.
<br>
<br> WA_SALES_CONDITIONS_IN-ITM_NUMBER = '000010'.
<br> WA_SALES_CONDITIONS_IN-COND_TYPE = 'ZMAN'.
<br> WA_SALES_CONDITIONS_IN-CURRENCY = 'NOK' .
<br> APPEND WA_SALES_CONDITIONS_IN TO LT_SALES_CONDITIONS_IN.
<br>
<br> WA_EXTENSIONIN-STRUCTURE = 'BAPE_VBAK'.
<br> * WA_EXTENSIONIN-VALUEPART1 = '090000000200'.
<br> APPEND WA_EXTENSIONIN TO LT_EXTENSIONIN.
<br>
<br>data lv_MATNR type MATNR value '000000000000000031'.
<br>
<br>CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
<br> EXPORTING
<br> INPUT = lv_MATNR
<br> IMPORTING
<br> OUTPUT = lv_MATNR.
<br>
<br> WA_SALES_ITEMS_IN-ITM_NUMBER = '10'.
<br> WA_SALES_ITEMS_IN-MATERIAL = lv_MATNR.
<br> WA_SALES_ITEMS_IN-TARGET_QTY = '1'.
<br> WA_SALES_ITEMS_IN-TARGET_QU = 'ST'.
<br> WA_SALES_ITEMS_IN-SHORT_TEXT = 'TESST AJ'.
<br> WA_SALES_ITEMS_IN-SALES_UNIT = 'ST'.
<br> WA_SALES_ITEMS_IN-CURRENCY = 'NOK'.
<br> WA_SALES_ITEMS_IN-WBS_ELEM = '011215'.
<br> APPEND WA_SALES_ITEMS_IN TO LT_SALES_ITEMS_IN.
<br>
<br> DATA : WA_ORDER_ITEMS_INX TYPE BAPISDITMX.
<br> DATA : LT_ORDER_ITEMS_INXN TYPE STANDARD TABLE OF BAPISDITMX.
<br> DATA : WA_ORDER_HEADER_INX TYPE BAPISDHD1X.
<br> DATA : LT_ORDER_HEADER_INXN TYPE STANDARD TABLE OF BAPISDHD1X.
<br>
<br> WA_ORDER_ITEMS_INX-UPDATEFLAG = ' '.
<br> WA_ORDER_ITEMS_INX-ITM_NUMBER = '000010'.
<br> WA_ORDER_ITEMS_INX-MATERIAL = 'X'.
<br> WA_ORDER_ITEMS_INX-TARGET_QTY = 'X'.
<br> WA_ORDER_ITEMS_INX-TARGET_QU = 'X'.
<br> WA_ORDER_ITEMS_INX-SHORT_TEXT = 'X'.
<br> WA_ORDER_ITEMS_INX-SALES_UNIT = 'X'.
<br> WA_ORDER_ITEMS_INX-WBS_ELEM = 'X'.
<br>
<br> APPEND WA_ORDER_ITEMS_INX TO LT_ORDER_ITEMS_INXN.
<br>
<br> CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
<br> EXPORTING
<br> SALESDOCUMENT = LV_VALUE_SALESDOCUMENT
<br> SALES_HEADER_IN = LT_SALES_HEADER_IN
<br>* SALES_HEADER_INX =
<br>* SENDER =
<br>* BINARY_RELATIONSHIPTYPE = ' '
<br> INT_NUMBER_ASSIGNMENT = LV_INT_NUMBER_ASSIGNMENT
<br>* BEHAVE_WHEN_ERROR = ' '
<br>* LOGIC_SWITCH = ' '
<br> BUSINESS_OBJECT = ' '
<br>* TESTRUN =
<br>* CONVERT_PARVW_AUART = ' '
<br> STATUS_BUFFER_REFRESH = 'X'
<br>* CALL_ACTIVE = ' '
<br> IMPORTING
<br> SALESDOCUMENT_EX = LV_SALESDOCUMENT_EX
<br> SALES_HEADER_OUT = LT_SALES_HEADER_OUT
<br> SALES_HEADER_STATUS = LT_SALES_HEADER_STATUS
<br> TABLES
<br> RETURN = LT_RETURN
<br> SALES_ITEMS_IN = LT_SALES_ITEMS_IN
<br>* SALES_ITEMS_INX =
<br> SALES_PARTNERS = LT_SALES_PARTNERS
<br> SALES_SCHEDULES_IN = LT_SALES_SCHEDULES_IN
<br>* SALES_SCHEDULES_INX =
<br> SALES_CONDITIONS_IN = LT_SALES_CONDITIONS_IN
<br>* SALES_CONDITIONS_INX =
<br>* SALES_CFGS_REF =
<br>* SALES_CFGS_INST =
<br>* SALES_CFGS_PART_OF =
<br>* SALES_CFGS_VALUE =
<br>* SALES_CFGS_BLOB =
<br>* SALES_CFGS_VK =
<br>* SALES_CFGS_REFINST =
<br>* SALES_CCARD =
<br> SALES_TEXT = LT_SALES_TEXT
<br>* SALES_KEYS =
<br>* SALES_CONTRACT_IN =
<br>* SALES_CONTRACT_INX =
<br> EXTENSIONIN = LT_EXTENSIONIN
<br>* PARTNERADDRESSES =
<br>* SALES_SCHED_CONF_IN =
<br> ITEMS_EX = LT_ITEMS_EX
<br> SCHEDULE_EX = LT_SCHEDULE_EX
<br>* BUSINESS_EX =
<br>* INCOMPLETE_LOG =
<br> EXTENSIONEX = LT_EXTENSIONEX
<br>* CONDITIONS_EX =
<br>* PARTNERS_EX =
<br>* TEXTHEADERS_EX =
<br>* TEXTLINES_EX =
<br>* BATCH_CHARC =
<br>* CAMPAIGN_ASGN =
<br>* CONDITIONS_KONV_EX =
<br>.
<br>
<br> commit work.
<br>
<br>I am aware that there are other BAPI's available to create a new sales order(BAPI_SALESORDER_CREATEFROMDAT2 <br>etc.) but the problem with using them is they internally call the same function module 'SD_SALESDOCUMENT_CREATE'. i <br>have already tried to create the sales order using 'BAPI_SALESORDER_CREATEFROMDAT' but the effect is the same.
<br>When I pass WBS element value in VA01 and create a sales order I can see that WBS element value is coming correctly. <br>But when i create the sales order using ABAP code WBS element is coming as blank. When I execute this standard FM it <br>creates the sales order correctly with a blank against WBS element. I checked in the VBAP table the value is not even <br>populated there . Kindly share your valuable inputs for the same.
- AkshayMay be you have to post this in ABAP forum to get suitable suggestions.
G. Lakshmipathi -
Problem in BDC for VA01 transaction TEXTS tab(Upgrading from 4.5b to ECC6)
Hi All,
I am working in upgrade project from 4.5b version to ECC6 version.
I am facing problem in TEXTS tab of VA01 transaction. In earlier version it is a table control containing of Language, Description & First line but, in ECC6 the screen is modified with texteditor, a list box for language key and a Text type at the left.
Now my problem is how to record this in BDC and how to read the text in the texteditor?
Thanks in Advance,
Ravi Kiran.Hi Seshagiri,
In this case i would suggest the use of BAPI if there's no compulsion to use BDC.
BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
BAPI_SALESORDER_CONFIRMDELVRY
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More
BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
try using these for creation or change of orders instead of bdcs.
hope this helps and revert for more clarifications if any.
<b>Always reward points to useful suggestions.</b>
regards,
Vikas -
Based On E-Mail Sales order automatically Created
Hi,
Customer will send the Email to Client for his / Her Sales Order (PO Order from Customer Side ) once client will get the Email from customer side, system will generate the popup Menu in that system has to show Details what customer wants with Accept for Sale order, check before Sales order confirmation ( Details ) & Reject
Once Accept the sales order system will automatically create a sales order and in that same customer mail system will send the Sales order confirmation O/P
Is it possible to Map into SAP?
If yes Please Guide me How to Map into SAP
Regards,
PrasannaHi,
You may configure an Inbound Idoc with sales order details like customer, material, quantity and expected delivery date, etc.
Since it is a third party system, you will have to map the fields and determine how it will be populated.
After that you may create sales order using BAPI_SALESORDER_CREATEFROMDATA or BAPI_SALESORDER_CREATEFROMDAT1.
Regards,
Amit
Maybe you are looking for
-
EHP4 - Stack XML file related issue
Hi, I have the following two issues from DSWP tcode (or solution_manager): 1. From DSWP code -> Change Management -> Maintenance Optimizer, New Maintenance Transaction and i select the ERP system , then i select the radio button Enhancement Package I
-
Can't see videos after I installed Adobe Flash Player 13.
Can't see videos after I installed Adobe Flash Player 13. When I choose a video to play there is always: "Plug-in failure. I use Mavericks on OS X 10.9 I unistalled Ad. Flash Player and reinstalled it but nothing got better L.
-
Getting exception TOPLINK-2004
We are trying insert a single record to a table and getting following error: We are at very crucial stage of testing , Pl help us to resolve the issue. Thanks in advance for your help <2006-12-21 21:58:42,547> <DEBUG> <default.collaxa.cube.ws> <Datab
-
They send me a mail, that my tone here isn´t good enough. And they will kick me out, if i go on... So I leave by choice. Didn´t think I harm anybody - if so - please excuse. Also I postet a review at the product site which never could be seen (wasn´
-
Manufacturer part number to appear on when creating a request for quotation
my client want to be able to see the manufacturer part number already stored in the material master to appear on the request for quotation.