Create a PDF document and attach it to a service order business transaction

Hi all,
I have following requirement. For a particular service order, i am reading the entire survey details and then my requirement is that i want to convert this details into a PDF document and then attach the document to the same service order.
Right now, i have created a SMARTFORM which prints the required details. I got the OTFDATA of the smartform and now my problem is to convert it into PDF and then attach it to the service order .
Kindly help.
Points will be rewarded.
Thanks in advance,
Karan

business object
business_object-instid = guid.
business_object-typeid = 'BUS2000116'.
business_object-catid = 'BO'.
PROPERTIES
ls_loio_properties-name = 'DESCRIPTION'.
APPEND ls_loio_properties TO l_loio_properties.
ls_loio_properties-name = 'KW_RELATIVE_URL'.
ls_loio_properties-value = 'Test'.
APPEND ls_loio_properties TO l_loio_properties.
CLEAR ls_loio_properties.
ls_loio_properties-name = 'DESCRIPTION'.
APPEND ls_loio_properties TO l_phio_properties.
ls_loio_properties-name = 'KW_RELATIVE_URL'.
ls_loio_properties-value = 'any name'.
APPEND ls_loio_properties TO l_phio_properties.
ls_loio_properties-name = 'LANGUAGE'.
ls_loio_properties-value = 'EN'.
APPEND ls_loio_properties TO l_phio_properties.
FILE_ACCESS_INFO
FILE_SIZE = l_filesize.
mimetype = 'application/pdf'.
file_name = 'any name'.
binary_flg = 'X'.
FILE_CONTENT_BINARY
pass the binary content
RAW_MODE
X
package_id  -> to create package id
CONSTANTS: c_objtype   TYPE skwf_ioty VALUE 'P',
           c_sign      TYPE sdok_qusgn VALUE 'I',
           c_op        TYPE sdok_cxop VALUE 'NX'.
           c_class     TYPE sdok_class VALUE 'BDS_POC1'.
DATA: appl TYPE skwf_appl.
DATA: cspc TYPE sdok_ent VALUE 'CRM'.
        CALL FUNCTION 'CRM_KW_BOR_SET'
          EXPORTING
            iv_business_object = business_object.
        ls_selectors-type = c_objtype.
        ls_selectors-attribute = 'LANGUAGE'.
        ls_selectors-sign      = c_sign.
        ls_selectors-op        = c_op.
        APPEND ls_selectors TO lt_selectors.
        ls_selectors-type = c_objtype.
        ls_selectors-attribute = 'BDS_DOCUMENTTYPE'.
        ls_selectors-sign      = c_sign.
        ls_selectors-op        = c_op.
        APPEND ls_selectors TO lt_selectors.
KW Framework: Context Treatment
        CALL FUNCTION 'SKWF_CTX_CREATE'
          EXPORTING
            context_class      = 'CRM_CTXCL'
            x_reduce_to_one    = reduce_to_one
            description        = 'Default Context'
            x_transient        = 'X'
          IMPORTING
            context_id         = lv_context_id
          TABLES
            instance_selectors = lt_selectors.
KW Framework: Package Handling
        CALL FUNCTION 'SKWF_PKG_DYNAMIC_CREATE'
          EXPORTING
            package_desc   = 'PAKET'
            x_transient    = 'X'
            appl           = appl
            cspc           = cspc
            context_id     = lv_context_id
          IMPORTING
            new_package_id = l_pkgid
            error          = l_error.

