How to use URLs longer than 132 Characters in CV01N

Jimbo's picture

http://www.animalspot.net/wp-content/uploads/2012/03/Nubian-Ibex.jpg|http://album.udn.com/community/img/PSN_PHOTO/debby927/f_3764285_1.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Capra_ibex_ibex_%E2%80%93_03.jpg/400px-Capra_ibex_ibex_%E2%80%93_03.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Bouquetin_adulte_couch%C3%A9.jpg/800px-Bouquetin_adulte_couch%C3%A9.jpg|https://pixabay.com/static/uploads/photo/2015/12/11/16/12/animals-1088374_960_720.jpgModern URLs tend to be much longer than when they were originally supported by SAP in CV01 and CV02 (now replaced by CV01N and CV02N). It may have been thought by SAP's developers that URLs would never exceed 132 characters and that might be why a 255-character table field is limited to 132 characters in Screen Painter.

This feature only rears its ugly head when the program is being run in batch mode; the field behaves as a TEXT255 field in other instances such as manual entry. SM35 performs a simulation of the screen before the data is passed to the program so that the data is truncated to 132 characters before it can be passed in as an original under the Originals tab which actually accepts 255 characters in batch mode.

Naturally, the idea to use LSMW as a wrapper for a BAPI comes to mind. With a little effort, it is possible to coax SAP into creating documents with originals represented by URLs longer than 132 characters.

The first step is to create all of the variables that will be passed to the BAPI function as parameters. Included here is the ability to add only originals through BAPI_DOC_FILES2, but any of the internal tables can be added here and populated a little later.

parameters: p_update as checkbox default 'X',
            p_replac as checkbox,
            p_commit as checkbox,
            p_break as checkbox.


data: LS_DOCUMENTDATA      TYPE BAPI_DOC_DRAW2,
      LS_DOCUMENTDATAX     TYPE BAPI_DOC_DRAWX2,
      Ls_documentstructure TYPE BAPI_DOC_STRUCTURE,
      LS_FOLDER_DRAW_EXT_ID   TYPE OLR3_DMS_TS_DRAW_EXT_ID,
      ls_docaux               type BAPI_DOC_AUX,
      it_docs type standard table of BAPI_DOC_FILES2 initial size 0,
      wa_docs type BAPI_DOC_FILES2,
      LS_RETURN            TYPE BAPIRET2,
      it_returns type standard table of BAPIRET2,
      it_DRAW type standard table of DRAW initial size 0,
      wa_DRAW like DRAW,
      nCount type i,
      it_dockeys type standard table of BAPI_DOC_FILES2_KEYS,
      it_docdesc type standard table of BAPI_DOC_DRAT,
      it_docdesckeys type standard table of BAPI_DOC_DRAT_KEYS,
      wa_docdesc type BAPI_DOC_DRAT.

Next, the decision is made to create or change the document. If the document already exists--and there is just one iteration of the existing document--then the document is changed.

http://www.animalspot.net/wp-content/uploads/2012/03/Nubian-Ibex.jpg|http://album.udn.com/community/img/PSN_PHOTO/debby927/f_3764285_1.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Capra_ibex_ibex_%E2%80%93_03.jpg/400px-Capra_ibex_ibex_%E2%80%93_03.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Bouquetin_adulte_couch%C3%A9.jpg/800px-Bouquetin_adulte_couch%C3%A9.jpg|https://pixabay.com/static/uploads/photo/2015/12/11/16/12/animals-1088374_960_720.jpgIf the p_Replac parameter is ticked then the program checks to see if the URL-based original is already loaded. When the URL-based original is already loaded, it is flagged for deletion while the same URL is added again--in effect, the URL is replaced.

If the p_Replac parameter is not ticked then the program adds a duplicate of the existing URL. When this tool was being written, it was unclear if there were to be duplicates allowed.

This could be done just as easily by skipping the BAPI and making no change, but there was a business requirement to replace when the tool was written. Many of the URLs had been created with a 132-character truncated value and those needed to be replaced.

