Skip to Content
author's profile photo Former Member
Former Member

CVAPI DMS problem, when creating new version with object link(s)

Hi All,

I am trying to create a new version of a particular document in DMS with an object link (In this case RFQ item1 ).

I can create a new version without an object link fine (Code below).

But cannot get the object link to work when I populate the pt_drad_x table (and uncomment the last two lines of course)!

Any solutions on how it is to be done?

  • Create New Version

CALL FUNCTION 'CVAPI_DOC_CREATE_NEW_VERSION'

EXPORTING

pf_dokar = f_dokar

pf_doknr = f_doknr

pf_doktl = f_doktl

  • ps_api_control = lv_api_control

  • ps_doc_status = lv_docstatus

IMPORTING

psx_message = lv_message

  • PFX_DOKAR =

  • PFX_DOKNR =

pfx_dokvr = f_dokvr

  • PFX_DOKTL =

  • TABLES

  • pt_drad = pt_drad_x

.

*

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 09:44 AM

    Any Ideas?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 11:22 AM

    The below works for me. Seems to be a bug in the table assignments when using the other FM.

    regards

    Dylan.

    • Create New Version

    lv_api_control-tcode = 'CV01XN'.

    CLEAR ps_draw.

    ps_draw-mandt = sy-mandt.

    ps_draw-dokar = f_dokar.

    ps_draw-doknr = f_doknr.

    ps_draw-dokvr = f_dokvr.

    ps_draw-doktl = f_doktl.

    CLEAR ps_drad.

    ps_drad-updateflag = ''.

    ps_drad-mandt = sy-mandt.

    ps_drad-dokar = 'ZRP'.

    ps_drad-doknr = f_doknr.

    ps_drad-dokvr = f_dokvr.

    ps_drad-doktl = f_doktl.

    ps_drad-dokob = 'EKPO'.

    ps_drad-obzae = '000'.

    ps_drad-objky = f_objky.

    CLEAR pt_drad_x.

    REFRESH pt_drad_x.

    APPEND ps_drad TO pt_drad_x.

    CONCATENATE 'DDE_RFQ_' ebeln INTO f_description.

    CLEAR ps_drat.

    ps_drat-updateflag = ''.

    ps_drat-mandt = sy-mandt.

    ps_drat-dokar = 'ZRP'.

    ps_drat-doknr = f_doknr.

    ps_drat-dokvr = f_dokvr.

    ps_drat-doktl = f_doktl.

    ps_drat-langu = 'E'.

    ps_drat-dktxt = f_description.

    ps_drat-dktxt_uc = f_description.

    APPEND ps_drat TO pt_drat_x.

    CALL FUNCTION 'CVAPI_DOC_MAINTAIN'

    EXPORTING: ps_api_control = lv_api_control

    ps_draw = ps_draw

    pf_revlevel = lv_docstatus-revlevel

    pf_statuslog = lv_docstatus-statuslog

    pf_ftp_dest = ''

    pf_http_dest = ''

    IMPORTING: psx_message = lv_message

    pfx_dokar = f_dokar

    pfx_doknr = f_doknr

    pfx_dokvr = f_dokvr

    pfx_doktl = f_doktl

    TABLES: pt_drad_x = pt_drad_x

    pt_drat_x = pt_drat_x.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.