Similar Messages

  • How to Create a PDF Document and apply Digital Signature in C# using the Adobe SDK?

    Hi Everybody!
    I have to do two distinct tasks here:
    1) How can I create a PDF document using the Adobe SDK in my .NET Applications(C# - 2.0)?
    I just need a basic sample to create a document with a simple text, for example. I did not find any useful information in the adobe documentation. I have the Acrobat Professional 8.0 in my computer, but it's very dificult to work whith de Acrobat.dll and .NET with a poor documentaion.
    2)How can I apply digital signature in a existent pdf document?
    I need to sign documents using the SDK, just a basic sample in c# would be helpful to start!
    Anybody could help?
    Thank in advance!

    Leonard Rosenthol or anybody that can help, sorry to insist.
    I will explain better my problem:
    I have an ASP.NET WebPAge (C# - 2.0). In this page, the user make a request. The request should generate a PDF document with the informations of the request and with a field to add a digital signature. The document created will be send to a approver that will confirm the approval applying his digital signature (I need to do too, a webpage where the approver open the page, choose the pdf document, and sign, just selecting his own certificate and clicking in the button SIGN... but this is another problem).
    That's the reason that I have to create a PDF document. If I create a WORD or HTML document, and then convert to PDF, how can I add a field to digital signature in this pdf document?
    Is there any solution using Acrobat SDK?
    Thank you very much!

  • Catalogs, code groups and codes not available in service order in Web UI

    Hi,
    I have created and maintained a subject profile for the service orders that i am using for my business scenarios. The same is visible under the objects tab in transaction data of the service order business transaction in the SAP GUI.
    However the same are not visible anywhere in the Web UI (they are not available in the list of available fields as well in BSP_WD_CMPWB for BT116H_SRVO).
    Can some1 pls advice me with the steps so as to make the catalogs, code groups and codes in my service orders available in the Web UI screen as well.
    Will really appreciate if detailed steps are provided since I am new to Web UI technology.
    Warm regards,
    DP

    Deepak,
    I'm 99% sure (although dont quote me as I dont have a developer key so I cant finish my testing) that you're missing the context Nodes - so although you have the assignment block yuo have no link between the code set and the service order header.  You havent referenced them in your comments on this post in any case. 
    Try this:
    Go into BSP_WD_CMPWB
    In the Browser component Structure open folder Component > Views
    Double-click BT116H_SRVO/DetailsOV and in the structure expand to BT116H_SRVO/DetailsOV > BT116H_SRVO/DetailsOV > View Controller  > DetailsOV.do > Context
    Right-click on folder Context Node and click Create
    Follow through the wizard defining a Z context Node (e.g. ZBTSubject) and a Model Node of BOL Entity BTSubject
    Define any Dependencies etc you may wish to have and so on (most of the wizard is optional)
    Repeat the same for the BOL Entity BTSubjectSet
    Now go back in and see if your values are populating.  I'm not a developer (and never have been), so I cant guarantee this will work as I dont have a developer key to test this, but I am quite sure that this needs to be done for you to get your values populating.
    Good luck, Merry Christmas and a Happy New Year (& please award points if useful!)
    Andrew Griffin.

  • I am trying to create a PDF document that calculates Gains and Losses in Mutual Funds. The calculation scripts are repetitive from line to line. The scripts work well until I reach the line 32. Script stops calculating...

    I am trying to create a PDF document that calculates Gains and Losses in Mutual Funds. The calculation scripts are repetitive from line to line. The scripts work well until I reach the line 32. Although I am using the same script as the fields above in the columm, the script eventually stops calculating and I can't figure out why. Is there a limit of how many calculation scripts you can enter? I will attempt to attach my pdf as soon as I figure out how. Thanks.

    For e31 :
    var e30 = +getField("e30").value ;
    var c31 = +getField("c31").value ;
    if ( (e30 !== 0) && (c31 !== 0) ) event.value = e30 + c31 ;
    else event.value = "";
    for e32 :
    var e31 = +getField("e31").value ;
    var c32 = +getField("c32").value ;
    if ( (e31 !== 0) && (c32 !== 0) ) event.value = e31 + c32 ;
    else event.value = "";
    for e33 :
    var e32 = +getField("e32").value ;
    var c33 = +getField("c33").value ;
    if ( (e32 !== 0) && (c33 !== 0) ) event.value = e32 + c33 ;
    else event.value = "";
    Java console doesn't show any error... That's why I am wondering if it's not a limitation issue... or memory issue, because they are maybe too many rows or something....
    The c value is not calculated.

  • I have a new computer with Windows 7 professional, Office 2007, Adobe XI. I have just created a word document and tried save it as a PDF but the PDF option doesn't appear in the drop down menu. Any ideas please? Thank you.

    I have a new computer with Windows 7 professional, Office 2007, Adobe XI. I have just created a word document and tried save it as a PDF but the PDF option doesn't appear in the drop down menu. Any ideas please? Thank you.

    What is "Adobe XI" - Reader, or Acrobat?
    But either way, 'Save as Adobe PDF' is a Word function, independent of what Adobe software you have installed.

  • Using a newly created Library document to create a list item and attach itself

    I have a workflow that moves a document from one library to another.
    When a document is moved to a certain library I want to create a list item with a link to the document in the list item.  Keep in mind there could be 10 files submitted to the library, so then in my list I would want 10 new list items created for
    each file, with a link to the individual file. or is there a way to attach the document to a newly created list item programmatically?
    is this possible?

    Hi,
    According to your post, my understanding is that you wanted to use a newly created Library document to create a list item and attach itself.
    I recommend to create a workflow assocaited to the second library, and start the workflow automatically when an item is created.
    Then add action as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Error message in Adobe Pdf in printer device panel when trying to create a pdf document.  I have CS3

    Error message in Adobe Pdf in printer device panel when trying to create a pdf document.  I have CS3 Web Premium with Acrobat Professional 8.  I use it fine on my old computer with Windows XP.  I recently got a new laptop with Windows 7.  I installed all my Adobe programs, and I think they are working.  When I look at Adobe PDF in the device section of the Control Panel it looks okay.  But when I try to print a Word, Photoshop, or HTML page in PDF, nothing happens.  I have tried printing both as File>print and using the PDF tab on the top menu bar.  I look at the device in the control panel and it has the yellow error warning symbol and suggests trying to troubleshoot.  I look at the document list and it says status "error".  When I try troubleshooting Windows suggests doing some Home Sharing and also suggests canceling the document I'm trying to print.  I tried re-installing just Acrobat 8 from CS3 (and have to use Photoshop CS4 disk for shared documents I guess).  I ran into a can't locate adobepdf_dll file, so did a web search on this issue and found a suggestion that I find and use the adobepdf_dll_64 file and may have to (I did have to) remove the "_64" for it to work.  I think I successfully reinstalled using that dll file- no errors came up anyway.  But still when I try printing/converting a photoshop, webpage, or word document into pdf, the pdf device in control panel still gives the error status on the document and gives the same troubleshooting advice.  Help?

    I just compared the properties between the two computers.  On the old computer it has the port as "My Documents/*.pdf".  On my new computer it lists the port as "LPT1".  I tried changing the port to "Print as File", but when I try printing a photoshop picture as pdf, I get a "Access Denied".  I then tried to create a new port on the device control panel.  I tried to create a local port "My Documents/*.pdf" port but was denied.  I ten tried to create a new port type and control panel asked for an INF file.  I wonder if this is where my problem lies.  Thoughts?

  • While creating a PDF document usinf Adobe Acrobat Pro 9, it generates additional blank pages.

    While creating a PDF document using Adobe Acrobat 9 Pro, it generates additional blank pages. How do I resolve this issue?

    I might make a wild guess that you are using WORD and have used hard page breaks. If that is the case, then likely what happens is when you print to PDF the document is being reflowed to match the printer and the forced page break may end up on the next page and be forcing a second page. Just a guess.

  • Print Problem - PDF is OK on Windows 7, but OK on Windows XP with "Acrobat Reader An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."

    I have received a PDF which prints fine in Windows 7 but with Windows XP I get "Acrobat Reader An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem." and a blank piece of paper passes through the printer. I appreciate that Windows XP is no longer supported but I would like to think that the solution to this problem is not too difficult!
    I have tried Acrobat 9, 10 and 11.
    Any advice (apart from use Windows 7! ) would be most welcome.
    Many thanks.

    If you use the same Adobe Reader versions with the same PDF on Windows 7 and XP, then I would expect the outcome to be the same.
    Is this a local or online PDF?
    If local, is the file really exactly the same?
    If online, in what browser?

  • How to create a  PDF document with page curls using Adobe  CS 4?

    My  goal is to create a  PDF document with page curls. I am using Adobe  CS 4.
    1.      The document was created in Adobe InDesign  CS 4  where the page  turn (curl) transition  was applied.
    2.      Then the document was exported to .swf.
    3.     The .swf file was imported into   Adobe Acrobat Pro  to create a PDF file with  flip page or page curl transitions.
    These are the problems.
    1.      The background is not  transparent.
    2.      Page dimensions have to be increased at least an inch in width and length so that the full page can show
    3.      The command and+   will not only increases the document's  screen size. It increases the page margins.

    PDF was never designed to support the Flash page curl effect (it didn't exist back then). Anything you try (and you've tried the standard hack) will look like a hack. Personally, I don't think the effort is worth it for an effect that's much overused.

  • How to create a PDF document

    I have a document from which I want to create a pdf file.  I have created a pdf two different ways:  1) Using the printer app, and 2) Using the app that I used to create the document in the first place and choosing Save As a pdf.  In both cases the original document was 975 KB and the pdf was 2.2 MB!  A friend of mine took the same document and created a pdf which was only 1 MB!  He used a Windows machine.  In addition the pdf I created using both methods killed the embedded url's.
    I have figured it out, sort of.  First I do not want to pay $35 for an app for my Mac that allows me to convert to pdf.  If I ever need to create a smaller pdf for screen viewing and/or one which retains the active links then I will use my PC.
    I used Powerpoint (Office 2010) on the PC to create a pdf which was good for web viewing and screen viewing.
    So the basic problem is with the Mac - both with the basic software which blows up the file size when converting to pdf and kills the links, and with the Office for Mac which uses the basic Mac software.  I will not pursue this problem with Apple or Microsoft (Office 2011) unless Apple plans a workaround
    One thing Office for the Mac gives you is the capability to Reduce File Size when saving the pptx doc; however, when then creating a pdf o te Mac I get the same expansion/kill url behavior.
    So now I have a strategy which will work fine for me.  Use the PC at selected pdf creation times.
    I think that Mac OS X should provide the ability to create proper pdf's and not those limited ones I have discussed above and not force one to use the PC!

    The Apple doc was very helpful.  Using the Quartz filter when saving from Preview eliminated the bloat.  The reducing file size worked.
    As far as the links:  all single line full url's were retained.  If you had a multiple line url or a substitution of a word for a url that did not work.  With that in mind,  most documents that I will create would work fine as pdf's.  To be sure of success I will follow this proceedure:  1) Don't substitute words for url's, 2) Make sure that url's are on one line of the document, 3) use the quartz filter out of Save As in Preview when creating the pdf, and 4) Go to the PC if the prior steps are not feasible.
    I still think that Apple should make the process easier!
    Thanks for your help.

  • How to create a pdf document with specific security settings

    Hallo,
    in Adobe Acrobat you can set security settings which make documents unprintable, unchangeable etc.
    What I want to do is: I want to set these security settings by creating the pdf-document, because I do not want to open every document and change the security settings. Is this possible at all???
    Thank you for help
    Elisabeth

    How are you creating the documents? If using Adobe PDF printer, use the security options in Adobe PDF printer settings. If using PDFMakers (Acrobat buttons inside Office applications, open the Preferences menu item and set security there)

  • How do you create a pdf document on a website?

    I am trying to create a pdf document that is an extension of my website. Here is my site. [spam link removed] any help is appreciated. Thanks.

    billyhoskins wrote:
    a pdf document that is an extension of my website
    I have no idea what this means.  You want to have a PDF on your website?  Upload it, and link to it.

  • How do extract one page from one pdf document and save as a new pdf?

    How do I extract one page from a pdf document and create a new document?

    In Acrobat: Tools - Pages - Extract.
    In Reader it's not possible.
    On Sat, Jan 31, 2015 at 10:29 PM, Ned Murphy <[email protected]>

  • How do I create a pdf document from my scanner?

    How do I create a pdf document from my scanner?

    If you are using Acrobat , then follow the below mentioned steps:-
    Scan a paper document to PDF using Autodetect Color Mode (Windows)
    1. Choose File > Create > PDF from Scanner > Autodetect Color Mode.
    2. If prompted to scan more pages, select Scan More Pages, Scan Reverse Sides, or Scan Is Complete, and click OK.
    Scan a paper document to PDF using a preset (Windows)
    1. Choose File > Create > PDF from Scanner > [document preset].
    2. If prompted to scan more pages, select Scan More Pages, Scan Reverse Sides, or Scan Is Complete, and click OK.
    Scan a paper document to PDF without presets
    1. In Acrobat, do one of the following:
    (Windows) Choose File > Create > PDF from Scanner > Custom Scan.
    (Mac OS) Choose File > Create > PDF from Scanner.
    2. Select scanning options in the Scan dialog box, as needed, and then click Scan.
    If you specify that you want to use the native scanner user interface instead of the Acrobat user interface, other windows or dialog
    boxes appear. Consult the scanner documentation information on available options. In Mac OS, the scanner user interface is always shown.
    3. If prompted to scan more pages, select Scan More Pages, Scan Reverse Sides, or Scan Is Complete, and click OK.

Maybe you are looking for