BAPI_DOCUMENT_CHECKIN2 - Can U tell me how to use it ???

Hy everybody.
I´m trying to checkin a PDF-File to a existing DIS and I´m trying to do so by using BAPI_DOCUMENT_CHANGE2.
But it doesn´t work. I debugged the ABAP but I couldn´t find the problem.
So here is my coding, maybe someone can help me:
REPORT  test_ml               .
DATA:  lt_files LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE.
DATA:  i_docdata LIKE bapi_doc_draw2 OCCURS 0 WITH HEADER LINE.
DATA:  i_docdatax LIKE bapi_doc_drawx2 OCCURS 0 WITH HEADER LINE.
DATA:  ls_return LIKE bapiret2.
DATA:  i_originidmax TYPE c.
i_originidmax = '0'.
CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
  EXPORTING
    documenttype               = 'SED'
    documentnumber         = '0000000000000000001011484'
    documentpart               = '000'
    documentversion            = '79'
  GETOBJECTLINKS             = 'X'
  GETCOMPONENTS              = ' '
  GETSTATUSLOG               = 'X'
  GETLONGTEXTS               = ' '
   getactivefiles             = 'X'
   getdocdescriptions         = 'X'
   getdocfiles                = 'X'
  GETCLASSIFICATION          = ' '
  GETSTRUCTURE               = 'X'
  GETWHEREUSED               = ' '
  HOSTNAME                   = ' '
IMPORTING
   documentdata               = i_docdata
  RETURN                     =
TABLES
  OBJECTLINKS                =
  DOCUMENTDESCRIPTIONS       =
  LONGTEXTS                  =
  STATUSLOG                  =
   documentfiles              = lt_files
  COMPONENTS                 =
  CHARACTERISTICVALUES       =
  CLASSALLOCATIONS           =
  DOCUMENTSTRUCTURE          =
  WHEREUSEDLIST              =
there are already some files connected and checked in to the DIS.
LOOP AT lt_files.
  IF lt_files-originaltype > i_originidmax.
    i_originidmax = lt_files-originaltype.
  ENDIF.
ENDLOOP.
i_originidmax = i_originidmax + 1.
lt_files-documenttype = 'SED'.
lt_files-documentnumber = '0000000000000000001011484'.
lt_files-documentpart = '000'.
lt_files-documentversion = '79'.
lt_files-storagecategory = 'ZPLM'.
lt_files-wsapplication = 'PDF'.
lt_files-docfile = 'S:TEST.PDF'.
lt_files-language = 'D'.
lt_files-active_version = 'X'.
lt_files-originaltype = i_originidmax.
CONCATENATE sy-datum sy-uzeit INTO lt_files-created_at.
CONCATENATE sy-datum sy-uzeit INTO lt_files-changed_at.
lt_files-created_by = sy-uname.
lt_files-changed_by = sy-uname.
lt_files-application_id = ' '.
lt_files-file_id = ' '.
APPEND lt_files.
CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
  EXPORTING
    documenttype               = 'SED'
    documentnumber         = '0000000000000000001011484'
    documentpart               = '000'
    documentversion            = '79'
    documentdata               = i_docdata
    documentdatax              = i_docdatax
  HOSTNAME                   = 'DV-429'
  DOCBOMCHANGENUMBER         =
  DOCBOMVALIDFROM            =
  DOCBOMREVISIONLEVEL        =
  SENDCOMPLETEBOM            = ' '
  PF_FTP_DEST                = ' '
    pf_http_dest               = 'SAPHTTP_EF438'
  CAD_MODE                   = ' '
  IMPORTING
    return                     = ls_return
  TABLES
  CHARACTERISTICVALUES       =
  CLASSALLOCATIONS           =
  DOCUMENTDESCRIPTIONS       =
  OBJECTLINKS                =
  DOCUMENTSTRUCTURE          =
    documentfiles              = lt_files
  LONGTEXTS                  =
  COMPONENTS                 =
IF ls_return-type CA 'EA'.
  ROLLBACK WORK.
  MESSAGE ID '26' TYPE 'I' NUMBER '000'
  WITH ls_return-message.
ENDIF.
commit work.
That´s it. I dont´t know exactly what to write into the parameters : documentdatax
and lt_files
Thanx for your comments and have a nice day
Markus

suggest reading Sun toturail in detail..
It is very good..
peterx
Pivotonic Inc. http://www.pivotonic.com
1. java IDE tool : JawaBeginer
2. java jar tool : JavaJar

