Application Development and Automation 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: 
Read only

Business objects link

Former Member
0 Likes
649

Hi Friends,

I am new to the Business objects. I got one requirement on business object.

My SAP version is ECC 5.0.

Here is the situation:

I am attaching customer and claim documents through OAOR transaction (Business Document Navigator) .

Attaching files are working fine in both customer and claim objects. i mean I can able to see those attached documentsin "Business Document Navigator).

There is a standard transaction to see claim documents. i.e WTYSE.

and we are using custom transaction to see customer documents.

I can able to see claim documents in WTYSE. But I am not able to see customer documents in ztransaction.

Could you pls help me ... some where we are missing link between business objects and object key number.

Is there any way to maintain link?

Hope you understood my issue. pls help me .

This is very urgent.

Thanks in advance

1 REPLY 1
Read only

uwe_schieferstein
Active Contributor
0 Likes
453

Hello

Have a look at the guide How to Attach Documents to Any Custom Program Using Generic Object Services

In the standard transaction like CLM3 (Display Claim) the GOS manager is defined in include LIQS0TPQ


...
* Objektdefinition generische Objektdienste
DATA: GO_NOTOBJECT TYPE REF TO CL_GOS_MANAGER.
DATA: G_OBJECT_GOS TYPE BORIDENT.
DATA: GV_CALL_BY_GOS(1)   type c value ' '.                  "818559
* note 881166
DATA: BEGIN OF GS_GOS,
        QMNUM LIKE VIQMEL-QMNUM,
        GO_NOTOBJECT TYPE REF TO CL_GOS_MANAGER,
        G_OBJECT_GOS TYPE BORIDENT,
      END   OF GS_GOS.
DATA: GT_GOS like GS_GOS occurs 0.
...

