Want to attach smartform as workitem but it doesn't work.

Dear Experts,
I want attach 'SMARTFROMS' or PWB Forms as workitem attachment but i couild not able to do .My method code is as follows...
function zbi_bill_revision_v1.
""Local Interface:
*"  IMPORTING
*"     REFERENCE(WID) TYPE  SWW_WIID
*"     REFERENCE(L_DOCNO) TYPE  E_PRINTDOC
*"  EXPORTING
*"     REFERENCE(L_WID) TYPE  SWW_WIID
data: l_wid type SWW_WIID.
  include <cntn01>.
  types : begin of ty_i_tline,
           i_tline  type tline,
          end of ty_i_tline.
  data: ls_control_parameters type ssfctrlop,
        w_compop         type ssfcompop,
        w_return         type ssfcrescl,
        v_len_in         type so_obj_len,
        it_i_otf         type itcoo occurs 0 with header line,
        it_i_tline       type table of ty_i_tline,
     it_zbillasses    TYPE zbill_assessment,
        out_opt          type ssfctrlop,
        fm_name          like rs38l-name,
        test_flag        type sysubrc,
        message_lines    type standard table of  swr_messag,
        message_struct   type standard table of swr_mstruc,
        att_head         type swr_att_header,
        it_solix_tab     type tsfixml,
       wid              TYPE sww_wiid,
        att_id           type swr_att_id,
        l_c              type efg_strn_printdata,
       wa_assesment     type zbill_assessment,
        wa_bill_ht       type zbill_invoice_ht.
     w_compop         type ssfcompop.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
   EXPORTING
     formname                 = 'ZFORMBI_HIGH_TENSION_EMAIL'
  VARIANT                  = ' '
  DIRECT_CALL              = ' '
  IMPORTING
    fm_name                   = fm_name
  EXCEPTIONS
    no_form                   = 1
    no_function_module        = 2
    OTHERS                    = 3
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
   EXPORTING
     i_language             = sy-langu
   IMPORTING
     e_devtype              = w_compop-tdprinter
   EXCEPTIONS
     no_language            = 1
     language_not_installed = 2
     no_devtype_found       = 3
     system_error           = 4
     OTHERS                 = 5.
IF sy-subrc <> 0.
ENDIF.
w_compop-tdnoprev               = 'X'.
ls_control_parameters-getotf    = 'X'.
ls_control_parameters-no_dialog = 'X'.
DATA: it_isu_bi_bill_s_doc_header TYPE isu_bi_bill_s_doc_header.
CALL FUNCTION '/1BCDWB/SF00000426'
   EXPORTING
  ARCHIVE_INDEX              =
  ARCHIVE_INDEX_TAB          =
  ARCHIVE_PARAMETERS         =
    control_parameters         = ls_control_parameters
  MAIL_APPL_OBJ              =
  MAIL_RECIPIENT             =
  MAIL_SENDER                =
    output_options             = w_compop
    user_settings              = 'X'
     pwb_data                   = it_isu_bi_bill_s_doc_header
     c                          = l_c
     wa_bill_ht                 = wa_bill_ht
  IMPORTING
  DOCUMENT_OUTPUT_INFO       =
    job_output_info            = w_return
  JOB_OUTPUT_OPTIONS         =
  EXCEPTIONS
    formatting_error           = 1
    internal_error             = 2
    send_error                 = 3
    user_canceled              = 4
    OTHERS                     = 5
IF sy-subrc <> 0.
ENDIF.
it_i_otf[] = w_return-otfdata[].
CLEAR w_return-otfdata[].
  data: x_printparams   type eprintparams,
          it_ranges     type standard table of efg_ranges,
          wa_ranges     type efg_ranges,
          c_fclass(12)  type c value 'IS_U_BI_BILL',
          lt_itcoo      type standard table of itcoo,
          g_docno       type erdk-opbel.
clear: wa_erdk.
  select single *
    from erdk
      into wa_erdk
        where opbel = l_docno.
  x_printparams-formkey   = wa_erdk-formkey.
  x_printparams-tdnoprev  = 'X'.
  x_printparams-tdnoprint  = 'X'.
x_printparams-NO_OPEN_FORM = 'X'.
x_printparams-NO_CLOSE_FORM = 'X'.
  x_printparams-tdgetotf = 'X'.
  x_printparams-formclass = c_fclass.
  wa_ranges-low           = wa_erdk-opbel.
  append wa_ranges to it_ranges.
