This website is not affiliated with, sponsored by, or approved by SAP AG.

Help required: Record/Document Management

CRM related discussion only

Moderators: Snowy, thx4allthefish, Lost Identity

Help required: Record/Document Management

Postby nsp » Tue Jun 12, 2007 9:21 am

Dear All,

Iam testing the method 'Checkoutviafile' of the object 'DOCUMENT'.
I get errors. Please let me know the exact parameters to be passed.
I find it really difficult to deal with record management.

Thanks,
nsp.
nsp
 
Posts: 121
Joined: Tue May 02, 2006 6:56 am

Re: Help required: Record/Document Management

Postby didier » Wed Jun 13, 2007 1:34 am

nsp wrote:I find it really difficult to deal with record management.



I find it really difficult to deal with errors which are even not mentioned...

Don't you see some error code ?

Didier
didier
 
Posts: 2406
Joined: Thu Apr 29, 2004 3:33 pm

Postby nsp » Wed Jun 13, 2007 2:34 am

Here is the error detail.

Source: CL_SRM_GENERIC_SP0============CP , CL_SRM_GENERIC_SP0============CM002 , 102
Message no. SRM_REGISTRY151
General error: Could not connect to repository.
Message no. BL001

Now can you help me out?

The code that I have used is

* Definition of local data types for DOC_ID
types: begin of ty_doc_id,
docclass type bapisrmdoc-docclass,
objectid type bapisrmdoc-guid,
end of ty_doc_id.
* Structure of the correct Document-ID
data: ls_doc_id type ty_doc_id,
lt_sp_poid type standard table of bapiproptb,
ls_sp_poid type bapiproptb,
ls_return like bapiret2,
ls_insertion_by_anchor type bapisrmrec_anchorins.


clear: lt_sp_poid, ls_doc_id, ls_doc_id.

ls_doc_id-docclass = 'ZSNG01'.
** Document Class des einzufügenden Dokumentes
ls_doc_id-objectid = '465D914DF8CF00E200000000AC11A10C'.
** Objektid des einzufügenden Dokumentes

clear: ls_sp_poid. " clear weg und ls_sp_poid clearen
ls_sp_poid-name = 'DOC_ID'.
ls_sp_poid-value = ls_doc_id.
** Document Class und Objektid als Struktur des Dokumentes
append ls_sp_poid to lt_sp_poid.

clear: ls_doc_id.
ls_sp_poid-name = 'VARIANT'.
ls_sp_poid-value = '0'.
append ls_sp_poid to lt_sp_poid.

clear: ls_doc_id.
ls_sp_poid-name = 'VERSION'.
ls_sp_poid-value = '0'.
append ls_sp_poid to lt_sp_poid.

clear: ls_insertion_by_anchor.
ls_insertion_by_anchor-parent_node_id = '6'.


call function 'BAPI_RECORD_ADDELEMENT'
exporting
objectid = '466A37F6244B00BC00000000AC11A10C'
** object id of the record

documentclass = 'ZSNG02'
** Document Class that I see in record attributed

sps_id = 'ZSCMG_SPS_NUCLEAR_MANUAL'
** SPS Id that I have seen in the technical information of record

anchor = 'AnchorName'
** Not sure what to give, can anyone suggest

description = 'Test Document'
** document description

element_type = 'I'
** not sure, can anyone suggest

importing
return = ls_return
tables
element_sp_poid = lt_sp_poid.

write: ls_return-message,
ls_return-type.
nsp
 
Posts: 121
Joined: Tue May 02, 2006 6:56 am

Re: Help required: Record/Document Management

Postby nibor00 » Thu Aug 24, 2017 10:51 am

The code that I have used is

* Definition of local data types for DOC_ID
types: begin of ty_doc_id,
docclass type bapisrmdoc-docclass,
objectid type bapisrmdoc-guid,
end of ty_doc_id.
* Structure of the correct Document-ID
data: ls_doc_id type ty_doc_id,
lt_sp_poid type standard table of bapiproptb,
ls_sp_poid type bapiproptb,
ls_return like bapiret2,
ls_insertion_by_anchor type bapisrmrec_anchorins.


clear: lt_sp_poid, ls_doc_id, ls_doc_id.

ls_doc_id-docclass = 'ZSNG01'.
** Document Class des einzufügenden Dokumentes
ls_doc_id-objectid = '465D914DF8CF00E200000000AC11A10C'.
** Objektid des einzufügenden Dokumentes

clear: ls_sp_poid. " clear weg und ls_sp_poid clearen
ls_sp_poid-name = 'DOC_ID'.
ls_sp_poid-value = ls_doc_id.
** Document Class und Objektid als Struktur des Dokumentes
append ls_sp_poid to lt_sp_poid.

clear: ls_doc_id.
ls_sp_poid-name = 'VARIANT'.
ls_sp_poid-value = '0'.
append ls_sp_poid to lt_sp_poid.

clear: ls_doc_id.
ls_sp_poid-name = 'VERSION'.
ls_sp_poid-value = '0'.
append ls_sp_poid to lt_sp_poid.

clear: ls_insertion_by_anchor.
ls_insertion_by_anchor-parent_node_id = '6'.


call function 'BAPI_RECORD_ADDELEMENT'
exporting
objectid = '466A37F6244B00BC00000000AC11A10C'
** object id of the record

documentclass = 'ZSNG02'
** Document Class that I see in record attributed

sps_id = 'ZSCMG_SPS_NUCLEAR_MANUAL'
** SPS Id that I have seen in the technical information of record

anchor = 'AnchorName'
** Not sure what to give, can anyone suggest

description = 'Test Document'
** document description

element_type = 'I'
** not sure, can anyone suggest

importing
return = ls_return
tables
element_sp_poid = lt_sp_poid.

write: ls_return-message,
ls_return-type.


Hello there,
Are you sure that the code is correct?
Thanks


Microfilm scanning services
nibor00
 
Posts: 1
Joined: Thu Aug 24, 2017 10:43 am


Return to CRM :: SAP CRM

Who is online

Users browsing this forum: No registered users and 2 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.