Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table link for EQUI and AUSP

jogeswararao_kavala
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

jogeswararao_kavala
Active Contributor

Updating the solution to the Titled Query:


EQUI-EQUNR <--------------> KSSK_INOB-INOB_OBJEK

                                                KSSK_INOB-OBJEK  <----------------->  AUSP-OBJEK

Useful discussion related to this  

8 REPLIES 8

gouravkumar64
Active Contributor
0 Kudos

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.

0 Kudos

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

0 Kudos

Hi,

Please marked this thread as answered now,if it is ok.

Regards

Gourav.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

jogeswararao_kavala
Active Contributor

Updating the solution to the Titled Query:


EQUI-EQUNR <--------------> KSSK_INOB-INOB_OBJEK

                                                KSSK_INOB-OBJEK  <----------------->  AUSP-OBJEK

Useful discussion related to this