and instantiated in FORM routine OBJECT_PUBLISH_F70 (include LIQS0F70 😞


*&---------------------------------------------------------------------*
*&      Form  OBJECT_PUBLISH_F70
*&---------------------------------------------------------------------*
* Objekte bekanntmachen zur Nutzung der Generischen Dienste
*----------------------------------------------------------------------*
FORM OBJECT_PUBLISH_F70.

  DATA: L_OBJECT   LIKE TOAOM-SAP_OBJECT.
  DATA: L_QMNUM    LIKE QMEL-QMNUM.
  DATA: L_QMNUM_H  LIKE QMEL-QMNUM.
  DATA: L_MANUM    LIKE QMSM-MANUM.
  DATA: L_MANUM_H  LIKE QMSM-MANUM.
  DATA: L_OBJKEY   LIKE SWEINSTCOU-OBJKEY.
  DATA: L_OBJID    LIKE SY-MSGV1.
  DATA: L_DIA_STAT LIKE QMEL-KZLOESCH.

*--- Funktion nicht prozessieren im BAPI-Modus
  CALL FUNCTION 'DIALOG_GET_STATUS'
    IMPORTING
      DIALOG_STATUS = L_DIA_STAT.
  IF L_DIA_STAT = YX.
    EXIT.
  ENDIF.

*--- Meldungskopf
  CASE TQ8T-QMTYP.
    WHEN YPM_01.
      L_OBJECT = C_BUS2038.
    WHEN YQM_02.
      L_OBJECT = C_BUS2078.
    WHEN YSM_03.
      L_OBJECT = C_BUS2080.
    WHEN YNM_05.
      L_OBJECT = C_BUS7051.
      INCLUDE CLAIM_025.
  ENDCASE.

  if t365-aktyp = YAKTYPH                                  "818559
  and ( TQ8T-QMTYP = YSM_03                                "881166
     or TQ8T-QMTYP = YQM_02 and SFBCALL-XDEFREC = YX ).    "881166
    gv_call_by_gos = 'X'.                                  "818559
  endif.                                                   "818559

*-- Unterscheidung ob Anlegen/ Ändern/ Hinzufügen
* IF T365-AKTYP = YAKTYPV OR T365-AKTYP = YAKTYPA.         "note777981
  IF T365-AKTYP = YAKTYPV OR T365-AKTYP = YAKTYPA           "note777981
   OR ( T365-AKTYP = YAKTYPH AND TQ80-EARLY_NUM = YX        "note777981
        AND SFBCALL-XDEFREC = SPACE                        "note881166
        AND ( TQ8T-QMTYP = YPM_01                          "note917479
           OR TQ8T-QMTYP = YSM_03 ) ).                     "note917479

    CALL FUNCTION 'SWU_OBJECT_PUBLISH'
      EXPORTING
        OBJTYPE = L_OBJECT
        OBJKEY  = VIQMEL-QMNUM.

*--- Maßnahmen
    LOOP AT IVIQMSM WHERE AEKNZ NE YDELT
                      AND AEKNZ NE YDELD.
*--- l_objkey fuellen
      CALL FUNCTION 'OBJECT_IDENTIFICATION_GET'
        EXPORTING
          OBJNR       = IVIQMSM-OBJNR
        IMPORTING
          IDENT_OBJID = L_OBJID
        EXCEPTIONS
          OTHERS      = 1.
      IF SY-SUBRC EQ 0.
* der FB OBJECT_IDENTIFICATION_GET liefert eine externe Darstellung für
* eine Objektnummer. Besitzt das Objekt mehrere Keyfelder, werden diese
* durch ein '/' getrennt.
        SPLIT L_OBJID AT '/' INTO L_QMNUM_H L_MANUM_H.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = L_QMNUM_H
          IMPORTING
            OUTPUT = L_QMNUM.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = L_MANUM_H
          IMPORTING
            OUTPUT = L_MANUM.
        CLEAR L_OBJID.
        MOVE L_QMNUM(12) TO L_OBJID(12).
        MOVE L_MANUM(4)  TO L_OBJID+12(4).
        MOVE L_OBJID TO L_OBJKEY.
        CALL FUNCTION 'SWU_OBJECT_PUBLISH'
          EXPORTING
            OBJTYPE = C_QMSM
            OBJKEY  = L_OBJKEY.
      ENDIF.
    ENDLOOP.
* ELSEIF T365-AKTYP = YAKTYPH.                              "note777981
  ELSEIF T365-AKTYP = YAKTYPH AND TQ8T-QMTYP <> YPM_01      "note777981
                              AND TQ8T-QMTYP <> YSM_03.     "note777981
*   note 881166
    READ TABLE GT_GOS WITH KEY QMNUM = VIQMEL-QMNUM INTO GS_GOS.
    IF SY-SUBRC NE 0.

      G_OBJECT_GOS-OBJTYPE = L_OBJECT.

*     When calling from defect recording, don't create a object to avoid
*     problems with other created notifications or the BOS object of the
*     inspection lot. Using SWU_OBJECT_PUBLISH you get then the
*     selection list and by deactivating the existence check like with
*     note 818559 you have also the same functionality
      IF SFBCALL-XFUNCCALL = YX AND SFBCALL-XDEFREC = YX.
        G_OBJECT_GOS-OBJKEY  = VIQMEL-QMNUM.
        CALL FUNCTION 'SWU_OBJECT_PUBLISH'
          EXPORTING
            OBJTYPE = L_OBJECT
            OBJKEY  = VIQMEL-QMNUM.
      ELSE.
*     do it like before with all possibilities, but here no selection
*     list is possible, so dangerous, if other objects are published too

        CREATE OBJECT GO_NOTOBJECT
                      EXPORTING  IS_OBJECT      = G_OBJECT_GOS
                                 IP_NO_INSTANCE = YX
*                                 IP_NO_COMMIT   = yx
                      EXCEPTIONS OTHERS         = 1.
      ENDIF.

      GS_GOS-QMNUM = VIQMEL-QMNUM.
      GS_GOS-GO_NOTOBJECT = GO_NOTOBJECT.
      GS_GOS-G_OBJECT_GOS = G_OBJECT_GOS.
      APPEND GS_GOS TO GT_GOS.
    ELSE.
      GO_NOTOBJECT = GS_GOS-GO_NOTOBJECT.
      G_OBJECT_GOS = GS_GOS-G_OBJECT_GOS.
    ENDIF.
  ENDIF.
...

ENDFORM.                               " OBJECT_PUBLISH_F70

Probably you have to make a similar logic known to your custom transaction.

Regards

Uwe