{"audience":"Customer service and order entry teams, export sales teams and finance teams following prepayment sales.","authorization_objects":[{"note":"Order display and output authorization by sales organization","object":"V_VBAK_VKO"},{"note":"Authorization by order type","object":"V_VBAK_AAT"},{"note":"Authorization to send external email from SAP","object":"S_OC_SEND"}],"components":[],"countries":[],"effort_days_max":8,"effort_days_min":5,"effort_size":"M","faq":[{"a":"No. Proforma amounts are calculated directly from the order, so no extra document appears in the billing flow. If the proforma must be a numbered document, it can be set up to work with the standard proforma billing type.","q":"Is a billing document created for the proforma?"},{"a":"Yes. When the confirmed date or quantity changes, output is determined again and a new confirmation with a higher revision number is sent; the changed items are marked on the form.","q":"Is the customer informed when the delivery date changes?"},{"a":"The document language comes from the output record, which by default is the customer's communication language. Form texts are kept translated for each language, and date and amount formats follow the language.","q":"Are the documents printed in the customer's language?"}],"features":[{"code":"email","label":"Send the result by email","note":"The confirmation is sent the moment the order is saved or by a short-interval job."},{"code":"test_run","label":"Test mode (check without posting)","note":"The PDF can be previewed before sending."},{"code":"log","label":"Line-by-line result and error log","note":""}],"functions":[{"name":"SSF_FUNCTION_MODULE_NAME","role":"Finds the form function when Smart Forms is used"},{"name":"FP_FUNCTION_MODULE_NAME","role":"Finds the form interface when Adobe Forms is used"},{"name":"SD_PRINT_TERMS_OF_PAYMENT","role":"Prepares the payment terms as printable text"},{"name":"READ_TEXT","role":"Reads order header and item texts"},{"name":"SO_NEW_DOCUMENT_ATT_SEND_API1","role":"Sends the confirmation and proforma as PDF attachments"}],"gap":"The standard order confirmation output is a generic sample form; the confirmed date per item, the customer's language and revision information do not appear in the required format. In the standard, a proforma invoice is obtained by creating a separate proforma billing document with VF01; this is an extra step and must be repeated when the order changes. The custom solution produces both documents directly from the order and sends them automatically to the right person.","id":"sd-order-confirmation-proforma","industries":[],"input_columns":[],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. Two output types (order confirmation and proforma) are defined for the order and linked to the custom program in NACE. An output determination condition is added so that the proforma is only determined for orders with prepayment terms or export orders.\n2. Order data comes from VBAK/VBAP, confirmed quantity and date from the schedule lines (VBEP: BMENG, EDATU), price and tax lines from KONV (PRCD_ELEMENTS in S/4HANA), and payment and delivery terms from VBKD.\n3. The proforma is calculated from the order without creating a billing document: net amount, VAT, grand total, amount in words, validity date and the company's bank account for the currency (T012K) are printed.\n4. When the order is changed the output is created again; the revision number is the count of processed NAST records of that output type. Items changed since the last sending are found in the change documents (CDHDR) and marked on the form.\n5. The PDF is sent to the customer's contact person on the order (VBPA → ADR6) with SO_NEW_DOCUMENT_ATT_SEND_API1; the sales representative gets a copy.\n6. The mass resend screen produces the confirmation or proforma again for the selected orders and returns a result list.","module":"SD","object_type":"form","output_columns":[{"calculated":false,"formula":"","label":"Sales order","source_field":"VBELN","source_table":"VBAK"},{"calculated":true,"formula":"Order confirmation or proforma invoice","label":"Document","source_field":null,"source_table":null},{"calculated":true,"formula":"Number of processed NAST records for this output type","label":"Revision","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Customer","source_field":"KUNNR","source_table":"VBAK"},{"calculated":false,"formula":"","label":"Customer name","source_field":"NAME1","source_table":"KNA1"},{"calculated":false,"formula":"","label":"Recipient email","source_field":"SMTP_ADDR","source_table":"ADR6"},{"calculated":false,"formula":"","label":"Net value","source_field":"NETWR","source_table":"VBAK"},{"calculated":false,"formula":"","label":"Currency","source_field":"WAERK","source_table":"VBAK"},{"calculated":true,"formula":"Maximum VBEP-EDATU (VBEP-BMENG \u003e 0)","label":"Latest confirmed date","source_field":null,"source_table":null},{"calculated":true,"formula":"Sent, previewed or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"Return message of sending or form processing","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"1000","kind":"select_option","label":"Sales organization","name":"S_VKORG","ref_field":"VBAK-VKORG","required":true},{"example":"10024518","kind":"select_option","label":"Sales order","name":"S_VBELN","ref_field":"VBAK-VBELN","required":false},{"example":"10.11.2026 – 16.11.2026","kind":"select_option","label":"Order date","name":"S_AUDAT","ref_field":"VBAK-AUDAT","required":false},{"example":"OR","kind":"select_option","label":"Order type","name":"S_AUART","ref_field":"VBAK-AUART","required":false},{"example":"X","kind":"radio","label":"Order confirmation","name":"R_CONF","ref_field":"","required":false},{"example":"","kind":"radio","label":"Proforma invoice","name":"R_PROF","ref_field":"","required":false},{"example":"","kind":"checkbox","label":"Preview only (do not send)","name":"P_PREV","ref_field":"","required":false}],"part_of":[],"performance":"Read CDHDR only for the order concerned and after the last sending date to find changed items. If output is sent immediately, do the email sending in a separate step after output processing rather than in the update task, so that saving the order does not slow down.","process":"O2C","quote_url":"https://nekuhub.com/en/request-a-quote/?report=sd-order-confirmation-proforma","related":["sd-backorders-unconfirmed-items","sd-incomplete-orders-missing-fields","sd-sales-order-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Triggers output manually from the order; uses the standard sample form and the customer's main address.","tcode":"VA02"},{"note":"Creates a proforma billing document; a separate step that must be repeated when the order changes.","tcode":"VF01"}],"summary":"A custom form program that prepares the order confirmation and, when needed, the proforma invoice as PDF the moment the sales order is saved and emails them to the customer's contact person. The confirmation shows the confirmed quantity and date per item, the proforma shows bank details and a validity date, and a new confirmation with a revision number goes out when the order changes.","tables":[{"access":"read","join_on":"","role":"Order header: customer, date, net value, currency (driving table)","table":"VBAK","variant":"both"},{"access":"read","join_on":"VBAP-VBELN = VBAK-VBELN","role":"Order items: material, order quantity, price","table":"VBAP","variant":"both"},{"access":"read","join_on":"VBEP-VBELN = VBAP-VBELN AND VBEP-POSNR = VBAP-POSNR","role":"Schedule lines: confirmed quantity and date","table":"VBEP","variant":"both"},{"access":"read","join_on":"VBKD-VBELN = VBAK-VBELN","role":"Payment and delivery terms, customer PO number","table":"VBKD","variant":"both"},{"access":"read","join_on":"VBPA-VBELN = VBAK-VBELN","role":"Contact person, payer and sales representative","table":"VBPA","variant":"both"},{"access":"read","join_on":"ADR6-ADDRNUMBER = VBPA-ADRNR","role":"Recipient's email address","table":"ADR6","variant":"both"},{"access":"read","join_on":"KNA1-KUNNR = VBAK-KUNNR","role":"Customer name and language","table":"KNA1","variant":"both"},{"access":"read","join_on":"KONV-KNUMV = VBAK-KNUMV","role":"Price, discount and tax lines (ECC)","table":"KONV","variant":"ecc"},{"access":"read","join_on":"PRCD_ELEMENTS-KNUMV = VBAK-KNUMV","role":"Price, discount and tax lines (S/4HANA)","table":"PRCD_ELEMENTS","variant":"s4"},{"access":"read","join_on":"","role":"Bank account printed on the proforma","table":"T012K","variant":"both"},{"access":"read","join_on":"NAST-OBJKY = VBAK-VBELN","role":"Output records and revision count","table":"NAST","variant":"both"},{"access":"read","join_on":"CDHDR-OBJECTCLAS = 'VERKBELEG' AND CDHDR-OBJECTID = VBAK-VBELN","role":"Order changes since the last sending","table":"CDHDR","variant":"both"}],"title":"Sales Order Confirmation and Proforma Invoice Output with Automatic Email","url":"https://nekuhub.com/en/programs/sales-order-confirmation-and-proforma-invoice-output/","vendor_id":"nekudos"}