Merge invoice and send email based on customer
I have search through the SAP forum and test it, but, it seem does not meet the requirement, Below i will explain the current problem.
I need to generate invoice from VF04, once generated it will send an email to the customer, currently, the customize print program will create one invoice with one pdf and send to customer because it only have one row information that was pass thru NAST
Because of the standard program pass info one by one, so the customize print program will not know which data is the last data so that it can proceed to combine and send an email.
For Example, i have 3 invoice as below
IF NOT gv_cust = ' '
IF gv_cust = gv_customer
IF gv_count = last row ------>> unfortunately, customize program dont know how many invoice has been selected to be sent an email, so it can't find the last row.
ELSEIF gv_cust <> gv_customer
"send email for invoice that has been merged
"Clear merge table
" append new invoice into merge table
Based on above example, is there have possible way or logic to get the number of invoice has been selected so that i can enhance the logic to merge the invoice and send the email based on customer.
Your kindness is most appreciated,
Thanks and Regards,