2007 Dec 10 10:59 PM
Hi guys in ie03 , when we go to classes info, i see a calue contract end date and a val associated with it, this is a characterstics, please tell me how to determine it at runtime ? I need to include this in a custom program
Thanks
2007 Dec 10 11:14 PM
Hi Sameer,
To get the Characteristic Values of Equipment number you need to use 2 Function modules.
BAPI_OBJCL_GETCLASSES
BAPI_CLASS_GET_CHARACTERISTICS
This is the sample code to get the characteristic values for Material.
REPORT ztemp.
DATA: i_alloc_list TYPE STANDARD TABLE OF bapi1003_alloc_list,
i_return TYPE STANDARD TABLE OF bapiret2,
i_chars TYPE STANDARD TABLE OF bapi_char,
i_char_values TYPE STANDARD TABLE OF bapi_char_values,
wa_alloc_list TYPE bapi1003_alloc_list,
wa_char_values TYPE bapi_char_values,
g_objectkey TYPE bapi1003_key-object.
CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
EXPORTING
objectkey_imp = 'XX01726138-206'
objecttable_imp = 'MARA'
classtype_imp = 'Z01'
TABLES
alloclist = i_alloc_list
return = i_return.
LOOP AT i_alloc_list INTO wa_alloc_list.
CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'
EXPORTING
classnum = wa_alloc_list-classnum
classtype = 'Z01'
TABLES
characteristics = i_chars
char_values = i_char_values.
LOOP AT i_char_values INTO wa_char_values.
WRITE: / 'Characteristic:', 20 wa_char_values-name_char,
40 'Value:', 50 wa_char_values-char_value.
ENDLOOP.
ENDLOOP.Regards,
Satish
Hi guys in ie03 , when we go to classes info, i see a calue contract end date and a val associated with it, this is a characterstics, please tell me how to determine it at runtime ? I need to include this in a custom program
Thanks
2007 Dec 10 11:14 PM
Hi Sameer,
To get the Characteristic Values of Equipment number you need to use 2 Function modules.
BAPI_OBJCL_GETCLASSES
BAPI_CLASS_GET_CHARACTERISTICS
This is the sample code to get the characteristic values for Material.
REPORT ztemp.
DATA: i_alloc_list TYPE STANDARD TABLE OF bapi1003_alloc_list,
i_return TYPE STANDARD TABLE OF bapiret2,
i_chars TYPE STANDARD TABLE OF bapi_char,
i_char_values TYPE STANDARD TABLE OF bapi_char_values,
wa_alloc_list TYPE bapi1003_alloc_list,
wa_char_values TYPE bapi_char_values,
g_objectkey TYPE bapi1003_key-object.
CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
EXPORTING
objectkey_imp = 'XX01726138-206'
objecttable_imp = 'MARA'
classtype_imp = 'Z01'
TABLES
alloclist = i_alloc_list
return = i_return.
LOOP AT i_alloc_list INTO wa_alloc_list.
CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'
EXPORTING
classnum = wa_alloc_list-classnum
classtype = 'Z01'
TABLES
characteristics = i_chars
char_values = i_char_values.
LOOP AT i_char_values INTO wa_char_values.
WRITE: / 'Characteristic:', 20 wa_char_values-name_char,
40 'Value:', 50 wa_char_values-char_value.
ENDLOOP.
ENDLOOP.Regards,
Satish
2008 Jan 30 11:41 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |