How to use Bapi for creating sales order
Dear All,
I am facing problem in creating Sales orders using BAPI.
Actually I am getting one file as an input and after validating the contents in the file i am preparing an internal table which has 6 fields - Customer number,PO Number,Material Number,Quantity,Price,Unit of measure.
Now my doubt is that while using BAPI_SALESORDER_CREATEFROMDAT2 , I am not getting how to pass PO Number and Customer number.
Please Help.
Regards,
Shweta
Hi shweta upadhyay
I have gone through you are post i have done some coding for creating sales order using bapi , I think it is helpful for you.
*& Report YOBJ_BAPI_SALESORDER
*& REPORT : CREATING SALES ORDER USING STANDARD BAPI
*& AUTHOR : S.PAVAN KUMAR INUMARTHY
REPORT YOBJ_BAPI_SALESORDER.
DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
*APPENDING VALUES FOR HEADER.
ORDER_HEADER_IN-DOC_TYPE = 'TA'.
ORDER_HEADER_IN-SALES_ORG = '1000'.
ORDER_HEADER_IN-DISTR_CHAN = '10'.
ORDER_HEADER_IN-DIVISION = '00'.
ORDER_HEADER_IN-SALES_GRP = '130'.
ORDER_HEADER_IN-SALES_OFF = '1030'.
APPEND ORDER_HEADER_IN.
*APPENDING VALUES FOR ITEM
ORDER_ITEMS_IN-MATERIAL = 'M-13'.
ORDER_ITEMS_IN-PLANT = '1000'.
ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
ORDER_ITEMS_IN-DIVISION = '07'.
ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
ORDER_ITEMS_IN-VOLUME = '0.780'.
ORDER_ITEMS_IN-VOLUNIT = 'M3'.
APPEND ORDER_ITEMS_IN.
*APPENDING VALUES FOR PARTNER
ORDER_PARTNERS-PARTN_ROLE = 'AG'.
ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
ORDER_PARTNERS-COUNTRY = 'DE'.
ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
APPEND ORDER_PARTNERS.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
ORDER_ITEMS_IN = ORDER_ITEMS_IN
* ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.
WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
This will be very helpful for you .
this one is the correct answer I have tried it and I am posting it for you.
Message was edited by: pavan inumarthy
Similar Messages
-
BAPI For CREATE SALES ORDER WITH REFERENCE TO ORDER
Hi ,
I want to develop a new RFC for 'Creating Sales Order' with reference to another sales order -
Is there any BAPI available for the same ? (Version 4.7) - I know its available for new create and change
but couldn't find for create with reference to Order ...
Thanks in advance ...
Regards
Rajesh.Hi,
You can use this FM "/SAPNEA/SMAPI_ORDER_CREATE". I haven;t tried this but you can still give it a try. Mention the Reference Order Type and other data in the header work area and pass it to the FM.
Reward if it's useful.
Thanks,
Anil -
BAPI FOR CREATING SALES ORDER WITH REFFERENCE TO QUOTATION
Hi All,
I am creating sales order with refference to quotation by using bapi "BAPI_SALESORDER_CREATEFROMDATA".Able to create sales order but its not refferencing qutation.Is there any other bapi for this scenario.Please guide me.
Regards,
SureshHi ,
Thank you for giving reply I tried by using bapi BAPI_SALESORDER_CREATEFROMDAT2 after execution it giving sales order number but when I am trying to see that sales order system is giving error message as document is not exist.
Please guide me.
Suresh -
Hi Folks,
I want to create a sales order using BAPI. Can any one tell me the name of that BAPI and how to use that BAPI.
SiddarthHi
See tha sample code for sales order creation
SALES ORDER INPUT CREATION.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
*ITEM
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.
DATA DECLARATIONS.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
HEADER DATA
header-doc_type = p_auart.
headerx-doc_type = 'X'.
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
PARTNER DATA
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
item-material = p_matnr.
itemx-material = 'X'.
item-plant = p_plant.
itemx-plant = 'X'.
item-target_qty = p_menge.
itemx-target_qty = 'X'.
item-target_qu = 'EA'.
itemx-target_qu = 'X'.
item-item_categ = p_itcat.
itemx-item_categ = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI
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.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
Regards -
BAPI for Creating Sales Order For Variant Configuration Materials
Dear Gurus,
Before posting this thread, we have referred many SDN threads, OSS notes and other sites for any sort of help..but no success..All threads and other referrals are not much of help as they are kind of incomplete( Perhaps, we are unable to understand them..no offense).
Few checked threads on this subjects are:
http://scn.sap.com/thread/34590
http://scn.sap.com/thread/851070
http://scn.sap.com/community/abap/blog/2014/04/23/update-vc-variant-configuration-data-using-standard-bapi-in-sales-order
http://scn.sap.com/community/abap/blog/2014/07/15/creating-orders-with-variant-configured-items-using-bapisalesordercreatefromdat2
http://scn.sap.com/community/abap/blog/2014/04/23/update-vc-variant-configuration-data-using-standard-bapi-in-sales-order
http://scn.sap.com/thread/120144
OSS: 549563
Well, we're using the BAPI (BAPI_SALESORDER_CREATEFROMDAT2) which creates the sales order successfully but without the characteristic values in line items.
We're passing data to the following parameters - ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_VALUE to create the variant config but not able to see it getting created.
Pls find attached BAPI coding document for your reference.
If you could throw any light on this issue will be of great help for us.
Thank You in Advance!!!
Reg,
Jagan-SD.Jagan nath
Try below.
you would need miimum of 3 segments to pass variant config data using this bapi
ORDER_CFGS_REF for each configurable item
POSEX = ITEM #
CONFIG_id , root_id - Start with 1 and increment it for each configurable line item
ORDER_CFGS_INST
CONFIG_ID - from above
INST_ID - Start with 1 and increment it for each configurable line item
OBJ_TYPE = "MARA'
CLASS_TYPE = '300'
OBJ_KEY = material #
ORDER_CFGS_VALUE
CONFIG_ID for the item, INST_ID for the item
charc for characteristic value
VALUE for characteristic value
Reference thread
How to Fill Configuration Data in BAPI BAPI_SALESORDER_CREATEFROMDAT2
Hope it will solve your issue.
Thanks
Ritesh -
Using BAPI_ACTIVITYCRM_CREATEMULTI for creating sales order in CRM
Hello Experts,
I am creating a sales order using BAPI_ACTIVITYCRM_CREATEMULTI, But I am getting the following errors:
1. Reference Object Type (ORGMAN) not allowed
2. Reference Object Type (PARTNER) not allowed
3. Incomplete interface data - No reference specified
4. Item was not found
Can you please help me with the mandatory fields, that has to be filled in the BAPI, and do I need to use Commit BAPI after this BAPI.
Please I am in critical postion,
Now I am able to create a sales order there is no data it like the partner number and Item.May be I am missing some important fileds.
Please help.
Thanks,
Suma
Edited by: Suma B on Aug 8, 2008 1:05 PMHi,
I am passing data using SE37 T-Code.
I was told by the fucntioal guys that GUID will be generated by CRM, so we dont need to send that as an input.
Still facing the same error...
These are my input fields:
REF_HANDLE
REF_GUID
R
OBJECTNAME
LOGICAL_KEY
FIELDNAME
C
|
0000000000
ORDERADM_H
PROCESS_TYPE
0000000000
ORDERADM_H
POSTING_DATE
0000000000
ACTIVITY_H
CATEGORY
0000000000
ACTIVITY_H
PRIORITY
0000000000
ACTIVITY_H
DIRECTION
0000000000
PARTNER
000000000022XXXXXXX
REF_PARTNER_FCT
0000000000
PARTNER
000000000022XXXXXXX
REF_PARTNER_NO
0000000000
PARTNER
000000000022XXXXXXX
PARTNER_FCT
0000000000
PARTNER
000000000022XXXXXXX
PARTNER_NO
0000000000
ORGMAN
DIS_CHANNEL
0000000000
ORGMAN
DIVISION
0000000000
ORGMAN
SALES_ORG
0000000000
ORDERADM_I
PRODUCT
0000000001
B
SCHEDLIN
00000000000000000000000000000000
QUANTITY
|
This is error log:
T
ID
NUM
MESSAGE
LOG_NO
LOG_MS
MESSAGE_V1
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
PARAMETER
ROW
FIELD
SYSTEM
|
W
CRM_ORDER
004
Referenced object type (ORGMAN) not allowed
$000001
000001
ORGMAN
ORDER
0
CR5CLNT100
W
CRM_ORDER
004
Referenced object type (PARTNER) not allowed
$000001
000002
PARTNER
ORDER
0
CR5CLNT100
W
CRM_ORDER
005
Incomplete interface data - No reference specified
$000001
000003
ORDER
0
CR5CLNT100
E
CRM_ORDERADM_I
006
Item was not found.
$000001
000004
ORDER
0
CR5CLNT100
E
CRM_ORDER
005
Incomplete interface data - No reference specified
$000001
000005
ORDER
0
CR5CLNT100
S
CRM_MESSAGES
005
A log has been generated for single document
$000001
000006
MESSAGES
0
CR5CLNT100
E
COM_PARTNER
119
Enter Sold-To Party
$000002
000001
Sold-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Ship-To Party
$000002
000002
Ship-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Bill-To Party
$000002
000003
Bill-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Payer
$000002
000004
Payer
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Sold-To Party
00000000000000047612
000001
Sold-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Ship-To Party
00000000000000047612
000002
Ship-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Bill-To Party
00000000000000047612
000003
Bill-To Party
PARTNER
0
PARTNER_NO
CR5CLNT100
E
COM_PARTNER
119
Enter Payer
00000000000000047612
000004
Payer
PARTNER
0
PARTNER_NO
CR5CLNT100
|
Thanks,
Suma -
Issue in BAPI for creating sales order
Dear friends,
BAPI_SALESORDER_CREATEFROMDAT2
and
BAPI_TRANSACTION_COMMIT
The above standard BAPI's we are using to create SO through third party software and the commit bapi to commit the order in DB, but the issue is now, we have created one new condition type for determining
1.Loading and Unloading point
2.Inco1 and Inco2
3.PayT.
This will trigger when we are selecting the ORDER Reason, this is working fine when we create the Order manually in SAP, but through Third party software this is not triggering, it is taking its own values from the master.Hello Experts,
I am having issue related to Item category determination.
Your inputs will be greatly appreciated.
We have a service order in which Item category is determining correctly. Let’s assume Material as “A” (Material type DIEN, Service,
Freight , etc..) and item category ZITC
is determined correctly.
Let’s assume sales order type as ZSOR
Now I would like to add another line item as miscellaneous
charges for the same order and we have a material created for that purpose Let’s
assume miscellaneous material as “B”
(Material type DIEN, Service,
Freight, etc..)
Both the materials “A” & “B” have Item category Group as “LEIS” (Service w/o Delivery), in material master Sales org 2 view.
In VOV4 we have config maintained as
Sa Ty | ItCGr | Usg | HLevItCa |DfItC
ZSOR | LEIS | | |ZITC
ZSOR | LEIS | TEXT| | ZITC
But when I add material “B” (miscellaneous charges)as a line item, I get the below error and item category is not determined.
No item category
available (Table T184 ZITC TEXT )
Message no. V1320
Thanks in advance -
Using BAPI to create sales order
Hi
i use this BAPI 'BAPI_SALESORDER_CREATEBOS' to create SO, and This BAPI is with SAP E&C solution.
it is similar to BAPI_SALESORDER_CREATEFROMDAT2. and when i call this BAPI, it give the error 'only quantity 1 ST are permitted (item 000010)'. This because the material i use is service material and with unit 'ST' and only 1. it means one project i sell.
The partial code is as below.
i_orderitemsin-itm_number = '000010'.
i_orderitemsin-material = it_sdmaster-MATNR.
I_ORDERITEMSIN-SHORT_TEXT = it_sdmaster-ARKTX.
I_ORDERITEMSIN-TARGET_QU = 'ST '.
I_ORDERITEMSIN-SALES_UNIT = 'ST '.
I_ORDERITEMSIN-TARGET_QTY = '1.000'.
I_ORDERITEMSIN-TARGET_QU = 'ST '.
I_ORDERITEMSIN-TRG_QTY_NO = 1.
I_ORDERITEMSIN-TRGQTY_DEN = 1.
i_orderitemsin-pckg_no = v_package.
APPEND i_orderitemsin .
clear i_orderitemsin .
You see, i have input the unit(ST) and quantity(1). tks for ur advice.I think you dont need to pass data in the fields TRG_QTY_NO and TRGQTY_DEN.
Refer the data element documentation of the above fields.
-Kiran -
Pricing determination for creating sales order using BAPI
Hi,
I am using BAPI_SALESORDER_CREATEFROMDAT2 for creating sales order. I am filling conditions structures
'BAPICOND' and 'BAPICONDX' .
fs_order_conditions_in-itm_number = '00010'.
fs_order_conditions_in-cond_type = 'ZNTP'.
fs_order_conditions_in-cond_value = zsalesinput-price.
fs_order_conditions_in-currency = 'INR'.
append fs_order_conditions_in to order_conditions_in.
fs_order_conditions_inx-itm_number = '00010'.
fs_order_conditions_inx-cond_type = 'ZNTP'.
fs_order_conditions_inx-cond_value = 'X'.
fs_order_conditions_inx-currency = 'X'.
fs_order_conditions_inx-updateflag = 'U'.
append fs_order_conditions_inx to order_conditions_inx.
I am filling the conditions table with above mentioned fields.
Sales order is getting created successfully but I am getting two condition records in the conditions tab of sales order, one which is filled using the BAPI and the other one which is automatically picked by the system. Please tell me how to restrict the one which is created automatically by the system.
Because I want the one which is created by BAPI only.
Helpful posts will be rewardedHello Manchu.
Basically, it is an SD customizing issue. During the creation of the Sales Order you cannot "restrict" any other condition type. The SD guys must customize the condition type to allow for zero value so that the sales order is successfully created without this conition type.
Regards,
George -
Web Service for "Creating Sales Order" by using BAPI
Hello All,
I am trying to create a WS for "Creating Sales Order". The corresponding BAPI that I am using for this purpose is BAPI_SALESORDER_CREATEFROMDAT1. I am able to create the Web Service and run the WSDL on WS Navigator.
But there is a problem whil executing the Web Service. In the interface of WS, we can only enter item level details of "Order Partner". So when I enter the details and click on Execute, it returns me an error message "Please enter Ship to Party and Sold to Party". I have already given these details.
Does any one have any idea of what is going wrong?
Regards,
AbhishekAs you suggested i have passed the suggested parameters in item level..But this time i was not ablet to create the SO also..earlier i am able to creat SO but not line item, But now ia m not able to creat salesdocuement also.
Return talbe filled with belwo messages.
S V4 233 SALES_HEADER_IN has been processed successfully
E V1 320 No item category available (Table T184 ZKB TEXT )
E V4 248 Error in SALES_ITEM_IN 000000
W V1 555 The sales document is not yet complete: Edit data
E V4 219 Sales document was not changed -
Minimum mandatry fields for Creating Sales Order
Hi All,
I am going to create sales order using <b>BAPI_SALESORDER_CREATEFROMDAT2</b> in the web dynpro for java,
I want to use minimum fields, so, what are the <b>minimum</b> fields for creating sales order ?.
if u have any documents or links realted to this please send me.
please help me out.
Thanks & regards,
Iqbal Ahmadchk it
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = l_order_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = l_salesdocument
TABLES
RETURN = it_return
ORDER_ITEMS_IN = it_order_items
ORDER_ITEMS_INX =
ORDER_PARTNERS = it_order_partners
ORDER_SCHEDULES_IN = it_order_schdl
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN = it_order_conditions
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES
How to create sales order using bapi( test purpose)
Create Sales Order using BAPI
creating sales order using bapi -
WebDynpro Application for Create Sales Order
Hi All,
Can any one help me to get the right documentation on How to create a WebDynpro Application for Create Sales Order, Calling BAPI.In NWDS, click Help-->Welcome...Netweaver Developer Studio. Under "Developing WebDynpro Applications" click the link to the chapter.
Go to....
SAP WebAS for Java Applications
Development Manual
Developing Web Application
Web Dynpro
Tutorials
Advanced Tutorials
Model Tutorials
Creating a Web Dynpro Appliation Accessing ABAP Functions.
This should get you started.
Regards,
Rich Heilman -
Hi,
what BAPI that can be used for Return Sales Order? BAPI SALES_ORDER_CREATEFROMDAT2 cant work, I get return message as error : 'Unpermitted combination of business object BUS2032 and sales document type category H'.
thanks alots.
AliaHi Alia,
Go to transaction BAPI, and in the tree go to :
Sales and Distribution -> Sales -> SalesOrder
You will have a list of all the BAPI for the Sales Order. If you want a list of Sales Order, maybe you need the GetList BAPI : BAPI_SALESORDER_GETLIST
Rgd
Frédéric -
BAPIs to create sales orders for Returns and Debit Memo Request
Hi,
I have to create a sales order for document type Returns as well as a debit memo request.The BAPI 'BAPI_SALESORDER_CREATEFROMDAT2' is giving the following error message for Debit Memo Request document creation as well as for Returns.
761 Unpermitted combination of business object BUS2032 and sales doc. category L
I found BAPIs:
BAPI_CUSTOMERRETURN_CREATE for creating sales document of type ZDRE and SD document category H.
BAPI_DEBITREQUEST_PROXY_CREATE for creating sales document of type ZDDR and SD document category L.
please let me know if anybody have used them. If so what values need to be passed to I_UPLOAD_ID,I_DESTIN,I_SFA_REL parameters of BAPI_DEBITREQUEST_PROXY_CREATE. Are there any alternative solutions using the Salesorder bapi.
I have to create documents based on the flat file data no reference sales document numbers are available.
Appreciate your help..
Good Day
Regards
BhargaviLook at the code done by me
Program Name: *
SAP Name : ZAXXXXXX Version : *
Programmer : Chris Dong of ITDC *
Description : *
Includes : *
Function Modules: XX_XXXXXX *
Transactions : *
Programs : *
REPORT XXXXXXXX LINE-SIZE 80
LINE-COUNT 65
MESSAGE-ID ZA
NO STANDARD PAGE HEADING.
CLEAR l_order_partners.
l_order_partners-partn_role = 'AG'.
l_order_partners-partn_numb = '0001202491'.
APPEND l_order_partners TO li_order_partners.
CLEAR l_order_partners.
l_order_partners-partn_role = 'WE'.
l_order_partners-partn_numb = '0001202491'.
APPEND l_order_partners TO li_order_partners.
Sales document type
l_order_header_in-doc_type = 'ZDR'.
Sales organization
l_order_header_in-sales_org = '1000'.
Distribution channel
l_order_header_in-distr_chan = '01'.
Division
l_order_header_in-division = '04'.
REF DOCUMENT
l_order_header_in-REF_DOC = '9100000144'.
order reason
l_order_header_in-ord_reason = '925'.
item number
l_order_items_in-itm_number = '000001'.
material no
l_order_items_in-material = '000000000007000012'.
Qty
l_order_items_in-target_qty = '0000000000100.000'.
APPEND l_order_items_in TO li_order_items_in.
*BUS2094 Credit memo request " OSS NOTE 93091
*BUS2096 Debit memo request " OSS NOTE 93091
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
EXPORTING
ORDER_HEADER_IN = l_order_header_in
BUSINESS_OBJECT = 'BUS2096'
WITHOUT_COMMIT = ' '
CONVERT_PARVW_AUART = ' '
IMPORTING
SALESDOCUMENT = l_vbeln
RETURN = li_return
TABLES
ORDER_ITEMS_IN = li_order_items_in
ORDER_PARTNERS = li_order_partners
Message was edited by:
Chris Dong
null -
Bapi To create sales order with reference of sales order.
Hi all,
Having requerment To create sales order with reference of onother open sales order.
Example: there open sales order which having qty of 20 for that 10 qty as already billed , for remain 10 qty as to create the new sales order with reference to the excsiting one.
Please guide me how do it.
Regards,
Santosh
Edited by: santosh jajur on May 15, 2010 11:47 AMHi Santhosh,
check this thread.
Re: Open Sales Order Migration
The last part of the thread says done.
hope you get a hint from that.
Also this one
Re: how to create open sales order using BAPI....?
http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
Regs,
SuryaD.
Edited by: SuryaD on May 15, 2010 9:09 PM
Edited by: SuryaD on May 15, 2010 9:10 PM
Edited by: SuryaD on May 15, 2010 9:11 PM
Maybe you are looking for
-
When I paste as a Smart Object in Photoshop, the gradients are wrong!
Occasionally when I paste a smart object into a Photoshop document, my gradient changes colors from color-to-color, to color-to-white! This never happened in CS3. This also happens sometimes when I save to .svg! What's going on here? Thanks in advanc
-
Goods receipt with reference to Purchase Order
the requirment is that we should be able to restrict the one Goods receipt posting for one Purchase order. The standard system is supporting processing of multiple P.O's of different vendors in on GR. could anybody suggest to configure the functiona
-
Is there a compatability issue with Microsoft Word 2004 and Snow Leopard or is it G-Mail? I am using Safari with a G-mail account.
-
I have recently updated my nokia ovi on the cellphone. Now I am not able to download any app which I had previously downloaded too. If I go to 'my stuff', and select an app, the download button becomes grayed and is disabled. Please tell me how to c
-
Unable to preview webpages on local host
Safari v 4.0.5 This post is a followup to http://discussions.apple.com/thread.jspa?threadID=1491305, which until now has not been resolved. I use Text Wrangler to code web pages in html with php includes. Files are saved as UTF-8 (No BOM), with .php