data : x_header  type  rfgen-header.
  call function 'EFG_PRINT'
    exporting
    X_HEADER                    = X_HEADER
      x_printparams               = x_printparams
    X_ARCHIVE_INDEX             =
    X_ARCHIVE_PARAMS            =
     x_dialog                    = ' '
    X_RECIPIENT                 =
    X_SENDER                    =
    X_STRN_COLLINFO             =
    X_TABN_SEL_PER_FCLASS       =
    REF_LOG                     = CL_EFG_LOG_NULL=>S
    I_FLG_EMSG                  = '+'
  IMPORTING
    Y_ITCPP                     =
    Y_RDI_RESULT                =
    Y_PRINTPARAMS               =
    Y_SF_RESULT                 =
    Y_TAB_GENDATA               =
    Y_TABN_SEL_PER_FCLASS       =
    Y_PDF_RESULT                =
    tables
      xt_ranges                   = it_ranges
    XT_RANGES1                  =
    XT_RANGES2                  =
    XT_RANGES3                  =
    XT_RANGES4                  =
    XT_RANGES5                  =
    XT_RANGES6                  =
    XT_RANGES7                  =
    XT_RANGES8                  =
    XT_RANGES9                  =
     yt_otf_data                  = lt_itcoo
   exceptions
     not_qualified               = 1
     formclass_not_found         = 2
     form_not_found              = 3
     formclass_invalid           = 4
     print_failed                = 5
     form_invalid                = 6
     cancelled                   = 7
     func_invalid                = 8
     not_authorized              = 9
     others                      = 10
  if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.
  data: pdf_bin type xstring,
        l_size type i.
  call function 'CONVERT_OTF'
    exporting
      format                = 'PDF'
      max_linewidth         = 132
    importing
      bin_filesize          = l_size
      bin_file              = pdf_bin
    tables
      otf                   = lt_itcoo[]
      lines                 = it_i_tline
    exceptions
      err_max_linewidth     = 1
      err_format            = 2
      err_conv_not_possible = 3
      err_bad_otf           = 4.
  call function 'SCMS_XSTRING_TO_BINARY'
    exporting
      buffer                = pdf_bin
  APPEND_TO_TABLE       = ' '
   importing
     output_length          = l_size
    tables
      binary_tab            = it_solix_tab
  att_head-file_type = 'B'.
  att_head-file_name = 'Billing Revision'.
  att_head-file_extension = 'PDF'.
  att_head-language = 'EN'.
l_wid = wid + 2.
  call function 'SAP_WAPI_ATTACHMENT_ADD'
  exporting
    workitem_id          = wid
    att_header           = att_head
    att_txt              = 'Bill Assessment'
    att_bin              = pdf_bin
   document_owner       = sy-uname
   language             = sy-langu
  DO_COMMIT            = 'X'
importing
   return_code          = test_flag
   att_id               = att_id
tables
   message_lines        = message_lines
   message_struct       = message_struct.
endfunction.
when execute code it shows attachment successfully created but it does'nt show in attachment.
Edited by: GURPRIT BHATIA on Jun 18, 2010 8:46 AM

Hi,
Pls explain it.
I am also facing problem.
Thanks
Ragaven

