How to create the document with originals and checkin that document

I am using this 2 bapi for creating DMS ,
BAPI_DOCUMENT_CREATE2
BAPI_TRANSACTION_COMMIT
BAPI_DOCUMENT_CHECKIN2
BAPI_TRANSACTION_COMMIT
at last we want to c in DRAO table the created doc no should be updated here.
But it not updating.how can i update in the table..
Please tell via code..

How do you call BAPI_DOCUMENT_CREATE2?
I just tried with the example given in the documentation and with a little adjustment I created a document with an original which appears in the DMS_DOC_FILES table.
  DATA: ls_doc    LIKE bapi_doc_draw2,
        ls_return LIKE bapiret2.
  DATA: lf_doctype    LIKE bapi_doc_draw2-documenttype,
        lf_docnumber  LIKE bapi_doc_draw2-documentnumber,
        lf_docpart    LIKE bapi_doc_draw2-documentpart,
        lf_docversion LIKE bapi_doc_draw2-documentversion.
  DATA: lt_files LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE,
        lt_drat  LIKE bapi_doc_drat OCCURS 0 WITH HEADER LINE.
  ls_doc-documenttype    = 'Z01'.
  ls_doc-documentversion = '01'.
  ls_doc-documentpart    = '000'.
  ls_doc-statusextern   = 'DR'.
  ls_doc-laboratory     = '001'.
  REFRESH lt_files.
  CLEAR lt_files.
  lt_files-docfile      = 'c:\BP\test.docx'.
  APPEND lt_files.
  CLEAR lt_drat.
  REFRESH lt_drat.
  lt_drat-language    = 'EN'.
  lt_drat-description = 'Info Rec Description'.
  APPEND lt_drat.
  CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING: documentdata         = ls_doc
        IMPORTING: documenttype         = lf_doctype
                   documentnumber       = lf_docnumber
                   documentpart         = lf_docpart
                   documentversion      = lf_docversion
                   return               = ls_return
       TABLES: documentdescriptions = lt_drat
               documentfiles        = lt_files.
  IF ls_return-type CA 'EA'.
    ROLLBACK WORK.
    MESSAGE ID '26' TYPE 'I' NUMBER '000'
            WITH ls_return-message.
  ELSE.
    COMMIT WORK.
  ENDIF.
Best Regards,
Martin

