Skip to Content

Change Mail Subject for Billing Doc in VF31

Hi Experts.

  In VF02, Header->Output..  Custom Output Type is entered and click on SAVE.

   Then VF31 is executed, the mail is send to the user.

  Requirement is change the subject of mail. not able to trace how to get solution.

  while executing VF31, started debugger and set break point at FM SO_NEW_DOCUMENT_SEND_API1. This didnt work.

  Please advise.

Sree

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    Feb 09, 2016 at 07:26 AM

    changing mail subject is written in custom class.

    not able to check attachment name.

    our SME told that we can test in production only after sending the mail to customer.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 04:02 AM

    HI,

    Please check the driver program .

    If the driver program is standard then convert to customized. I will suggest you should use class-method to send emails instead of above FM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 23, 2015 at 04:18 AM

    Hi Sreekanth,

    Can you please specify program and line number where this code is written?

    Best Wishes,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 05:42 AM

    Able to trace the code on filling the mail subject.

    Need help to check how attachment description should be changed.

    currently billing document number is attachment name.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 07:26 AM

    Hi Sreekanth ,

    Use t-code NACT , and use application V3 , the click on position and type your custom o/p type->click on processing routines , from there you  will get program name , there you can change the logic as per your  requirement.

    Award points if solution meet your req.

    Regards

    Uday

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 23, 2015 at 08:22 AM

    Sreekanth,

    NACE

    Select V3 Billing.

    Click on Output types

    In the next screen select your Z output type and click on "Mail Title and Texts"

    Here for EN maintain as "Service_Invoice_&XNAST-OBJKY&.

    After this Click on Details ICON

    in the Mail tab maintain Program as SAPLV61B and Form Routine as TEXT_SYMBOL_REPLACE.

    Now when the output type is triggered,you will get to see the mail getting triggered in SOST with DOCTITLE as "Service_Invoice_0001234567".

    You can also refer to SAP Note 537832.

    K.Kiran.

    Add comment
    10|10000 characters needed characters exceeded

    • I traced the code where mail subject is populated.

      Already Custom code is written to handle it. can change subject here

      I want to how to change the attachment name.

      Current logic:     Billing doc number is the attachment name

  • Oct 27, 2015 at 06:02 AM

    Hello Sreekanth,

    Are you using Function module "SO_NEW_DOCUMENT_ATT_SEND_API1" to create and send an attachment. If so you can set the name of the attachment by passing value to the table field below.

    PACKING_LIST-OBJ_NAME.

    Try this and let me know whether it works.

    Regards,

    Thanga

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sree,

      Goto Your Driver Program  

      Might already Declared check & change your subject

      data :gv_subject TYPE sodocchgi1.

      gv_subject -obj_descr  =    'Your VF31 Subject '

      gv_subject - sensitivty =    'P'.



      pass your subject value to gv_subject -obj_descr   and try


      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

                 EXPORTING

                   document_data              = gv_subject  " Your subject add here ,

                   document_type              = 'HTM'

                   put_in_outbox              = 'X'

                   commit_work                = 'X'

                 TABLES

                   object_header              = it_table

                   object_content             = it_table

                   receivers                  =  it_table

                 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.



      Kabil