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

DB Table??

Former Member
0 Likes
789

Hi All,

Please tell me which table should i use for creating a link between the document and the business objects???

I searched a lot and i cud jus find the structure like s00d4, sood2, BAPIBORID...

Iam getting something like-

FOLTP FOL

FOLYR 25

FOLNO 000000000004

DOCTP EXT

DOCYR 31

DOCNO 000000000075

THE LINK IS THIS IN WHICH TABLE DOES THIS LINK GETS STORED???

link id C5E5FBEDCB90B4488A7BF3C4EB870E95

Or u can even tell me the name of the Function Module through which i can relate them???

Thanks in Advance.

Seema.

4 REPLIES 4
Read only

Former Member
0 Likes
707

Hi Seema ,

can u give some more input so we can check , IS it from archive link ? If yes Check tcode SARA.

of If it is Temse File check in SP11.

Regards

Prabhu

Read only

0 Likes
707

Hi Prabhu,

here is my code-

INCLUDE : <cntn01>.

CLASS CL_BINARY_RELATION definition load.

CLASS CL_OBL_OBJECT definition load.

PARAMETERS:

P_BOTYPE LIKE obl_s_pbor-typeid DEFAULT 'BUS2032', " e.g. 'BUS2012'

P_BO_ID LIKE OBL_S_PBOR-INSTID DEFAULT '0000002000', " Key e.g.

P_DOCTY LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,

P_MSGTYP LIKE SOFM-DOCTP DEFAULT 'ATTA' NO-DISPLAY,

P_RELTYP LIKE mdoblrel-reltype DEFAULT 'ATTA'.

types: BEGIN OF TY_MESSAGE_KEY,

FOLTP TYPE SO_FOL_TP,

FOLYR TYPE SO_FOL_YR,

FOLNO TYPE SO_FOL_NO,

DOCTP TYPE SO_DOC_TP,

DOCYR TYPE SO_DOC_YR,

DOCNO TYPE SO_DOC_NO,

FORTP TYPE SO_FOR_TP,

FORYR TYPE SO_FOR_YR,

FORNO TYPE SO_FOR_NO,

END OF TY_MESSAGE_KEY.

DATA : LV_MESSAGE_KEY type TY_MESSAGE_KEY.

DATA : LO_MESSAGE type SWC_OBJECT.

DATA : LT_DOC_CONTENT type standard table of SOLI-LINE with header

line.

P_DOCTY = 'MESSAGE'.

CASE P_RELTYP.

WHEN 'URL'.

P_MSGTYP = 'URL'.

WHEN 'NOTE' OR 'PNOT'.

P_MSGTYP = 'RAW'.

WHEN 'ATTA'.

P_MSGTYP = 'EXT'.

WHEN OTHERS.

EXIT.

ENDCASE.

swc_create_object LO_MESSAGE 'MESSAGE' LV_MESSAGE_KEY.

swc_container LT_MESSAGE_CONTAINER.

swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTITLE' 'Title'.

swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTLANGU' 'E'.

swc_set_element LT_MESSAGE_CONTAINER 'NO_DIALOG' 'X'.

swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTNAME' P_DOCTY.

swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTYPE' P_MSGTYP.

CASE P_MSGTYP.

WHEN 'URL'.

LT_DOC_CONTENT = '&KEY&http://www.rmtiwari.com' .

append LT_DOC_CONTENT.

WHEN 'RAW'.

LT_DOC_CONTENT = 'Hi How r u?' .

append LT_DOC_CONTENT.

WHEN 'EXT'.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME =

'C:\Documents and Settings\Administrator\Desktop\auth.txt'

FILETYPE = 'ASC'

TABLES

DATA_TAB = lt_doc_content

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDCASE.

swc_set_element LT_MESSAGE_CONTAINER 'DocumentContent' LT_DOC_CONTENT.

swc_call_method LO_MESSAGE 'CREATE' LT_MESSAGE_CONTAINER.

swc_refresh_object LO_MESSAGE.

swc_get_object_key LO_MESSAGE LV_MESSAGE_KEY.

data: LO_IS_OBJECT_A type SIBFLPORB.

LO_IS_OBJECT_A-INSTID = P_BO_ID.

LO_IS_OBJECT_A-TYPEID = P_BOTYPE.

LO_IS_OBJECT_A-CATID = 'BO'.

data: LO_IS_OBJECT_B type SIBFLPORB.

LO_IS_OBJECT_B-INSTID = LV_MESSAGE_KEY.

LO_IS_OBJECT_B-TYPEID = P_DOCTY.

LO_IS_OBJECT_B-CATID = 'BO'.

CALL METHOD CL_BINARY_RELATION=>CREATE_LINK

EXPORTING

IS_OBJECT_A = LO_IS_OBJECT_A

IS_OBJECT_B = LO_IS_OBJECT_B

IP_RELTYPE = P_RELTYP.

Hope this wud b enough.

Thanks,

Seema.

Read only

0 Likes
707

Hi ,

check the tcode SOBL_MODEL , and get the info of view where u are storing the date .


Create new link
Functionality
This method creates a relationship record of the specified relationship type for the transferred business objects. If attributes have been defined for the relationship type, a structure or a table with data can be transferred for an attribute.

Requirements
The relationship type is added to the model data of the relationship service (transaction SOBL_MODEL).

Result
The relationship record and the attribute are created and are written to the database at the end of the LUW.

Parameters
IS_OBJECT_A

Local persistent object reference to the business object that occurs in the relationship in role A

IP_LOGSYS_A (optional for local object)

Logical system of business objects in role A

IS_OBJECT_B

Local persistent object reference to the business object that occurs in the relationship in role B


IP_LOGSYS_B (optional for local object)

Logical system of business objects in role B

IP_RELTYPE

Relationship type

IP_PROPNAM

Name of relationship attribute. The persistent class, with which the attribute is administered, can be withdrawn from the model data (transaction SOBLVC).

I_PROPERTY

Structure or table with relationship attribute data. The type of parameter is dependent on the relationship attribute.

EP_LINK_ID

Relationship record GUID

EO_PROPERTY

Reference to the instance of the relationship attribute.

Exceptions
CX_OBL_PARAMETER_ERROR (incorrect call of interface)

CX_OBL_INTERNAL_ERROR

CX_OBL_MODEL_ERROR

Notes
Administration of relationship records takes place using the ABAP object services. The method can also be inserted in 00 transactions.

Regards

Prabhu

Read only

0 Likes
707

Hi Prabhu,

The TXN which u suggested is nt wrkin 4 me can u tel me in a more detail plz... i hope u hv understood my requirement i want 2 find out where does in SAP it gets stored??

Iam not even able 2 read whole of ur code coz of the default screen size... so plz change tht 2...

Thanks,

Regards,

Seema.