Similar Messages

  • Need to create the document with originals and checkin that document

    HI Guys,
    My requirement is to write a method to  create the document with originals and checkin that document of DMS.
    Plz suggest the approach to get this requirement solved.
    Regards,
    RSK

    Hi Bala,
    Thanks for the reply.
    Iam writing the code under method like below.
    Importing:
    ls_doc type bapi_doc_draw2.
      APPEND is_files TO it_files.
      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING
          documentdata               = ls_doc
       IMPORTING
         documenttype               = iv_doctype
         documentnumber             = iv_docnumber
         documentpart               = iv_docpart
         documentversion            = iv_docvers
         return                     = iv_return
       TABLES
        documentfiles              = it_files.
    Iam checking with document number , document type, document part, document version... it is throwing error message as
    error while checking in and storing: version number(25).
    Please advice whether it is correct approach?
    Regards,
    RSK
    Edited by: shravan kumar ravula on Dec 22, 2011 11:24 AM
    Edited by: shravan kumar ravula on Dec 22, 2011 1:26 PM
    Edited by: shravan kumar ravula on Dec 22, 2011 1:26 PM

  • How to create the servlet as acontroller  and how to use it

    how to create the servlet as acontroller and how to use it

    >
    John
    Please update your forum profile with a real handle instead of "914824".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I am going to have over 50 buttons in a page, Why? This would be a most unusual UI paradigm. I've never seen such a page, which suggests that whatever you want to do is normally done another way. Please explain the requirement in more detail.
    just wanted to know if its possible to do something like this in java.
    Java is not used in programming APEX UI behaviour. Java and JavaScript may share initial syllables, but they are not closely related.
    It's possible to achieve a great deal in JavaScript, but a clear definition of the requirements is necessary. Do you mean the buttons should be dynamically generated? If so, yes, this is possible in JavaScript. What would drive the process?
    Also, i would like to have dynamic action on it, for example, when the button is pressed, fill a string of text into other items(text field) within the page. Without more detail its not possible to make any specific suggestions. For example, I certainly would not want to create 50+ individual dynamic actions relating to different buttons.

  • How was created the cluster with keys in example: Sim Phone.vi

    Hello all
    I have LV 7.1.1
    I have found the example: Sim Phone.vi
    And I don't know how was created the cluster with keys?
    Best regards
    Iskander

    It's just like any other cluster you create. Put a cluster container on the front panel and insert some Booleans. the actual Booleans are on the classic controls palette. The border of the cluster is also colored transparent with the paintbrush on the Tools palette.

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • FCP7 HELP - Exported quicktime mov plays differently than what I edited on the timeline. The playback shows the clips with ins and outs that are different than what I set in the clips when I edited - some are too early and the clips don't playback

    Please help ASAP.
    Specs: IOS 10.6.8
    Processor 2.4GHz Intel Core i5
    Memory 4GB 1333 MHz DDR3 -- Everything is edited, sourced, and stored on an 2TB external hard drive to make things go faster.
    Editing with FCP 7
    When I export the sequence I edited with quicktime, the playback video is very different from what I edited on the timeline. The playback has the clips with ins and outs that are way off than what I cut, and some of the clips don't show at all or have changed transitions. However when I play in the timeline in FCP, the sequence is fine, just the way I cut it.
    The source of the clips was one long .mov that I cut into clips for the timeline. Everything has gone smoothly but the exported .mov is just so different.
    How can I get the time codes of the clips to be the same in the exported .movs? I just want the quicktime .mov to represent my edit exactly.
    This video is due tomorrow - if the solution is too time consuming, can I play within the FCP player window and Log and Capture?
    Thanks,
    MV

    What is your source material? Is it H.264? FCP does not work correctly with that material.
    Click on a source clip in the FCP Browser, and once selected, type Command + 9 to see the item properties for the clip. Either report those properties, or take a screen shot of the item properties, and post that here.
    Next, click anywhere in your timeline, and then type Command + 0 {zero} to see your Sequence Settings. Either report those Sequence Settings, or take a screen shot of the Sequence Settings and post that here.
    MtD

  • How to Create a Table with Merge and partitions in HANA

    Hi,
    What is the best way to create a Table with MERGE and PARTITION and UNLOAD PRIORITIES.
    Any body can you please give me some examples.
    Regards,
    Deva

    Ok,
    1) the UNLOAD PRIORITY has nothing to do with the order of data loads in your ETL process
    2) Unloading of columns will happen automatically. Don't specify anything specific for the tables, then SAP HANA will take care about it
    3) Not sure where you get your ideas from, but there is no need to manually "flush" tables or anything like that. SAP HANA will take care of memory housekeeping.
    4) Partitioning and how to specify it for tables has been largely documented. Just read up on it.
    5) Delta Merge will happen automatically, as long as you don't prevent it (e.g. by trying to outsmart the mergedog rules)
    Seriously, I get the impressions that this list of requirements is based on some hear-say and lack of actual information and experience with SAP HANA. There are a couple of extensive discussions on data loading optimization available here in SCN and on SAPHANA.COM. Please read those first.
    All this had been discussed broadly a couple of times.
    - Lars

  • How to create a chart with x and y input arrays

    I am trying to create a chart that receives chunks of data from a while loop.  I know how to create a chart in order to append new data points to those points already in the display, but a regular chart doesn't let me specify the x axis data points.  Is there a way to create a chart with x and y array inputs?
    Thanx,
    Tom

    It's called an XY Graph. If you need an XY graph to behave like a chart, look at the shipping example called XY Chart.

  • How to create a playlist with podcasts AND music?

    I created a playlist with both podcasts and music in it. The thing is when I try to shuffle it, only music plays. When I start playing podcasts, none of my music plays. How can I make them both play at the same time and shuffle on the same playlist?

    In iTunes, you created a playlist (with songs and podcasts), and then synced that playlist to the iPod?  Or you manually created a playlist on the iPod, and manually added songs and podcasts to that playlist?  It needs to be an actual playlist that is on the iPod, not simply songs and podcasts on the iPod.
    If you have a playlist on the iPod....  In shuffle mode, only songs play.  Set the iPod to play-in-order (not shuffle).  Then, select the playlist on the iPod (by selecting Music -> Playlists from the Home screen).  With the playlist selected, press Play/Pause.  The playlist plays the song and podcasts in the order shown for that playlist in iTunes.

  • How to create Base Dimensions with MaxL and Text File?

    Hi,
    Doing a scratch rebuild of a cube every month. Don't want to have a 'dummy' outline with base dimensions to copy over every build. Instead want to build from text file somehow. Thus my plan is to: 1) Delete the existing app/db 2) Create a new blank app/db 3) Create the base dimensions in the outline via text file and 4) Build entire outline via a text file. I'm stuck on #3 how to get the 'base dimensions' built via text file. I need:
    ACCOUNTS
    PERIOD
    VALUE
    VIEWS
    SCENARIO
    CUSTOM4
    YEAR
    CUSTOM3
    CUSTOM2
    ENTITY
    CUSTOM1
    I see this MaxL, but it uses a 'rules file' and I never have built a rules file to create base dims so I'm confused if it's possible or not...
    import database sample.basic dimensions
    from data_file '/data/calcdat.txt'
    using rules_file '/data/rulesfile.rul'
    on error append to '/logs/dimbuild.log';

    We rebuild our Departments and Organization from an enterprise hierarchy master each week.
    The way we implemented (what you call #3) was to not do #1 and #2, but to have a "destructive" load rule for each of these dimensions using a text file. (in the "Dimension Build Settings" for the load rule, select "Remove Unspecified" to make it destructive)
    The text file just has the dimension name (parent) and any children we needed defined in a parent/child relationship. For instance
    "Sales Departments" "0100-All Departments"
    This essentially works the same as deleting the app because the destructive load rules will drop all the blocks of data that were unspecified.
    Then we run our SQL load rule to build the rest of the dimensions from the Location Master.
    We perform a level-0 export prior to this process, then reload the level-0 data and execute all the consolidation scripts to get the data back (now in a current enterprise defined hierarchy)

  • How far is the compatibility with PowerPoint and Keynote '09?

    Hello everyone
    I love making presentations and strangely while I'm an Apple fan the only thing I still didn't convert to is iWork
    Keynote is the best presentation tool I ever saw. The problem is with playing the presentations in college or anywhere else.
    I know that keynote is compatible with PowerPoint, but how far?
    Will the beautiful transitions and animations on keynote work on PowerPoint? Alongside with the beautiful graphics, charts and backgrounds?
    Thanks

    I would say the compatibility is "just good enough". If you NEED to use it you will, but you don't want to ever NEED it.
    You shoud think of the compatibility as being like trying to playback high resolution, color, widescreen, Dolby stereo content on a small black and white mono tv. There are some things that old telly just won't be capable of. Sure, you can see the motion and hear something, but you're ultimately limited by what you use to PLAYBACK the content, not what you used to CREATE it.
    Because Keynote has features that PowerPoint doesn't, PowerPoint will never be able to playback exactly what you see in Keynote. The reverse is true as well.

  • How to create a Book in Indesign and add indesign documents to it?

    Hi all,
    Can I create a book in InDesign CS3 and add indesign documents to it using javascript.
    Thanks,
    Hemachandiran.

    Here's my version of the script — now works in CS4 — may be it would come in handy to somebody:
    var myFolder = Folder.selectDialog( "Select a folder with InDesign files" );
    if ( myFolder != null ) {
         var myFiles = [];
         var myAllFilesList = myFolder.getFiles();
         for (var f = 0; f < myAllFilesList.length; f++) {
              var myFile = myAllFilesList[f];
              if (myFile instanceof File && myFile.name.match(/\.indd$/i)) {
                   myFiles.push(myFile);
         if ( myFiles.length > 0 ) {
              var myBookFileName = myFolder + "/"+ myFolder.name + ".indb";
              myBookFile = new File( myBookFileName );
              if ( myBookFile.exists ) {
                   if ( app.books.item(myFolder.displayName + ".indb") == null ) {
                        myBook = app.open( myBookFile );
              else {
                    myBook = app.books.add( myBookFile );
                    myBook.automaticPagination = false;
                    for ( i=0; i < myFiles.length; i++ ) {
                        myBook.bookContents.add( myFiles[i] );
                    myBook.save( );

  • How to create the query with multiple node types

    Hi,
    I am having an issue in creating a query to search multiple node types.
    The requirement is to query documents/pages of the type dam:Asset and cq:Page present under a path.
    I tried the following code snippet with no luck .
    path=/content
    1_type=cq:Page
    2_type=dam:Asset
    property=jcr:content/metadata/@cq:tags
    property.1_value=<tag Name>
    I was able to write a query with single type. However i could not find any documents/ materials with multipe types as shown above.
    Thanks in advance.
    Regards
    Sudhi

    I don't think multiple type is possible. Instead use super type like nt:base that will cover both page and asset.
    Yogesh
    www.wemblog.com

  • How to create Clipping Masks with Shapes and Text?

    Hi there! I am new to Illustrator and am currently attempting to learn it. I am creating a logo that has text and has a shape that goes through the text to make the text appear as if it has claw marks in it.
    I have two layers. The layer with the shape "claw" marks, and a layer with the text. The shape layer is currently above and the text layer is currently below. If I select both layers and click on Make Clipping Mask it has the text displayed within the little claw marks, how do I reverse that? Because when I try to change the order of the layers it doesn't clip anything?
    Thank you so much!
    Aaron

    Hi Monika,
    Sorry for taking so long to reply... This is what I am trying to accomplish. I tried following your directions above, but that only made the text invisible and I tried moving the claw layers above and below the text... and it only appeared as if the claws per se were filling up with the text color.
    Here is what I am trying to accomplish:

  • How to set up facetime with iPad and MacPro that have the same Apple ID?

    I have a iPad and a MacPro both with the same Apple ID but they are different locations. I am using the iPad in NY and my husband is using the MacPro in a different location. I cannot call him on the MacPro with facetime. When I call the message says "....not available"

    Hello Susan Dietz,
    Much like calling from one phone to another, you would need a separate Apple ID to contact with FaceTime (just as calling your own phone number would direct you to your own voicemail, rather than ring your phone).
    iOS: Using FaceTime
    http://support.apple.com/kb/HT4319
    Create an Apple ID.
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/wa/createAppleId?loca lang=en_US
    Cheers,
    Allen

Maybe you are looking for

  • WAN security in bridge mode

    Greetings! I have an Airport Extreme 802.11n hooked up to a cable modem, and I am pondering switching the Airport from NAT mode to bridge mode. The purpose is to give each client on the network its own WAN IP. As I share an apartment with two friends

  • NETworking Lightroom ... how I survive, and organize folders

    fyi: I am networking my data files in LRv1 on a NAS and a USB2 drive being shared on a WinXP Pro OS. My problem is we cannot "share" the Lightroom Database.lrdb file. (I do realize to do it right will be complicated ... if you wanted to share only "s

  • HT4623 Ipad will not upgrade past ios 5

    Is my original ipad capable of going past ios 5.01?  It tried to get 6 at one time, now just says it is up to date.

  • Transferring SQL Profiles between databases

    We'd like to be able to ship SQL Profiles for 10gR2 with our application for commonly problematic SQL. Does anyone know of a way that we can extract these profiles and apply them during application installation/upgrade? There is a bug indicating that

  • I can't do anything with Firefox

    My browser used to work just fine, but today I opened it and this is what it looked like: http://i49.tinypic.com/mbprbr.png As you can see there are no toolbars except for the bookmarks one and the page is black. Same goes for new windows, and when I