Bapi for creating Sales Area data on Relationship
Hi,
I am looking for BAPI for creating relationship between business partners with sales area data in CRM 5.0.
Example - I would like to create relationship type CRMH03.
Bapi BUPR_RELATIONSHIP_CREATE does not allow for maintaining sales area data (Sales org, distribution channel, division).
Does anybody know such a bapi?
Regards
Radek
hi
try using these
BAPI_BUPA_CREATE_FROM_DATA
BAPI_BUPA_RELATIONSHIP_CREATE
best regards
ashish
Similar Messages
-
FM/BAPI to add sales area data to a BP , FM to assign relationship to BP
Friends of CRM world,
I need your help in finding out BAPI or FM to
add sales area data to an existing Business Partner (BP).
Also I need to assign a relationship to this BP.
Please help me with info on BAPIs or Function Modules for this if you can.
Best Regards,
VivekHi Vivek,
You should use separate function modules for each tab in the sales area data. Please find the following code:
For shipping data tab of sales area data
CALL FUNCTION 'BAPI_BUPA_FRG0020_ADD'
EXPORTING
businesspartner = g_partner_no
sales_area = wa_sales_data
data = wa_ship_data
TABLES
return = it_return.
For billing data tab of Sales area data
CALL FUNCTION 'BAPI_BUPA_FRG0030_ADD'
EXPORTING
businesspartner = g_partner_no
sales_area = wa_sales_data
data = wa_price_data
TABLES
return = it_return.
Use function module BAPI_BUPA_FRG0140_ADD - For organization data tab of Sales area data
CALL FUNCTION 'BAPI_BUPA_FRG0140_ADD'
EXPORTING
businesspartner = g_partner_no
sales_area = wa_sales_data
data = wa_org_data
TABLES
return = it_return.
Thanks
Swagatika -
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 -
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,
ShwetaHi 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 -
For XD01, Sales area data tab greyed out
Hi,
User has XD01,XD02,XD05,XD06,XD07,XD99.when user tries to use XD01 with parameters customer,sales org, dist channel and division when go to customer : sales area data screen,sales area data tab is greyed out.It shouldnot be greyed out.what is the cause of it.user has proper authorization for SD.Hi,
Try with OBD2 tcode...
Also, make sure that while creating customer, you enter sales org., dis channel, & division....
Regards
Edited by: SAP2020 on Jan 27, 2010 11:08 AM -
BAPI for creating sales scheduling agreement
Hi All,
I have a scenario where i need to create a sales scheduling agreement using VA31. I have tried using a function module "SD_SALESDOCUMENT_CREATE". I am able to create the document by inserting the correct data in "SALES_HEADER_IN", "SALES_ITEMS_IN", "SALES_PARTNERS" and using the update flag as " I ".
When I try to insert data in "SALES_SCHEDULES_IN" the function module returns error message "No schedule line category could be determined during quantity adjustment".
please provide help in finding out the right procedure for creating the scheduling agreement with schedule lines data.
Regards.
AnuragHi,
Did you shown this to your functional team.
Regards,
Madhu.
Edited by: madhurao123 on Nov 21, 2011 3:29 PM -
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 -
As per the SPRO settings, you assign your plant to your sales org and Distribution Channel that means you are authorize your sales area to sell the material from a particular Plant
Can any one plz help me in finding the BAPI that can list all the Sales Areas for a particular plant where the Material can be sold.....
Thanks In Advance
Abhi.......Hello,
In DB table TVKWZ you can find the plants assigned to a particular sales areas.
If you want to find the sales areas, in which the plant exist, select sales area info from TVKWZ by passing WERKS.
If you want to find the plants exist in a particular sales area, select plants from TVKWZ by passing sales area info. To accomplish this, you can also use the FM "TVKWZ_GENREAD_WERKS".
Hope this helps you!!
Regards,
Ganga -
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 -
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 -
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 -
CRM - Bapi for creating relationship between BPs with sales area data
Hi
I am looking for BAPI for creating relationship between business partners with sales area data in CRM 5.0.
Example - I would like to create relationship type CRMH03.
Bapi BUPR_RELATIONSHIP_CREATE does not allow for maintaining sales area data (Sales org, distribution channel, division).
Does anybody know such a bapi?
Regards
RadekHey Radek,
I am actually looking for the same functionality. Were you able to find a solution although no one replied to your question in this thread? If so, it would be very helpful for me to know. Maybe you have to combine more BAPIs in order to add the organization information to the relationship. But I have no idea how.
Best Regards
Mirko -
Bapi - relationship on BP with sales area data - urgent
Hello,
I am still looking for BAPI for creating relationship between business partners with sales area data in CRM 5.0.
Example - I would like to create relationship type CRMH03.
Bapi BUPR_RELATIONSHIP_CREATE does not allow for maintaining sales area data (Sales org, distribution channel, division).
Does anybody know such a bapi?
regards
RadekHi,
U can implement the FM accordingly :
declare the data.
DATA : LT_NEW_ENTRIES TYPE STANDARD TABLE OF BAPIBUS1006_SALES_AREA,
LW_NEW_ENTRIES LIKE LINE OF LT_NEW_ENTRIES,
LT_RET TYPE TABLE OF BAPIRET2..
*Assign the required values
LW_NEW_ENTRIES-SALES_ORGANIZATION = 'O 50000000'.
LW_NEW_ENTRIES-DISTRIBUTION_CHANNEL = '01'.
CALL FUNCTION 'BUPA_PFCT_ADDFUNCTION'
EXPORTING
IV_PARTNER1 = '0000000569'
IV_PARTNERGUID1 =
IV_SALES_AREA = LW_NEW_ENTRIES
IV_BPFUNCTION = '00000004'
IV_PARTNER2 = '0000000568'
IV_PARTNERGUID2 =
IV_STANDARD =
IV_TESTRUN = ' '
IV_X_SAVE = 'X'
TABLES
ET_RETURN = LT_RET
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Hope its useful.
Regards,
Shwetha. -
Hello,
When creating/editing an account, in the sales area data assignment block, there is an option "New from Template". I assume we can use this option to populate the sales area data from a predefined template.Question is, where do we create these templates?
any input muych appreciated.
Thanks in advance.You can create the templates in IMG - CRM - Master Data - Business Partner - Templates
In Templates you will see three options... you can select anyone to create template for your sales area data accordingly
Thanks and Regards
Ravi Gaikwad -
Sales area data wrong mantained in Business Partner
Dear All,
We work with a CRM 7.0 EPH3 and we do integrate our CRM with a SAP ERP.
We are using common distribution channel and division for maintaining sales area data in Products and Business Partners.
We did mapped the common channel and division as well as we have done for non common in the organization model.
SALES ORG-CHANNEL -DIVISION
1000 00 00
My problem is with several Accounts that have been wrong maintained in CRM s with non common division.7
my problem is with several Accounts that have been wrong maintained in CRM s with non-common division.
SALES ORG-CHANNEL -DIVISION
1000 00 40
ERP refuse the combination cause is not a valid sales area data for master data maintenance, and I can´t delete this info from sales area in the account
if I avoid the error to be done in future (assigning wrong division). How can I prevent this wrong sales area data to try to be sinc in ERP each time the account is updated Can Anyone tell me how to prevent this error?
Thanks in advance
Marga RibesThanks Christophe
I don´t need to map the org model cause it´s already fixed, I need to solve the problem for the account master data wrongly maintained. the accounts are maintained for
1006-00-40 and each time that get updated and try to sinc a red bdoc raise with the same error. This sales area is not valid in ERP.
Marga
Maybe you are looking for
-
How to use 2 AAA server for different login purpose
Hello, could you help me? This is a part of my configuration; I would like to add another TACACS server, witch should take care of the telnet at vty 0 4. The Tacacs server 10.20.30.40 takes care of the virtual access, and I have another Tacacs server
-
Creating a new package for a new project
how do I create a new package? I have an existing piece of code that was written using a pacakge that looks like a file directory structure. I have found most of thoes file. how do I recreate that package?
-
Songs won't all go on iPod, 5th gen 30 Gig
When I try putting all my songs on my iPod, either by dragging and dropping or syncing, they don't all go on; iTunes copies about 250ish and then just stops for no apparent reason. I restored the iPod and re-downloaded iTunes, but this still happens.
-
ABAP Routine to duplicate data
Dear Experts: I need to duplicate data in a cube, changing the time characteristics. Can I do this with an ABAP Routine. This duplication has to be done each time the infopackage is executed. If this is posible, where should I write this
-
MQC: Steps and Prerequiste to Execute
greetings.. i am new to PP-PI master recipe. I read the SAP help for material calculation but til i need some more clarification for my requirement i am using Active ingredient for making dome chemical . BOM structure contain one A