Create SAP Customer Classification with BAPI function



User Rating:  / 0
PoorBest 
Details
Category: ABAP
Created on Wednesday, 13 June 2012 10:06
Last Updated on Wednesday, 13 June 2012 10:08
Published on Wednesday, 13 June 2012 10:06
Written by Administrator
Hits: 10848

The following code creates Sap Customer Classification using BAPI Function :

View source
report zcustclass.
*---------------------------------------------------
*   wwww.developerpages.gr
*--------------------------------------------------- 
 
data : l_return  type TABLE OF BAPIRET2.
 
CALL FUNCTION 'BAPI_OBJCL_CREATE'
  EXPORTING
    OBJECTKEYNEW   = '0000999999'  " Customer code
    OBJECTTABLENEW = 'KNA1'
    CLASSNUMNEW    = 'XXXXXXXXXXXXXX'  " Class
    CLASSTYPENEW   = '011'
  TABLES
    RETURN         = l_return.
 
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.