How to add body text when sending output as PDF in email?

Hello,
We are using standard SAP to send SD output as PDF in an email (in output type we choose medium 5, email address is taken from customer master. In transaction SCOT is indicated that SAPscript/smartforms are converted to PDF. When the output is generated, we run rsconn01 to trigger the actual sending of the email).
Via form TEXT_SYMBOL_REPLACE we can modify the subject of the email that is send to include e.g. the order number. HOWEVER, in the body of the email that is send, we now only have the PDF, but we also would like to add a standard text in the body of the email. Does anyone know how to do this?
Thanks,
Alex

Hi,
Please refer to the following program and see if it helps you.
REPORT ZSAMPL_001 .
INCLUDE ZINCLUDE_01.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
*file_open_error = 1
*file_read_error = 2
*no_batch = 3
*gui_refuse_filetransfer = 4
*invalid_type = 5
*no_authority = 6
*unknown_error = 7
*bad_data_format = 8
*header_not_allowed = 9
*separator_not_allowed = 10
*header_too_long = 11
*unknown_dp_error = 12
*access_denied = 13
*dp_out_of_memory = 14
*disk_full = 15
*dp_timeout = 16
*OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
***INCLUDE ZINCLUDE_01 .
10.08.2005 Amit M - Created
Include For Mail (First Req F16)
Modification Log
Data
tables crmrfcpar.
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
data v_rfcdest LIKE crmrfcpar-rfcdest.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
FORM
FORM ml_saveforbp USING jobname jobcount.
Data
*data : yhead like yhrt_bp_head.
*DATA : ydocdata LIKE yhrt_bp_docdata,
*yobjtxt LIKE yhrt_bp_objtxt OCCURS 0 WITH HEADER LINE,
*yreclist LIKE yhrt_bp_reclist OCCURS 0 WITH HEADER LINE.
*DATA : seqnr TYPE i.
Head
*yhead-jobname = jobname.
*yhead-jobcount = jobcount..
*MODIFY yhrt_bp_head FROM yhead.
Doc Data
*ydocdata-jobname = jobname.
*ydocdata-jobcount = jobcount.
*MOVE-CORRESPONDING docdata TO ydocdata.
*MODIFY yhrt_bp_docdata FROM ydocdata.
Objtxt
*seqnr = 0.
*LOOP AT objtxt.
*seqnr = seqnr + 1.
*yobjtxt-jobname = jobname.
*yobjtxt-jobcount = jobcount.
*yobjtxt-seqnr = seqnr.
*MOVE-CORRESPONDING objtxt TO yobjtxt.
*MODIFY yhrt_bp_objtxt FROM yobjtxt.
*ENDLOOP.
RecList
*seqnr = 0.
*LOOP AT reclist.
*seqnr = seqnr + 1.
*yreclist-jobname = jobname.
*yreclist-jobcount = jobcount.
*yreclist-seqnr = seqnr.
*MOVE-CORRESPONDING reclist TO yreclist.
*MODIFY yhrt_bp_reclist FROM yreclist.
*ENDLOOP.
ENDFORM. "ml_saveforbp
FORM
FORM ml_fetchfrombp USING jobname jobcount.
*CLEAR docdata.
*REFRESH objtxt.
*REFRESH reclist.
*SELECT SINGLE * FROM yhrt_bp_docdata
*INTO corresponding fields of docdata
*WHERE jobname = jobname
*AND jobcount = jobcount.
*SELECT * FROM yhrt_bp_objtxt
*INTO corresponding fields of TABLE objtxt
*WHERE jobname = jobname
*AND jobcount = jobcount
*ORDER BY seqnr.
*SELECT * FROM yhrt_bp_reclist
*INTO corresponding fields of TABLE reclist
*WHERE jobname = jobname
*AND jobcount = jobcount
*ORDER BY seqnr.
ENDFORM. "ml_fetchfrombp
Hope this helps.
Please reward some points if it helps.
Regards,
Amit Mishra

Similar Messages

  • How to set Default text when sending a blank mail from SAP

    Hi all,
    How to add Signature with company logo in the mail body.
    User should see at least one default text (eg; Hi) in the mail body if the sender did not type any text in the mail body when sending a mail from SAP.
    Is it possible to set like this on Subject also.
    Kindly share your ideas.
    Regards,
    Mathan A

    Hi Mathan,
    Please check sap note
    SAP Note No. 1304146 Email Signatures feature note
    1163250 - How to Create an Email Signature on several rows
    I hope it will solve your issue.PLease mark thread as answerd.
    Best Regards,
    Atul

  • How to add body text to smartform email?

    Hi,
    In release 620, how can you add text to the mail message that is generated from e-mailing a smartform.  I need to add a small message to the body of the message in addition to the attachment.
    i.e. Please find attached your invoice. [attachement.pdf]
    Thanks,
    Guy

    I don't know SmartForm so there may be another way to do it but the following approach was fine for Sapscript.
    Basically have a look at the SAP sample programs bcs_example_* where * = 1 thru 5. I think bcs_example_5 is the one to focus on. This creates a simple email and then adds an attachemnt to it. In your case you want the attachment to be your SmartForm's output.
    For the SapScript I was able to call the form from abap, receive the output into a table whose contents I could then attach to the email.
    The attachment code needs to be changed to set type to OTF:
    i_attachment_type = 'OTF'
    I'll speak in SAPscript and hope there are equivalent terms in SmartForm. I created the following abap form to run the SAPscript and get it's output into a table:
         Form  GET_OTF_CODE
    FORM  get_otf_code
    USING us_work       TYPE zsd_fet_signup_confirm
    CHANGING ch_otf_out TYPE solix_tab.
      DATA: BEGIN OF otf OCCURS 0.
              INCLUDE STRUCTURE itcoo .
      DATA: END OF otf.
      DATA: itcpo LIKE itcpo.
      DATA: itcpp LIKE itcpp.
      CLEAR itcpo.
      itcpo-tdgetotf = 'X'.
    Start writing OTF code
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          form     = 'ZSD_FET_COVERFAX'
          language = sy-langu
          OPTIONS  = itcpo
          dialog   = ' '
        EXCEPTIONS
          OTHERS   = 1.
      CALL FUNCTION 'START_FORM'
        EXCEPTIONS
          error_message = 01
          OTHERS        = 02.
      CASE us_work-recipient_type.
        WHEN c_agent_recipient.
          w_recipient_name = us_work-agent.
        WHEN c_asm_recipient.
          w_recipient_name = us_work-asm.
        WHEN OTHERS.
          w_recipient_name = 'IPL Agent/ASM'.
      ENDCASE.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          window        = 'MAIN'
          element       = 'HEADER'
        EXCEPTIONS
          error_message = 01
          OTHERS        = 02.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          window        = 'MAIN'
          element       = 'TEXT'
        EXCEPTIONS
          error_message = 01
          OTHERS        = 02.
    Close up Form and get OTF code
      CALL FUNCTION 'END_FORM'
        EXCEPTIONS
          error_message = 01
          OTHERS        = 02.
      MOVE-CORRESPONDING itcpo TO itcpp.
      CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT  = itcpp
        TABLES
          otfdata = otf
        EXCEPTIONS
          OTHERS  = 1.
    Move OTF code to output structure
      REFRESH ch_otf_out.
      LOOP AT otf.
        APPEND otf TO ch_otf_out.
      ENDLOOP.
    ENDFORM.                    "GET_OTF_CODE

  • Need user exit to add body text in mail while saving the transaction VF02

    Hi All,
       Output type has been configured as external send(5) to trigger billing document as PDF. There is a requirment to add body text in the  mail along with pdf attachement. Funtional consultant has tried using NACE "Mail title and Text" but that doesn't worked out. As a abaper, we are trying to identfy the user exit where I can code the body of mail text.
    Can any body please let us know the user exit to add the body text only?
    Regards,
    Suresh Kumar.

    Hi,
    In your driver program you will have one standard include RVADOPFO.
    Copy all the code available in that include and make it to Z include.
    In this include function module ADDR_GET_NEXT_COMM_TYPE, will have the email address, subject etc.. details.
    So You can modify the contents of the imported parameters here.
    The above code will trigger only when update debugging is switched on!!!!!
    Regards,
    Santhosh.

  • Unable to add body text for Purchase Order

    Hi,
    If this question has been posted before request send me the link .
    We are sending PO as a PDF attachment to email.
    To add body text to this I copied the print program SAPFM06P and modified the fm06pe04 program.
    DATA : l_mail_text TYPE bcsy_text,
                     l_mail_text_row TYPE soli.
              CONCATENATE 'Please check the' ' Attached file' INTO l_mail_text_row.
              APPEND l_mail_text_row TO l_mail_text.
                document = cl_document_bcs=>create_document(
                    i_type    = 'PDF' " cf. RAW, DOC
                    i_hex     = pdf_content
                    i_text    = l_mail_text               "added by me
                    i_length  = lp_pdf_size
                    i_subject = lv_subject ).                   "#EC NOTEXT
    But it does not show in the body text.
    But if I use the add_attachment method the text comes as an attachment.
    I am not sure what is the error here.
    Regards,
    Narayani

    DATA: send_request       TYPE REF TO cl_bcs.
      DATA: text               TYPE bcsy_text.
      DATA: binary_content     TYPE solix_tab.
      DATA: document           TYPE REF TO cl_document_bcs.
      DATA: sender             TYPE REF TO cl_sapuser_bcs.
      DATA: recipient          TYPE REF TO if_recipient_bcs.
      DATA: bcs_exception      TYPE REF TO cx_bcs.
      DATA: sent_to_all        TYPE os_boolean.
             Convert the OTF file format ino the PDF format.
              CALL FUNCTION 'CONVERT_OTF_2_PDF'
                IMPORTING
                  bin_filesize           = lwa_bin_filesize
                TABLES
                  otf                    = lt_otf
                  doctab_archive         = lt_doctab_archive
                  lines                  = lt_pdf_lines
                EXCEPTIONS
                  err_conv_not_possible  = 1
                  err_otf_mc_noendmarker = 2
                  OTHERS                 = 3.
              REFRESH lt_objbin.
             get the pdf data into the attachment table .
              CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
                EXPORTING
                  line_width_dst              = 255
                TABLES
                  content_in                  = lt_pdf_lines
                  content_out                 = lt_objbin
                EXCEPTIONS
                  err_line_width_src_too_long = 1
                  err_line_width_dst_too_long = 2
                  err_conv_failed             = 3
                  OTHERS                      = 4.
             Refresh the local tables and workareas.
              REFRESH: lt_reclist,
                       lt_objtxt,
                       lt_objpack.
              TRY.
                  CLEAR send_request.
        -------- create persistent send request ------------------------
                  send_request = cl_bcs=>create_persistent( ).
        -------- create and set document with attachment ---------------
        create document from internal table with text
                  REFRESH text.
                  APPEND 'Body1.' TO text.
                  APPEND 'Body2.'TO text.
                  APPEND 'Body3.'TO text.
                  CLEAR document.
                  document = cl_document_bcs=>create_document(
                                  i_type    = 'RAW'
                                  i_text    = text
                                  i_length  = '12'
                                  i_subject = 'Electronic Payment Notification' ).
                  FIELD-SYMBOLS <fs_x> TYPE x.
                  DATA lv_content  TYPE xstring.
                  CLEAR lv_content.
                  LOOP AT lt_objbin INTO lwa_objbin.
                    ASSIGN lwa_objbin TO <fs_x> CASTING.
                    CONCATENATE lv_content <fs_x> INTO lv_content IN BYTE MODE.
                  ENDLOOP.
                  CLEAR pdf_content.
                  pdf_content = cl_document_bcs=>xstring_to_solix(
                          ip_xstring = lv_content ).
        add attachment to document
        BCS expects document content here e.g. from document upload
        binary_content = ...
                  CONCATENATE 'Remittance_' sy-datum sy-uzeit '.pdf' INTO lv_filename_cl.
                  CALL METHOD document->add_attachment
                    EXPORTING
                      i_attachment_type    = 'PDF'
                      i_attachment_subject = lv_filename_cl
                      i_att_content_hex    = pdf_content.
        add document to send request
                  CALL METHOD send_request->set_document( document ).
        --------- set sender -------------------------------------------
        note: this is necessary only if you want to set the sender
              different from actual user (SY-UNAME). Otherwise sender is
              set automatically with actual user.
                  CLEAR sender.
                  sender = cl_sapuser_bcs=>create( sy-uname ).
                  CALL METHOD send_request->set_sender
                    EXPORTING
                      i_sender = sender.
                  CALL METHOD send_request->set_status_attributes(
                    EXPORTING
                    i_requested_status = 'N'
                    i_status_mail = 'N' ).
             Fill the receiver for the email with PDF attachemnt.
                  CLEAR : lwa_reclist,
                          lwa_lfa1,
                          lwa_adr6.
                  CLEAR lwa_lfa1.
                  READ TABLE lt_lfa1
                        INTO lwa_lfa1
                        WITH KEY lifnr = lwa_reguh-lifnr.
                  IF sy-subrc EQ 0.
                    CLEAR lwa_adr6.
                    READ TABLE lt_adr6
                          INTO lwa_adr6
                          WITH KEY addrnumber = lwa_lfa1-adrnr.
                    IF ( sy-subrc EQ 0 )
                      AND ( lwa_adr6-smtp_addr IS NOT INITIAL ).
        --------- add recipient (e-mail address) -----------------------
        create recipient - please replace e-mail address !!!
                      CLEAR recipient.
                      recipient = cl_cam_address_bcs=>create_internet_address(
                                                       lwa_adr6-smtp_addr ).
                    ELSE.
                      CLEAR lv_fax.
                      lv_fax = lwa_lfa1-telfx.
                      recipient = cl_cam_address_bcs=>create_fax_address(
                      i_country = lwa_lfa1-land1
                       i_number = lv_fax ).
                    ENDIF.
                  ENDIF.
        add recipient with its respective attributes to send request
                  CALL METHOD send_request->add_recipient
                    EXPORTING
                      i_recipient = recipient
                      i_express   = 'X'.
        ---------- send document ---------------------------------------
                  CALL METHOD send_request->send(
                    EXPORTING
                      i_with_error_screen = 'X'
                    RECEIVING
                      result              = sent_to_all ).
                  IF sent_to_all = 'X'.
                    WRITE text-003.
                  ENDIF.
                  COMMIT WORK.
                CATCH cx_bcs INTO bcs_exception.
                  WRITE: 'Error Occured'.
                  WRITE: 'Error', bcs_exception->error_type.
                  EXIT.
              ENDTRY.

  • How to deselect the text when I start the program?

    how to deselect the text when I start the program?
    photo:

    wants the blue background could not be seen:
    Code Form:
    Public Class Form2
        Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        End Sub
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            If ComboBox1.SelectedItem = "The Sims 4" Then
                Form3.Show()
            Else
            End If
            If ComboBox1.SelectedItem = "The Sims 3" Then
                Form4.Show()
            Else
            End If
        End Sub
    End Class
    There's a lot wrong with all of that.
    I'm sorry that I won't be able to help...
    Still lost in code, just at a little higher level.

  • How to add standard text in smartforms?

    Hi friends,
    How to add standard text in smartforms ?
    points rewarded soon
    Regards
    RH

    Creating the Standard Text:
    Go to SO10
    1. Enter Text Name.  For example, ZABC
    2. Text ID ST
    3. Language EN
    Click on Create.
    And enter the Required Information and save.
    To include a Standard text in SmartForm.
    Follow the steps below:
    1. Create a text node in the window.
    2. Under general attributes select "Include text" as Type.
    3. Specify the fields under Text.
    Text Name ZABC
    Text Object TEXT
    Text ID ST
    Language EN.
    Hope it helps.
    Regards.

  • How to add a text box in the layout (View)

    How to add a text box in the layout (View)

    Hi.
    Right Click in the RootUIElement container.
    Click Insert Element.
    Give Name: Input
    Type : Input Field.
    Press Enter.
    Regards
    Bala.

  • How to add new text field in standard report

    how to add new text field in standard report?

    Hi,
    I presume you are talking about a report display in ALV and u wish to add a column to it .
    If it is a global requirement ,as in table being used there in ALV can be modified, then you can append the table and the system should pick up the same automatically from there.
    Otherwise , you can make a Z program . Modify the catalog being used in ALV.
    Regards,
    Shweta

  • How to add multiple table when creating add on using b1de

    Hi all,
    Plz help me
    How to add multiple table when creating add on using b1de.
    Thanks

    Hi dns_sap,
    Can you explain a little better what you are trying to accomplish? Is it to create UserTables and UserFields in the database, when the addon runs the first time?
    If so, you can use the following code
    Add User Table
            Try
                Dim lRetCode As Long
                Dim oUDT As SAPbobsCOM.UserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                oUDT.TableName = TableName
                oUDT.TableDescription = TableDescription
                oUDT.TableType = TableType
                lRetCode = oUDT.Add
                '// Check for error when adding the Table: if lRetCode = 0 the table was created; if lRetCode = -2035 the table already exisits
                If lRetCode <> 0 Then
                    oApplication.MessageBox("Error: " & lRetCode.ToString & ", " & oCompany.GetLastErrorDescription)
                End If
            Catch ex As Exception
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDT)
                oUDT = Nothing
                lRetCode = Nothing
                GC.Collect()
            End Try
    Add User Field
    Try
                Dim lRetCode As Long
                Dim oUDF As SAPbobsCOM.UserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                oUDF.TableName = TableName
                oUDF.Name = FieldName
                oUDF.Description = FieldDescription
                oUDF.Type = FieldType
                lRetCode = oUDF.Add
                '// Check for error when adding the field: if lRetCode = 0 the field was created; if lRetCode = -2035, the field already exists
                If lRetCode <> 0 Then
                    oApplication.MessageBox("Error: " & oCompany.GetLastErrorCode & ", " & oCompany.GetLastErrorDescription)
                End If
            Catch ex As Exception
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDF)
                oUDF = Nothing
                lRetCode = Nothing
                GC.Collect()
            End Try
    Regards,
    Vítor Vieira

  • How to add standard text in PO and how it is maintained ?

    How to add standard text (paragraph) in PO and how it is maintained ?

    Hi
    Please go through this document.which has a step by step
    Working with Frequently Used Texts
    Use
    You can copy texts from various sources to create PO texts:
    Standard texts
    Certain standard texts are supplied with the system and can be assigned to a purchasing document in Customizing.
    The content of some standard texts is predefined by your system administrator.
    You can also create standard texts yourself and copy them into purchasing documents.
    Master records
    Database fields
    Activities
    Creating Standard Texts
    You can create your own standard texts via Tools ® SAPscript ® Standard text.
    Inserting Standard Texts
    You can insert your standard text on the long text screen via Insert ® Text ® Standard.
    For more information, refer to the Basis documentation under BC Word Processing with the SAPscript Editor:  Including Texts.
    You can display the print preview via Text ® Print ® Print preview.
    Inserting Texts from the Master Record
    There are three ways of linking texts from a master record with a purchasing document. The relevant settings are made for each text type in Customizing for Purchasing. The indicator in the status column shows the nature of the linkage.
    Option                                              Indicator in status column
    The text is copied:               
    It is then independent of the text                 None
    in the master record. Changes to
    the text in the material master record
    have no influence on the text in the document.
    The text is displayed only:
    It cannot be adopted.                                          N
    The text is offered for copying:
    It can be copied via Header or Item ® Texts ® Adopt text. (In requisitions: Goto ® Texts ® Adopt text.) Changes made in the master record will also be adopted in the document until such time as you copy the text.
    Inserting Texts from Database Fields
    You can include the content of a database field at any point in the text on the long text screen. A value specific to the relevant document is displayed in the printed document.
    Choose Insert ® Symbols ® Program symbols.
    Choose DDIC fields.
    Search for the relevant table/structure (in the case of PO items, this is EKPO) and then choose ENTER .
    Choose the relevant table field.
    Choose Text ® Print preview to see the print preview.
    Reward if useful
    Aasif

  • I have forgotten my security questions but the email to reset them is no longer active how do i change it to send it to a different email?

    I have forgotten my security questions but the email to reset them is no longer active how do i change it to send it to a different email?

    You won't be able to change your rescue email address until you can answer your questions, you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to update your rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • On iphone 4 how do i block text messages that are coming from an email account?

    on iphone 4 how do i block text messages that are coming from an email account?

    There is no way to block text messages.  You may wish to report them to your carrier

  • How do you create bookmarks when you create a PDF from word?

    Hi All, how do you create bookmarks when you create a PDF from word, rather than having to individually copy from a pdf and create bookmarks?
    Adobe 8.1 full version.

    Thanks for the reply, I'll give it a go and will let you know

  • How to invoke alt-text for images in a PDF file by Automation

    Hi,
    Can any one help me?
    How to invoke Alt-text for Images in a PDF file using script?
    Thanks for looking into this.
    Regards,
    Sudhakar

    What do you mean "invoke" alt-text?  If Alt-text is there, then it will be presented to a screen reader.

Maybe you are looking for

  • You call this Nokia Support?????

    Having problem with proximity and brightness sensors-not working after updating with cyan. Can anybody help? Stop offering me the nokia recovery tool.it does nothing.after using the tool or hard reset sensors working for an hour and just stop. I want

  • Sales Order quantity

    Hi, I've created a sales order with decimal quantity, system allows this although i didnt maintain multuple UOM or I didnt assign any rounding profiles in Material Master. SAP should not allow decimal quantity in sales order.  SAP should allow only B

  • EP for xMII12.0

    Is EP must for xMII 12.0? I understand that 12.0 is on Netweaver stack but I am unaware of EP. Regards

  • Multiple time zone display

    Hi All I know this isn't possible with the built in Calendar App but I've been searching the app store and can't see anything that obviously does this. Bit surprised as I'm sure it would be so useful to many people. I'm looking for an App that will i

  • Is helper.exe required to run firefox on windows 7?

    I am setting a limited user account on my windows 7 x64 system with parental control settings (just for added security reasons) and need to know if I should allow mozillafirefox\uninstall\helper.exe on the allowed programs list for the controlled acc