‎2011 Nov 09 7:22 PM
I have a class called "SUERTE" with categ.class = "003 - Functional Location". This class was created by the standard transaction CL01 and its characteristics were assigned to the class.
in transaction IL02, type the code of functional location, and it displays all the values of the characteristics for class "SUERTE". Right there I can change nay value and updates.
I need to know BAPI´s name to update the value of the characteristics of a class (Transaction code IL02).
I'm just starting in BAPI management , if you could give me an example of how to run and parameters considering the example described above i would appreciate it.
the bapi BAPI_CLASS_GET_CHARACTERISTICS got me the characteristic list that is assigned a class. For this BAPI, the parameters according to my example would be:
CLASSNUM = 'SUERTE'
ClassType = '003'
can help me pls with similar example with right bapi for update characteristics values like transaction IL02 pls.
Thank you!
‎2011 Nov 09 7:33 PM
Use BAPI_CHARACT_CREATE.
What you could do is to first use BAPI_CHARACT_GETDETAIL to query a characteristic, then it will populate the relevant tables with data. You can then use this data to call BAPI_CHARACT_CREATE, to create other characteristic values.
This should work as both BAPI's have identical interface. Only difference being one creates where the other retrieves the characteristics.
‎2011 Nov 10 7:29 AM
First read the existng characterstics value with 'BAPI_OBJCL_GETDETAIL' and then you can use
'BAPI_OBJCL_CHANGE' to change the values by modifying tables parameter retrievied from first BAPI.
Thanks,
Pawan
‎2011 Nov 15 12:35 PM
Good morning.
I'm trying to use the BAPI BAPI_OBJCL_CHANGE.
this BAPI performs the process that is normally performed by the standard transaction IL02, I want to upgrade or change the current value of a characteristic of a functional location.
If you enter the IL02, give the code a functional location, the transaction displays the data and on the tab "Characteristics" shows all the values of each one of the characteristics associated with that functional location. I want to modify the value of these characteristics.
The code I have and that I am not running is the following:
*Obtengo las caracteristicas de una clase
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = wa_kssk-objek " = '1001-010'
objecttable = p_tcode " = 'IFLOT'
classnum = l_classnum " = 'SUERTE'
classtype = wa_kssk-klart " = '003'
TABLES
allocvaluesnum = i_CARACT_NUM "devuelve las caract num
allocvalueschar = i_CARACT_CHAR "devuelve las caract char
allocvaluescurr = i_CARACT_CURR "devuelve las caract curr
return = i_return.
loop at i_caract_num.
read table caract_num into wa_num with key charact = i_caract_num-charact.
if sy-subrc ne 0.
append i_caract_num to caract_num.
endif.
endloop.
loop at i_caract_char.
read table caract_char into wa_char with key charact = i_caract_char-charact.
if sy-subrc ne 0.
append i_caract_char to caract_char.
endif.
endloop.
loop at i_caract_curr.
read table caract_curr into wa_curr with key charact = i_caract_curr-charact.
if sy-subrc ne 0.
append i_caract_curr to caract_curr.
endif.
endloop.
*Aqui es donde no me funciona
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = wa_kssk-objek " = '1001-010'
objecttable = p_tcode " = 'IFLOT'
classnum = l_classnum " = 'SUERTE'
classtype = wa_kssk-klart " = '003'
TABLES
allocvaluesnumnew = caract_num
allocvaluescharnew = caract_char
allocvaluescurrnew = caract_curr
return = return.
i dont now where i can give the caracteristic name and the new value in the bapi.
In my case I want to change a caracteristic type CURR, so using the debugging, i modify on the table "caract_curr" the "value_to" and I put the new value that i want, but the BAPI did nothing; i consulted by the transaction IL02 and caracteristic continues with the old value.
The basic data are:
Class = 'SUERTE'
Cat Class = '003' "functional location
Table = 'IFLOT'
Characteristic = 'VALOR_STOCK_APS' "Type CURR
Current value = 0 USD
New value = 1000 USD
If you can explain me how I can pass these values ​​to the BAPI so that I run after changing the value of the feature "VALOR_STOCK_APS" from 0 to 1000 USD and that it can be reflected upon entering the transaction IL02.
Thank you!
‎2011 Nov 18 11:00 AM
You have to modify i_caract_curr table for 'VALOR_STOCK_APS' before calling 'BAPI_OBJCL_CHANGE'
BAPI.
loop at i_caract_curr.
read table i_caract_curr into wa_curr with key charact = 'VALOR_STOCK_APS' .
if sy-subrc eq 0.
wa_curr-VALUE_FROM = New value here
modify i_caract_curr from wa_curr where = 'VALOR_STOCK_APS' .
endif.
endloop.
Thanks,
Pawan