BAPI_BUSPROCESSND_CHANGEMULTI
In CRM I'm attempting to change business partners on a sales document. We have process_type ZLIT configured as a Service Confirmation. I am able to build these fine with the BAPI_BUSPROCESSND_CREATEMULTI, however, when I attempt to utilize the change bapi for BP change I get an error thrown by CRM_ORDER_CHECK_AUTHORITY_ACE that "An authorization check could not be executed". When I stepped through in debug this was thrown because the "Process_type" was blank. The header table being sent to the change BAPI does not include a data element for the 'Process_type".
In other entries on this forum re: this BAPI I see most of the answers refer to the CRM_ORDER_MAINTAIN function mudule. I'm confused by this because the Change Bapi ultimately calls the order maintain function.
Can anyone shed any light on this error.
Check out OSS note # 905855 AND<b> 813921</b>
<b>813921</b>
Symptom
In the PC-UI, when creating a business transaction from the account application, authorization check related problems may occur depending on the authorizations assigned to your user.
As a result of this problem, some transaction types could be displayed wrongly or could be missing.
Other terms
PC-UI
Authorization check
Business transaction
Account
Business activity
Business opportunity
Sales transaction
Reason and Prerequisites
Program error.
Solution
Carry out a correction as follow:
1. Edit function module CRM_BSP_SALES_GET_PROC_TYPE with transaction SE37 (Only for the CRM4.0 Release).
Go to theImport tab
Add the following parameter:
ParameterName ReferenceType Opt.
IV_SCREEN_STRUCTURE_NAME CRMT_BSP_SCRSTRUCNAME X
Check, save and activate the function module.
2. Edit class CL_BSP_ACC_ACCMOD_ACTIVITY with transaction SE24
Go to the Attributes Tab (For the CRM3.1 and CRM4.0 releases).
Add the following attributes:
Attributes Level Visibility ReferenceType
GV_NO_PROCESS_TYPE Instance Attribute Private BU_BOOLEAN
Check, save and activate the class.
3. Edit class CL_BSP_ACC_ACCMOD_OPPORTUNITY with transaction SE24
Go to the Attributes Tab (For the CRM3.1 and CRM4.0 releases).
Add the following attributes:
Attributes Level Visibility ReferenceType
GV_NO_PROCESS_TYPE Instance Attribute Private BU_BOOLEAN
Check, save and activate the class.
4. Implement the attached correction instruction.
<b>FYI ..</b>
Symptom
In transaction CRMD_ORDER, you have the possibility to insert three buttons to create business transactions as a shortcut through personal settings. Even if you do not have the authorization to create the transactions with the transaction type, you still have the possibility to insert the transaction type to one of the three buttons by the following approach:
you specify the transaction to create a new button, you will get a warning message to inform you that you do not have the authorization to create the business transsaction with the transaction type. Then you confirm this popup warning message and choose the option 'cancel'. After that, a button with the transaction type will be getting created.
Other terms
personal settings, create, button, crmd_order, CRM_ORDER064, CRM_ORDER 064
Reason and Prerequisites
This is caused by a program error.
Solution
The attached correction is required.
Thanks
Saquib
Message was edited by: Saquib Khan
Similar Messages
-
How to use BAPI_BUSPROCESSND_CHANGEMULTI and BAPI_ACTIVITYCRM_SAVE
hi boys
I need to change some text in my operations massively, but my code doesn't work.
I exec tc CRMD_BUS2000126 to check if the orders were changed but nothing happends.
I Hope someone can help
rgds
A. Garduño
This is the code:
REPORT ZCRM_TOUCH_ORDERS .
TABLES: CRMD_ORDERADM_H .
DATA: BEGIN OF ZCRM_OBJECT_ID,
object_id TYPE CRMT_OBJECT_ID,
END OF ZCRM_OBJECT_ID,
it_object_id LIKE TABLE OF ZCRM_OBJECT_ID WITH HEADER LINE,
it_guid TYPE TABLE OF CRMT_OBJECT_GUID WITH HEADER LINE,
guid TYPE CRMT_OBJECT_GUID.
DATA: it_guid32 TYPE TABLE OF BAPIBUS20001_GUID_DIS,
wa_guid32 LIKE BAPIBUS20001_GUID_DIS,
it_text TYPE TABLE OF BAPIBUS20001_TEXT_DIS WITH HEADER LINE,
hit_text_za02 TYPE HASHED TABLE OF BAPIBUS20001_TEXT_DIS
WITH UNIQUE KEY REF_GUID.
DATA: BEGIN OF DOCS,
guid LIKE CRMD_ORDERADM_H-guid ,
object_id LIKE CRMD_ORDERADM_H-object_id,
text TYPE BAPIBUS20001_TEXT_DIS-TDLINE,
END OF DOCS,
it_docs LIKE TABLE OF DOCS.
*jus a few sample operations
APPEND '0201340821' TO it_object_id.
APPEND '0201340816' TO it_object_id.
APPEND '0201340831' TO it_object_id.
APPEND '0201340841' TO it_object_id.
*get guids from crmd_orderadm_h
SELECT guid INTO TABLE it_guid FROM CRMD_ORDERADM_H
FOR ALL ENTRIES IN it_object_id
WHERE object_id = it_object_id-object_id.
*cast it to a format for bapi_bussprocessnd_getdetailmul
it_guid32 = it_guid[] .
*get text for each opeartion
CALL FUNCTION 'BAPI_BUSPROCESSND_GETDETAILMUL'
TABLES
guid = it_guid32
text = it_text .
*I'm just interested in text witht tdid = ZA02 and...
*put it_text in a hashed table
LOOP AT it_text WHERE tdid = 'ZA02'.
INSERT it_text INTO TABLE hit_text_za02 .
ENDLOOP.
FIELD-SYMBOLS -tdline
SEPARATED BY SPACE.
ENDLOOP.
*LOOP AT hit_text_za02 INTO wa.
WRITE: AT / wa-ref_guid, wa-tdline .
*ENDLOOP .
DATA:it_text_ins TYPE TABLE OF BAPIBUS20001_TEXT_INS WITH HEADER LINE,
i_fields TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS WITH HEADER LINE.
*put modified data in it_text_ins
MOVE hit_text_za02 TO it_text_ins[].
*LOOP AT it_text_ins.
WRITE: AT / it_text_ins-ref_guid, it_text_ins-tdline .
*ENDLOOP .
LOOP AT it_guid32 INTO wa_guid32.
i_fields-ref_guid = wa_guid32 .
i_fields-ref_kind = 'B' .
i_fields-objectname = 'TEXTS'.
APPEND i_fields.
ENDLOOP.
*LOOP AT i_fields .
WRITE AT / i_fields-ref_guid .
*ENDLOOP.
*change order
CAll FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
TABLES
INPUT_FIELDS = i_fields
TEXT = it_text_ins .
*make changes persitent in the database
CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
TABLES
OBJECTS_TO_SAVE = it_guid32 .
Message was edited by: Gerardo CepedaI have modified the code and its working fine now.
The line
MOVE hit_text_za02 TO it_text_ins[] is incorrect .
Both structures are not similar and data is mismatching here in it_text_ins.
and BAPIBUS20001_TEXT_INS-MODE should set to 'A' .
Use the following code and let me know whether it is resolved your issue.
Thanks,
Thirumala.
*& Report ZCRM_TOUCH_ORDERS *
REPORT ZCRM_TOUCH_ORDERS .
include CRM_OBJECT_NAMES_CON.
TABLES: CRMD_ORDERADM_H .
DATA: BEGIN OF ZCRM_OBJECT_ID,
object_id TYPE CRMT_OBJECT_ID,
END OF ZCRM_OBJECT_ID,
it_object_id LIKE TABLE OF ZCRM_OBJECT_ID WITH HEADER LINE,
it_guid TYPE TABLE OF CRMT_OBJECT_GUID WITH HEADER LINE,
guid TYPE CRMT_OBJECT_GUID.
DATA: it_guid32 TYPE TABLE OF BAPIBUS20001_GUID_DIS,
wa_guid32 LIKE BAPIBUS20001_GUID_DIS,
it_text TYPE TABLE OF BAPIBUS20001_TEXT_DIS WITH HEADER LINE,
hit_text_za02 TYPE TABLE OF BAPIBUS20001_TEXT_DIS with header line,
wa_it_text like line of it_text.
DATA: BEGIN OF DOCS,
guid LIKE CRMD_ORDERADM_H-guid ,
object_id LIKE CRMD_ORDERADM_H-object_id,
text TYPE BAPIBUS20001_TEXT_DIS-TDLINE,
END OF DOCS,
it_docs LIKE TABLE OF DOCS.
CONSTANTS: GC_TEXT_OBJ_H TYPE COMT_TEXT_TEXTOBJECT VALUE 'CRM_ORDERH',
GC_TEXT_OBJ_I TYPE COMT_TEXT_TEXTOBJECT VALUE 'CRM_ORDERI'.
*Constants for fieldname
constants: gc_text_lines type crmt_fieldname value 'LINES'.
*jus a few sample operations
APPEND '0000000921' TO it_object_id.
*APPEND '0201340816' TO it_object_id.
*APPEND '0201340831' TO it_object_id.
*APPEND '0201340841' TO it_object_id.
*get guids from crmd_orderadm_h
SELECT guid INTO TABLE it_guid FROM CRMD_ORDERADM_H
FOR ALL ENTRIES IN it_object_id
WHERE object_id = it_object_id-object_id.
*cast it to a format for bapi_bussprocessnd_getdetailmul
it_guid32 = it_guid[] .
*get text for each opeartion
CALL FUNCTION 'BAPI_BUSPROCESSND_GETDETAILMUL'
TABLES
guid = it_guid32
text = it_text .
*I'm just interested in text witht tdid = ZA02 and...
*put it_text in a hashed table
*LOOP AT it_text WHERE tdid = 'ZA02'.
*LOOP AT it_text WHERE tdid = 'A001'.
LOOP AT it_text into wa_it_text.
concatenate wa_it_text-tdline wa_it_text-ref_guid into wa_it_text-tdline.
wa_it_text-tdspras = 'E'.
append wa_it_text to hit_text_za02 .
*INSERT it_text INTO TABLE hit_text_za02 .
ENDLOOP.
DATA: it_text_ins TYPE TABLE OF BAPIBUS20001_TEXT_INS WITH HEADER LINE,
it_text_insx TYPE TABLE OF BAPIBUS20001_TEXT_INSX WITH HEADER LINE,
i_fields TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS WITH HEADER LINE,
wa_it like line of it_text_ins.
*put modified data in it_text_ins
loop at hit_text_za02 into wa_it_text.
clear wa_it.
move-corresponding wa_it_text to wa_it.
wa_it-mode = 'A'.
append wa_it to it_text_ins.
endloop.
LOOP AT it_guid32 INTO wa_guid32.
i_fields-ref_guid = wa_guid32 .
i_fields-ref_kind = 'A' .
i_fields-objectname = 'TEXTS'.
i_fields-FIELDNAME = 'LINES'.
APPEND i_fields.
ENDLOOP.
*change order
CAll FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
TABLES
INPUT_FIELDS = i_fields
TEXT = it_text_ins[] .
*make changes persitent in the database
CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
TABLES
OBJECTS_TO_SAVE = it_guid32 .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'. -
How to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'
Dear Experts,
Can anyone Explain me how to Use the Function Module 'BAPI_BUSPROCESSND_CHANGEMULTI'.My Requirement is i want to change the Partners of the Service Order.It is Very Urgent Requirement Please Help me.
Thanks & Regards,
Ashok.Hi,
For service order you can use FM 'BAPI_ACTIVITYCRM_CHANGEMULTI' as it is much easier to use.
Sample code is below. You can use that:
"fill the details of partner which is
"to be added as main partner or in place of Interaction Agent
wa_partner_new-ref_guid = w_guid_ref.
wa_partner_new-ref_handle = '0000000000'.
wa_partner_new-ref_kind = 'A'.
wa_partner_new-kind_of_entry = wa_partner-kind_of_entry.
wa_partner_new-ref_partner_handle = '0000'.
wa_partner_new-ref_partner_fct = 'Z_IA'.
"wa_partner-partner_no : New partner no.
wa_partner_new-ref_partner_no = wa_partner-partner_no.
wa_partner_new-ref_no_type = wa_partner-ref_no_type.
wa_partner_new-ref_display_type = wa_partner-ref_display_type.
wa_partner_new-display_type = 'BP'.
wa_partner_new-no_type = 'BP'.
wa_partner_new-partner_fct = 'Z_IA'.
"w_partner_no : Old partner no. which is to be changed
wa_partner_new-partner_no = w_partner_no.
wa_partner_new-mainpartner = 'X'.
INSERT wa_partner_new INTO TABLE it_partner_new.
wa_partner_newx-display_type = 'X'.
wa_partner_newx-no_type = 'X'.
wa_partner_newx-partner_fct = 'X'.
wa_partner_newx-partner_no = 'X'.
wa_partner_newx-mainpartner = 'X'.
INSERT wa_partner_newx INTO TABLE it_partner_newx.
IF it_partner_new[] IS NOT INITIAL AND it_partner_newx[] IS NOT INITIAL.
"maintain all changes to be done
CALL FUNCTION 'BAPI_ACTIVITYCRM_CHANGEMULTI'
TABLES
partner = it_partner_new
partnerx = it_partner_newx.
CLEAR : wa_guid1.
REFRESH : it_guid1.
wa_guid1-guid = w_guid_ref.
APPEND wa_guid1 TO it_guid1.
"save the changes
CALL FUNCTION 'BAPI_ACTIVITYCRM_SAVE'
TABLES
objects_to_save = it_guid1.
"commit the transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
Reply fro any further help.
Please reward points if helpful.
Regards,
Ashlesha -
Document could not be saved error while using BAPI_BUSPROCESSND_SAVE
Hi All,
I am using BAPI_BUSPROCESSND_CHANGEMULTI and BAPI_BUSPROCESSND_SAVE to change the status of the CRM Service Order.
The BAPI_BUSPROCESSND_CHANGEMULTI is working fine without any errors, in return table(zero entries), so after this I call the BAPI_BUSPROCESSND_SAVE with save_frame_log = 'X' and update_task_local = '' with the objects_to_save having the guid.
I get an error 'document could not be saved' but still the service order is having the status, which I try to update, in the Item details.
I had gone through the forums, for similar kind of error, and did not find any concrete solution for this error.
Could you please let me know how to rectify this error.
Regards
Sunil Kumar PHi Sachin,
Still the same error.
I had debugged the code and found that the FM 'CRM_EVENT_PASS_INFO_EXE_OW' called internally is failing to generate the events required for save.
The next step of this is deleting the objects to save and inturn , the error.
The events are filled based on entries in table 'gt_plan_exets' in the FM, but for me the table is blank.
I tried to find how this table is getting filled, but I could not trace it.
Regards
Sunil Pasunooti -
Problem in creating service request
Hi all,
I have created a custom RFC where I am using FM "CRM_ICSS_SRVREQ_CREATE". After this i am calling "CRM_ORDER_MAINTAIN" to update the same Service request for updating product version and activity.
The service request created but it does not update the Activity category or you can say no effect of calling FM "CRM_ORDER_MAINTAIN".I tried "BAPI_ORDER_CHANGEMULTI" also in place of CRM_ORDER_MAINTAIN. But it does not work.
When i execute it in Debug mode it works fine. Can anyone suggest me what causes the RFC to behave like this or what could be the solution.
Thanks & Regards,
AnimeshHi karthik,
first of all thanks for your quick replies.
Now, Still its not working. This is the order in which i am calling the FMs:
CALL FUNCTION 'CRM_ICSS_SRVREQ_CREATE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' (wait = true)
CALL FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'(wait = true)
I tried commit work and wait also but it also does not works.
Thnks & Regards,
Animesh -
Crm_order_maintain---insert a partner
Hi guys, I've got a problem with crm_order_maintain!
I want to create a new service contract (subcontract from a master contract) but I don't know how to insert a sold-to-party because in the table et_partner there isn't the field 'MODE'.
Someone can halp me to resolve my problem?
Thanks,
Lorenzo
Message was edited by:
Lorenzo NeviHi Nevi,
Refer the following piece of code to insert the partner on the basis of partner_fct field in et_partner :
* Sold to Party
MOVE: lv_header_guid TO wa_partner-ref_guid,
'A' TO wa_partner-ref_kind,
'0001' TO wa_partner-ref_partner_handle,
lc_stp TO wa_partner-partner_fct,
"lc_stp is partner function for sold to party
gv_partner TO wa_partner-partner_no,
'BP' TO wa_partner-no_type,
'BP' TO wa_partner-display_type,
lc_true TO wa_partner-mainpartner.
APPEND wa_partner TO lit_partner.
CLEAR wa_partner.
* Fill input fields
MOVE: lv_header_guid TO wa_inputfields-ref_guid,
lc_header TO wa_inputfields-ref_kind,
'0001' TO wa_inputfields-logical_key,
lc_partner TO wa_inputfields-objectname.
MOVE lc_partner_fct TO wa_inputfields-fieldname.
APPEND wa_inputfields TO lit_inputfields.
Pass these tables to BAPI_BUSPROCESSND_CHANGEMULTI along with header and item tables. This BAPI internally calls CRM_ORDER_MAINTAIN.
<b>Reward points if it helps.</b> -
How to improve the performance of the Data Migration program ?
Hi All,
I have written a program for Data Migration of Opportunities, but it is taking a lot of time to create or update opportunities.
I have used so many function modules like
" 'CONVERSION_EXIT_ALPHA_INPUT' " -- 8 TIMES
"GUID_CREATE'" -- 4 TIMES
"CRM_ORDER_READ" -- 1 TIME
"CONVERT_INTO_TIMESTAMP" -- 4 TIMES
"CRM_ORDER_MAINTAIN" --- 1 TIME
"CRM_ORDERADM_H_CHANGE_OW" - 1 TIME
"'BAPI_BUSPROCESSND_SAVE" -- 1 TIME
"BAPI_TRANSACTION_COMMIT" -- 1 TIME
"BAPI_BUSPROCESSND_CREATEMULTI" OR "BAPI_BUSPROCESSND_CHANGEMULTI"
and all these function modules are for every record in a loop. for 1000 records it is taking 75 min approximately. How i can improve its performance ?Hi Raman,
For Performance improvment do the following things:
First Remove the CRM_ORDER_READ and use the tables to get the data and then use Read Statement on Internal Tables.
Second, Instead of BAPI_BUSPROCESSND_CREATEMULTI use BAPI_OPPORTUNITY_CREATEMULTI and then use BAPI_TRANSACTION_COMMIT. No need to use 'BAPI_BUSPROCESSND_SAVE.
Third thing, Not sure why you are creating guid 4 times, No need to generate guid if you use BAPI_OPPORTUNITY_CREATEMULTI. Guid will get generated.
Fourth, instead of using 'CONVERSION_EXIT_ALPHA_INPUT' multiple times, create a variable of req. length and then pass the values.
Hope this helps. -
Function module to update the territory in the Transaction.
Hi All,
I was using bapi_busprocessnd_changemulti, and crm_order_maintain to update the territory which appears in partner tab. In this case it picks up the territory automatically, but if there are multiple territories, it picks up the first territory and updates the transaction which is wrong. If I need to pick the 2nd territory, and update the transaction, how would I be able to do the same, any suggestions?
Please let me know how i could update the correct territory based on a transaction. Helpful answers will certainly be avoid points.
Thanks and Regards,
ThiruHi Naren,
Thanks for ur reply,
The BAPI that you have gave is to update only Material BOM. But I want to Change and create spare part indicator for 4 BOM's, ie Sales Order BOM, Eqipment BOM and also Material BOM and WBS BOM.
Can u please shed some light on it,so that it would be helpfull to me.
Thanks
Yathish -
Has anyone successfully updated dates on a CRM transaction using function BAPI_BUSPROCESSND_CHANGEMULTI?
If so, would you mind posting some code, please?I am posting the code of my program, so maybe you can see what I am doing wrong:
tables: crmd_orderadm_h.
DATA: RETURN TYPE TABLE OF BAPIRET2 WITH HEADER LINE.
DATA: GUID TYPE TABLE OF BAPIBUS20001_GUID_DIS WITH HEADER LINE.
DATA: APPOINTMENT TYPE TABLE OF BAPIBUS20001_APPOINTMENT_INS WITH HEADER LINE.
DATA: INPUT_FIELDS TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS WITH HEADER LINE.
data: saved type TABLE OF BAPIBUS20001_OBJECT_ID with header line.
Select header using doc number to get guid
select single * from crmd_orderadm_h
where object_id = '0050000172'.
Guid from selected record
guid-guid = crmd_orderadm_h-GUID.
APPEND GUID.
Update input fields
INPUT_FIELDS-ref_guid = crmd_orderadm_h-guid.
INPUT_FIELDS-ref_kind = 'A'.
INPUT_FIELDS-objectname = 'APPOINTMENT'.
Add individual fields
INPUT_FIELDS-fieldname = 'REF_GUID'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'REF_KIND'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'REF_HANDLE'.
append INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'APPT_TYPE'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'DATE_FROM'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'DATE_TO'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'MODE'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'TIMEZONE_FROM'.
APPEND INPUT_FIELDS .
INPUT_FIELDS-fieldname = 'TIMEZONE_TO'.
APPEND INPUT_FIELDS .
Update appointment - change to an exising record
APPOINTMENT-ref_guid = crmd_orderadm_h-guid.
APPOINTMENT-appt_type = 'CONTSIGNON'.
APPOINTMENT-timezone_from = 'CET'.
APPOINTMENT-timezone_to = 'CET'.
APPOINTMENT-date_from = sy-datum.
APPOINTMENT-time_from = sy-uzeit.
APPOINTMENT-date_to = sy-datum.
APPOINTMENT-time_to = sy-uzeit.
APPOINTMENT-mode = 'B'. "<-- Appointment type already exists, so change
APPEND APPOINTMENT.
Update Document
CALL FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
TABLES
APPOINTMENT = APPOINTMENT
INPUT_FIELDS = INPUT_FIELDS
RETURN = return.
Persist Changes
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
EXPORTING
UPDATE_TASK_LOCAL = 'X'
TABLES
OBJECTS_TO_SAVE = GUID
SAVED_OBJECTS = saved
RETURN = RETURN. -
Mass transfer of sales person accounts,contacts ,transactions to another
Hello All
in CRM2007, is it possible to transfer Acounts/Contacts/Leads and Opportunities from one Sales employee to another Sales employee and if YES,
How it can be done for Mass tranfer
Regards
KumarHi Phani!
May be you should check for SAP Notes.
In our case we were need only to transfer contacts & some other data,
but because of mass cleansing we did a Z-development (to make it faster than standard & to fo some special cleansing).
You can make some mix I think:
Step 1. Use development (based on FM 'BAPI_BUSPROCESSND_CHANGEMULTI') for Accounts cleansing.
Step 2. Continue with standard cleansing routine.
Hope it helps.
Best regards,
Alexander Kirillov -
Inbound RFC Data / Duplicate Note Texts
Hello,
Question: Is there a way for me to view the contents which have already been passed to an RFC in CRM (5.0) from Portal?
Background: We are experiencing an issue with duplicate note texts when displaying opportunity notes in Portal. Note texts are being populated by an RFC call which in turn calls BAPI_BUSPROCESSND_CHANGEMULTI. We are not able to recreate the issue in any test enviorment. We are only able to identify the issue after it has already occurred in PRD on almost a daily basis.
As this appears to be a random occurance, I am hoping to compare the data passed to the RFC for a successful & errored example to identify any discrepancies in the data passed to the RFC.
One thing I have noticed is that the duplicate texts appear to be occuring when a date/time stamp is not included at then end of the TEXT field of STXH, but have not been able to determine why a date/time stamp is added in one instance and not another.
Any input would be greatly appreciated. Thanks!Hi Mats,
I have the same problem. As I work-around, I added the following code to the transfer routine for 0TCTPRCSVAR in InfoSource 0TCTPRCSVAR_TEXT.
DATA: l_str TYPE sobj_name.
l_str = TRAN_STRUCTURE-objnm.
* Begin Note 1134138 3/23/2008
* IF ( STRLEN( l_str ) > 30 ).
IF ( STRLEN( l_str ) > 10 ).
* End Note 1134138
RESULT = TRAN_STRUCTURE-objnm+10(30).
ELSE.
* Multiple records with process variant type = LOADING and
* blank process variant name caused duplicate record errors
* during load. This code prevents the duplicate records by
* forcing a delay and plugging a time stamp into the process
* variant name.
IF TRAN_STRUCTURE-TXTSH IS INITIAL.
CALL FUNCTION 'RFC_PING_AND_WAIT'
EXPORTING
SECONDS = 2.
CONCATENATE 'DUP_RECORD_ERROR_' sy-timlo
INTO RESULT.
ENDIF.
ENDIF.
* returncode <> 0 means skip this record
RETURNCODE = 0.
* abort <> 0 means skip whole data package !!!
ABORT = 0.
It's not very elegant, but it seems to solve the duplicate record error. Periodically, I delete the 0TCTPRCSVAR master data that contains string "DUP_RECORD_ERROR.'
Isn't SAP grand!!
Hope this helps.
Regards,
D&C -
Discount calculation for a sales order in CRM
Hi All,
I need to change the pricing data for a sales order item using a BAPI. For this I want to make use of the BAPI_BUSPROCESSND_CHANGEMULTI. But I am not sure as to which of the fileds to be used for the discount rate calculation. The scenario is, from a Custom UI we will change the discount given for an item and the same has to be reflected in CRM and the calculation for that also will be carried out in CRM.
Can somebody throw some light on this?
Regards,
- PrasenjitHi Richard,
There is no pricing procedure in the UI. For every calculation the UI is calling a BAPI and changing the UI accordingly. Everything needs to be done in CRM.
The requirement is basically to fetch the pricing details for a contract that is under creation. The main funda is to obtain the pricing document guid, which will intern fetch the pricing condtion rates corresponding to a condition type. Can you tell me how to do that?
Regards -
BAPI CHANGEMULTI and CRM_ORDER_MAINTAIN
Hi all,
I have a couple of questions which are strictly connected:
1. Does anybody know if BAPI BAPI_BUSPROCESSND_CHANGEMULTI, in CRM application is suitable for adding a new item in a sales order already created?
The fact we have set up parameter <b>A (CREATE)</b>, in the internal table ITEM , but after a long debuggins Bapi return us the parameter<b> A (MODIFY).</b>
CALL FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
TABLES
HEADER = CT_ORDERADM_H
ITEM = CT_ORDERADM_I
SALES = it_sales
ORGANISATION = it_organiz
PRICING = it_pricing
APPOINTMENT = it_appointment
TEXT = it_text
INPUT_FIELDS = ct_input
RETURN = it_return_bapi
CONDITION_CREATE = it_preciopos
SCHEDULELINE = it_repartos
BILLING = it_billing_maintain.
LOOP AT it_return_bapi.
IF it_return_bapi-TYPE = 'E' OR
it_return_bapi-TYPE = 'A'.
MESSAGE it_return_bapi-message type 'I'.
ENDIF.
ENDLOOP.
2 . <b>CRM_ORDER MAINTAIN</b> used in another version of the program, return us the new position but unfortunately it create <b>PRICE CONDITIONS INACTIVE</b>, filled with 0.
So far we do not know why it create inactive conditions, especially the price one as, this condition is not statistical.
The code is the following:
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_BILLING = it_billing_maintain
IT_SCHEDLIN_I = IT_SCHEDLIN_maintain
IT_PRIDOC = IT_PRIDOC
IT_TEXT = IT_TEXT
IMPORTING
ET_EXCEPTION = ET_EXCEPTION
CHANGING
CT_ORDERADM_H = CT_ORDERADM_H
CT_ORDERADM_I = CT_ORDERADM_I
CT_INPUT_FIELDS = CT_INPUT
CT_DOC_FLOW = CT_DOC_FLOW
EXCEPTIONS
ERROR_OCCURRED = 1
DOCUMENT_LOCKED = 2
NO_CHANGE_ALLOWED = 3
NO_AUTHORITY = 4
OTHERS = 5.
Any suggestions are welcomed.
Many thanks in advance,
AndreaHi Amit,
basically we checked all input fields.
We noticed that input fields are set up exatly as you said as for
ORDERADM_H is A and for ORDERADM_I is B.
Unfortunately it still does not work. We think that input fields may be wrong.
Attached you find the code use for this BAPI.
In any case many thanks for your answer.
Andrea.
FORM rellenar_input_fields .
inicio modificacion jgarciar 11122006 ********************
rellenar tabla input_fields con datos de header
loop at it_header.
it_inputfields-REF_GUID = it_header-GUID.
it_inputfields-REF_KIND = 'A'.
it_inputfields-OBJECTNAME = 'ORDERADM_H'.
append it_inputfields.
ct_input-REF_GUID = it_header-GUID.
ct_input-REF_KIND = 'A'.
ct_input-OBJECTNAME = 'ORDERADM_H'.
ct_input-fieldname = 'GUID'.
append ct_input.
endloop.
loop at it_header.
CT_INPUT-REF_GUID = it_header-GUID.
CT_INPUT-REF_KIND = 'A'.
CT_INPUT-FIELDNAME = 'OBJECT_ID'.
CT_INPUT-OBJECTNAME = 'ORDERADM_H'.
ct_input-changeable = 'A'.
append CT_INPUT.
endloop.
Fin modificacion jgarciar 11122006 ********************
Rellenar tbla input_fields de billing
LOOP AT it_billing_maintain INTO wa_billing_maintain.
Inicio modificacion jgarciar 11122006 ***************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 ***************
CLEAR: WA_INPUT, WA_NOMBRES.
Datos de facturacion
WA_INPUT-REF_GUID = wa_billing_maintain-ref_guid.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'BILLING'.
WA_input-FIELDNAME = 'BILLING_BLOCK'.
WA_NOMBRES-FIELDNAME = 'BILLING_BLOCK'.
WA_NOMBRES-changeable = ''.
Inicio modificacion jgarciar 11122006 ************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 ************
Inicio modificacion jgarciar 11122006 ************
INSERT WA_INPUT INTO TABLE CT_INPUT.
append WA_INPUT TO CT_INPUT.
Fin modificacion jgarciar 11122006 ************
ENDLOOP.
rellenar tabla input_fields con datos de item
loop at CT_ORDERADM_I INTO WA_CT_ORDERADM_I.
Inicio modificacion jgarciar 11122006 ******************
SELECT SINGLE * FROM CRMD_ORDERADM_I
WHERE GUID = WA_CT_ORDERADM_I-GUID.
Si existe, solo se modifica la descripcion
IF sy-subrc = 0.
Fin modificacion jgarciar 11122006 ********************
MMG - Description
CLEAR WA_INPUT.
Inicio modificacion jgarciar 11122006 **************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'DESCRIPTION'.
WA_input-CHANGEABLE = ''.
WA_NOMBRES-FIELDNAME = 'DESCRIPTION'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
WA_NOMBRES-FIELDNAME = 'MODE'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
append wa_input to ct_input.
CLEAR WA_INPUT.
CLEAR WA_INPUT.
Inicio modificacion jgarciar 11122006 **************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'MODE'.
WA_input-CHANGEABLE = ''.
WA_NOMBRES-FIELDNAME = 'DESCRIPTION'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
WA_NOMBRES-FIELDNAME = 'MODE'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
append wa_input to ct_input.
CLEAR WA_INPUT.
INSERT WA_INPUT INTO TABLE CT_INPUT.
Fin modificacion jgarciar 11122006 **************
Inicio modificacion jgarciar 11122006 ***************
endif.
SELECT SINGLE * FROM CRMD_ORDERADM_I
WHERE GUID = WA_CT_ORDERADM_I-GUID.
Si existe, solo se modifica la descripcion
IF sy-subrc <> 0.
clear wa_input.
MMG - GUID
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
Inicio modificacion jgarciar 11122006 **************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
WA_input-FIELDNAME = 'GUID'.
WA_NOMBRES-FIELDNAME = 'GUID'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
append wa_input to ct_input.
CLEAR WA_INPUT.
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
Inicio modificacion jgarciar 11122006 **************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
WA_input-FIELDNAME = 'DESCRIPTION'.
WA_NOMBRES-FIELDNAME = 'GUID'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
append wa_input to ct_input.
CLEAR WA_INPUT.
Fin modificacion jgarciar 11122006 **************
MMG -HEADER
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'HEADER'.
WA_NOMBRES-FIELDNAME = 'HEADER'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 **************
INSERT WA_INPUT INTO TABLE CT_INPUT.
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'PRODUCT'.
WA_NOMBRES-FIELDNAME = 'PRODUCT'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
append WA_INPUT TO CT_INPUT.
CLEAR WA_INPUT.
Fin modificacion jgarciar 11122006 **************
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
WA_input-FIELDNAME = 'ORDERED_PROD'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'ORDERED_PROD'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
append WA_INPUT TO CT_INPUT.
INSERT WA_INPUT INTO TABLE CT_INPUT.
CLEAR WA_INPUT.
Fin modificacion jgarciar 11122006 **************
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'ITM_TYPE'.
WA_NOMBRES-FIELDNAME = 'ITM_TYPE'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
append WA_INPUT TO CT_INPUT.
INSERT WA_INPUT INTO TABLE CT_INPUT.
CLEAR WA_INPUT.
Fin modificacion jgarciar 11122006 **************
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'PARTNER_PROD'.
WA_NOMBRES-FIELDNAME = 'PARTNER_PROD'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 ***************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 ***************
INSERT WA_INPUT INTO TABLE CT_INPUT.
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'NUMBER_INT'.
WA_NOMBRES-FIELDNAME = 'NUMBER_INT'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
append WA_INPUT TO CT_INPUT.
CLEAR WA_INPUT.
Fin modificacion jgarciar 11122006 **************
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
MMG - 18-11-04
WA_NOMBRES-FIELDNAME = 'NUMBER_EXT'.
WA_NOMBRES-CHANGEABLE = ''.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
IF WA_CT_ORDERADM_I-ITM_TYPE <> 'ZTAD'.
IF WA_CT_ORDERADM_I-NUMBER_PARENT <> ''.
MMG - PARENT
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'PARENT'.
WA_NOMBRES-FIELDNAME = 'PARENT'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
append WA_INPUT TO CT_INPUT.
CLEAR WA_INPUT.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
Fin modificacion jgarciar 11122006 **************
MMG - NUMBER_PARENT
WA_INPUT-REF_GUID = WA_CT_ORDERADM_I-GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'ORDERADM_I'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_input-FIELDNAME = 'NUMBER_PARENT'.
WA_NOMBRES-FIELDNAME = 'NUMBER_PARENT'.
WA_NOMBRES-CHANGEABLE = ''.
Inicio modificacion jgarciar 11122006 **************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
append wa_input to ct_input.
CLEAR WA_INPUT.
Fin modificacion jgarciar 11122006 **************
ENDIF. "<> ZTAD
ENDIF.
Inicio modificacion jgarciar 11122006 ***************
Fin modificacion jgarciar 11122006 ***************
endloop.
rellenar tabla input_fields con datos de item
loop at ct_orderadm_i.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'GUID'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'HEADER'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'PRODUCT'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'ORDERED_PROD'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'ITM_TYPE'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'PARTNER_PROD'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'NUMBER_INT'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'NUMBER_EXT'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'PARENT'.
append ct_input.
ct_input-REF_GUID = ct_orderadm_i-GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'ORDERADM_I'.
ct_input-FIELDNAME = 'NUMBER_PARENT'.
append ct_input.
endloop.
rellenar tabla input_fields con datos de item
Rellenar input fields con campos de doc_flow
Loop At ct_doc_flow Into wa_ct_doc_flow.
REFRESH WA_INPUT-FIELD_NAMES.
wa_input-REF_GUID = wa_ct_doc_flow-REF_GUID.
wa_input-REF_KIND = wa_ct_doc_flow-REF_KIND.
wa_input-OBJECTNAME = 'DOC_FLOW'.
wa_nombres-fieldname = 'REF_GUID'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'REF_KIND'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'OBJTYPE_A'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'OBJTYPE_B'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'OBJKEY_A'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'OBJKEY_B'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'VONA_KIND'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'RELTYPE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
wa_nombres-fieldname = 'BREL_KIND'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
EndLoop.
rellenar tabla input_fields con datos de sales
loop at it_sales.
WA_INPUT-REF_GUID = it_sales-REF_GUID.
WA_INPUT-REF_KIND = it_sales-REF_KIND.
WA_INPUT-OBJECTNAME = 'SALES'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'PO_NUMBER_SOLD'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
endloop.
rellenar tabla input_fields con datos de organización
loop at it_organiz.
WA_INPUT-REF_GUID = it_organiz-REF_GUID.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'ORGMAN'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'SALES_ORG_RESP'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
endloop.
rellenar tabla input_fields con datos de SCHEDULELINE
loop at it_repartos.
WA_INPUT-REF_GUID = it_repartos-ITEM_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'SCHEDLIN'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'QUANTITY'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
endloop.
Inicio modificacion jgarciar 11122006 ********************
Datos de schedulin - Cantidades
loop at IT_SCHEDLIN_MAINTAIN INTO WA_IT_SCHEDLIN_MAINTAIN.
WA_INPUT-REF_GUID = WA_IT_SCHEDLIN_MAINTAIN-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'SCHEDLIN'.
Inicio modificacion jgarciar 11122006 *****************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 *****************
WA_NOMBRES-FIELDNAME = 'QUANTITY'.
Inicio modificacion jgarciar 11122006 *****************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 *****************
INSERT WA_INPUT INTO TABLE CT_INPUT.
endloop.
Fin modificacion jgarciar 11122006 ********************
rellenar tabla input_fields con datos de CONDITION_COM
loop at it_pridoc into wa_pridoc.
WA_INPUT-REF_GUID = wa_pridoc-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'PRIDOC'.
Inicio modificacion jgarciar 11122006 *****************
REFRESH WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 *****************
WA_NOMBRES-FIELDNAME = 'CURRENCY'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'COND_TYPE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'COND_RATE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'COND_P_UNT'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Mod. 04.12.2006 ASA INICIO.
WA_NOMBRES-FIELDNAME = 'KSCHL'.
Inicio modificacion jgarciar 11122006 *****************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-field_names.
Fin modificacion jgarciar 11122006 *****************
WA_NOMBRES-FIELDNAME = 'WAERS'.
Inicio modificacion jgarciar 11122006 *****************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-field_names.
Fin modificacion jgarciar 11122006 *****************
WA_NOMBRES-FIELDNAME = 'KBETR'.
Inicio modificacion jgarciar 11122006 *****************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-field_names.
WA_NOMBRES-FIELDNAME = 'KPEIN'.
Inicio modificacion jgarciar 11122006 *****************
INSERT WA_NOMBRES INTO TABLE WA_INPUT-field_names.
Fin modificacion jgarciar 11122006 *****************
INSERT WA_INPUT INTO TABLE CT_INPUT.
Mod. 04.12.2006 ASA FINAL.
endloop.
MMG - Input fields para los textos
Inicio modificacion jgarciar 11122006 ********************
loop at it_text into wa_it_text.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'TDID'.
APPEND WA_INPUT TO CT_INPUT.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'TDSPRAS'.
APPEND WA_INPUT TO CT_INPUT.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'TDSTYLE'.
APPEND WA_INPUT TO CT_INPUT.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'MODE'.
APPEND WA_INPUT TO CT_INPUT.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'LINES'.
APPEND WA_INPUT TO CT_INPUT.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'TDFORMAT'.
APPEND WA_INPUT TO CT_INPUT.
clear wa_input.
WA_INPUT-REF_GUID = wa_it_text-REF_GUID.
WA_INPUT-REF_KIND = 'B'.
WA_INPUT-OBJECTNAME = 'TEXTS'.
wa_input-fieldname = 'TDLINE'.
APPEND WA_INPUT TO CT_INPUT.
Inicio modificacion jgarciar 11122006 *****************
REFRESH WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'TDID'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'TDSPRAS'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'TDSTYLE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'MODE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'LINES'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'TDFORMAT'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
WA_NOMBRES-FIELDNAME = 'TDLINE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
Fin modificacion jgarciar 11122006 *****************
INSERT WA_INPUT INTO TABLE CT_INPUT.
endloop.
Fin modificacion jgarciar 11122006 ********************
rellenar tabla input_fields con datos de PARTNER
loop at it_partner.
WA_INPUT-REF_GUID = it_partner-REF_GUID.
WA_INPUT-REF_KIND = it_partner-REF_KIND.
WA_INPUT-OBJECTNAME = 'PARTNER'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_INPUT-LOGICAL_KEY = it_partner-REF_PARTNER_HANDLE.
WA_NOMBRES-FIELDNAME = 'PARTNER_FCT'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
WA_INPUT-REF_GUID = it_partner-REF_GUID.
WA_INPUT-REF_KIND = it_partner-REF_KIND.
WA_INPUT-OBJECTNAME = 'PARTNER'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_INPUT-LOGICAL_KEY = it_partner-REF_PARTNER_HANDLE.
WA_NOMBRES-FIELDNAME = 'PARTNER_NO'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
WA_INPUT-REF_GUID = it_partner-REF_GUID.
WA_INPUT-REF_KIND = it_partner-REF_KIND.
WA_INPUT-OBJECTNAME = 'PARTNER'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_INPUT-LOGICAL_KEY = it_partner-REF_PARTNER_HANDLE.
WA_NOMBRES-FIELDNAME = 'NO_TYPE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
WA_INPUT-REF_GUID = it_partner-REF_GUID.
WA_INPUT-REF_KIND = it_partner-REF_KIND.
WA_INPUT-OBJECTNAME = 'PARTNER'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_INPUT-LOGICAL_KEY = it_partner-REF_PARTNER_HANDLE.
WA_NOMBRES-FIELDNAME = 'DISPLAY_TYPE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
WA_INPUT-REF_GUID = it_partner-REF_GUID.
WA_INPUT-REF_KIND = it_partner-REF_KIND.
WA_INPUT-OBJECTNAME = 'PARTNER'.
REFRESH WA_INPUT-FIELD_NAMES.
WA_INPUT-LOGICAL_KEY = it_partner-REF_PARTNER_HANDLE.
WA_NOMBRES-FIELDNAME = 'KIND_OF_ENTRY'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
endloop.
JCF 19/12/2003 Incorporar funcionalidad fechas de ZSUBIROFERTA
Rellenar input_fields con datos de appointment
LOOP AT it_appointment.
WA_INPUT-REF_GUID = it_appointment-ref_guid.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'APPOINTMENT'.
REFRESH WA_INPUT-FIELD_NAMES.
if it_appointment-APPT_TYPE = 'ZLIQUIDACION'.
WA_INPUT-LOGICAL_KEY = 'ZLIQUIDACIONX'.
ELSE.
WA_INPUT-LOGICAL_KEY = it_appointment-APPT_TYPE.
ENDIF.
WA_NOMBRES-FIELDNAME = 'APPT_TYPE'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
wa_input-fieldname = 'APPT_TYPE'.
append wa_input to ct_input.
WA_INPUT-REF_GUID = it_appointment-ref_guid.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'APPOINTMENT'.
REFRESH WA_INPUT-FIELD_NAMES.
if it_appointment-APPT_TYPE = 'ZLIQUIDACION'.
WA_INPUT-LOGICAL_KEY = 'ZLIQUIDACIONX'.
ELSE.
WA_INPUT-LOGICAL_KEY = it_appointment-APPT_TYPE.
ENDIF.
WA_NOMBRES-FIELDNAME = 'TIMESTAMP_FROM'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
wa_input-fieldname = 'APPT_TYPE'.
append wa_input to ct_input.
WA_INPUT-REF_GUID = it_appointment-ref_guid.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'TIMESTAMP_FROM'.
REFRESH WA_INPUT-FIELD_NAMES.
if it_appointment-APPT_TYPE = 'ZLIQUIDACION'.
WA_INPUT-LOGICAL_KEY = 'ZLIQUIDACIONX'.
ELSE.
WA_INPUT-LOGICAL_KEY = it_appointment-APPT_TYPE.
ENDIF.
WA_NOMBRES-FIELDNAME = 'TIMEZONE_FROM'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
wa_input-fieldname = 'TIMEZONE_FROM'.
append wa_input to ct_input.
WA_INPUT-REF_GUID = it_appointment-ref_guid.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'APPOINTMENT'.
REFRESH WA_INPUT-FIELD_NAMES.
if it_appointment-APPT_TYPE = 'ZLIQUIDACION'.
WA_INPUT-LOGICAL_KEY = 'ZLIQUIDACIONX'.
ELSE.
WA_INPUT-LOGICAL_KEY = it_appointment-APPT_TYPE.
ENDIF.
WA_NOMBRES-FIELDNAME = 'TIMESTAMP_TO'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
wa_input-fieldname = 'TIMESTAMP_TO'.
append wa_input to ct_input.
WA_INPUT-REF_GUID = it_appointment-ref_guid.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'APPOINTMENT'.
REFRESH WA_INPUT-FIELD_NAMES.
if it_appointment-APPT_TYPE = 'ZLIQUIDACION'.
WA_INPUT-LOGICAL_KEY = 'ZLIQUIDACIONX'.
ELSE.
WA_INPUT-LOGICAL_KEY = it_appointment-APPT_TYPE.
ENDIF.
WA_NOMBRES-FIELDNAME = 'TIMEZONE_TO'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
wa_input-fieldname = 'TIMEZONE_TO'.
append wa_input to ct_input.
WA_INPUT-REF_GUID = it_appointment-ref_guid.
WA_INPUT-REF_KIND = 'A'.
WA_INPUT-OBJECTNAME = 'APPOINTMENT'.
REFRESH WA_INPUT-FIELD_NAMES.
if it_appointment-APPT_TYPE = 'ZLIQUIDACION'.
WA_INPUT-LOGICAL_KEY = 'ZLIQUIDACIONX'.
ELSE.
WA_INPUT-LOGICAL_KEY = it_appointment-APPT_TYPE.
ENDIF.
WA_NOMBRES-FIELDNAME = 'DURATION'.
INSERT WA_NOMBRES INTO TABLE WA_INPUT-FIELD_NAMES.
INSERT WA_INPUT INTO TABLE CT_INPUT.
wa_input-fieldname = 'DURATION'.
append wa_input to ct_input.
endloop.
Fin JCF 19/12/2003 Incorporar funcionalidad fechas de ZSUBIROFERTA
Inicio modificacion jgarciar 11122006 ********************
rellenar tabla input_fields con datos de CONDITION_COM
loop at it_preciopos.
CT_INPUT-REF_GUID = it_preciopos-REF_GUID.
CT_INPUT-REF_KIND = 'B'.
CT_INPUT-OBJECTNAME = 'CONDITION_COM'.
CT_INPUT-FIELDNAME = 'CURRENCY'.
append CT_INPUT.
CT_INPUT-REF_GUID = it_preciopos-REF_GUID.
CT_INPUT-REF_KIND = 'B'.
CT_INPUT-OBJECTNAME = 'CONDITION_COM'.
CT_INPUT-FIELDNAME = 'COND_TYPE'.
append CT_INPUT.
CT_INPUT-REF_GUID = it_preciopos-REF_GUID.
CT_INPUT-REF_KIND = 'B'.
CT_INPUT-OBJECTNAME = 'CONDITION_COM'.
CT_INPUT-FIELDNAME = 'COND_RATE'.
append CT_INPUT.
CT_INPUT-REF_GUID = it_preciopos-REF_GUID.
CT_INPUT-REF_KIND = 'B'.
CT_INPUT-OBJECTNAME = 'CONDITION_COM'.
CT_INPUT-FIELDNAME = 'COND_P_UNT'.
append CT_INPUT.
endloop.
rellenar tabla input_fields con datos de sales
loop at it_sales.
CT_INPUT-REF_GUID = it_sales-REF_GUID.
CT_INPUT-REF_KIND = it_sales-REF_KIND.
CT_INPUT-OBJECTNAME = 'SALES'.
CT_INPUT-FIELDNAME = 'PO_NUMBER_SOLD'.
append CT_INPUT.
endloop.
rellenar tabla input_fields con datos de pricing
loop at IT_PRICING.
CT_INPUT-REF_GUID = it_pricing-REF_GUID.
CT_INPUT-REF_KIND = it_pricing-REF_KIND.
CT_INPUT-OBJECTNAME = 'PRICING'.
CT_INPUT-FIELDNAME = 'PRICE_DATE'.
append CT_INPUT.
endloop.
rellenar tabla input_fields con datos de organización
loop at IT_ORGANIZ.
CT_INPUT-REF_GUID = it_organiz-REF_GUID.
CT_INPUT-REF_KIND = 'A'.
CT_INPUT-OBJECTNAME = 'ORGMAN'.
CT_INPUT-FIELDNAME = 'SALES_ORG_RESP'.
append CT_INPUT.
endloop.
LLenar tabla scheduline.
loop at it_repartos.
ct_input-REF_GUID = it_repartos-ITEM_GUID.
ct_input-REF_KIND = 'B'.
ct_input-OBJECTNAME = 'SCHEDLIN'.
ct_input-FIELDNAME = 'QUANTITY'.
append ct_input.
endloop.
Fin modificacion jgarciar 11122006 ********************
ENDFORM. " rellenar_input_fields -
Error in updationg the opportunity in data Migration program
Hi,
I am getting an error in updationg the opportunity in data Migration program. I am using
CALL FUNCTION 'BAPI_BUSPROCESSND_CHANGEMULTI'
TABLES
HEADER = li_header
ITEM = lt_bapibus20001_item
OPPORTUNITY = lt_bapibus20001_opportunity
INPUT_FIELDS = lt_bapibus20001_input_fields
PARTNER = lt_bapibus20001_partner_ins
STATUS = lt_bapibus20001_status_ins
PRICING = li_pricing
TEXT = li_text
RETURN = lt_bapiret2.
after save when it is to be commited. I am getting the following error.
Express Document: Updation terminated author by "XYZ"
Thanks in advance.HI Piyush,
Tyr to use CRM_order_maintain. If you are trying to change partner,pricing,status,header,item then ORDER_MAINTAIN is the good one to use.
Its very easy to identify the parameters that need to be populated for this FM -
Iam using bapi_busprocessnd_changemulti followed by bapi_busprocessnd_save for cancellation of contract.
But, my contract is not cancelled as I was passing cancproc, canc_reason, cancparty, cancrequst and cancrequst_tz to the bapi. And iam appending the input fields as well.
Pls. help me regd this.
Thanks,
VinodHi,
Iam not passing the status.
My code is like this.
Declared w_cancel and w_cancel_ir.
*contract cancellation
w_cancel-ref_guid = header_guid.
*w_cancel-guid = zguid_32.
w_cancel-cancproc = 'Zxxx'.
w_cancel-canc_reason = 'Zxxx'.
w_cancel-cancparty = 'Zxxx'.
w_cancel-CANCREQUEST = '20060606114300'.
w_cancel-CANCREQUEST_TZ = 'GMTUK'.
append w_cancel to it_cancel.
w_cancel_ir-ref_guid = header_guid.
w_cancel_ir-canc_guid = zguid_32. "->created using guid_create FM.
append w_cancel_ir to it_cancel_ir.
And Iam passing to input fields as below:
*input fields for cancellation of contract
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'REF_GUID'.
append w_inpfields to it_inpfields.
*w_inpfields-ref_guid = header_guid.
*w_inpfields-ref_kind = 'A'."for header
*w_inpfields-objectname = 'CANCEL'.
*w_inpfields-fieldname = 'GUID'.
*append w_inpfields to it_inpfields.
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'CANCPROC'.
append w_inpfields to it_inpfields.
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'CANC_REASON'.
append w_inpfields to it_inpfields.
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'CANC_PARTY'.
append w_inpfields to it_inpfields.
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'CANCREQUEST'.
append w_inpfields to it_inpfields.
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'CANCREQUEST_TZ'.
append w_inpfields to it_inpfields.
*input fields for cancel_ir
w_inpfields-ref_guid = header_guid.
w_inpfields-ref_kind = 'A'."for header
w_inpfields-objectname = 'CANCEL'.
w_inpfields-fieldname = 'CANC_GUID'.
append w_inpfields to it_inpfields.
Please check this asap.
Maybe you are looking for
-
Game center ios7 problems (achievements out of sync)
There are many serious bugs in Game Center for iOS7. None of the deficiencies of GC on iOS6 were addressed, and new crashes, hangs, and other bugs were added. It's as if Apple couldn't care less that games are the single biggest category of apps se
-
Delivery completed" indicator cannot be set for item 00001
Hi all, I have done a inter company stock transfer order , with respect to that Order I made Outbound delivery and posted GR with respect to outbound delivery. I have done MIRO for PO for all the Item , Now I need to return some material to
-
Collective Outputs for sales orders
hi, Please can anybody help me to find out the outputs collectively for Sales Order.
-
I need to see what is in a cookiefile, where are cookies stored?
I need to know where are cookie files stored, so I can study what is inside them(cookiefile).
-
[Editors: text editor] KVim
# Packager: Dawid Ciezarkiewicz "arael" <arael[at]fov[dot]pl> pkgname=kvim pkgver=6.2.14 pkgrel=1 pkgdesc="KVim is a port of Vim to the KDE" url="http://www.freehackers.org/kvim/index.html" depends=(qt) makedepends=() conflicts=() replaces=(vim) back