SAP Virtual/Onsite Trainings

Document Categories:

What's New?


Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 

Join the Mailing List
Enter name and email address below:
Subscribe  Unsubscribe 

Working with constructors (Global Class)


Step14:  t_vbak is defaulted in the Types tab which has be declared in earlier step

Step15: In the Attributes Tabà Create V_VBELN type vbak-vbeln.

Step16: Double click the Constructor and Implement the code.

Step17:  Go to Select Method à Create Parameters

Step18:  Go to Select Method à Double Click the Method and Implement the code

Step18:  Activate the Class and Go to SE38 à Create a Program: ZCONSTRUCTOR_SALES.

Implement the code and execute the Program

Step20:  Execute the Program without giving any sales document number.


Step21:  The Output is displayed as shown below with the Constructor method with the default initial values

Step22:  Give the Sales Document as: 4971


Step23:  The output is displayed for the corresponding Sales document

Static Constructor  

Step24: Within the Same Global Class Create the Static Constructor. Click on Class Constructor


 Menu à Edit à Create Class Constructor.

Step25: Class Constructor Method is defaulted as shown below as soon as the Class Constructor is Clicked or Selected.

Step26: Select the Class Constructor and Click on Parameters à following message is displayed.

Class Constructor does not have Parameters.

Step27: Double Click the Class_Constructor method and write the Write Statement

Step28: Go to SE38 and execute the same program ZCONSTRUCTOR_SALES. The Class Constructor is triggered.


Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image