CRM Smartform taking user parms instead of output options

ISA users that are created in the ISA admin do not have an output device specified in their user default (SU01D).  So when an ISA order hits the back end (CRM) it triggers an action, which in turn calls a method and processes smarform.  This smartform gets attached to an email and sent out.  The problem is, that when the user is missing the output device in their user default, to attachmennt comes as a 1 kb PDF that can't be opened. 
I'm trying to pass the parameters to the Smartform FM, but not taking effect..
Am I missing setting something?
  control_parameters-langu = lv_language.
  control_parameters-no_open   = ' '.      "SAP SF: General flag
  control_parameters-no_close  = ' '.      "SAP SF: General flag
  control_parameters-device    = 'LOCL'.      "Output device
  control_parameters-no_dialog = 'X'.      "suppress printer dialog
  control_parameters-preview   = ' '.      "Print preview
  control_parameters-getotf    = 'X'.      "Return OTF tab, no print
  control_parameters-replangu1 = ' '.      "Language key
  control_parameters-replangu2 = ' '.      "Language key
  control_parameters-replangu3 = ' '.      "Language key
  control_parameters-startpage = ' '.      "SAP SF: Object name
  ls_output_options-tddest = 'LOCL'.
  ls_output_options-tdnoprev = 'X'.
call function to process smart form
  CALL FUNCTION function_name
    EXPORTING
      archive_index        = is_archive_index
      archive_index_tab    = ct_archive_index_tab
      archive_parameters   = is_archive_parameters
      control_parameters   = control_parameters
      mail_appl_obj        = is_mail_appl_obj
      mail_recipient       = is_mail_recipient
      mail_sender          = is_mail_sender
      output_options       = ls_output_options
      user_settings        = space
      orderadm_h           = ls_orderadm_h
      activity_h           = ls_activity_h
      lead_h               = ls_lead_h
      opport_h             = ls_opport_h
      orgman_h             = ls_orgman_h
      partner_h            = lt_partner_h
      pricingdata_h        = ls_pricingdata_h
      sales_h              = ls_sales_h
      shipping_h           = ls_shipping_h
      payplan_d_h          = lt_payplan_d_h
      cumulat_h            = ls_cumulat_h
      customer_h           = ls_customer_h
      acs_h                = ls_acs_h
      billing_h            = lt_billing_h
      cancel_h             = lt_cancel_h
      appointment_h        = lt_appointment_h
      billplan_d_h         = lt_billplan_d_h
      billplan_h           = lt_billplan_h
      status_d_h           = lt_status_d_h
      status_h             = lt_status_h
      srv_subject_h        = lt_srv_subject_h
      srv_reason_h         = lt_srv_reason_h
      srv_result_h         = lt_srv_result_h
      orderadm_i           = lt_orderadm_i
      orderadm_i_qt        = lt_orderadm_i_qt
      orderadm_i_in        = lt_orderadm_i_in
      orgman_i             = lt_orgman_i
      pricingdata_i        = lt_pricingdata_i
      pricing_i            = lt_pricing_i
      product_i            = lt_product_i
      sales_i              = lt_sales_i
      schedlin_i           = lt_schedlin_i
      schedlin_i_cf        = lt_schedlin_i_cf
      shipping_i           = lt_shipping_i
      partner_i            = lt_partner_i
      item_cstics_i        = lt_item_cstics_i
      customer_i           = lt_customer_i
      billing_i            = lt_billing_i
      cancel_i             = lt_cancel_i
      finprod_i            = lt_finprod_i
      ordprp_i             = lt_ordprp_i
      appointment_i        = lt_appointment_i
      billplan_d_i         = lt_billplan_d_i
      billplan_i           = lt_billplan_i
      status_i             = lt_status_i
      working_set_e_s_bbp  = lt_working_set_e_s_bbp
      language             = lv_language
    IMPORTING
      document_output_info = es_document_output_info
      job_output_info      = es_job_output_info
      job_output_options   = es_job_output_options
    EXCEPTIONS
      output_canceled      = 1
      parameter_error      = 2
      OTHERS               = 3.

Hi Cathy,
DATA:
i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE  TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1  OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1  OCCURS 0 WITH HEADER LINE.
DATA:
  w_objhead TYPE soli_tab,
  w_ctrlop TYPE ssfctrlop,
  w_compop TYPE ssfcompop,
  w_return TYPE ssfcrescl,
  w_doc_chng TYPE sodocchgi1,
  w_data TYPE sodocchgi1,
  w_buffer TYPE string.