Similar Messages

  • I've set 2 aliases in my iCloud Account and want to set a 3. one but it doesn't work

    In my iCloud Account i have 2 Aliases transfered from Me.com. When i set up iCloud on my Mac i see one another alias that i had on Me.com, i can choose it as the despatcher adress but it is not listed as an alias in my ICloud.com Account.
    My Problems are:
    1. how can i delete the alias that is on my mac but nowhere else? (it is an [email protected] adress)
    2 How can i create a new Alias in iCloud? Remeber i have only 2 Aliases listed in iCloud so it should be possible to create a third one
    Thanks for your responses!!
    Cheerz David

    Hello Chris,
    Thanks for your answer. I was hoping for an easier answer. Too bad there is no drag and drop solution, it would have been much easier.
    Thanks for answering so fast.
    Bye.
    Yan

  • Want to download Adobe Premiere Pro - but it doesn't work. Am quite desperate. It was promised I could use this program in seconds - and now I have been toiling on this for hours...

    What should/can I do?

    Hi, If you are not seeing Premiere Pro app listed for download, it is most likely because of your machine being 32 bit.
    Apps will not be listed if your machine does not satisfy the requirements.  Check your machine's specs against the Premiere Pro system Requirements.
    System requirements | Creative Cloud
    Not all apps displayed for download | Creative Cloud desktop app
    This shall help.
    if you seeing any other issue/error, please respond back.
    Regards
    Ajay Jain

  • I want to Open a PDF attachment in iBook, but it doesn't work anymore.

    I want to Open an Email attachés PDF in my iBook. Just do ist like always, but it doesn't work anymore.
    Can you help me.
    Thanks

    Try quitting the iBooks App completely, restart the iPad and see if that helps.
    Go to the home screen first by tapping the home button. Quit/close iBooks by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down the iBooks icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • When I launch I photo it wants me to choose a library but it doesn't find one which is impossible, because i still have no storage. before i can clean up i want to back up them. how can i find my library?

    When I launch I photo it wants me to choose a library but it doesn't find one which is impossible, because i still have no storage. before i can clean up i want to back up them. how can i find my library?

    You may very well have damaged your library - or even your system by not having adaquate storage available
    And never select all of the pitcture and move them - that will destroy your library - the iPhotolibrary is a SQLite database and must always be kept intact as a single entity -
    Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
    And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
    And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
    LN

  • I lost my connection when I was using internet and when I want to reconnect to airport it give me connection timeout error, I changed my password on router but still doesn't work. How can i fix my problem?

    Hi,
    I lost my airport connection when I was using internet and when I wanted to re-reconnect to airport it gave me connection timeout error, I changed my password on router but still doesn't work. How can i fix my problem?

    Hello there hastibahreini,
    It sounds like you were using your Wi-Fi network from your Airport base station and the connection cut out. You have reset the password on the device but the issue persists. I would try the 3 resets outlined in the following article in order to help resolve the issue. If it persists, is the Wi-Fi connection issue happening on more than one device or computer?
    Resetting an AirPort base station FAQ
    http://support.apple.com/kb/ht3728
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • I just bought RAR Extractor, but it doesn't work in my ipad. E-mail attached photographs can not be opened in "open-in"

    I just bought RAR Extractor, but it doesn't work in my ipad. E-mail attached photographs came in .rar format. I checked Apples Store and found RAR Extractor. I bought, installed, erased, reinstalled again but I still can not see the photos. They seem to be existing in "open-in" folder. When I tap, it goes back to "Home" screen.

    Have you contacted the developer? They would be the best people to help with their product.

  • I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work

    Hi,
    I want to use the SQL query IF EXIST to update or insert data in a ms access table, but it doesn´t work
    (fault number -2147217900)
    I want to search for a value in a ms access table , if it exist i want to update it, if not i want to insert a new row.
    Working with LabView 7.1, database con. toolset.
    Who can HELP?
    Thanks a lot
    Marco

    Hello,
    I think that If exist is not a standar SQL command (I know it exists I think in Oracle and SQL server), MS access doesn't support it, so I think the best way to do it is first make a Select and then either an Update or an insert, sorry...
    Paulo

  • I just bought a macbook air, I want to cut en paste, but it doesn't work, how can I fix this?

    I just bought a macbook air, I want to cut and paste but it doesn't work.  How can I fix this?

    that all works, no problem. but if I want to devide my songs per genre, it doesn't work.  in itunes you find cut, but I can't select it.  I just can copy my songs or photos.  So I've got everything twice.  Can you explane me how I can do that? cause it's my first Apple computer

  • Acrobat Pro X 10.1.6 attach to email, Mac Outlook 2011 Doesn't work, but Adobe Reader X 10.1.6 works

    Acrobat Pro X 10.1.6 attach to email, Mac Outlook 2011 Doesn't work, but Adobe Reader X 10.1.6 works.......WHY?!?1?1?!

    Past the contents of the install.log file in the forum.  It's located at:  /var/log/install.log

  • I have bought a new iPad 2 charger and it works absolutely fine but then I wanted to upload some pictures on the computer so I put the wire in the right places but it doesn't work so I tried my iPhone and it worked fine?

    I have bought a new iPad 2 charger and it works absolutely fine but then I wanted to upload some pictures on the computer so I put the wire in the right places but it doesn't work so I tried my iPhone and it worked fine?

    Plz answer as soon as possible

  • When I Backup iphone 5s and i want to restore my photo but It doesn't work.How can I do friends thank for your answer

    when I Backup Iphone 5s and i want to restore my photo but It doesn't work.How can I do friends thank for your answer

    What do you mean it doesn't work?
    Are you getting an error message?
    ~Lyssa

  • When I open Creative Cloud there is only a thinking wheel and nothing else. I have downloaded it again but still doesn't work. I want Lightroom and it keeps saying I need this to download it.

    I have downloaded it again but still doesn't work. I want Lightroom and it keeps saying I need this to download it.

    1.If internet is fine then this might be becase of Creative cloud files, please try the steps metioned in http://helpx.adobe.com/creative-cloud/kb/unknown-server-error-launchin g-cc.html and see if it works.
    2.Please navigate to ~/Library/Application Support/Adobe/OOBE/opm.db and trash it. Try to launch CC desktop and sign in with your Adobe Id (http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-f iles.html) .
    {Note for step 2: The file is in the user Library, not the Applications folder. To see the hidden user Library (not the system Library) in the Finder click on the Gomenu item and then hold down the Alt / Option key. You will see Library appear between Home and Computer. Click onLibrary and then navigate toApplication Support > Adobe > OOBE.
    Alternatively open the Terminal and paste in the following and then press the Enter / Return key:
    rm ~/Library/Application\ Support/Adobe/OOBE/opm.db, This will also delete the file}
    Other related threads:
    http://forums.adobe.com/message/5468864 (spinning blue wheel)
    http://forums.adobe.com/message/5469306
    Hope it works.
    Regards,
    Rajshree

  • I want to import .vro-files from my dvd-camcorder to imovie´11 but it doesn´t work

    hi,
    i´m a mac newbie and i´m tryig to import video-files from my panasonic vdr-m70 dvd-camcorder to imovie but it doesn´t work.
    please excuse my bad english i´m a german guy, 47 years old an not well trained in english.
    thanks for any help....
    max

    Please check if all your plugins are up-to-date. To do this, go to the [http://mozilla.com/plugincheck Mozilla Plugin Check site].
    Once you're there, the site will check if all your plugins have the latest versions.
    If you see plugins in the list that have a yellow ''Update'' button or a red ''Update now'' button, please update these immediately.
    To do so, please click each red or yellow button. Then you should see a site that allows you to download the latest version. Double-click the downloaded file to start the installation and follow the steps mentioned in the installation procedure.

  • I bought a mini DVI to HDMI convertor and  a HDMI to VGA cable to connect my mac book pro to a tv but it doesn't work any one can help.\\\\\

    i bought a mini DVI to HDMI convertor and  a HDMI to VGA cable to connect my mac book pro to a tv but it doesn't work any one can help.

    I would suggest looking into a Thunderbolt to HDMI connector. In this case, you may be able to use the TV as an external monitor. For this option, please confirm through additional research. I have not tested it personally.
    You can also use an Apple TV, which connects with HDMI. In this case, you can use Airplay Mirroring. Not all Macs support Airplay Mirroring, so you need to check first. I have a Mid-2011 27" iMac, and it supports Airplay Mirroring. I don't use it often because my TV is in another room, but I just tried it and it worked. It had to change the screen resolution to work well, so I don't know if I would want to use it as my day to day monitor. http://support.apple.com/kb/ht5404

Maybe you are looking for

  • Qosmio F20: How to use the internal microphone?

    Okay, my second and last question (hopefully). The F20 has a "built in" microphone. How do I use it? Does this mean I won't need an external microphone at any point?

  • Where is show transform controls in pse 13

    Can someone please tell me exactly where I can find the show transform controls in pse 13? 

  • VA01 user exit at line item with partner address

    I need a user exit for VA01 that is at the line item level.  The catch is I also need access to the partner address data.  I have found userexit_pricing_prepare_tkomk (include MV45AFZZ) but that doesn't give you the "instance" address information (th

  • My Macbook Pro freezes

    My 2011 Macbook Pro 13" keeps on freezing for like 10 seconds and it shows the loading circle or some call it the spinning wheel of death. What should i do to prevent my Macbook from messing up completely.

  • Round corners cant select vertices

    Hello, After I've applied a round corners filter, is there a way of then selecting individual vertices? It seems this is no longer possible thanks s