Note that existing originals have the URL stored in the DOCFILE field of the DOCUMENTFILES internal table, but when the original is being created, the URL is passed in to the DOCPATH field. When URLs are passed in through the DOCFILE field, the system cuts out all but the end and removes the path leaving nothing but the file portion. For example, when a URL to a JPEG is passed into the DOCFILE field, the system cuts out everything but the filename of the JPEG file.

clear: ls_documentdata, ls_documentdatax, ls_folder_draw_ext_id,
 wa_docs, wa_docdesc.
refresh: it_docs, it_docdesc.
"Perform some cleanup on sloppy data.
translate CV01S-DOKAR to UPPER CASE.
translate CV01S-DOKNR to UPPER CASE.
translate CV01S-STABK to UPPER CASE.

"Populate the fields that will be used for create or change.
ls_documentdata-documenttype   = CV01S-DOKAR.
ls_documentdata-documentnumber = CV01S-DOKNR.
ls_documentdata-STATUSEXTERN   = CV01S-STABK.

select count(*) from DRAW into nCount
 where DOKNR eq CV01S-DOKNR and DOKAR eq CV01S-DOKAR
   and LOEDK ne 'X'.
if nCount gt 1.
  write: / CV01S-DOKNR, 'Document ambiguous.' color col_positive.
elseif nCount eq 1.  "Just one document.
  select single * from DRAW into wa_DRAW
   where DOKNR eq CV01S-DOKNR and DOKAR eq CV01S-DOKAR
     and LOEDK ne 'X'.
  "Ensure that we ONLY change this document and no other.
  ls_documentdata-documentpart    = wa_DRAW-DOKTL.
  ls_documentdata-documentversion = wa_DRAW-DOKVR.
  if p_update eq 'X'.
    CALL FUNCTION 'BAPI_DOCUMENT_GETLIST2'
      EXPORTING
        SELECT_DOCUMENTDATA      = ls_documentdata
        GETDOCDESCRIPTIONS       = 'X'
        GETDOCFILES              = 'X'
      IMPORTING
        RETURN                   = ls_return
      TABLES
        DOCUMENTDESCRIPTIONS     = it_docdesckeys
        DOCUMENTFILES            = it_dockeys.

    "Now we flag all existing descriptions to be deleted.
    loop at it_docdesckeys into wa_docdesc.
      if wa_docdesc-LANGUAGE eq 'E'.
        wa_docdesc-DELETEVALUE = 'X'.
        append wa_docdesc to it_docdesc.
      endif.
    endloop.
    clear wa_docdesc.
    wa_docdesc-DESCRIPTION     = CV01S-DKTXT.
    wa_docdesc-LANGUAGE        = 'E'.
    append wa_docdesc to it_docdesc.

    "Now we flag all existing originals to be deleted.
    loop at it_dockeys into wa_docs.
      if wa_docs-DOCFILE = CV01S-FILEP1 and p_Replac eq 'X'.
        wa_docs-DELETEVALUE = 'X'.
        append wa_docs to it_docs.
      endif.
    endloop.
    clear wa_docs.
    wa_docs-DOCUMENTTYPE       = CV01S-DOKAR.
    wa_docs-DOCUMENTNUMBER     = CV01S-DOKNR.
    wa_docs-DOCUMENTPART       = wa_DRAW-DOKTL.
    wa_docs-DOCUMENTVERSION    = wa_DRAW-DOKVR.
    wa_docs-DOCPATH            = CV01S-FILEP1.
    wa_docs-DESCRIPTION        = CV01S-FILE_DESCRIPTION.
    wa_docs-WSAPPLICATION      = CV01S-DAPPL.
    wa_docs-LANGUAGE           = 'E'.
    append wa_docs to it_docs.

    ls_documentdatax-documenttype    = ls_documentdatax-documenttype.
    ls_documentdatax-documentnumber  = ls_documentdatax-documentnumber.
    ls_documentdatax-documentpart    = ls_documentdata-documentpart.
    ls_documentdatax-documentversion = ls_documentdata-documentversion.
    ls_documentdatax-description     = ls_documentdata-description.
    ls_documentdatax-STATUSEXTERN    = ls_documentdata-STATUSEXTERN.
    ls_docaux-DOCTYPE    = CV01S-DOKAR.
    ls_docaux-DOCNUMBER  = CV01S-DOKNR.
    ls_docaux-DOCPART    = wa_DRAW-DOKTL.
    ls_docaux-DOCVERSION = wa_DRAW-DOKVR.
    CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
      EXPORTING
        DOCUMENTTYPE             = ls_docaux-DOCTYPE
        DOCUMENTNUMBER           = ls_docaux-DOCNUMBER
        DOCUMENTPART             = ls_docaux-DOCPART
        DOCUMENTVERSION          = ls_docaux-DOCVERSION
        DOCUMENTDATA             = ls_documentdata
        DOCUMENTDATAX            = ls_documentdatax
      IMPORTING
        RETURN                   = ls_return
      TABLES
        DOCUMENTDESCRIPTIONS     = it_docdesc
        DOCUMENTFILES            = it_docs.
    append ls_return to it_returns.

    if p_commit eq 'X'.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    endif.
  else.
    write: / CV01S-DOKNR, 'No update performed.' color col_positive.
  endif.