DATA:
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
  EXPORTING
    formname           = 'Z_SMARTFORM'
  IMPORTING
    fm_name            = v_form_name
  EXCEPTIONS
    no_form            = 1
    no_function_module = 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.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION '/1BCDWB/SF00000200'
  EXPORTING
    control_parameters = w_ctrlop
    output_options     = w_compop
    user_settings      = 'X'
  IMPORTING
    job_output_info    = w_return
  EXCEPTIONS
    formatting_error   = 1
    internal_error     = 2
    send_error         = 3
    user_canceled      = 4
    OTHERS             = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
  EXPORTING
    format                = 'PDF'
    max_linewidth         = 132
  IMPORTING
    bin_filesize          = v_len_in
  TABLES
    otf                   = i_otf
    lines                 = i_tline
  EXCEPTIONS
    err_max_linewidth     = 1
    err_format            = 2
    err_conv_not_possible = 3
    err_bad_otf           = 4.
IF sy-subrc <> 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT i_tline.
  TRANSLATE i_tline USING '~'.
  CONCATENATE w_buffer i_tline INTO w_buffer.
ENDLOOP.
TRANSLATE w_buffer USING '~'.
DO.
  i_record = w_buffer.
  APPEND i_record.
  SHIFT w_buffer LEFT BY 255 PLACES.
  IF w_buffer IS INITIAL.
    EXIT.
  ENDIF.
ENDDO.
REFRESH :
  i_reclist,
  i_objtxt,
  i_objbin,
  i_objpack.
CLEAR w_objhead.
i_objbin[] = i_record[].
DESCRIBE TABLE i_objbin LINES v_lines_bin.
i_objtxt = 'Find attached the output of the smartform.'.
APPEND i_objtxt.
i_objtxt = 'Regards,'.
APPEND i_objtxt.
i_objtxt = 'Sravanthi'.
APPEND i_objtxt.
DESCRIBE TABLE i_objtxt LINES v_lines_txt.
w_doc_chng-obj_name = 'Smartform'.
w_doc_chng-expiry_dat = sy-datum + 10 .
w_doc_chng-obj_descr  = 'Smart form output'.
w_doc_chng-sensitivty = 'F'.
w_doc_chng-doc_size = v_lines_txt * 255.
CLEAR i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type  = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'smartform output' 'pdf'
INTO i_objpack-obj_descr.
i_objpack-doc_size = v_lines_bin * 255.
APPEND i_objpack.
CLEAR i_reclist.
i_reclist-receiver = ''." ---------------> email id
i_reclist-express  = 'X'.
i_reclist-rec_type  = 'U'.
APPEND i_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
  EXPORTING
    document_data              = w_doc_chng
    put_in_outbox              = 'X'
    commit_work                = 'X'
  TABLES
    packing_list               = i_objpack
    contents_bin               = i_objbin
    object_header              = w_objhead
    contents_txt               = i_objtxt
    receivers                  = i_reclist
  EXCEPTIONS
    too_many_receivers         = 1
    document_not_sent          = 2
    document_type_not_exist    = 3
    operation_no_authorization = 4
    parameter_error            = 5
    x_error                    = 6
    enqueue_error              = 7
    OTHERS                     = 8.
IF sy-subrc NE 0.
  WRITE:/ 'Error When Sending the File', sy-subrc.
ELSE.
  WRITE:/ 'Mail sent'.
ENDIF.
Regards,
Sravanthi

Similar Messages

  • Restrict user could not get output of conc request more than one

    Hi all,
    I actually have one scenario that I want to delete or purge concurrent requests after getting view output. Please tell me how it is possible to purge request , Its simple means to prohibit the user to
    see out 2nd time.
    "I have one option that May be I use personalization , when user click on view output button , after populating file
    code delete request from concurrent request table."
    Thanks

    user9275313 wrote:
    Hi Sirini,
    We have its solution already, when user click on view output then this directly go to printer, user can not view output, But I prevent here user he can click only one time against one request, the second time when he click of that button either it goes disable or that request purg in first click from the table.
    ThanksThere are several obvious issues that come to mind -
    1. If the user cannot view the output but can only print it, then the only way he/she can verify that it is the correct output is after printing it - seems to be a possible waste of paper.
    2. What if the printer jams (or runs out of ink etc etc) when printing the output ? What is the option to print a second time ?
    HTH
    Srini

  • Populating the user group instead of the group ID in MFA

    Hello all,
    I am trying to Populate the user group instead of the group ID in MFA. I want to use this to create authorization permissions, after authentication. I am running into the problem of not getting any info after authentication in the attribute dump.  Are
    there settings that I can change in order to Populate the attribute dump? are there settings that I can change to get all of the groups that each user is in?
    Thanks,
    Levi Williams
    IT professonial
    Intern

    Hi Levi Williams,
    Thanks for posting here!
    Refer to the solution in this  thread link:
    https://social.msdn.microsoft.com/Forums/en-US/df060757-8190-4083-a162-0876cd4b8d15/group-based-radius-return-attributes?forum=windowsazureactiveauthentication
    Additional reference:
    http://www.rdsgurus.com/uncategorized/step-by-step-using-windows-server-2012-r2-rd-gateway-with-azure-multifactor-authentication/
    Hope this helps!
    Regards,
    Sadiqh

  • Displaying the current users information instead of the value of the person who completed the form in the first place.

    I found this fantatic post regarding querying the user profile service 
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx?pi47623=2#comments 
    However i have an issue whenever the form is opened again either to view or edit, it displays the current users information
    instead of the value of the person who completed the form in the first place.
    Please help me, I'm turning more grey each minute

    I think it is how the current user information is stored based on your logic.
    You might be quering current value again when loading the form (Form load Rule).
    you have to tweak your logic, after the user submits the form you can set the username to the one who saved it.
    or in form load, write a logic to see if the form was not saved before and then query the username( by using internal field like "formstatue")
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if the reply helps you

  • Smartforms - how to use page URL like output option ?

    Hello,
    in the smartofms output options, there's the possibility to set
    BSP Page/URL: ......
    and Output format:  XSF output + HTML.
    My requisite is to send a form in XML via web service, can I use it ? How is run ?
    tks.

    Hello
    Use the function module "FB_CONVERT_FORM_TO_XML" to convert the smartform to XML format table.
    The function module has been used in the method "GET_SMART_FORM_AS_XML" of the class .
    THanks ,
    M.Naveen Kumar

  • Capture, the AED is taking 100% value instead of 50% Import capital purchas

    Hi,
    Im doing Import po process for capital purchase, when I'm doing migo with excise invoice capture, the AED is taking 100% value instead of 50% , for the remaing its taking 50% only i.e BED, Ecess, Se cess.
    So, can anyone tell me, how to rectify the issue???
    Please guide me any config.
    Thanks
    Shital

    manufacturer is entitled for 100 % AED set off in the same year for capital goods

  • HT2470 Why won't Itunes store my music library in my User/Music Folder, if I select my user name as a storage location in Itunes, Itunes creates folders for artist name right in my user folder, instead of in my user/music folder

    Why won't Itunes store my music library in my User/Music Folder? 
    If I select my user name as a storage location in Itunes, Itunes creates folders for artist name right in my user folder, instead of in my user/music folder.  This gets especially annoying because if I tell Itunes to store my "media" in my user/music folder, Itunes will then create a folder named "music" in my "music" folder and will also create additional folders in my user/music folder location to store other non-music media in as well. It is very annoying to see this lack of affinity for folders between two Apple created programs.

    Help iTunes locate your media folder:
    No content shows up in iTunes after updating
    http://support.apple.com/kb/TS1967

  • Standard smartform for application V5-Groups. and Output type LL00.

    Hi,
    I want the name of standard smartform for application V5-Groups. and Output type LL00.
    I need to print Ship to party address of Multiple Deliveries.
    Can anyone tell me the standard form name and Print program name.
    Regards,
    Rajender

    Hi Lavanya,
    SD_LOADING_LIST is a script.
    Can you please provide me with a standard smartform as we need to develop this in smartform only.
    Thanks,
    Rajender.

  • Siebel CRM On Demand User Group

    Not sure if this specifically fits under this particular forum but...
    Does anyone know if there is a specific Siebel CRM On Demand Users Group? I am aware of the Oracle Application Users Group etc, but I'm not sure if it caters for the On Demand model of Siebel, or just the Enterprise model.
    If anyone knows which group(s) serve Siebel CRM On Demand users either globally, regionally or locally (especially in Australia), please post the details.
    Regards,
    Cameron

    Hi Kathy,
    I believe a users group would be beneficial in APAC (particularly in regional locations e.g. Australia, New Zealand etc).
    I would see it serving multiple roles -:
    1. To act as a forum for Siebel CRM On Demand users to share their collective knowledge and experience with the product.
    2. To act as a collective voice for Siebel CRM On Demand users.
    3. To act as a conduit for communication from Oracle to their customers, and in turn from the customer to Oracle.
    4. To promote and facilitate educational offerings and training opportunities.
    5. To promote and facilitate networking opportunities.
    In a nut shell, it should serve to promote Knowledge, Advocacy, Communication, Education and Networking.
    If I'm not mistaken, such groups exist and represent the user base of just about every product that Oracle sells except for Siebel CRM On Demand. I feel that it is important for the Siebel CRM On Demand user base to be able to benefit from a users group similarly representing them.
    That being said, I can understand why you would have conflicting opinions on the usefulness of such a tool in APAC. As a region, Asia Pacific is particularly diverse and as such, a users group would have to be capable of representing the interests and needs of each unique demographic.
    Regards,
    Cameron.

  • Directly taking user to SAP inbox rather from a z-prog

    Hi All,
    I am working on release 4.7 Wanted to know if there is a way of taking user directly to his inbox from a z-prog.
    To clarify more :
    I am calling transaction 'SBWP' but that takes to the root level (status - USRROOT) whereas i am required to take it to the inbox (status - IWP).
    Thanks,
    Ameekar

    Thanks Mikkel, that solved my problem.
    Aman, your solution would not work out in my case because user get their initial mail in Outlook and not in SAP so they are not automatically directed to inbox.
    Thanks guyz.

  • COPA Assessment Cycle-USer Setting instead of Config

    Is it possible to make creation of assessment cycle as a user setting instead of configuration so that it does not create transport request and need not to be configured everytime.
    Thanks

    Hi Deepshika,
    Normally creation of cycles is a configuration and we will not be able to create cycles in testing and production clients (which are in non-modifiable status).
    But pls refer to SAP Note 326080 released on 20.02.2009 which will enable us to create cycles in testing clients also...
    Hope it will help you...
    Srikanth Munnaluri

  • Smartforms: Output Options for Field Contents not working within table

    Hello,
    to display an amount and its unit I am using &GS_MM_IT_GEN-MENGE(R)& &GS_MM_IT_GEN-MEINS& with a line of a table. Unfortunatly it seams that the output option "R" (right-justified) is not working with the table context. Has anyone an idea, what to do?
    Thanx,
    Peter

    Dear all,
    thank you for your suggestions. I have found out, that the output option work pretty well as described in the documentation. The are output options of a field and not of a column! To get a right justified column, I had to change the attribute of the parapraph assigned to the column.
    Regards
    Peter

  • Report select options similar to Query output options : Urgent !!!!!

    Hi All,
    I have developed a custom report . The output options of this report needs to be included in Selection screen like in SQ01 queries, there should be option to output the report results in different formats like List Viewer, ABAP List, Spread Sheet etc.,. 
    If some variant is selected then user will select whatever the format he want .
    the output should display in that format .
    How I can acomodate all these options to output a report .
    How can I do this ..Pls help me its Urgent !!!!
    Points for Sure !!!
    Regards,
    Varma

    Hi,
       Try this code,
       at user-command.
       case sy-ucomm.
       when 'disp'.
       write:.......   "abap list
       when 'buton1'
        call function 'reuse_alv_list_display'.
         endcase.
    i hope it gives ur answer
    Reward if it helps.

  • Cannot see Airport Express as an Audio Output option!

    Hello All,
    Very frustruating.
    I bought an AirPort Express hoping to use it as a Audio output device for movies/spotify etc.
    Plugged it all in to my reciever (using optical cable) configured it to my TC network.
    Opened itunes and the Airplay function is working perfectly. Music is streaming as expected.
    However i cannot see the AE in the audio output options (when i "option+click" the speaker icon).
    Tearing my hair out as this was the primary reason for purchasing the AE!
    any help would be greatly apprecaited.
    Tim

    Trying to play movies through VLC and stream the Audio component to my AirPort express. Similary use Spotify on my computer and stream the audio component.
    I thought i would be able to enable my laptop (Macbook Air) to use the Airport Express as its 'speakers' through selecting it as the output source in System preferences.
    However it does not show up in the system preferences at all, what has me stumped is the Airport Express is 100% functional through itunes as well as some third party applications (Airfoil).
    Im very confused as other users (from extensive google searching) appear to be able to atleast see the AirPort Express as an output device.
    Any help greatly appreciated.

  • Control parameters and Output options

    Hi Friends,
    How to get control parameters & output options which were to be exported to samrtform function module.
    what is purpose of job_output_info and how that is to be used after calling the smartform.
    Please help me.
    Thanks,
    Sathish kumar Swamy.

    Hi satish,
    Data:
      w_control TYPE ssfctrlop.
    CALL FUNCTION '    '------> smartform function module
              EXPORTING
               control_parameters          = w_control
                fs_spfli                   = fs_spfli
             EXCEPTIONS
               formatting_error           = 1
               internal_error             = 2
               send_error                 = 3
               user_canceled              = 4.
    Regards,
    Sravanthi

Maybe you are looking for