cancel
Showing results for 
Search instead for 
Did you mean: 

Read Classification of Object links

Former Member
0 Kudos

Hi All,

I classified Object links (MARA) of a DIR, using class type 048.

Is there any BAPI which can retrieve the Classification information of the Object link.

I tried BAPI_DOCUMENT_GETOBJECTLINKS, it retries only OBJECTLINKID.

Is there any table where I can use this OBJECTLINKID

tried BAPI_DOCUMENT_GETDETIAL2 , not useful.

Regards,

Aby

Accepted Solutions (0)

Answers (3)

Answers (3)

DanielP
Active Participant
0 Kudos

You should use FM:

CLAF_CLASSIFICATION_OF_OBJECTS

Hope it helps.

/Daniel

former_member585060
Active Contributor
0 Kudos

Hi,

Have you set the GETCLASSIFICATION = 'X' in Bapi 'BAPI_DOCUMENT_GETDETAIL2".

CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
      EXPORTING
        documenttype               = wa_draw-dokar
        documentnumber             = wa_draw-doknr
        documentpart               = wa_draw-doktl
        documentversion            = wa_draw-dokvr
*       GETOBJECTLINKS             = ' '
*       GETCOMPONENTS              = ' '
*       GETSTATUSLOG               = ' '
*       GETLONGTEXTS               = ' '
*       GETACTIVEFILES             = 'X'
*       GETDOCDESCRIPTIONS         = 'X'
*       GETDOCFILES                = 'X'
       GETCLASSIFICATION          = 'X'                           " Set this to 'X'
*       GETSTRUCTURE               = ' '
*       GETWHEREUSED               = ' '
*       HOSTNAME                   = ' '
*     IMPORTING
*       DOCUMENTDATA               =
*       RETURN                     =
*     TABLES
*       OBJECTLINKS                =
*       DOCUMENTDESCRIPTIONS       =
*       LONGTEXTS                  =
*       STATUSLOG                  =
*       DOCUMENTFILES              =
*       COMPONENTS                 =
       CHARACTERISTICVALUES       = i_class           " You will get Classifications in i_class
*       CLASSALLOCATIONS           =
*       DOCUMENTSTRUCTURE          =
*       WHEREUSEDLIST              =
              .

      LOOP AT i_class.

            CALL FUNCTION 'BAPI_CHARACT_GETDETAIL'
              EXPORTING
                charactname         =   i_class-charname.
*               KEYDATE             = SY-DATUM
*               LANGUAGE            =
              IMPORTING
                charactdetail       = lv_chardetail
              TABLES
*               CHARACTDESCR        =
*               CHARACTVALUESNUM    =
*               CHARACTVALUESCHAR   =
*               CHARACTVALUESCURR   =
*               CHARACTVALUESDESCR  =
*               CHARACTREFERENCES   =
*               CHARACTRESTRICTIONS =
                return              = lt_return.

ENDLOOP.

Thanks & Regards
Bala Krishna

Message was edited by: Bala Krishna

Former Member
0 Kudos

Hi Bala,

Thanks, I tried this but sorry, this will bring only the Classification values assigned to Class type 017.

My requirement is classfication information of Object links, Class type 048, in a document info record.

Regards,

Aby

former_member585060
Active Contributor
0 Kudos

Hi,

You will get that entry in STXH table, you can read that values using READ_TEXT function module.

First get the Objectlinks using Bapi 'BAPI_DOCUMENT_GETDETAIL2' by setting GETOBJECTLINKS = 'X'.

You will get all Objectlinks in i_objlinks.

Now with the I_objlinks-objlinkid( Pass this value into STXH it will have an entry) value pass it to READ_TEXT function module.

CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
      EXPORTING
        documenttype               = wa_draw-dokar
        documentnumber             = wa_draw-doknr
        documentpart               = wa_draw-doktl
        documentversion            = wa_draw-dokvr
       GETOBJECTLINKS             = 'X'
*       GETCOMPONENTS              = ' '
*       GETSTATUSLOG               = ' '
*       GETLONGTEXTS               = ' '
*       GETACTIVEFILES             = 'X'
*       GETDOCDESCRIPTIONS         = 'X'
*       GETDOCFILES                = 'X'
*       GETCLASSIFICATION          = 'X'
*       GETSTRUCTURE               = ' '
*       GETWHEREUSED               = ' '
*       HOSTNAME                   = ' '
*     IMPORTING
*       DOCUMENTDATA               =
*       RETURN                     =
*     TABLES
       OBJECTLINKS                =  i_objlinks
*       DOCUMENTDESCRIPTIONS       =
*       LONGTEXTS                  =
*       STATUSLOG                  =
*       DOCUMENTFILES              =
*       COMPONENTS                 =
*       CHARACTERISTICVALUES       =
*       CLASSALLOCATIONS           =
*       DOCUMENTSTRUCTURE          =
*       WHEREUSEDLIST              =
              .

DATA : v_name TYPE stxh-tdname.

LOOP AT i_objlinks.

v_name = i_objlinks-objectlinkid.

IF NOT v_name IS INITIAL.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      id                      = 'LTXT'
      language                = sy-langu
      name                    = v_name
      object                  = 'DRAD'
    TABLES
      lines                   = i_textlines
    EXCEPTIONS
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      OTHERS                  = 8.


*** i_textlines will have the long text.


ENDIF.

CLEAR : v_name.
REFRESH : i_textlines.
ENDLOOP.

Thanks & Regards

Bala Krishna

Former Member
0 Kudos

Hi Bala,

I checked your suggestion. I could see the Long text stored for the object links are saved in the table STXH.

The Classification details are not stored there, becasue no new entries were created when I added classification for a new object link now.

Regards,

Aby

former_member585060
Active Contributor
0 Kudos

Hi Aby,

Can provide the screenshot of the characteristics which you are providing in the Objectlinks tab. I can see only a long text being created. I am little bit confused as how can we enter characteristics in Objectlinks tab.

Just post the screen shot of what values you are expecting from that Objectlinkid.

Thanks & Regards

Bala Krishna

Former Member
0 Kudos

Hi Bala,

of course, please find the screen shots

I require a Function module which can retrive the characeteric values, by reading the Document Info record.

Regards,

Aby

Former Member
0 Kudos

Hi All,

I got the answer,  The OBJECTLINKID can be passed in table AUSP and there we can read the entries of the Characteristics.

Thanks all.

Regards,

Aby

former_member188883
Active Contributor
0 Kudos

Hi Aby,

You may use BAPI_OBJCL_GETDETAIL .

Refer links below for details.

http://www.saptechnical.com/Tutorials/BAPI/Classification/Index.htm

http://scn.sap.com/message/13965532

Hope this helps.

Regards,

Deepak Kori

Former Member
0 Kudos

Hello Deepak,

I had seen these links. They talk about when you classify an Object such as material or Equipment master.

Here, I classify Object links , using class type 048. 

BAPI_OBJCL_GETDETAIL is not returning results for class type 048.

Regards,

Aby