else.  "Document does not exist--create a new one.
  ls_documentdata-documentpart    = '000'.
  ls_documentdata-documentversion = '00'.

  wa_docdesc-DESCRIPTION     = CV01S-DKTXT.
  wa_docdesc-LANGUAGE        = 'E'.
  append wa_docdesc to it_docdesc.

  wa_docs-DOCUMENTTYPE       = CV01S-DOKAR.
  wa_docs-DOCUMENTNUMBER     = CV01S-DOKNR.
  wa_docs-DOCUMENTPART       = '000'.
  wa_docs-DOCUMENTVERSION    = '00'.
  wa_docs-DOCPATH            = CV01S-FILEP1.
  wa_docs-DESCRIPTION        = CV01S-FILE_DESCRIPTION.
  wa_docs-WSAPPLICATION      = CV01S-DAPPL.
  wa_docs-LANGUAGE           = 'E'.
  append wa_docs to it_docs.


  CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
      documentdata               = ls_documentdata
    IMPORTING
      DOCUMENTTYPE               = ls_folder_draw_ext_id-DOKAR
      DOCUMENTNUMBER             = ls_folder_draw_ext_id-DOKNR
      DOCUMENTPART               = ls_folder_draw_ext_id-DOKTL
      DOCUMENTVERSION            = ls_folder_draw_ext_id-DOKVR
      RETURN                     = ls_return
    TABLES
      DOCUMENTDESCRIPTIONS       = it_docdesc
      DOCUMENTFILES              = it_docs.

  append ls_return to it_returns.

  if p_commit eq 'X'.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
  endif.
endif.
skip_transaction. "Don't create any records.

In order for the document to have a description, the DOCUMENTDESCRIPTIONS internal table is populated with the value from the source file and with an 'E' for English. This should not be confused with the description of the orginal which is passed in to the BAPIs through the DOCUMENTFILES internal table.

The DOCUMENTDESCRIPTIONS table was left out the first time the program was run resulting in nearly ten thousand documents with no description in any language. Running it through to update all the documents added the description and the client was very happy.

The source file had one record wherein the document number or DOKNR was in lower case. Since the document number did not show up in a select, the system assumed that the document had not been created and created another document with an incremented version number or DOKVR.

To solve this, the translate to UPPER CASE lines were added to ensure that case would no longer cause this problem. Additionally, the DOKVR and DOKTL values were hard-coded to 00 and 000 respectively when calling the BAPI_DOCUMENT_CREATE2 BAPI.

A little bit of reporting wraps up this LSMW object (or report). These BAPIs do not populate the BAPIRET2 table with much data, so the reporting isn't that important; checking the document using the CV02N transaction afterward will give a lot more information about the results.

