Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change Mail Subject for Billing Doc in VF31

sreekanth_n2
Active Participant
0 Kudos

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

1 ACCEPTED SOLUTION

sreekanth_n2
Active Participant
0 Kudos

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.

12 REPLIES 12

Rushikesh_Yeole
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Sreekanth,

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

Best Wishes,

Ravi

sreekanth_n2
Active Participant
0 Kudos

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.

0 Kudos

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

kiran_k8
Active Contributor
0 Kudos

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.

0 Kudos

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

thanga_prakash
Active Contributor
0 Kudos

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

0 Kudos

Im using class but not the FM

0 Kudos

Are you using Class: CL_DOCUMENT_BCS Method: ADD_ATTACHMENT, if so pass the attachment name to the parameter I_ATTACHMENT_SUBJECT

0 Kudos

not sure what has been used

0 Kudos

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

sreekanth_n2
Active Participant
0 Kudos

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.