Objectives: Logon To SAP From VB. Use of BAPI. Creation of Sales Order Using BAPI
Objectives: Logon To SAP From VB. Use of BAPI. Creation of Sales Order Using BAPI
Objectives: Logon To SAP From VB. Use of BAPI. Creation of Sales Order Using BAPI
Objectives
By the end of this Exercise, you will be familiar to:
Prerequisites
Before working on this exercise, you should be familiar with the following:
Property Value 2
Name frmCustomer
Caption Customer Order
Height 4425
Width 8520
• Choose Copy.
• Choose Paste.
Doc Type
Sales Org 5
Distribution Channel
Division
Date
PO Number
Partner Role
Partner Number
Req. Quantity
Material
Rate
1. Create Order
2. Log Off
Dim x As String
oheader.Value("DOC_TYPE") = Text1(0)
oheader.Value("SALES_ORG") = Text1(1)
oheader.Value("DISTR_CHAN") = Text1(2)
oheader.Value("DIVISION") = Text1(3)
oheader.Value("PRICE_DATE") = Text1(4)
oheader.Value("PURCH_NO") = Text1(5)
oPartner.rows.Add
oPartner.Value(1, "PARTN_ROLE") = Text1(6)
oPartner.Value(1, "PARTN_NUMB") = Text1(7)
oItemin.rows.Add
oItemin.Value(1, "REQ_QTY") = Text1(8)
oItemin.Value(1, "MATERIAL") = Text1(9)
oItemin.Value(1, "COND_VALUE") = Text1(10)
boOrder.createfromdata orderheaderin:=oheader, orderitemsin:=oItemin,
orderpartners:=oPartner, return:=oreturn
x = oreturn.Value("message")
If x = "" Then
MsgBox "Transaction complete"
Else
MsgBox x
End If
10
11
12
13
15
4
16
4