Here In this example, barcode generated is a combination of Personnel Number and Trip Number.
Go to Transaction SFP.
Create an Interface with two parameters GV_PERNR & GV_REINR under Import.
Save and Activate the Interface.
Create an form and Drag and Drop the GV_PERNR and GV_REINR Values from Interface on the left side to Context on the right side.
Goto Layout Tab.
Goto Palettes -> Library.
Under Barcodes, select the type of Barcode – I have selected Code 128.
Place it in the Form. Adjust the size of the barcode as required.
Drag and drop GV_PERNR and GV_REINR in the form.
For Barcode, maintain the Data length as 18 (Personnel number – 8 & Trip Number – 10)
Barcode value is combination of Personnel Number and Trip Number.
Form Calc Language is used to generate the Barcode Number so the Value is selected as ‘Calculated-Read Only’.
Save and Activate the Form.
Execute the Form.
Provide the inputs – Personnel Number – 00000001 & Trip Number – 0000001234
Click on Execute.
Enter the Output Device and Click on Print Preview.
Barcode is generated which is a combination of Personnel Number and Trip Number.