{"audience":"Dealer channel sales teams, order entry and customer service, portal and integration teams.","authorization_objects":[{"note":"Authorization to create orders of the portal order type","object":"V_VBAK_AAT"},{"note":"Sales order authorization by sales organization","object":"V_VBAK_VKO"},{"note":"Authorization for the service user to call the portal service only","object":"S_SERVICE"}],"components":[],"countries":[],"effort_days_max":18,"effort_days_min":12,"effort_size":"L","faq":[{"a":"It works with any portal that can make REST/JSON calls. On the SAP side the service and message structure are agreed with the portal team during installation; if middleware is used, the service is placed behind it.","q":"Which portal technology does it work with?"},{"a":"The portal takes the price from a simulation of SAP pricing rather than from its own list. Condition records, discounts and campaigns are therefore kept in one place and the price does not change when the order is created.","q":"How does the portal price stay the same as the SAP price?"},{"a":"The order is created in SAP but stays blocked by the standard credit check; the portal shows it as \"awaiting approval\". When the credit team releases the block, a status update goes to the portal.","q":"What happens to the order of a dealer over its credit limit?"}],"features":[{"code":"log","label":"Line-by-line result and error log","note":"Every portal message is kept in the application log with its result."},{"code":"alv","label":"ALV list (sort, filter, subtotals)","note":""},{"code":"background","label":"Runs as a background job","note":"Queued orders and status updates are processed by a short-interval job."},{"code":"error_file","label":"Download failed lines as a separate file","note":""}],"functions":[{"name":"BAPI_SALESORDER_CREATEFROMDAT2","role":"Creates the sales order from the portal order"},{"name":"BAPI_SALESORDER_SIMULATE","role":"Calculates the dealer-specific price and confirmation date for the portal"},{"name":"BAPI_SALESORDER_GETSTATUS","role":"Returns the open order status to the portal"},{"name":"BAPI_AR_ACC_GETKEYDATEBALANCE","role":"Returns the dealer's account balance"},{"name":"BAPI_TRANSACTION_COMMIT","role":"Commits the order"}],"gap":"In the standard, external orders can be received via EDI/IDoc (and reprocessed with BD87), but this needs an EDI partner setup and a converter for each dealer, and most dealers do not use EDI. ECC has no ready service that offers the dealer price, balance and order status queries a portal needs. S/4HANA has released sales order APIs, but duplicate checks, dealer-specific responses and error handling still have to be designed. As a result portal orders are often retyped in VA01.","id":"sd-dealer-b2b-portal","industries":[],"input_columns":[{"derived":false,"label":"Portal order number","required":true,"rule":"","target_field":"BSTKD","target_table":"VBKD"},{"derived":false,"label":"Dealer","required":true,"rule":"","target_field":"KUNNR","target_table":"VBAK"},{"derived":false,"label":"Ship-to","required":false,"rule":"","target_field":"KUNNR","target_table":"VBPA"},{"derived":false,"label":"Material","required":true,"rule":"","target_field":"MATNR","target_table":"VBAP"},{"derived":false,"label":"Quantity","required":true,"rule":"","target_field":"KWMENG","target_table":"VBAP"},{"derived":false,"label":"Unit","required":false,"rule":"","target_field":"VRKME","target_table":"VBAP"},{"derived":false,"label":"Requested delivery date","required":false,"rule":"","target_field":"EDATU","target_table":"VBEP"}],"kind":"program","language":"en","lastmod":"2026-11-17","logic":"1. The portal sends the order to a REST/JSON service: dealer code, portal order number, ship-to, items and requested delivery date. The service user is authorized for this service only.\n2. Checks: the dealer is defined in the sales area (KNVV) and has no order block (KNA1-AUFSD), the ship-to is a partner of the dealer (KNVP), the material is released for sale (MVKE-VMSTA), and the same portal order number has not been received for this dealer before (VBKD-BSTKD).\n3. The order is created with BAPI_SALESORDER_CREATEFROMDAT2 in the order type defined for the portal; the portal order number is written as the customer PO number. Pricing, campaigns and credit check run in standard order processing.\n4. Response: SAP order number, confirmed quantity and date per item (VBEP) and net value. If the order was saved incomplete or with a credit block, the portal receives an \"awaiting approval\" status; errors are returned with their message texts.\n5. Query services: price simulation via BAPI_SALESORDER_SIMULATE, open order status via BAPI_SALESORDER_GETSTATUS and account balance via BAPI_AR_ACC_GETKEYDATEBALANCE.\n6. Each message is written to the application log (BALHDR) with its result. A monitor screen shows failed messages; after the data is corrected the message can be reprocessed.","module":"SD","object_type":"interface","output_columns":[{"calculated":true,"formula":"Date and time the message was received (BALHDR)","label":"Message time","source_field":null,"source_table":null},{"calculated":false,"formula":"","label":"Portal order number","source_field":"BSTKD","source_table":"VBKD"},{"calculated":false,"formula":"","label":"Dealer","source_field":"KUNNR","source_table":"VBAK"},{"calculated":false,"formula":"","label":"SAP order","source_field":"VBELN","source_table":"VBAK"},{"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":"Fully, partly or not confirmed (VBEP-BMENG)","label":"Confirmation","source_field":null,"source_table":null},{"calculated":true,"formula":"Created, awaiting approval, duplicate or error","label":"Status","source_field":null,"source_table":null},{"calculated":true,"formula":"First error or information message from the BAPI return table","label":"Message","source_field":null,"source_table":null}],"parameters":[{"example":"OR","kind":"parameter","label":"Order type for portal orders","name":"P_AUART","ref_field":"VBAK-AUART","required":true},{"example":"200510","kind":"select_option","label":"Dealer (monitor screen)","name":"S_KUNNR","ref_field":"VBAK-KUNNR","required":false},{"example":"16.11.2026","kind":"select_option","label":"Message date (monitor screen)","name":"S_ERDAT","ref_field":"VBAK-ERDAT","required":false},{"example":"X","kind":"checkbox","label":"Show failed messages only","name":"P_ERR","ref_field":"","required":false}],"part_of":[],"performance":"Do not simulate the whole catalogue item by item for price queries; let the portal make one simulation call for the items in the basket. Run the duplicate check with an indexed read on VBKD-BSTKD. At peak hours queue order creation, but keep the query services synchronous.","process":"O2C","quote_url":"https://nekuhub.com/en/request-a-quote/?report=sd-dealer-b2b-portal","related":["sd-credit-blocked-orders-by-value","sd-incomplete-orders-missing-fields","sd-sales-order-upload"],"releases":[],"source":"custom","standard_alternatives":[{"note":"Enters orders manually; portal orders have to be retyped.","tcode":"VA01"},{"note":"Reprocesses orders received via EDI/IDoc; requires an EDI setup for each dealer.","tcode":"BD87"}],"summary":"A custom integration between the dealer order portal and SAP. Orders from the portal are checked and turned into sales orders automatically; the order number, confirmed quantity and date are returned to the portal. The portal queries the dealer-specific price, open orders and account balance from SAP in real time, so the price list is not kept in two places.","tables":[{"access":"write","join_on":"","role":"Sales order header created","table":"VBAK","variant":"both"},{"access":"write","join_on":"VBAP-VBELN = VBAK-VBELN","role":"Order items created","table":"VBAP","variant":"both"},{"access":"read_write","join_on":"VBKD-VBELN = VBAK-VBELN","role":"Duplicate check by portal order number (customer PO number)","table":"VBKD","variant":"both"},{"access":"read","join_on":"VBEP-VBELN = VBAP-VBELN AND VBEP-POSNR = VBAP-POSNR","role":"Confirmed quantity and date (response to the portal)","table":"VBEP","variant":"both"},{"access":"read","join_on":"KNVV-KUNNR = VBAK-KUNNR","role":"Dealer's sales area data","table":"KNVV","variant":"both"},{"access":"read","join_on":"KNVP-KUNNR = VBAK-KUNNR","role":"Dealer's ship-to partners","table":"KNVP","variant":"both"},{"access":"read","join_on":"KNA1-KUNNR = VBAK-KUNNR","role":"Dealer name and order block","table":"KNA1","variant":"both"},{"access":"read","join_on":"MVKE-MATNR = VBAP-MATNR","role":"Sales status of the material","table":"MVKE","variant":"both"},{"access":"write","join_on":"","role":"Processing log of each portal message","table":"BALHDR","variant":"both"}],"title":"Dealer (B2B) Order Portal Integration with SAP Sales Orders","url":"https://nekuhub.com/en/programs/dealer-b2b-order-portal-integration/","vendor_id":"nekudos"}