08-11-2012 5:37 AM
Dear Experts,
Whenever I queried/searched for the subject matter, the usual answer I get is:
EQUI-EQUNR = AUSP-OBJEK.
But this never worked for me.
Please help, how I link these 2 tables.
kind regards
Jogeswara Rao
04-16-2016 1:55 PM
08-11-2012 6:11 AM
Hi,
I am not sure but,
Sometimes it is not possible to link these two types due to different key field length length.
You have some different approach
1)Use standard report IHO8/CL6B/CL6BN, or
2)Develop custom report using BAPI_OBJCL_GETDETAIL like this
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
OBJECTKEY = V_OBJNUM
OBJECTTABLE = C_TABL " EQUI
CLASSNUM = C_CLSNUM " GL_INSP
CLASSTYPE = C_CLAS " Z02
UNVALUATED_CHARS = C_X " X
LANGUAGE = SY-LANGU
TABLES
ALLOCVALUESNUM = I_ALLOCNUM
ALLOCVALUESCHAR = I_ALLOCCHAR
ALLOCVALUESCURR = I_ALLOCCURR
RETURN = I_RETURN.
OR
3)Extract all the equipment and its associated characteristics using IH08 report.
Order and plan information using IW38 ,
Export this to excel & Join using MS ACCESS.
Regards
Gourav.
08-11-2012 11:10 AM
Dear Experts,
I found the answer
By using the FM BAPI_OBJCL_GET_KEY_OF_OBJECT I am getting the OBJEK of AUSP.
Thank you
08-11-2012 11:20 AM
Hi,
Please marked this thread as answered now,if it is ok.
Regards
Gourav.
08-11-2012 11:28 AM
Dear Experts,
I've got some issue further.
The FM is returning value when tested in 220DEV client but no value is returned in Production server.(message:669: Class type 002 requires additional objects)
Both the screen-shots attached.
Pl. help.
kind regards
Jogeswara Rao
08-11-2012 11:42 AM
Hi,
I think
You cannot use the this BAPI for class type 002, This BAPI can only be used with class types which have multiple objects enabled.
For changing the characteristics of material try using BAPI_OBJCL_CHANGE.
like this
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = '1100000028' "Customer
objecttable = 'KNA1'
classnum = 'CATALOG_VIEW_CUST' "Class Number
classtype = '011' "Class Type
tables
allocvaluesnumnew = git_bapi1003
allocvaluescharnew = git_values_char
allocvaluescurrnew = git_values_curr
return = git_bapiret2
.
then,
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = ls_bapiret2
>>OTHER WISE
USE 'BAPI_BATCH_CREATE' like this,
material2 = p_matnr.
plant2 = p_werks.
lgort2 = p_lgort.
CALL FUNCTION 'BAPI_BATCH_CREATE'
EXPORTING
MATERIAL = material2
PLANT = plant2
BATCHSTORAGELOCATION = lgort2
IMPORTING
BATCH = batch2
TABLES
RETURN = return2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
refresh return2.
concatenate material2 batch2 into object2.
CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'
EXPORTING
OBJECTNAME = object2
OBJECTTABLE = 'MCH1'
CLASSTYPE = '023'
CREATE_MISSING_KEY = 'X'
IMPORTING
CLOBJECTKEYOUT = obj_key
TABLES
RETURN = return2
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
It may solve your problem.
Regards
Gourav.
08-11-2012 12:04 PM
It'd be helpful if the suggested examples are relevant to class type 002.
And
How do you explain the 220 client returning correct values.
Regards
Jogeswara Rao
08-12-2012 5:14 AM
Hi,
Actually what happens in our projects same problem we faced with class 001,by this way
USE 'BAPI_BATCH_CREATE' like this,
material2 = p_matnr.
plant2 = p_werks.
lgort2 = p_lgort.
CALL FUNCTION 'BAPI_BATCH_CREATE'
EXPORTING
MATERIAL = material2
PLANT = plant2
BATCHSTORAGELOCATION = lgort2
IMPORTING
BATCH = batch2
TABLES
RETURN = return2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
refresh return2.
concatenate material2 batch2 into object2.
CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'
EXPORTING
OBJECTNAME = object2
OBJECTTABLE = 'MCH1'
CLASSTYPE = '023'
CREATE_MISSING_KEY = 'X'
IMPORTING
CLOBJECTKEYOUT = obj_key
TABLES
RETURN = return2
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
We solved
That's why i was telling u.particular i do not know the Client wise result change reason .
Gourav.
04-16-2016 1:55 PM