Similar Messages

  • Plase can anybody tell me how to use SETS (GS01/02/03) in ABAP program

    Plase can anybody tell me how to use SETS (GS01/02/03) in ABAP program

    http://wiki.sdn.sap.com/wiki/display/Snippets/Reading+Sets+-+GS01+-+GS02+-+GS03

  • Can anyone tell me how to use GUI status in ALV report.

    Can anyone tell me how to use GUI status in ALV report. I want to use  buttons in ALV report.

    Juheb,
    see the link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    Adding a button on the ALV grid using OOPs
    check these sites.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproABAP-ALVControllingStandard+Buttons&
    chk this.
    alv-pfstatus:
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_pfstatus.htm
    then how to capture that button click.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm
    REPORT ZTESTALV.
    TYPE-POOLS: SLIS.
    *- Fieldcatalog
    DATA: IT_FIELDCAT  TYPE LVC_T_FCAT,
          IT_FIELDCAT1  TYPE SLIS_T_FIELDCAT_ALV..
    *- For Events
    DATA:IT_EVENTS TYPE SLIS_T_EVENT.
    DATA:  X_FIELDCAT  TYPE LVC_S_FCAT,
            X_FIELDCAT1  TYPE SLIS_FIELDCAT_ALV.
    DATA:X_LAYOUT TYPE LVC_S_LAYO.
    "{ FOR DISABLE
    DATA: LS_EDIT TYPE LVC_S_STYL,
          LT_EDIT TYPE LVC_T_STYL.
    "} FOR DISABLE
    DATA: BEGIN OF IT_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
       <b>   BUTTON(10),</b>
         END OF IT_VBAP.
    DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
    SELECT VBELN
           POSNR
           UP TO 10 ROWS
          INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
          FROM VBAP.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    <b>X_FIELDCAT-SELTEXT = 'Button'.
    x_fieldcat-fieldname = 'BUTTON'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-OUTPUTLEN = '10'.
    X_FIELDCAT-style = X_FIELDCAT-style bit-xor
                      cl_gui_alv_grid=>MC_STYLE_BUTTON bit-xor
                      cl_gui_alv_grid=>MC_STYLE_ENABLEd.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.</b>
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'VBELN'.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '10'.
    x_fieldcat-ref_field = 'VBELN'.
    x_fieldcat-ref_table = 'VBAK'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'POSNR'.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '5'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    "{FOR DISABLE HERE 6ROW IS DISABLED
    SY-TABIX = 6.
    LS_EDIT-FIELDNAME = 'VBELN'.
    LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    LS_EDIT-STYLE2 = SPACE.
    LS_EDIT-STYLE3 = SPACE.
    LS_EDIT-STYLE4 = SPACE.
    LS_EDIT-MAXLEN = 10.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    *LS_EDIT-FIELDNAME = 'POSNR'.
    *LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    *LS_EDIT-STYLE2 = SPACE.
    *LS_EDIT-STYLE3 = SPACE.
    *LS_EDIT-STYLE4 = SPACE.
    *LS_EDIT-MAXLEN = 6.
    *INSERT LS_EDIT INTO TABLE LT_EDIT.
    INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
    MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB  TRANSPORTING
                                      HANDLE_STYLE .
    X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
    "} UP TO HERE
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        I_CALLBACK_PROGRAM = SY-REPID
        IS_LAYOUT_LVC      = X_LAYOUT
        IT_FIELDCAT_LVC    = IT_FIELDCAT
      TABLES
        T_OUTTAB           = IT_VBAP[]
      EXCEPTIONS
        PROGRAM_ERROR      = 1
        OTHERS             = 2.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Don't forget to reward if useful....

  • Can someone tell me how to use ObjectSharingInformation.GetObjectSharingInformation to get AnonymousViewLink property

    Hi,
    I am successfully using ObjectSharingInformation.GetObjectSharingInformation to get AnonymousEditLink property but I can't figure out how to use the same function to get AnonymousViewLink property it is always coming out as null does anyone know how to get
    a value for this property?
    Any help will be greatly appreciated.

    Hi,
    According to your post, my understanding is that you had an question about the property of AnonymousViewLink.
    The SPObjectSharingInformation.AnonymousViewLink property
    gets the anonymous view link for the securable object, or an empty string if the link is not available.
    There is an example about the property in the sharing.debug.js file which located in the below path, you can have a look at it.
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Can someone tell me how to use 2 ipods on one computer

    well when anyone can ill be waiting for the answer i want to know cuz since im buying the ipod video i want to see if i can use the same computer that im uploading stuff to my ipod mini

    There is no limit to how many iPods can run on a single PC. Or how many PCs a single iPod can connect to. Either by Apple design or by any legal issues.
    These links should help:
    Natalie Beresford: Multiple iPods/iTunes Installations
    How to use multiple iPods with one computer
    How to share music between different accounts on a single computer

  • Can you tell me how to use a USB Flash Drive

    Not familiar with USB flash drive.  Anyone tell me how it operates?

    ...but don't expect even close to the access speeds you would get with a hard drive!  That's fine of course since you should use it for example, as an emergency boot drive, or transporting stuff to and from other locations, or backups for selected stuff.

  • Can anyone tell me how to use Tiles framework in an existing JSP page

    I want to seperate my portal area using tiles. I'm looking for example on how I go about that.

    This book doesn't have information on how to use tiles in legacy JSP page. Let me rephase the question again:
    How do I place Tiles tags to an existing JSP page to seperate the areas in a page?

  • Can anybody tell me how to use SHD0-tRANSACTION VARIANT

    hI,
    pL.tell me the procedure to use SHD0 for co01 and CO02 T-CODES

    Dear Laxmikanth,
    Transaction variant or Screen variant does not works out for T
    code CO01 or CO02.
    As far I know you can restrict only the plant and order type ,I
    dont think you can restrict the user's to change or modify the
    BOM Components.
    Regards
    Mangalraj.S

  • Can u tell me how  to use messagedialogbox

    Hi to all, i m facing problems in JoptionPane.messageDialogbox, i want to put some action on the ok and cancel , like if i click ok button it show me number table .if i click cancel button it exits the program , how i can do it using if statement , how i can compare that in if statement.
    Please reply me as soon as possible.

    suggest reading Sun toturail in detail..
    It is very good..
    peterx
    Pivotonic Inc. http://www.pivotonic.com
    1. java IDE tool : JawaBeginer
    2. java jar tool : JavaJar

  • Can anybody tell em How to use NEW TASK?

    Hi,
          How to define a new task for a Function Module?when i clicked on new task name its going to function pool and showing "DATA TASKNAME".now what i have to do means how to declare the taskname (thru example)?
    Thanks and Regards,
    Gopi.

    You can simply use a literal, I think.
    call function 'Z_TEST'
         starting new task 'TEST'
    Or you can use a variable.
    data: taskname type string.
    taskname = 'TEST'.
    call function 'Z_TEST'
         starting new task taskname
    Regards,
    RIch Heilman

  • Can anyone tell me how to use the loops and backing tracks with a single guitar input? I can't seem to figure out how to set this up

    I am trying to configure Mainstage to input my own guitar and add a backing track from the library or a loop but, I can figure out how to open or add the tracks I've downloaded. Any help would be great

    did you try the PlayBack preset/template?
    once you open the PlayBack plug-in you just load the tracks from the plug-in's menu.

  • In plain English can someone tell me how to use the unsubscribe button or get it to show up in the "unsubscribe from mailing list" ad-on?

    There's nothing to detail it doesn't work.

    In plain English.
    If the unsubscribe header the add-on uses is present it shows up in the mail header along with the from Subject to etc. With or Without the add-on. So if there is no entry in the header, then the mail sender does not support that style of unsubscribing. In the United States unsubscribing from a mailing list is troublesome as legislators are either are unable or unwilling to understand the problem. Given the amounts of money involved I will go with the latter.
    Any difficulties you have with the actual add-on need to be dealt with by the add-on author The download page list a support link. https://addons.mozilla.org/en-US/thunderbird/addon/unsubscribe-from-mailing-list/?src=search

  • Can any one tell me how to use the BER in RF communication module

    I want to analyse the BER for digital modulation system. IN RF modulation tool kit i found the BER vi . But I didn't understand how to use it. I searched in the help, but it is of no use can any tell me how to use that under user defined funtion.

    SELECT COUNT (1)
    FROM SYSADM.OHR_PERS_CURR PC
    , SYSADM.OHR_JOB_CURR JC
    WHERE PC.EMPL_ID = JC.EMPL_ID
    AND EXISTS (
    SELECT null
    FROM SYSADM.HU_SCRTY_JOB HS, ODSHR.OHR_SCRTY_USER_CFG OS
    WHERE HS.HU_SCRTY_CFG_ID = OS.HU_SCRTY_CFG_ID
    AND OS.DB_LOGIN = USER
    AND HS.EMPL_ID = JS.EMPL_ID AND HS.EMPL_RCD = JC.EMPL_RCD)
    But why ?
    Rgds.

  • HT1689 can anyone simply tell me how to use the "find my ipod" feature through my itunes account that has the ipod registered?

    Can anyone tell me how to use the "find my ipod" app that I have for my ipod?  I have the ipod registered on my itunes account but I can get the serial # to send it in for apple support?  How does this feature work?  Thanks

    Turn on your computer.
    Open your Browser.
    Go to icloud.com
    Select find my iphone/ipod

  • Can someone tell me how to make my screen full size with Safari ?  I am using a Mac osx 10.6.8.

    Can someone tell me how to make my screen full size on my Mac OSX 10.6.8. using safari.  I know this is a simple question. I have always had it on full screen and recently had it worked on remotely and now I can't get the screen back to full size.  I appreciate any advise you can offer. Thank you

    from the BetterTouchTool blog, older versions can be obtained using these links:
    The last 64bit Snow Leopard (10.6 ) version (v 0.939 ) can be downloaded here
    <http://bettertouchtool.net/btt0.939.zip>
    If you are using an older 32bit Mac you’ll have to use this version: 0.785
    <http://bettertouchtool.net/btt0.785.zip>

Maybe you are looking for