‎2009 Jul 21 9:04 AM
Dear Experts ,
I have created a characteristics contanis the SLED with reference to table MCHA & field VFDAT , but I have a problem finding the table that contains the data i stored in the characteristics
I have looked at AUSP & CAWN but it just contains Null values in the Character Value Field
The other problem that even the field VFDAT in table MCHA does not contain the dates i entered in the MIGO in the SLED Field
Note : I enter the Date twice .. once in the characteristics and the other in the original SLED field
Please Advice
Thanks in Advanced
‎2009 Jul 22 9:03 AM
The value of the field in the table is :
2.0090703000000000E+07
but in real when i display it through the standard transaction is 03.07.209
How can convert it to date type in SAP Query ??
Thanks alot for you help
‎2009 Jul 21 9:22 AM
Hi,
If my understanding is right.
Try using the following function module for Material characteristics CLAF_CLASSIFICATION_OF_OBJECTS and VB_BATCH_GET_DETAIL for Batch characteristics.
Regards,
Sandhya
‎2009 Jul 21 9:31 AM
‎2009 Jul 21 9:58 AM
You can find the value of characteristics related value from table INOB and AUSP.
Check the below sample code in this code you can fetch the vaue of UD characteristics.
IF s_compcd-low = '003'.
CONCATENATE gt_invent1_temp-matnr gt_invent1_temp-werks gt_invent1_temp-charg INTO gv_objek.
SELECT SINGLE cuobj FROM inob
INTO gv_cuobj
WHERE klart = '022' AND
obtab = 'MCHA' AND
objek = gv_objek.
IF sy-subrc = 0.
SELECT SINGLE atwrt FROM ausp
INTO gv_atwrt
WHERE objek = gv_cuobj AND
atinn = '0000000448' (this value ix fixed for UD characteristics).
IF sy-subrc = 0.
MOVE gv_atwrt TO gt_invent1-ud_char.
ENDIF.
endif.
Or you can also use BAPI to fetch this value check the below sample code
CALL FUNCTION 'QMSP_MATERIAL_BATCH_CLASS_READ'
EXPORTING
i_matnr = matnr
i_charg = charg
i_werks = werks
i_mara_level = 'X'
i_no_dialog = 'X'
i_datuv = sy-datum
IMPORTING
e_class = lv_class
e_klart = lv_klart
e_obtab = lv_table
e_objec = lv_objek
EXCEPTIONS
no_class = 1
internal_error_classif = 2
no_change_service = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = lv_objek
objecttable = lv_table
classnum = lv_class
classtype = lv_klart
keydate = sy-datum
language = sy-langu
TABLES
allocvaluesnum = lt_alloc_values_num
allocvalueschar = lt_allocvalueschar
allocvaluescurr = lt_allocvaluescurr
return = lt_return.
ENDIF.
Hope this will help you.
‎2009 Jul 22 8:25 AM
The probem is when the characteristics's type is "Char" the value is displayed in AUSP but when the its type is DATE there is no data displyed even though the data is exicted when I try viewing it by a standard transaction
Thanks a lot guys for you help
‎2009 Jul 22 8:35 AM
Hello
In some cases values type DATE are stored in field AUSP-ATFLV (instead AUSP-ATWRT). Check this.
‎2009 Jul 22 9:03 AM
The value of the field in the table is :
2.0090703000000000E+07
but in real when i display it through the standard transaction is 03.07.209
How can convert it to date type in SAP Query ??
Thanks alot for you help
‎2009 Jul 22 9:11 AM
Hello
In programm I do like this:
data: IDATE TYPE I,
XDATE(10),
TEMP(8),
DAY(2),
MONTH(2),
YEAR(4).
IDATE = AUSP-ATFLV.
TEMP = IDATE.
YEAR = TEMP.
MONTH = TEMP+4(2).
DAY = TEMP+6(2).
CONCATENATE DAY MONTH YEAR INTO XDATE SEPARATED BY '.'.
As result - in XDATE I will have date.
‎2009 Jul 22 9:31 AM
A lot of thanks for you answers
But please can you till me if it possible to enter this code in a LOCAL field in SAP Query
Note : I have tested this code in se93 with a seperate program and it worked very good
Please Advice
‎2009 Jul 22 9:37 AM
Hello
Regrettably, I do not work with SAP Query. So I can not advise
‎2009 Jul 22 9:43 AM
even though Thanks alot for you help .. i will continue from this ... you are very helpful
Thanks again