Web Service to Create a Document Info Record with attachments (e.g. PDF)

Hello guys,
we are looking forward to create a Web Service that should be able to create a Document Info Record on SAP ERP Application Server. As we don't have installed the SAP Standard Web Services on our SAP ERP ECC 6.0 system we will manually create a Web Service with the help of the standard BAPI_DOCUMENT_CREATE2.
The current problem is that the Web Service based on the Standard BAPI can not upload Files (PDF or Word files) from the Users Client PC to the Application Server.
Is there a possibility to Create a Web Service that can handle files and create DIRs on application server?
Thanks a lot!!
Regards,
Christian

Hello Natallia,
Well, in this case you don't really need the CV01N transaction. This represents the user interface (UI), and you only need an interface (that is, an API), which in SAP is represented by a BAPI
I'm not familiar with CRM, but I assume that at some point when saving a Service Contract, you have a BAdI, where you can check the status and insert some custom code.
So, all you have to do is call BAPI_DOCUMENT_CREATE or BAPI_DOCUMENT_CREATE2 (if available on your installed version), with the required attributes (this can be master data, classification, custom data...). After this function is called successfully, you should receive the document key (DOKAR, DOKNR, DOKVR, and DOKTL). Which you can also save in the Attachments tab.
Hope this helps,
Tudor

Similar Messages

  • Linking document info record and purchase order

    Hi all,
    I hope that someone can help me because I'm having a problem with creating links between document info records and purchase orders.
    By default in SAP I can create links between document info record and purchase order ITEMS! When I create that link, I can see it in document info record under Object links tab, but when I double click on the number of purchase order nothing happens (I expected that this purchase order will open).
    Why is that so?
    Why can't I access purchase order from document info record even though the link exists?
    The other question is about creating object links to purchase orders, not purchase order items! Is it possible to link document info record with purchase order?
    I would appreciate quick answer because we're in the middle of a project and we're stuck with that problem.
    Thanks!

    Hi Karlo,
             As you mentioned, object links could be linked to Purchase order items. In customisation you maintain these entries under the node SPRO > Cross Application Components> Document Management--> Control Data --> Define Document Types --> Define Object Links.
    There are many links in the standard system (possible entries).
    The system automatically determines the screen number (dialog box) where the key data for the object is maintained for document maintenance.
    You can check the screens when the screen entry is missing or contains errors by doing the following:
    Start the Object Navigator and display the objects for the development class  CV.
    Expand the function group 130. The structure nodescreens lista all screens that can be used for object links.
    You can make an object link to SAP objects that are not shown in the possible entries list. To do this, proceed as follows:
    In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
    You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140 .
    The processing logic must follow that of screen 1204 in program SAPLVC130.
    Create function module OBJECT_CHECK_XXXX (XXXX = object name)
    If the object can be classified, this function module already exists .
    Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
    Hope the above instruction helps in solving your problem,
    Sojan
    Note : Award points if you find the information useful

  • ECR/ECO and Document Info Record creation

    Hi,
    I’m trying to find out if it’s possible to automatically create an document info record and attach the document info record to the ECR/ECO (in background  through “Accompanying docs) when I create a new ECR/ECO through transaction CC31 or when I save the ECR/ECO.
    Do anyone now if this is possible, if yes can you please also answer the User Exit and BADI to use.
    Thanks

    Hi,
    Try following it may be useful for your requirement.
    1. EXIT_SAPMC29C_006   --    Include program ‘ZXCCAU06’
    2.EXIT_SAPMC29C_005   --     Include program ‘ZXCCAU05’
    Enjoy SAP……
    Don’t forget to give points if its useful ans.
    Namskar,
    Ketan Dave

  • Document Info Record

    Hi All,
    A PDF file is attached to SAP Document Info Record. While opening that PDF file through CV03N getting a messege like -
    "Error while executing C:\DOCUME~1\.................."
    What can be the reason for this & how it can be soleved?
    Regards
    MHP

    Hi Manish,
    You need to define application type in DC30.
    Kindly put suffix as .pdf and mime type as "application/pdf". This will activate the application pdf in the sap dms.
    if you found problem with other files do same and fill mime types properly. Aslo tick the start authorization field in same screeen.
    I hope this will resolve the query.
    Regards,
    Ravindra

  • Create Document Info Record (DIR)

    Hi Experts,
    I have to Create document info records to store product specification information in DMS.
    Can any one tell me the process how to proceed for the same.
    Regards,
    Krishna Singh.

    Hi,
    You can use CV01N transaction for creating a document.
    Regards,
    Keerthi

  • Variable number of document info record parameters

    Hi guys,
    I have a question about adding additional information to document info record.
    The situation is following:
    Our customer wants us to link original purchase order (PDF file) with it's document info record in SAP. The document itself is stored in another document management system and we have succeeded in linking this object with it's document info record in SAP.
    He also wants to have some description data stored in document info record (date, description, name, etc). One odd requirement is copying information about cost centers and costs per each cost center from fields in document management system to some fields in document info record.
    The problem is that each purchase order can have various number of cost centers and costs per each cost center!
    So, is there any possibility to define some fields in document info record to which I can store variable number of parameters (for example in one case 3 fields, and maybe in another case 1 field)?
    Any kind of information will be valuable for me!
    Thanks for help!

    Hi,
    But my next question is how can I know how much cost centers will be for some document? If I need to define number of cost centers in advance, then this solution is not very flexible. The best solution would be if I could add values to classification flexibly (for example: one time 3 values and the other time 1 value).
    :-Check box additional values in values tab of char. that will allow to enter flexible number of values any time
    The other question is about values of parameters. For each cost center I need to enter two values (cost center number, and costs for that cost center). So, for each cost center I need to add 2 values. Is that possible using classification?
    :-Create classification with chara. cost center, cost center value and check box additional values as above that will allow you to add values for cost center and cost center value.
    Anirudh.

  • Version Document Info Record and File Management

    Hi all!
    want to edit DMS document info records (as in cv04n - add, del files) without deleting original DIR -> Version management of DIRs.
    I use the following BAPI scenario:
    - BAPI_DOCUMENT_GETACTVERSION (get the highest version of a DIR)
    - BAPI_DOCUMENT_GETDETAIL2 (to get the object links of the DIR)
    - BAPI_DOCUMENT_CREATENEWVRS2 (create a new version of the DIR, copyoriginals = X, object links are copied as well)
    - again BAPI_DOCUMENT_GETACTVERSION (get this new version number)
    - again BAPI_DOCUMENT_GETDETAIL2 to get the files of the new version DIR)
    - to delete single files, i change the file record of the files table ( set deletevalue = X).
    - then BAPI_DOCUMENT_CHANGE2  as suggested in a nother thread of mine by 2 community members.
    the latest step runs for version = 00, but when having a version gt 00, the bapi_document_change2 returns : "original is already checked in and stored".
    also i checked the ph_objid and lo_objid (the ids are the same for Version n and n+1), which might be the reason for the error mentioned above.
    i can't find any solution.
    thanks for replies in advance,
    Christoph

    Hi all!
    got the solution: - finally !!!
    Problem:
    you want to edit Document info records - using a new version of this DIR. in the new version it is possible to add and delete files.
    Solution:
    - CALL FUNCTION 'BAPI_DOCUMENT_GETACTVERSION'
    and get the actual hightest version of the DIR
    - ls_objtype-OBJECTTYPE = '*'.
    append ls_objtype to myobjectlinks. to be able to copy all the objectlinks of the DIR.
    - lv_dokvr_new = lv_dokvr_ref + 1. - increment the DIR version number
    - CALL FUNCTION 'BAPI_DOCUMENT_CREATENEWVRS2 to create a new version of the DIR.
    - * get again the actual version
    CALL FUNCTION 'BAPI_DOCUMENT_GETACTVERSION'
    - * get files of the new version
    CALL FUNCTION 'BAPI_DOCUMENT_GETDETAIL2'
    - * set the delete flag for those you want to delete in the table documentfiles.
    - CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
    IMPORTANT ***
    !!! transfer O N L Y the files you want to delete O R transfer all files but C L E A R the STORAGE_CATEGORY field !!!
    any questions? feel free to ask...

  • SQVI - Material to Document Info Record

    I am trying to create a query that gives me
    Material Number <b>(I tried MARA and MARC but MARA wont join and MARC produces no data when ran)</b>Document Type (DRAW-DOKAR)
    Document Number (DRAW-DOKNR)
    Document Status (TDWST-STABK)
    Once I have these I can create a report that shows me all materials that are not at a release status. I know 90% of the tables I need but when I create a join using the Document Info Record (DRAW) and any of the material master records MARA, MARC, MAKT, MEBW I end up with a join that doesn't work or a join that doesn't have a similar key to run.
    Any ideas?

    When you go into MM03 and look at any material and then go to the additional
    data tab and then select document data that gives you the documents associated with a part. If you then double click on any document that gives you the document status.
    I am trying to create a report that gives me all open production orders - the parts on that production order (which I can do) and then for every part to see which have documents that are on a certain status.
    Example you may be creating an assembly and the drawing on the document went from a 2 hole gidget to a three hole gidget. Well - production people don't know that the document has been re-issued and is being reviewed. This way they can run a report that shows them which parts on the Production Order are currently in review so they should not waste time a money on an assembly if the design is being tweaked.
    Because you can get to the document status from the material master there must be a link. I don't know where that is. I tried MARA, MARC, MKPF and MSEG and nothing links with the document. But there must be something that triggers that the document is attached to certain part.
    I just need to know what table that is......

  • Document Info Record and Archivelink

    Dear all,
    Can any expert help to distinguish Document Info Record (e.g. CV04N) and Archivelink (e.g. OAER)?
    When should we use these two document management systems?
    We're now using ArchiveLink but we it is hard for us to search for specific document since there're no business custom attributes or characteristics to describe the document. Can we add custom attributes to ArchiveLink document?
    Document Info Record support characteristics seem can solve the problem. But how do we upload the document by using BAPI rather than attach it manually by CV01N.

    Hi Karlo,
             As you mentioned, object links could be linked to Purchase order items. In customisation you maintain these entries under the node SPRO > Cross Application Components> Document Management--> Control Data --> Define Document Types --> Define Object Links.
    There are many links in the standard system (possible entries).
    The system automatically determines the screen number (dialog box) where the key data for the object is maintained for document maintenance.
    You can check the screens when the screen entry is missing or contains errors by doing the following:
    Start the Object Navigator and display the objects for the development class  CV.
    Expand the function group 130. The structure nodescreens lista all screens that can be used for object links.
    You can make an object link to SAP objects that are not shown in the possible entries list. To do this, proceed as follows:
    In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
    You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140 .
    The processing logic must follow that of screen 1204 in program SAPLVC130.
    Create function module OBJECT_CHECK_XXXX (XXXX = object name)
    If the object can be classified, this function module already exists .
    Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
    Hope the above instruction helps in solving your problem,
    Sojan
    Note : Award points if you find the information useful

  • Creating a Standard Info Record for multiple plants

    We did some clean up in info records the other day and marked some old/incomplete info records for deletion down at the PO organizational data level (EINE).  This went fine; however, now when we go to create another info record using the same info record number (because material and vendor is the same), but for a different plant (will be a separate entry in the EINE table), SAP automatically marks it for deletion because the previous entry is marked for deletion.
    The one consistent thing I have noticed is that the old incomplete info record originally marked for deletion had a purchasing document attached to it.  The document along with document date carried through the additional info records we tried to create for different plants.
    Can someone tell me the reason this happens?  Also, what can we do to prevent this?  I would think you could have an info record marked for deletion in plant 1,  and have a valid one for plant 2??

    This is a program bug, please see OSS  Note 742405 - Creating purchasing info record with deletion indicator

  • Creating new DMS info record directly from purchase order transactions

    Hello Everybody,
    does anyone knows of a way to make it possible for users to Create New DMS info record directly from the purchase order transactions ?
    e.g:
    in ME22N there is a button of "Documents" for an item level in the order, but that button only allows to link an existing info record.
    Link To a screenshot:
    http://img263.imageshack.us/i/me22n1.jpg/
    Regards,
    Yossi Fridman.

    hi
    This query has already been addressed in the following Forum by Christoph Hopf..
    pls chk link below.
    Create DIR through P.O and Sales order screen
    Thanks
    john
    Edited by: johnpp on Feb 15, 2011 11:54 AM
    Edited by: johnpp on Feb 15, 2011 11:57 AM

  • Document Info Record Visiable in Quality Notification

    Greetings All,
    I am trying to set a Document info Record in the material master such that when a quality notification is created; the DIR will appear in the Supporting Documents tab/Linked documents (Quality Notification).  The DIR should be material specific such that when a QN is generated; the linked document field is auto populated.
    Your attention into this matter is greatly appreciated.
    Many Thx,
    jaime

    Hi,
    In context with DMS when we create DIR it can have object links. In ur context Object links are material code and the Quality Notification.
    When u create DIR using CV01N and assign Material code in  object link tab the same can be viewed thru material master ---> additional data -
    > document data
    If you assign Quality notification number in Object link tab , the link will get created with Quality Notification which can be viewed in subject tab of Q Notification.
    Regards,
    Nitin

  • Document Info Record (MM) self populating in Quality Notification

    Greetings All,
    I am trying to set a Document info Record in the  material master such that when a quality notification is created; the DIR will appear in the Supporting Documents tab/Linked documents.
    Your attention into this matter is greatly appreciated.
    Many Thx,
    jaime

    Hi,
    In context with DMS when we create DIR it can have object links. In ur context Object links are material code and the Quality Notification.
    When u create DIR using CV01N and assign Material code in  object link tab the same can be viewed thru material master ---> additional data -
    > document data
    If you assign Quality notification number in Object link tab , the link will get created with Quality Notification which can be viewed in subject tab of Q Notification.
    Regards,
    Nitin

  • Invoking a web service not created using oracle web service lib

    Hi All,
    I have a need to invoke my web service from oracle sql command. My web service not created using oracle web service library, but it is created using axis c++ libraries. Is it possible to do so,
    Thanks in advance,
    Regards,
    Monica

    In order to call out from the database process, is SQL (or PL/SQL) you need to generate some client code, that understand the details about the specific of the service you want to invoke and can produce the correct SOAP request. Once this proxy is uploaded in the Database, you can use it.
    There is a set of Database Web services samples that should help you get started. You can also take a look at the developer's guide - see Developing a Web Service Client in the Database.
    Hope it answers your question.
    --eric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Update/create the purchase info records

    Hi All,
    i got a requirment for update/create the purchase info records for the transaction ME11.
    i came to know that the FM <b>ME_DIRECT_INPUT_INFORECORD</b> is suitable for this requirment.
    but when i am trying to test this by passing data to I_EINA and I_EINE.
    it is giving some error message like "<b>Please enter at least one vendor</b>, Number entered not within external number range and etc".
    can any one guid me in passing the data to this function module, i.e. what are the required fields that are to be passed to this FM.
    if i have to update/create the EINA & EINE table data.
    Thanks,
    Rama

    Hi,
    Better use report RM06IBI0 - read its documentation with
    Tcode SE38
    Greetings Andreas

Maybe you are looking for