Quantcast
Channel: SCN : Unanswered Discussions - SAP Business Process Management
Viewing all articles
Browse latest Browse all 3160

send mail with attachment not PDF But Link to the transaction (Searched a lot)

$
0
0

hi Good day,

 

i have searched the Forums a lot and i found that majarity of them want to attach the PDF or SMARTFORMS to send mail step.

 

but my requirment is that i need to attach the TRANSACTION CODE : CBIH82 with INC.LOG.

 

So when the user clicks the attachment it displays the TCODE : CBIH82,

 

I have written the code and i get the MAIL with ATTACHMENT but it is 1KB in size

 

i have never done this and i would like have your input.

 

how can i achieve this? From Forums i found that i

 

1. need to instantiate the SOFM in method and call the method .

 

 

*------test

CONSTANTS:c_object_describe TYPE swotobjid-describe VALUE '*<OBJECT>*',
           c_url          TYPE   rvari_vnam    VALUE    'KPURL',
           c_url1         TYPE   soodk-objtp   VALUE    'URL',
           c_desc         TYPE   sodocchgi1-obj_descr VALUE  'LINK1'.
DATA: lv_title     TYPE sood-objdes,
      l_object     TYPE swotobjid,
      l_objheader  TYPE soxobj,
      objhead      TYPE solisti1 OCCURS 10 WITH HEADER LINE,
      attach       TYPE swc_object,
      lv_st_url    TYPE char255,
      lv_key       TYPE  sibfboriid.                          .
DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line WITH HEADER
LINE.
MOVE object-key TO lv_key.

DATA : l_cont LIKE STANDARD TABLE OF swcont   WITH HEADER LINE.

break 9997500.

*create OBJ attachment
l_object-describe = c_object_describe.
l_object-objtype = 'BUS1240'.
l_object-objkey = object-key.
MOVE-CORRESPONDING l_object TO l_objheader.
APPEND l_objheader TO objhead.



MOVE 'Inc.Log' TO lv_title.
swc_create_object attach 'SOFM' space.
*swc_call_method attach 'Create' l_cont.
swc_set_element CONTAINER 'NO_DIALOG' 'X'.
swc_set_element CONTAINER 'DOCUMENTTITLE' lv_title.
swc_set_table   CONTAINER 'DocumentContent' lt_doc_content.
swc_set_table   CONTAINER 'DocumentHeader' objhead.
*swc_set_element CONTAINER 'DOCUMENTTYPE' 'URL'.
*swc_set_element CONTAINER 'Enjoy' 'X'.
*swc_call_method attach 'Create' l_cont.
*
swc_get_element l_cont '_Result' attach.

swc_set_element container 'Attachment' attach.

 

 

am not sure if this the right way but i have tried.

 

please help me as to how i would be able to attache in SEND MAIL ATTACHMENT.

 

Thank you,

J.


Viewing all articles
Browse latest Browse all 3160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>