Activity through BAPI_ACTIVITYCRM_CREATEMULTI or CRM_ORDER_MAINTAIN
Hi All,
I have to create activity from Legacy file, so which one would be convenient as FM CRM_ORDER_MAINTAIN is a generic FM and it can create Opprtunity,Activity etc.and there is a BAPI FM ( which creates Activity )BAPI_ACTIVITYCRM_CREATEMULTI .What Should one use in a conversion program in which input is in a fixed length file format.
Thanks & Regards.
Paul Dibs.
Hi Koushik,
Thanks for the reply,
But still I need to know what are the specific difference between the two function module.Even in CRM_ORDER MAINTAIN I am able to get all those Structure with which I am working in BAPIACTIVITYCRM_CREATEMULTI. I know all the other CRM Business transaction can be created through CRM_ORDER_MAINTAIN. If you could explain a bit detail in what context one should use CRM_ORDER MAINTAIN and BAPIACTIVITYCRM_CREATEMULTI.
Similar Messages
-
my phone is activated through carrier and has been working, just recently it is saying no service as the SIM card is not provisioned. how do i fix this?
Now 1st make sure there is nothing wrong on the carrier side
2nd make sure sim card works and make sure sim trey is not damaged some how.
Try settings>general>reset>reset network settings
Try as well a restore as new and with the iPhone as it was when you 1st got it see if you have service, if not go o an apple store or call apple care.
Try all that in that same order, and test it afterwards.
Hope that helps -
Add Text to Activity using BAPI_ACTIVITYCRM_CREATEMULTI
All:
I am creating activities as part of a data load.
One of the requirements is to assign text to a text type associated with an activity journal. However, I am struggling with this last piece of the puzzle.
I have lifted most of my code from the program "CRM_CALL_ACTIVITY_INTERFACE". Unfortunately, the demo program does not include parameters for passing text.
The snippet below is from my workup program.
Any ideas why the text is not making through the bapi?
data: text type standard table of BAPIBUS20001_TEXT_INS,
wa_text type BAPIBUS20001_TEXT_INS,
TEXTX type standard table of BAPIBUS20001_TEXT_INSX,
wa_TEXTX type BAPIBUS20001_TEXT_INSX.
TEXT
wa_text-ref_Guid = wa_header-GUID.
wa_text-tdid = '0200'.
wa_text-tdspras = 'E'.
wa_text-tdline = 'This is my test text.'.
wa_text-tdstyle = 'SYSTEM'.
wa_text-tdform = 'SYSTEM'.
wa_text-mode = 'I'. "guess
wa_text-tdformat = '*'.
append wa_text to text.
wa_textx-ref_guid = 'X'.
wa_textx-tdid = 'X'..
wa_textx-tdspras = 'X'.
wa_textx-tdline = 'X'.
wa_textX-tdstyle = 'X'.
wa_textX-tdform = 'X'.
wa_textx-mode = 'X'.
wa_textx-tdformat = 'X'.
append wa_textx to textx.
CALL FUNCTION 'BAPI_ACTIVITYCRM_CREATEMULTI'
TABLES
HEADER = header
HEADERX = headerx
PARTNER = partner
PARTNERX = partnerx
ORGANISATION =
ORGANISATIONX =
DATE =
DATEX =
TEXT = text
TEXTX = textx
REASON =
REASONX =
OUTCOME =
OUTCOMEX =
STATUS =
STATUSX =
LOCATION =
LOCATIONX =
INPUT_FIELDS =
CREATED_PROCESS = CREATEDPROCESS
RETURN = return
DOCUMENT_FLOW =
JOURNAL = journal
JOURNALX = journalx
MATERIAL = material
MATERIALX = materialx
EXTENSIONIN = lt_extensionin
Thanks in advance.Mauricio:
Pardon me. You were right about the GUID. I haven't gone through a deep debug, but the results are there.
The GUID is generated a the start of the program and passed to all of the tables required by the function module. This follows the logic laid out in the demo program.
Following your logic, I removed the generated GUID from the table TEXT. Poof my item text appeared in the new generated activity journal.
Thanks for your help.
RM
I have included my code for anyone's perusal. No warranties implied or expressed. Use at you own risk.
*& Report Z_LOAD_ACTIVITIES_FROMDATA *
REPORT Z_LOAD_ACTIVITIES_FROMDATA .
data: header type standard table of BAPIBUS2000110_HEADER_INS,
wa_header type BAPIBUS2000110_HEADER_INS,
headerX type standard table of BAPIBUS2000110_HEADER_INSX,
wa_headerX type BAPIBUS2000110_HEADER_INSX,
partner type standard table of BAPIBUS20001_PARTNER_INS,
wa_partner type BAPIBUS20001_PARTNER_INS,
PARTNERX type standard table of BAPIBUS20001_PARTNER_INSX,
wa_partnerx type BAPIBUS20001_PARTNER_INSX,
return type standard table of BAPIRET2,
MATERIAL type standard table of BAPIBUS2000110_MATERIAL,
wa_MATERIAL type BAPIBUS2000110_MATERIAL,
MATERIALX type standard table of BAPIBUS2000110_MATERIALX ,
wa_MATERIALX type BAPIBUS2000110_MATERIALX,
EXTENSIONIN type standard table of BAPIPAREX,
wa_EXTENSIONIN type BAPIPAREX,
JOURNAL type standard table of BAPIBUS2000110_JOURNAL,
wa_JOURNAL type BAPIBUS2000110_JOURNAL,
JOURNALX type standard table of BAPIBUS2000110_JOURNALX,
wa_JOURNALX type BAPIBUS2000110_JOURNALX,
text type standard table of BAPIBUS20001_TEXT_INS,
wa_text type BAPIBUS20001_TEXT_INS,
TEXTX type standard table of BAPIBUS20001_TEXT_INSX,
wa_TEXTX type BAPIBUS20001_TEXT_INSX.
constants: gc_lenstruc type i value 30.
constants: begin of gc_bapi_te,
activity_i type crmt_object_name value
'BAPI_TE_CRMD_ACTIVITY_I',
activity_ix type crmt_object_name value
'BAPI_TE_CRMD_ACTIVITY_IX',
product_i type crmt_object_name value
'BAPI_TE_CRMD_PRODUCT_I',
lead_h type crmt_object_name value
'BAPI_TE_CRMD_LEAD_H',
opport_h type crmt_object_name value
'BAPI_TE_CRMD_OPPORT_H',
orderadm_h type crmt_object_name value
'BAPI_TE_CRMD_ORDERADM_H',
orderadm_i type crmt_object_name value
'BAPI_TE_CRMD_ORDERADM_I',
shipping type crmt_object_name value
'BAPI_TE_CRMD_SHIPPING',
sales type crmt_object_name value
'BAPI_TE_CRMD_SALES',
schedlin type crmt_object_name value
'BAPI_TE_CRMD_SCHEDLIN',
pricing type crmt_object_name value
'BAPI_TE_CRMD_PRICING',
pricing_i type crmt_object_name value
'BAPI_TE_CRMD_PRICING_I',
billing type crmt_object_name value
'BAPI_TE_CRMD_BILLING',
ordprp_i type crmt_object_name value
'BAPI_TE_CRMD_ORDPRP_I',
end of gc_bapi_te.
* My structure for loading the journal
data: ls_activity_i_add_fields type zzcrmt_activity_i_add_fields,
ls_te_activity_i type bapi_te_crmd_activity_i,
ls_te_activity_ix type bapi_te_crmd_activity_ix,
ls_extensionin type bapiparex,
lt_extensionin type table of bapiparex.
data: ls_activity_bapi type bapibus2000110_header_ins,
lt_return2 type standard table of bapiret2,
createdProcess type standard table of BAPIBUS20001_HEADER_INS.
field-symbols: <lv_anyfield> type simple,
<lv_flagfield> type simple,
<lv_fn> type any,
<lv_ft> type any.
data:
laeng type zzcrmt_activity_i_add_fields-laeng,
breit type zzcrmt_activity_i_add_fields-breit,
hoehe type zzcrmt_activity_i_add_fields-hoehe,
meabm type zzcrmt_activity_i_add_fields-meabm,
prava type zzcrmt_activity_i_add_fields-prava,
pravb type zzcrmt_activity_i_add_fields-pravb,
subjecta type zzcrmt_activity_i_add_fields-subjecta,
subjectb type zzcrmt_activity_i_add_fields-subjectb,
result type zzcrmt_activity_i_add_fields-kv_result,
resreas type zzcrmt_activity_i_add_fields-resreas,
kv_deko type zzcrmt_activity_i_add_fields-kv_deko,
dekotp type zzcrmt_activity_i_add_fields-dekotp,
kv_stock type zzcrmt_activity_i_add_fields-kv_stock,
posloc type zzcrmt_activity_i_add_fields-posloc,
kv_zpanz type zzcrmt_activity_i_add_fields-kv_zpanz,
kv_zpava type zzcrmt_activity_i_add_fields-kv_zpava,
nrmshf type zzcrmt_activity_i_add_fields-nrmshf,
nrpshf type zzcrmt_activity_i_add_fields-nrpshf,
posver type zzcrmt_activity_i_add_fields-posver,
poshor type zzcrmt_activity_i_add_fields-poshor,
posqli type zzcrmt_activity_i_add_fields-posqli,
ecropt type zzcrmt_activity_i_add_fields-ecropt,
nroffac type zzcrmt_activity_i_add_fields-nroffac,
faclen type zzcrmt_activity_i_add_fields-faclen,
facwid type zzcrmt_activity_i_add_fields-facwid,
facdep type zzcrmt_activity_i_add_fields-facdep,
facunit type zzcrmt_activity_i_add_fields-facunit,
sprice type zzcrmt_activity_i_add_fields-sprice,
oprice type zzcrmt_activity_i_add_fields-oprice,
aprice type zzcrmt_activity_i_add_fields-aprice,
kvcurr1 type zzcrmt_activity_i_add_fields-kvcurr1,
phrefnr type zzcrmt_activity_i_add_fields-phrefnr,
storno type zzcrmt_activity_i_add_fields-storno,
lbval type zzcrmt_activity_i_add_fields-lbval,
grade type ZZCRMT_ACTIVITY_I_ADD_FIELDS-grade,
trade_name type ZZCRMT_ACTIVITY_I_ADD_FIELDS-grade.
data: logsys type bapibus20001_doc_flow_ins-logsys_a.
data: lr_structdescr_bapi_te type ref to cl_abap_structdescr,
lr_structdescr_add_fields type ref to cl_abap_structdescr,
lv_component like line of cl_abap_structdescr=>components.
* INITIALIZATION *
initialization.
data: lv_datum(10) type c,
lv_uzeit(6) type c..
write: sy-datum to lv_datum dd/mm/yyyy,
sy-uzeit to lv_uzeit using edit mask '__:__'..
call function 'OWN_LOGICAL_SYSTEM_GET'
importing
own_logical_system = logsys
exceptions
others = 0.
lr_structdescr_bapi_te ?= cl_abap_typedescr=>describe_by_data(
ls_te_activity_i ).
lr_structdescr_add_fields ?= cl_abap_typedescr=>describe_by_data(
ls_activity_i_add_fields ).
start-of-selection.
* Test journal entries
subjecta = 'Z000000001'.
subjectb = 'Z007'.
FACUNIT = 'KG'.
grade = '200%'.
trade_name = 'Chlorine Tonner'.
call function 'GUID_CREATE'
importing
ev_guid_32 = wa_header-GUID.
* My Activity Type
wa_header-PROCESS_TYPE = 'ZCON'.
wa_header-description = 'This is my bapi test'.
* My Activity Category
wa_header-CATEGORY = 'Z01'.
wa_header-PRIORITY = '5'.
wa_header-posting_date = sy-datum.
wa_header-MODE = 'A'.
wa_header-direction = 0.
append wa_header to header.
wa_headerx-GUId = 'X'.
wa_headerx-PROCESS_TYPE = 'X'.
wa_headerx-DESCRIPTION = 'X'.
wa_headerx-CATEGORY = 'X'.
wa_headerx-PRIORITY = 'X'.
wa_headerx-OBJECTIVE = 'X'.
wa_headerx-POSTING_DATE = 'X'.
wa_headerx-MODE = 'X'.
wa_headerx-DIRECTION = 'X'.
append wa_headerx to headerx.
wa_partner-ref_guid = wa_header-GUID.
wa_partner-REF_KIND = 'A'.
wa_partner-REF_PARTNER_HANDLE = '0001'.
wa_partner-PARTNER_FCT = '00000009'.
wa_partner-partner_no = '45000181'.
wa_partner-NO_TYPE = 'BP'.
wa_partner-DISPLAY_TYPE = 'BP'.
append wa_partner to partner.
wa_partner-REF_PARTNER_HANDLE = '0002'.
wa_partner-PARTNER_FCT = '00000022'.
*User Name
wa_partner-partner_no = 'RMYERS'.
wa_partner-NO_TYPE = 'US'.
wa_partner-DISPLAY_TYPE = 'US'.
append wa_partner to partner.
wa_partnerx-REF_GUID = 'X'.
wa_partnerx-REF_KIND = 'X'.
wa_partnerx-REF_PARTNER_HANDLE = 'X'.
wa_partnerx-PARTNER_FCT = 'X'.
wa_partnerx-PARTNER_NO = 'X'.
wa_partnerx-NO_TYPE = 'X'.
wa_partnerx-DISPLAY_TYPE = 'X'.
append wa_partnerx to partnerx.
wa_material-header = wa_header-GUID.
wa_material-handle = 1.
*Product GUID
wa_material-product ='A105BA8D09107646BF7C58408DCECEFA'.
wa_material-ORDERED_PROD = '90000113'.
* using volume not quanitiy fileds
wa_material-volume = 100.
* wa_material-QUANTITY = 100.
append wa_material to material.
wa_materialx-HANDLE = 'X'.
wa_materialx-PRODUCT = 'X'.
wa_materialx-HEADER = 'X'.
wa_materialx-volume = 'X'.
wa_material-ORDERED_PROD = 'X'.
wa_materialx-QUANTITY = 'X'.
append wa_materialx to materialx.
data j_guid like wa_JOURNAL-journal_guid.
j_guid = 'B845C68411370348807A9C46F74A756C'.
wa_JOURNAL-ref_handle = '0000000001'.
* My journal GUID
wa_JOURNAL-journal_guid = 'B845C68411370348807A9C46F74A756C'.
append wa_journal to journal.
wa_JOURNALX-journal_guid = 'X'.
wa_JOURNALX-ref_handle = 'X'.
append wa_JOURNALX to journalx.
move: laeng to ls_activity_i_add_fields-laeng,
breit to ls_activity_i_add_fields-breit,
hoehe to ls_activity_i_add_fields-hoehe,
meabm to ls_activity_i_add_fields-meabm,
prava to ls_activity_i_add_fields-prava,
pravb to ls_activity_i_add_fields-pravb,
subjecta to ls_activity_i_add_fields-subjecta,
subjectb to ls_activity_i_add_fields-subjectb,
result to ls_activity_i_add_fields-kv_result,
resreas to ls_activity_i_add_fields-resreas,
kv_deko to ls_activity_i_add_fields-kv_deko,
dekotp to ls_activity_i_add_fields-dekotp,
kv_stock to ls_activity_i_add_fields-kv_stock,
posloc to ls_activity_i_add_fields-posloc,
kv_zpanz to ls_activity_i_add_fields-kv_zpanz,
kv_zpava to ls_activity_i_add_fields-kv_zpava,
nrmshf to ls_activity_i_add_fields-nrmshf,
nrpshf to ls_activity_i_add_fields-nrpshf,
posver to ls_activity_i_add_fields-posver,
poshor to ls_activity_i_add_fields-poshor,
posqli to ls_activity_i_add_fields-posqli,
ecropt to ls_activity_i_add_fields-ecropt,
nroffac to ls_activity_i_add_fields-nroffac,
faclen to ls_activity_i_add_fields-faclen,
facwid to ls_activity_i_add_fields-facwid,
facdep to ls_activity_i_add_fields-facdep,
facunit to ls_activity_i_add_fields-facunit,
sprice to ls_activity_i_add_fields-sprice,
oprice to ls_activity_i_add_fields-oprice,
aprice to ls_activity_i_add_fields-aprice,
kvcurr1 to ls_activity_i_add_fields-kvcurr1,
phrefnr to ls_activity_i_add_fields-phrefnr,
storno to ls_activity_i_add_fields-storno,
lbval to ls_activity_i_add_fields-lbval,
grade to ls_activity_i_add_fields-grade,
trade_name to ls_activity_i_add_fields-trade_name.
move-corresponding ls_activity_i_add_fields to ls_te_activity_i.
include: crm_bapi_eewfields_move.
while sy-subrc eq 0. "// Set the X-flags generic
assign component sy-index of structure ls_te_activity_i to
<lv_anyfield>.
if sy-subrc eq 0.
if not <lv_anyfield> is initial.
assign component sy-index of structure ls_te_activity_ix to
<lv_flagfield> casting type bapiupdate.
if sy-subrc eq 0.
<lv_flagfield> = 'X'.
endif.
endif.
endif.
endwhile.
if not ls_te_activity_ix is initial.
ls_te_activity_i-ref_handle = ls_te_activity_ix-ref_handle = 1.
ls_te_activity_i-journal_guid = ls_te_activity_ix-journal_guid = j_guid
call method cl_abap_container_utilities=>fill_container_c
exporting
im_value = ls_te_activity_i
importing
ex_container = ls_extensionin+gc_lenstruc
exceptions
illegal_parameter_type = 1
others = 2.
move gc_bapi_te-activity_i to ls_extensionin-structure.
append ls_extensionin to lt_extensionin.
call method cl_abap_container_utilities=>fill_container_c
exporting
im_value = ls_te_activity_ix
importing
ex_container = ls_extensionin+gc_lenstruc
exceptions
illegal_parameter_type = 1
others = 2.
move gc_bapi_te-activity_ix to ls_extensionin-structure.
append ls_extensionin to lt_extensionin.
endif.
* TEXT
* wa_text-ref_Guid = wa_header-GUID.
wa_text-ref_handle = '0000000001'.
wa_text-REF_KIND = 'B'.
wa_text-tdid = '0200'.
wa_text-tdspras = 'E'.
wa_text-tdline = 'This is my test text.'.
wa_text-tdstyle = 'SYSTEM'.
wa_text-tdform = 'SYSTEM'.
wa_text-mode = 'B'. "guess
wa_text-tdformat = '*'.
append wa_text to text.
* wa_textx-ref_guid = 'X'.
wa_textx-REF_KIND = 'X'.
wa_textx-tdid = 'X'..
wa_textx-tdspras = 'X'.
wa_textx-tdline = 'X'.
wa_textX-tdstyle = 'X'.
wa_textX-tdform = 'X'.
wa_textx-mode = 'X'.
wa_textx-tdformat = 'X'.
append wa_textx to textx.
data: ls_process_settings type bapibus20001_procsettings,
lt_created_header type table of bapibus20001_header_ins,
ls_created_header type bapibus20001_header_ins.
ls_process_settings-msglevel = 8 ."gc_msglevel-administrator.
ls_process_settings-save = 'X' . "true.
call function 'BAPI_BUSPROCESSND_PROCSETTINGS'
exporting
process_settings_in = ls_process_settings
tables
return = lt_return2.
CALL FUNCTION 'BAPI_ACTIVITYCRM_CREATEMULTI'
TABLES
HEADER = header
HEADERX = headerx
PARTNER = partner
PARTNERX = partnerx
* ORGANISATION =
* ORGANISATIONX =
* DATE =
* DATEX =
TEXT = text
TEXTX = textx
* REASON =
* REASONX =
* OUTCOME =
* OUTCOMEX =
* STATUS =
* STATUSX =
* LOCATION =
* LOCATIONX =
* INPUT_FIELDS =
CREATED_PROCESS = CREATEDPROCESS
RETURN = return
* DOCUMENT_FLOW =
JOURNAL = journal
JOURNALX = journalx
MATERIAL = material
MATERIALX = materialx
EXTENSIONIN = lt_extensionin
if sy-subrc = 0 .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
endif.
field-symbols: <cp> type BAPIBUS20001_HEADER_INS,
<rt> type BAPIRET2.
loop at createdprocess assigning <cp>.
write: / <cp>-OBJECT_ID,
<cp>-description.
endloop.
loop at return assigning <rt>.
write:/ <rt>-message.
endloop. -
Date Issue while creating Activity using BAPI_ACTIVITYCRM_CREATEMULTI
Hi,
I'm creating an activity using BAPI BAPI_ACTIVITYCRM_CREATEMULTI and this is working fine. The only thing which is not reflecting in the activity is the date which I'm passing to this BAPI. The system always puts the default date, which is system date.
Below are the parameters I'm passing in DATE and DATEX parameters of BAPI_ACTIVITYCRM_CREATEMULTI. Let me know if I'm doing something wrong.
Can someone help me? Any help in resolving this would be appreciated and rewarded with points. Thanks!
lt_date-ref_handle = lt_header-handle. "handle for activity
lt_date-ref_kind = 'A'. "Adm header
lt_date-appt_type = 'ORDERACTUAL'. "Order actual date type
lt_date-date_from = '20060120'. "e.g.
lt_date-time_from = '1200000'. "e.g.
lt_date-date_to = '20060120'."e.g.
lt_date-time_to = '1200000'. "e.g.
lt_date-show_local = 'X'.
lt_date-mode = 'A'."Create
lt_datex-ref_handle = 'X'.
lt_datex-ref_kind = 'X'.
lt_datex-appt_type = 'X'.
lt_datex-date_from = 'X'.
lt_datex-time_from = 'X'.
lt_datex-date_to = 'X'.
lt_datex-time_to = 'X'.
lt_datex-show_local = 'X'.
lt_datex-mode = 'X'.
append: lt_date, lt_datex.
Regards,
SandeepHi,
Here is a sample code for you.
*& Report YAM_TEST_CONT_END_DATE *
REPORT yam_test_cont_end_date .
DATA: lit_header_guid TYPE crmt_object_guid_tab,
lit_appointment TYPE crmt_appointment_comt,
lit_status_comt TYPE crmt_status_comt,
wa_status_comt LIKE LINE OF lit_status_comt.
DATA : lit_ret TYPE TABLE OF bapiret2,
lit_obj_to_save TYPE TABLE OF bapibus20001_guid_dis,
lit_saved_obj TYPE TABLE OF bapibus20001_object_id.
DATA: lv_header_guid TYPE crmt_object_guid,
lv_item_guid TYPE crmt_object_guid,
lv_timestamp(15) TYPE c.
DATA: lit_fname TYPE crmt_input_field_names_tab,
wa_fname TYPE crmt_input_field_names.
DATA: lit_input TYPE crmt_input_field_tab,
wa_input TYPE crmt_input_field.
DATA: wa_appointment TYPE crmt_appointment_com,
wa_logical_date_key TYPE crmt_date_logical_date_key.
CONSTANTS: lc_end TYPE crmt_apptype VALUE 'CONTEND',
lc_appt TYPE crmt_fieldname VALUE 'APPT_TYPE',
lc_from TYPE crmt_fieldname VALUE 'TIMESTAMP_FROM',
lc_to TYPE crmt_fieldname VALUE 'TIMESTAMP_TO',
lc_obj TYPE crmt_object_name VALUE 'APPOINTMENT',
lc_tzone_from(13) TYPE c VALUE 'TIMEZONE_FROM',
lc_tzone_to(11) TYPE c VALUE 'TIMEZONE_TO'.
PARAMETER: p_objid TYPE crmt_object_id.
START-OF-SELECTION.
* Get the HEADER GUID for the Contract Number
SELECT SINGLE guid
INTO lv_header_guid
FROM crmd_orderadm_h
WHERE object_id EQ p_objid.
CHECK sy-subrc EQ 0.
* Get the Item GUID for the HEADER GUID
SELECT SINGLE guid
INTO lv_item_guid
FROM crmd_orderadm_i
WHERE header EQ lv_header_guid.
CHECK sy-subrc EQ 0.
APPEND lv_header_guid TO lit_header_guid.
APPEND lv_header_guid TO lit_obj_to_save.
* Convert System date and time to timestamp
CONCATENATE sy-datum sy-uzeit INTO lv_timestamp.
* Setting Contract End Date
MOVE: lv_item_guid TO wa_appointment-ref_guid,
'B' TO wa_appointment-ref_kind,
'CONTEND' TO wa_appointment-appt_type,
lv_timestamp TO wa_appointment-timestamp_from,
lv_timestamp TO wa_appointment-timestamp_to,
sy-zonlo TO wa_appointment-timezone_to,
sy-zonlo TO wa_appointment-timezone_from.
* Filling the Input Fields for Appointment
wa_fname-fieldname = lc_appt.
INSERT wa_fname INTO TABLE lit_fname.
CLEAR: wa_fname.
wa_fname-fieldname = lc_from.
INSERT wa_fname INTO TABLE lit_fname.
CLEAR: wa_fname.
wa_fname-fieldname = lc_to.
INSERT wa_fname INTO TABLE lit_fname.
CLEAR: wa_fname.
wa_fname-fieldname = lc_tzone_from.
INSERT wa_fname INTO TABLE lit_fname.
CLEAR: wa_fname.
wa_fname-fieldname = lc_tzone_to.
INSERT wa_fname INTO TABLE lit_fname.
CLEAR: wa_fname.
wa_logical_date_key-appt_type = lc_end.
MOVE: lv_item_guid TO wa_input-ref_guid,
'B' TO wa_input-ref_kind,
lc_obj TO wa_input-objectname,
wa_logical_date_key TO wa_input-logical_key,
lit_fname TO wa_input-field_names.
APPEND wa_input TO lit_input.
CLEAR: wa_input, wa_logical_date_key.
APPEND wa_appointment TO lit_appointment.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_appointment = lit_appointment
it_status = lit_status_comt
CHANGING
ct_input_fields = lit_input
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
CHECK sy-subrc EQ 0.
* Saving the items alone
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
TABLES
objects_to_save = lit_obj_to_save
saved_objects = lit_saved_obj
return = lit_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
<b>Reward points if it helps.</b>
Regards,
Amit Mishra -
Adding Component, Activity, Changing Activity through BAPI
Hello Everyone,
I have a requirement to develop a FM which will use the standard BAPI's to create an Activity, Change the activity status, and also add a component to the activity.
Am using BAPI_BUS2002_SET_STATUS to set the status of the activity, understand have to use BAPI_PS_INITILIZATION with it.
Using BAPI_NETWORK_MAINTAIN to maintain the activity, BAPI_NETWORK_COMP_ADD to add the component.
But the sequence of the initiailzation that I have developed are not helping me update the all of the required data.
Basic question would be a procedure to update activity, activity status and create component.
If anybody has used the above BAPI's or developed similar applications would be very much helpful.
Regards,
PrashanthHi Koushik,
Thanks for the reply,
But still I need to know what are the specific difference between the two function module.Even in CRM_ORDER MAINTAIN I am able to get all those Structure with which I am working in BAPIACTIVITYCRM_CREATEMULTI. I know all the other CRM Business transaction can be created through CRM_ORDER_MAINTAIN. If you could explain a bit detail in what context one should use CRM_ORDER MAINTAIN and BAPIACTIVITYCRM_CREATEMULTI. -
Create activity and survey via 'CRM_ORDER_MAINTAIN'
Dears,
i am in CRM 6.0 now. i have decided to use FM 'CRM_ORDER_MAINTAIN' to create and change activity, also there is a import field named 'IT_SURVEY'. Now i want to batch upload the answers of the survey in a txt file to CRM and then create the survey and attach the survey to the activity.
After check program 'CRM_SURVEY_UI' which also use 'CRM_ORDER_MAINTAIN' to create activity and survey, i found SAP will convert your input to a rawstring. But the convertion is based on the HTML container(class gr_survey_html), my case is flat txt file. How could i realize the convertion ?
Any advice? I am so puzzled on this for a long time..
BR.Hi,
I have the same issue. Any suggerence with this topic?
Regards,
Mon
Edit: It is solved. CRM_ORDER_MAINTAIN allows introduce a survey in an activity.
Edited by: Mon on Apr 7, 2008 3:51 PM -
Unable To Relaese a Network Activity Through BAPI
Hi all,
I am in the process of creating an interface between SAP PS and primavera. I use bapis to create the wbs,network , activities etc.
In that process i need to release some activities after it gets created. If i do the same process in CJ20n and release an activity , automatically the parent wbs and the network of that activity goes into a partially released status.
But if i try to do it through bapi i get an error that the wbs element under which the activity is present is not in a partially released status. The bapi i am using to release the activities is BAPI_BUS2002_SET_STATUS.
Regards,
PrasannakumarWhy don't you use BDC for the same.
I have used BDC for the similar parent- child relationship in one of my assignment. As in BDC is the copy of standard txn it will not give this type of error.
I am not sure the technically how BAPI works. As per me BAPI only changes the status field of activity and try to save than in case of parent -child relationship error is natural & Usage of BAPI is not slove your perpose.
Regards
Nitin -
MAK activation through Proxy activate
dear all
good day
I'am using VAMT to activate all computers in my domain by using MAK activation, when I activate a windows 8.1 through "proxy activate" I found that the remaining activation count was decreased by 2 not by 1 when I apply the
confirmation ID.
while when iam using the same activation method to activate office pro 2010 it's work normally and decrease the activation count only by 1.
could any one help me and explain why is this happened and how to fix this problem.
thank youHi,
Did this happen for all computer with windows 8.1?
If you are activating a MAK key, you can retrieve the remaining number of activations for that key by selecting the MAK in the product key list in the center pane and then clicking
Refresh product key data online in the right-side pane. This retrieves the number of remaining activations for the MAK from Microsoft. Note that this step requires Internet access and that the remaining activation count can only be retrieved
for MAKs.
Regards.
Vivian Wang -
Windows XP activation through the internet
Hello,
I haven't used my Windows in quite a bit. I forgot whether I have or have not installed the drivers. I'd reckon I have... most probably. Either way, there's no way I could check it after the 30 day grace period is over... and I can't get into my Windows XP at all.
So, I'm trying to activate it through the internet... but I can't. I thought the problem might be because I'm counting on a protected wireless connection... so I tried using cable, but my Windows also still says that there's no internet connection detected.
Are these the only two workarounds to this problem:
1. Call up Microsoft so I could activate my Windows.
2. Reinstall Windows.
Is there no way I can get internet detection at all, at this juncture?
Thank you.Mulia:
I believe that you may not have installed the drivers. Did the internet ever work with your windows installation? If yes then you installed the drivers. If you never checked or it never worked then you may not have installed them.
Regardless of that, if you have an authentic Windows product then you can make a 10 minute or less call to Microsoft and get your WIndows activated. This will allow you back on the Windows desktop and then you can install the drivers and get on the internet. Without the installation of the drivers the internet connection will not work.
Axel F. -
Add Activity through di api with assigned to employee
Hello Experts
I am fresher to sap b1 add on development.I got a problem in Adding Activities through di api
the problem is i am not able to get handled by employee property .
by default contacts.handledby is taking assigned to USER but I required Employee.
thanks in advance.Hi,
In order to set the employee correctly, don't use the Contacts object, but instead use the Activity object.
In the Activity object there's a property called HandledByEmployee.
Note that in order to create an Activity object, you should use the ActivitiesService object.
Look here for an example.
Beni. -
Will the passwords on my iphone be deleted if icloud is reset through my mac, and the keychain was never activated?
iCloud email is just IMAP mail, so the mail messages are stored on the iCloud mail server, not on the device(s) used to read that mail. If you delete your iCloud account from one device, it does nothing but stop you reading that accounts mail on that device. It does not effect the other clients on on other devices with that email account active.
All you are doing is removing that account (ie. it's server and connection settings) from that device. You are not deleting the contents of the account on the IMAP server. -
Maintenance activity through command line
Hi All,
I'm trying to automate the "Maintenance plan". I was able to do it through GUI by logging into SQL studio.
But, I'm supposed to automate by embedding the SQL command into jython.
Would be greatfull if somebody can provide me complete steps for maintenance plan.
Below is the Maintenance plan I'm expecting for:
DBE – Full Backup
1. Schedule the job to run every night at 5 AM.
2. Configure the tasks in the following order: Back Up Database (Full),
Maintenance Cleanup Task (3 days) and Clean Up History (older than 4
weeks).
DBE – Integrity Checks
1. Schedule the job to run every Saturday night at 6 AM.
2. Configure the tasks in the following order: Check Database Integrity and
Update Statistics.
DBE – Optimization
1. Schedule the job to run every Saturday night at 10 PM.
2. Configure the tasks in the following order: Rebuild Index.Once DB is created, we perform post-installation activity, which includes creating maintenance plan. After which we release the server into production. That's when "SQL DBA's" come into picture.
I have done some research and finally got something, please help me in refining the below:
USE master;
GO
EXEC dbo.DatabaseBackup
@Databases = 'USER_DATABASES',
@Directory = 'E:\Backup',
@BackupType = 'FULL',
@Verify = 'Y',
@Compress = 'Y',
@CheckSum = 'Y'
GO
EXECUTE dbo.DatabaseIntegrityCheck
@Databases = 'USER_DATABASES',
@CheckCommands = 'CHECKDB',
@PhysicalOnly = 'Y'
GO
EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30,
@UpdateStatistics = 'ALL',
@OnlyModifiedStatistics = 'Y'
GO
EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES',
@FragmentationLow = NULL,
@FragmentationMedium = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 = 5,
@FragmentationLevel2 = 30
the last two steps are redundant.. you do not both of them..just have one of them..
Hope it Helps!! -
Knowing which space is active through applescript or ?
Is there a way to know which of my x spaces is "on screen" through an applescript (or else) to take actions according to this information ?
Thankswhen running this shell script
defaults read com.apple.spaces
I get a "current space" information together with uuid (or wsid for the baseic space) for my different spaces, however this current doesn't change when the space used is changed, unless (and not always) I move the app running the script in this new space (seems to be linked to the space in which Alfred, terminal or applescript or else eg. bbedit shell sheets are running - am I right ?).
Any help very much appreciated on this
Thanks -
Needs to Trace user activity through firewall.
Hello,
I am using Cisco ASA firewall to connect remote users to Data Centers.
I want to capture only below mentioned two types of logs and save it to a Server.
# Who logged in through VPN.
# They accessed with servers in inside network.
Please provide me an overview, how I can filter only those two messages and send it to remote server.
Thanks in advancehi,
you can use the same command but specify which VPN type you want to see, either webvpn (aka SSL VPN), anyconnect or RA VPN.
see sample below:
ciscoasa# show vpn-sessiondb anyconnect
Session Type: AnyConnect
Username : anyconnect-user Index : 1
Assigned IP : 10.1.1.10 Public IP : 192.168.1.17
Protocol : IKEv2 IPsecOverNatT Clientless
License : AnyConnect Premium
Encryption : IKEv2: (1)AES256 IPsecOverNatT: (1)AES256 Clientless: (1)RC4
Hashing : IKEv2: (1)SHA1 IPsecOverNatT: (1)SHA1 Clientless: (1)SHA1
Bytes Tx : 51620 Bytes Rx : 98124
Group Policy : GroupPolicy_ANYCONNECT-PROF
Tunnel Group : ANYCONNECT-PROF
Login Time : 16:28:49 SGT Tue May 13 2014
Duration : 0h:03m:45s
Inactivity : 0h:00m:00s
NAC Result : Unknown
VLAN Mapping : N/A VLAN : none -
Play button active through quiz
In my project the user is able to skip through a quiz by clicking the play button and selecting an answer. How do I disable the play button so the user is forced to take the quiz? I am using Captivate 7. Thank you for your time!
Just had another thought. I tested on Cp7 with a quiz set to Answer All required and it would not allow me to go to the next question until I had selected an answer and clicked the Submit button.
If you're not seeing this same behaviour, then something about your quiz questions is broken. Have you by any chance removed or replaced the default Question Title or Question Text captions that come with each quiz question? If so, that might be causing your issue.
Maybe you are looking for
-
DSO error while creating update rules
Hi All, i am new to BI 7.0 , while creating update rules for datastore object , i have given the infosource name, and tried to activate it, then i got the error, ERROR: infoobject 0recordmode is missing from the infosourse Can any one help
-
Import map issue one record at a time
Hello Experts, I built an import map to run it manually with import manager, but when I click on Ready to Import, the import manager is doing one record at a time. I have to go back to the match tab and refresh in order to import the rest. Any idea
-
Can I transfer Video 8 to Hi8/Digital?
I was transfering all my old 8 mm cassettes filmed on predigital Sony camcorders to Hi8/Digital, but my Sony TRV120 started playing the tapes back all jerky, or with lots of noise and lines. The small amount of research I did made me think it would b
-
Re: Destiny DLC shader for pre order of advanced warfare.
Anyone happen to have a shader code they are not using? I'm a huge destiny fan and I'll give the shader a good home
-
Set value of bean objects inthe other beans
Hi i have a session scope bean "mySessionScopeBean" . in this bean i have a String value . Now How can i set its value from other beans . I searched and find this stufff code for get value : Map<String, Object> viewScope =AdfFacesContext.getCurrentIn