loop at it_returns into ls_return where type eq 'E'. "Errors only.
  write: / ls_return-type, ls_return-id, ls_return-Number,
   ls_return-Message+0(60),
   ls_return-message_v1+1(30).
endloop.

Load Characteristic Values with a BAPIDownload this LSMW Object

This LSMW, in its entirety, is available below--just copy-paste it into a text file and then import that into a new LSMW Project. Be sure to import it to a new LSMW object and then move it to an existing one; that is much easier than restoring from backups after trying to import to an existing LSMW Project.


[Legacy System Migration Workbench]
LSMW Version Number : 4.0.0
LSMW Version Date : 08/31/2004
R/3 Installation Number : 0020958171
R/3 System Id : QM0
R/3 Release : 731
R/3 Client : 100
R/3 Operating System : Windows NT
R/3 Database System : MSSQL
R/3 Hostname : jimsapqm0
User Id : JKAUFMANN
Date : 06/06/2016
Time : 19:14:13
Local Date : 06/06/2016
Local Time : 19:14:13
Local Timezone : CET

[Project Information]
[Project Name     ] : SAPLSMW
[Project Text     ] : SAPLSMW.com Projects

/SAPDMC/LSGPRO                SAPLSMW        JKAUFMANN   20160606
/SAPDMC/LSGPROT               ESAPLSMW        SAPLSMW.com Projects

[Subproject Information]
[Subproject       ] : MD
[Subproject Text  ] : Master Data

/SAPDMC/LSGSUB                SAPLSMW        MD             JKAUFMANN   20160606
/SAPDMC/LSGSUBT               ESAPLSMW        MD             Master Data

[Object Information]
[Object           ] : CV01N_DOCUMENTS
[Object Text      ] : Upload documents with long URL values

