on 04-11-2012 6:28 PM
How to read mail form's file export attribute's description in Campaign Element ID ?
Hello, Raja.
Check CRMD_PML_HEAD - here you find MAIL_GUID for MAIL ID (ID of mail form which is stored in campaign element).
Then using this GUID you'll find description in CRMD_PML_DESCR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raja,
could you please elaborate your needs? Do you need the description of attribute which is available in popup on pressing Attribute button during mail form creation? Or do you need to find the description of attribute which is already inserted in mail form?
Screenshot with the example would be great.
For instance, if you want to get description of an attribute in mail body (the second option) then you should follow such sequence:
table CRMD_PML_HEAD
find MAIL_GUID by MAIL_ID for instance
CRMD_PML_ELE
find all or desired elements of your mail form ( EL_GUID ) by MAIL_GUID
CRMD_PML_TXTSUBJ
find the entry by EL_GUID. In TEXT there is the content of element. In rawstring. You should convert it to simple string and parse it.
For example I have such mail form with attributes inserted.
With this simple report you can see where the description is:
REPORT zplm.
PARAMETERS: p_id TYPE crmt_pml_el_guid,
p_st TYPE i.
START-OF-SELECTION.
DATA: lv_xtext TYPE xstring,
lv_text TYPE string.
SELECT SINGLE text INTO lv_xtext
FROM crmd_pml_txtsubj
WHERE el_guid = p_id.
CALL FUNCTION 'CRM_IC_XML_XSTRING2STRING'
EXPORTING
inxstring = lv_xtext
IMPORTING
outstring = lv_text.
WRITE: / lv_text+p_st.
Here is the output (I used p_st = 100, because the very beginning is a head part of html)
Hope this will help you. If I didn't get you right please correct me.
Hi Rahul,
Use the below code to get mail form's body text.
cl_crm_pml_mail_form_api=>read_text(
EXPORTING
iv_mail_guid = lv_form_guid "" Mail form guid
IMPORTING
es_text = ls_text
et_text = lt_text
et_messages = lt_messages
EXCEPTIONS
mail_not_found = 1
not_read = 2
OTHERS = 3
).
READ TABLE lt_text INTO ls_text INDEX 1.
lv_body_text = cl_crm_pml_mail_form_exec=>convert_xstring_to_string( iv_xstring = ls_text-text ).
Now lv_body_text contains the body of your mail form.
User | Count |
---|---|
5 | |
1 | |
1 | |
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.