on 09-30-2014 6:23 PM
Hi,
Can we delete text logs in an opportunity?
If yes, please guide me with the steps.
Regards,
Sayan
Hi Sayan/Anji,
To delete the log, you have to delete the text type for which the log has been maintained , i.e. Text type 'P'. This will delete Text type 'R' automatically.
data: lv_transaction_id TYPE crmt_object_id,
lv_guid TYPE crmt_object_guid,
lv_tdname TYPE string,
lt_data TYPE TABLE OF stxl,
ls_stxl TYPE stxl.
lv_transaction_id = 'your transaction id/opportunity id /sales order id '.
SELECT SINGLE guid FROM crmd_orderadm_h INTO lv_guid WHERE object_id = lv_transaction_id.
lv_tdname = lv_guid.
CONCATENATE lv_tdname '%' INTO lv_tdname.
SELECT * FROM stxl INTO TABLE lt_data WHERE tdname LIKE lv_tdname
AND tdid = 'ZABC'. "tdid of text type 'P'
LOOP AT lt_data INTO ls_stxl.
DELETE FROM stxl CLIENT SPECIFIED
WHERE relid = 'TX'
AND mandt = sy-mandt
AND tdobject = ls_stxl-tdobject
AND tdname = ls_stxl-tdname
AND tdid = ls_stxl-tdid
AND tdspras = ls_stxl-tdspras.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sayan,
Are you able to delete the Text type "Log". I too want to delete the text type "Log". But couldnt find this in Text (STXH/STXL) tables.
Thank you
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can delete them as long as you have the authorization to do it
I guess you mean by program, in that case I would suggest to put a break point in the FM CRM_ORDER_MAINTAIN, delete the text from WebUI or SAP GUI (CRMD_ORDER), and check the input parameters, once you got how it works, use CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE in your custom program, if your scenario is more specific, will be a great if you describe it more precisely.
Cheers!
Luis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Luis for your reply.
Earlier we had to add a note to few opportunities, so we added that through a custom report using the FM CRM_ORDER_MAINTAIN. The note was not added as a row item in the notes assignment block, rather the Text Log was updated.
Text Log is maintained as type R(Display Log) and hence can't be modified.
Now we have a requirement to delete the note we have added earlier. Since we don't have any row item specific to the note we added earlier, we are not sure how we should go about it.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.