/SAPDMC/LSOTXT                ESAPLSMW        MD             CV01N_DOCUMENTSUpload documents with long URL values
/SAPDMC/LSOATT                SAPLSMW        MD             CV01N_DOCUMENTS0100010001                                                                                                                                    00000000JKAUFMANN   X JKAUFMANN   20160606
/SAPDMC/LSOSTR                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         Source                                                                                    000101 00000000000000000000
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         DAPPL                         0005C   003Application
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         DKTXT                         0003C   015Description
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         DOKAR                         0002C   003Document Type
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         DOKNR                         0001C   010Document
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         FILEP1                        0007C   255FILEP1
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         FILE_DESCRIPTION              0006C   015FILE_DESCRIPTION
/SAPDMC/LSOFLD                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         STABK                         0004C   002Document Status
/SAPDMC/LSOREL                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 CV01S                         20160601JKAUFMANN
/SAPDMC/LSOREL                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 CV01S                         20160601JKAUFMANN
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_PROCESSING__                                     ACJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    ACJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_PROCESSING__                                       ACJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_TRANSACTION__                                      DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             ACJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 STYPE                         DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 __BEGIN_OF_RECORD__           DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 __END_OF_RECORD__             DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 STYPE                         DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 __BEGIN_OF_RECORD__           DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSORUL                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 __END_OF_RECORD__             DFJKAUFMANN   20160606                                                                                                                        00000000
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_PROCESSING__                                     0001if p_break eq 'X'. break-point. endif.                                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0001clear: ls_documentdata, ls_documentdatax, ls_folder_draw_ext_id,        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0002 wa_docs, wa_docdesc.                                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0003refresh: it_docs, it_docdesc.                                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0004"Perform some cleanup on sloppy data.                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0005translate CV01S-DOKAR to UPPER CASE.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0006translate CV01S-DOKNR to UPPER CASE.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0007translate CV01S-STABK to UPPER CASE.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0008                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0009"Populate the fields that will be used for create or change.            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0010ls_documentdata-documenttype   = CV01S-DOKAR.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0011ls_documentdata-documentnumber = CV01S-DOKNR.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0012ls_documentdata-STATUSEXTERN   = CV01S-STABK.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0013                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0014select count(*) from DRAW into nCount                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0015 where DOKNR eq CV01S-DOKNR and DOKAR eq CV01S-DOKAR                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0016   and LOEDK ne 'X'.                                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0017if nCount gt 1.                                                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0018  write: / CV01S-DOKNR, 'Document ambiguous.' color col_positive.       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0019elseif nCount eq 1.  "Just one document.                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0020  select single * from DRAW into wa_DRAW                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0021   where DOKNR eq CV01S-DOKNR and DOKAR eq CV01S-DOKAR                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0022     and LOEDK ne 'X'.                                                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0023  "Ensure that we ONLY change this document and no other.               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0024  ls_documentdata-documentpart    = wa_DRAW-DOKTL.                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0025  ls_documentdata-documentversion = wa_DRAW-DOKVR.                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0026  if p_update eq 'X'.                                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0027    CALL FUNCTION 'BAPI_DOCUMENT_GETLIST2'                              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0028      EXPORTING                                                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0029        SELECT_DOCUMENTDATA      = ls_documentdata                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0030        GETDOCDESCRIPTIONS       = 'X'                                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0031        GETDOCFILES              = 'X'                                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0032      IMPORTING                                                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0033        RETURN                   = ls_return                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0034      TABLES                                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0035        DOCUMENTDESCRIPTIONS     = it_docdesckeys                       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0036        DOCUMENTFILES            = it_dockeys.                          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0037                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0038    "Now we flag all existing descriptions to be deleted.               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0039    loop at it_docdesckeys into wa_docdesc.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0040      if wa_docdesc-LANGUAGE eq 'E'.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0041        wa_docdesc-DELETEVALUE = 'X'.                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0042        append wa_docdesc to it_docdesc.                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0043      endif.                                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0044    endloop.                                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0045    clear wa_docdesc.                                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0046    wa_docdesc-DESCRIPTION     = CV01S-DKTXT.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0047    wa_docdesc-LANGUAGE        = 'E'.                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0048    append wa_docdesc to it_docdesc.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0049                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0050    "Now we flag all existing originals to be deleted.                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0051    loop at it_dockeys into wa_docs.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0052      if wa_docs-DOCFILE = CV01S-FILEP1 and p_Replac eq 'X'.            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0053        wa_docs-DELETEVALUE = 'X'.                                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0054        append wa_docs to it_docs.                                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0055      endif.                                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0056    endloop.                                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0057    clear wa_docs.                                                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0058    wa_docs-DOCUMENTTYPE       = CV01S-DOKAR.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0059    wa_docs-DOCUMENTNUMBER     = CV01S-DOKNR.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0060    wa_docs-DOCUMENTPART       = wa_DRAW-DOKTL.                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0061    wa_docs-DOCUMENTVERSION    = wa_DRAW-DOKVR.                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0062    wa_docs-DOCPATH            = CV01S-FILEP1.                          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0063    wa_docs-DESCRIPTION        = CV01S-FILE_DESCRIPTION.                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0064    wa_docs-WSAPPLICATION      = CV01S-DAPPL.                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0065    wa_docs-LANGUAGE           = 'E'.                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0066    append wa_docs to it_docs.                                          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0067                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0068    ls_documentdatax-documenttype    = ls_documentdatax-documenttype.   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0069    ls_documentdatax-documentnumber  = ls_documentdatax-documentnumber. JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0070    ls_documentdatax-documentpart    = ls_documentdata-documentpart.    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0071    ls_documentdatax-documentversion = ls_documentdata-documentversion. JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0072    ls_documentdatax-description     = ls_documentdata-description.     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0073    ls_documentdatax-STATUSEXTERN    = ls_documentdata-STATUSEXTERN.    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0074    ls_docaux-DOCTYPE    = CV01S-DOKAR.                                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0075    ls_docaux-DOCNUMBER  = CV01S-DOKNR.                                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0076    ls_docaux-DOCPART    = wa_DRAW-DOKTL.                               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0077    ls_docaux-DOCVERSION = wa_DRAW-DOKVR.                               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0078    CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'                               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0079      EXPORTING                                                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0080        DOCUMENTTYPE             = ls_docaux-DOCTYPE                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0081        DOCUMENTNUMBER           = ls_docaux-DOCNUMBER                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0082        DOCUMENTPART             = ls_docaux-DOCPART                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0083        DOCUMENTVERSION          = ls_docaux-DOCVERSION                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0084        DOCUMENTDATA             = ls_documentdata                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0085        DOCUMENTDATAX            = ls_documentdatax                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0086      IMPORTING                                                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0087        RETURN                   = ls_return                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0088      TABLES                                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0089        DOCUMENTDESCRIPTIONS     = it_docdesc                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0090        DOCUMENTFILES            = it_docs.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0091    append ls_return to it_returns.                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0092                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0093    if p_commit eq 'X'.                                                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0094      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0095        EXPORTING                                                       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0096          wait = 'X'.                                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0097    endif.                                                              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0098  else.                                                                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0099    write: / CV01S-DOKNR, 'No update performed.' color col_positive.    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0100  endif.                                                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0101else.  "Document does not exist--create a new one.                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0102  ls_documentdata-documentpart    = '000'.                              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0103  ls_documentdata-documentversion = '00'.                               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0104                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0105  wa_docdesc-DESCRIPTION     = CV01S-DKTXT.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0106  wa_docdesc-LANGUAGE        = 'E'.                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0107  append wa_docdesc to it_docdesc.                                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0108                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0109  wa_docs-DOCUMENTTYPE       = CV01S-DOKAR.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0110  wa_docs-DOCUMENTNUMBER     = CV01S-DOKNR.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0111  wa_docs-DOCUMENTPART       = '000'.                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0112  wa_docs-DOCUMENTVERSION    = '00'.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0113  wa_docs-DOCPATH            = CV01S-FILEP1.                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0114  wa_docs-DESCRIPTION        = CV01S-FILE_DESCRIPTION.                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0115  wa_docs-WSAPPLICATION      = CV01S-DAPPL.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0116  wa_docs-LANGUAGE           = 'E'.                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0117  append wa_docs to it_docs.                                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0118                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0119                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0120  CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'                                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0121    EXPORTING                                                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0122      documentdata               = ls_documentdata                      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0123    IMPORTING                                                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0124      DOCUMENTTYPE               = ls_folder_draw_ext_id-DOKAR          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0125      DOCUMENTNUMBER             = ls_folder_draw_ext_id-DOKNR          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0126      DOCUMENTPART               = ls_folder_draw_ext_id-DOKTL          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0127      DOCUMENTVERSION            = ls_folder_draw_ext_id-DOKVR          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0128      RETURN                     = ls_return                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0129    TABLES                                                              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0130      DOCUMENTDESCRIPTIONS       = it_docdesc                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0131      DOCUMENTFILES              = it_docs.                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0132                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0133  append ls_return to it_returns.                                       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0134                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0135  if p_commit eq 'X'.                                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0136        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0137          EXPORTING                                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0138            wait = 'X'.                                                 JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0139  endif.                                                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0140endif.                                                                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__BEGIN_OF_TRANSACTION__                                    0141skip_transaction. "Don't create any records.                            JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_PROCESSING__                                       0001loop at it_returns into ls_return where type eq 'E'. "Errors only.      JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_PROCESSING__                                       0002  write: / ls_return-type, ls_return-id, ls_return-Number,              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_PROCESSING__                                       0003   ls_return-Message+0(60),                                             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_PROCESSING__                                       0004   ls_return-message_v1+1(30).                                          JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_PROCESSING__                                       0005endloop.                                                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__END_OF_TRANSACTION__                                      0001transfer_transaction.                                                   JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0001parameters: p_update as checkbox default 'X',                           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0002            p_replac as checkbox,                                       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0003            p_commit as checkbox,                                       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0004            p_break as checkbox.                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0005                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0006                                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0007data: LS_DOCUMENTDATA      TYPE BAPI_DOC_DRAW2,                         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0008      LS_DOCUMENTDATAX     TYPE BAPI_DOC_DRAWX2,                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0009      Ls_documentstructure TYPE BAPI_DOC_STRUCTURE,                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0010      LS_FOLDER_DRAW_EXT_ID   TYPE OLR3_DMS_TS_DRAW_EXT_ID,             JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0011      ls_docaux               type BAPI_DOC_AUX,                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0012      it_docs type standard table of BAPI_DOC_FILES2 initial size 0,    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0013      wa_docs type BAPI_DOC_FILES2,                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0014      LS_RETURN            TYPE BAPIRET2,                               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0015      it_returns type standard table of BAPIRET2,                       JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0016      it_DRAW type standard table of DRAW initial size 0,               JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0017      wa_DRAW like DRAW,                                                JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0018      nCount type i,                                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0019      it_dockeys type standard table of BAPI_DOC_FILES2_KEYS,           JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0020      it_docdesc type standard table of BAPI_DOC_DRAT,                  JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0021      it_docdesckeys type standard table of BAPI_DOC_DRAT_KEYS,         JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0000__GLOBAL_DATA__                                             0022      wa_docdesc type BAPI_DOC_DRAT.                                    JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 STYPE                         0001/SAPDMC/LTXTH-STYPE = '1'.                                              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 __BEGIN_OF_RECORD__           0001/SAPDMC/LTXTH = INIT_/SAPDMC/LTXTH.                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0001/SAPDMC/LTXTH                 __END_OF_RECORD__             0001transfer_record.                                                        JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 STYPE                         0001/SAPDMC/LTXTL-STYPE = '2'.                                              JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 __BEGIN_OF_RECORD__           0001/SAPDMC/LTXTL = INIT_/SAPDMC/LTXTL.                                     JKAUFMANN   20160606
/SAPDMC/LSOCOD                SAPLSMW        MD             CV01N_DOCUMENTS0002/SAPDMC/LTXTL                 __END_OF_RECORD__             0001transfer_record.                                                        JKAUFMANN   20160606
/SAPDMC/LSOINP                SAPLSMW        MD             CV01N_DOCUMENTS0001FEC:\clients\documents.txt                                                                                                file                          0000X 000000                                 X      X XX
/SAPDMC/LSOINS                SAPLSMW        MD             CV01N_DOCUMENTSCV01S                         0001
/SAPDMC/LSOPAR                SAPLSMW        MD             CV01N_DOCUMENTS            FROMLINE_CONV                 0000000000
/SAPDMC/LSOPAR                SAPLSMW        MD             CV01N_DOCUMENTS            FROMLINE_READ                 0000000000
/SAPDMC/LSOPAR                SAPLSMW        MD             CV01N_DOCUMENTS            TOLINE_CONV                   0000010000
/SAPDMC/LSOPAR                SAPLSMW        MD             CV01N_DOCUMENTS            TOLINE_READ                   0000010000
/SAPDMC/LSOPAR                SAPLSMW        MD             CV01N_DOCUMENTSFF_MDG2     WILDCARDVALUE
/SAPDMC/LSOPAR                SAPLSMW        MD             CV01N_DOCUMENTSJKAUFMANN   WILDCARDVALUE

[Documentation    ]

http://9.9.9.6|http://9.9.9.7|http://9.9.9.8|http://9.9.9.9|http://album.udn.com/community/img/PSN_PHOTO/debby927/f_3764285_1.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Capra_ibex_ibex_%E2%80%93_03.jpg/400px-Capra_ibex_ibex_%E2%80%93_03.jpg|https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Bouquetin_adulte_couch%C3%A9.jpg/800px-Bouquetin_adulte_couch%C3%A9.jpg|https://pixabay.com/static/uploads/photo/2015/12/11/16/12/animals-1088374_960_720.jpg