The sample code has four parts:
- selection screen
- Data Population
- BAPI call
- output from BAPI call
The (*) indicates that those are comments and are not executed in the program.This Program creates the Purchase Order only for one item.User should change the default values while executing the program. Current default values are valid for the custom settings made at our R/3 system.This code is useful before creating a WebDynpro application to test the functionality of BAPI.It has all mandatory fields populated to create the purchase order document with standard type NB. User can directly upload this code in R/3 system using tcode SE38. Code Sample: