2006 Jun 29 12:24 PM
HI All,
Ho to give the inputs to this Bapi : BAPI_OBJCL_CREATE
Thanks
Ravi
2006 Jun 29 12:30 PM
You should specify the object for which you want to create the classification and the classes / char values that you want this object to have.
What exactly is the issue?
regards,
Ravi
Note : Please mark the helpful answers
2006 Jun 29 12:41 PM
Hi All ,
Requirement is I am creating a batch(Bapi : BAPI_BATCH_CREATE) , for which charactaristic values are not updating.
Can any body suggest how to do...?
Thanks
Ravi
2006 Jun 29 12:36 PM
Hi,
you can build upon these details.
p_v_objectkey -> concatenate otificatin number with line number
p_v_objecttable ->table name
p_v_classnum -> name of the class.
p_v_classtype -> type of the class.
p_i_allocvaluesnumnew -> pass it blank
p_i_allocvaluescharnew ->
wa_i_allocvaluescharnew-charact = characteristics name.
wa_i_allocvaluescharnew-value_char = value of the characteristics.
p_i_allocvaluescurrnew -> pass it blank
p_i_return_class -> stores return value.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = p_v_objectkey
objecttablenew = p_v_objecttable
classnumnew = p_v_classnum
classtypenew = p_v_classtype
STATUS = '1'
STANDARDCLASS =
CHANGENUMBER =
KEYDATE = SY-DATUM
NO_DEFAULT_VALUES = ' '
IMPORTING
CLASSIF_STATUS =
TABLES
allocvaluesnum = p_i_allocvaluesnumnew
allocvalueschar = p_i_allocvaluescharnew
allocvaluescurr = p_i_allocvaluescurrnew
return = p_i_return_class
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
wait up to 2 seconds.
In case you need a complete working program do let me know. I need to create it.
Regards,
Sumit.
2006 Jun 29 12:39 PM
Hi ,
what is the meaning of this :
p_v_objectkey -> concatenate otificatin number with line number
Thanks
Ravi
2006 Jun 29 12:44 PM
sorry spelling mistake.
its notification number.
p_v_objectkey is a parameter we need to pass in this BAPI. we create this parameter by concatenating the notification number with line item number .
2006 Jul 03 2:51 PM
2006 Jul 03 2:54 PM
Hello,
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = P_L_T_CLASS-objnum
objecttablenew = 'MARA'
classnumnew = P_L_T_CLASS-class
classtypenew = P_L_T_CLASS-ctype
STATUS = '1'
STANDARDCLASS =
CHANGENUMBER =
KEYDATE = SY-DATUM
TABLES
allocvaluesnum = l_it_num
allocvalueschar = l_it_mkml
allocvalueschar = l_t_class
allocvaluescurr = l_it_curr
return = l_t_ret2.
Try like this.
Dont forget to award point
Regards,
Vasanth
2006 Jul 03 3:00 PM
Hai Ravi
Check the following Code
DATA: obtab LIKE tcla-obtab,
objectkey TYPE objnum,
hlp_return TYPE TABLE OF bapiret2 ,
wa_return type bapiret2,
it_t001w TYPE TABLE OF t001w WITH HEADER LINE,
it_werks TYPE TABLE OF pre15 WITH HEADER LINE.
SELECT SINGLE obtab FROM tcla INTO obtab
WHERE klart EQ i_classtypenew.
IF sy-subrc NE 0.
t_return-type = 'E'.
t_return-message = text-001.
APPEND t_return.
EXIT. "from Function
ENDIF.
IF NOT i_flg_werks_to_kunnr IS INITIAL.
it_werks[] = t_newobjects[].
SELECT * FROM t001w INTO TABLE it_t001w
FOR ALL ENTRIES IN it_werks
WHERE werks = it_werks-werks.
LOOP AT t_newobjects.
READ TABLE it_t001w WITH KEY werks = t_newobjects-object.
IF sy-subrc EQ 0.
t_newobjects-object = it_t001w-kunnr.
MODIFY t_newobjects.
ENDIF.
ENDLOOP.
ENDIF.
DATA: it_stores TYPE TABLE OF wisp_breakd_result
WITH HEADER LINE.
REFRESH it_stores.
LOOP AT t_newobjects.
it_stores-object = t_newobjects-object.
COLLECT it_stores.
ENDLOOP.
LOOP AT it_stores.
REFRESH hlp_return.
objectkey = it_stores-object.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = objectkey
objecttablenew = obtab
classnumnew = i_classnumnew
classtypenew = i_classtypenew
TABLES
return = hlp_return.
APPEND LINES OF hlp_return TO t_return.
ENDLOOP.
READ TABLE t_return WITH KEY type = msgty_error.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = true
IMPORTING
return = wa_return.
ENDIF.
Thanks & regards
Sreeni
Message was edited by: Sreenivasulu Ponnadi