SSF function module to disable pop window but OTF data is not coming.

Hi Experts,
My requirement is to get the PDF from the SSF function module and email it and i don want to display the pop option
I passed these parameters
1.no_dialog = c_x.
2.-preview = c_x.
3.-no_open   = c_x.--|
4.no_close  = c_x.---| if i add these two conditions i don get printer pop up but i don get the data for " job_output_info  " also.
to this function module ,
Please tell me how to get data into " job_output_info "  import parameter by not displaying the pop up for printer.
Thanks and Regards in advance.

Hello,
we did it using the following code.
DATA: w_ctrlop TYPE  SSFCTRLOP,
        w_return TYPE  SSFCRESCL.
  DATA ls_job_output_info TYPE ssfcrescl.
  DATA p_pdf_len          TYPE i.
  DATA pt_tlines          TYPE TABLE OF tline.
(function_name is the name of the smartform)
W_CTRLOP-GETOTF = 'X'.
W_CTRLOP-NO_DIALOG = 'X'.
    CALL FUNCTION function_name
      EXPORTING
        CONTROL_PARAMETERS         = W_CTRLOP
        USER_SETTINGS              = 'X'
     IMPORTING
        JOB_OUTPUT_INFO            = ls_job_output_info
      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.
    REFRESH pt_tlines.
    CLEAR:  p_pdf_len.
    CALL FUNCTION 'CONVERT_OTF'
     EXPORTING
        FORMAT                      = 'PDF'
     IMPORTING
        BIN_FILESIZE                = p_pdf_len
      TABLES
        OTF                         = ls_job_output_info-otfdata
        LINES                       = pt_tlines
     EXCEPTIONS
       err_max_linewidth           = 1
       err_format                  = 2
       err_conv_not_possible       = 3
       err_bad_otf                 = 4
       OTHERS                      = 5.
    IF sy-subrc <> 0.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       bin_filesize                    = p_pdf_len
       filename                        = p_filename
       filetype                        = 'BIN'
      TABLES
        data_tab                        = pt_tlines
     EXCEPTIONS
       file_write_error                = 1
       no_batch                        = 2
       gui_refuse_filetransfer         = 3
       invalid_type                    = 4
       no_authority                    = 5
       unknown_error                   = 6
       header_not_allowed              = 7
       separator_not_allowed           = 8
       filesize_not_allowed            = 9
       header_too_long                 = 10
       dp_error_create                 = 11
       dp_error_send                   = 12
       dp_error_write                  = 13
       unknown_dp_error                = 14
       access_denied                   = 15
       dp_out_of_memory                = 16
       disk_full                       = 17
       dp_timeout                      = 18
       file_not_found                  = 19
       dataprovider_exception          = 20
       control_flush_error             = 21
       OTHERS                          = 22.
    IF sy-subrc <> 0.
      MESSAGE s614(zef) DISPLAY LIKE 'E'.
  ENDIF.

Similar Messages

  • Function module table returning empty rows but export data is getting

    Hi,
    I am executing function module through JCO after setting importing parameter and when i retrieve the table i get table with empty data 0 rows but i am able get export parameter data . when execute the same function module in abap through sap gui i get table containing 5 rows. what may be the problem. please find below code 
          function = getDefaultJCoConnection().getJCoFunction("ZCRM_ICSS_PROJ_CUST_USR");
                function.getImportParameterList().getField("USER_ID").setValue("MLDL010");
                getDefaultJCoConnection().execute(function);
                exportTable = function.getTableParameterList().getTable("PROJCUSTLIST");
                int rowsNumber = exportTable.getNumRows(); // companies table number of rows
                log.error("rowsNumber----"+String.valueOf(rowsNumber));
      try
         if (rowsNumber > 0)
         int i = 0;
         do
         tempString="table valuesZCOMP_ID"(String)exportTable.getValue("ZCOMP_ID")"ZCOMP_SPC-"+(String)exportTable.getValue("ZCOMP_SPC")
                     + "table valuesZCOMP_DESC"(String)exportTable.getValue("ZCOMP_DESC")"ZPRICE-"(String)exportTable.getValue("ZPRICE")"---" ;
         log.error(tempString);
         while (exportTable.nextRow());
         catch (Exception th)
         log.error("The following error occured: while retrieving table values ", th);
    Do you have any idea where may be the problem
    Regards,
    Pavan
    Edited by: Pavan Reddy on Apr 10, 2010 4:46 PM

    Hi Pavan,
    This could be the case. The function module might be expecting a value converted into its format.
    By this, I mean that the function module might be expecting 0012345678 for 12345678 (Where data element of the ID is of type CHAR 10 ).
    Please check if it is so.
    Best Regards,
    Kris.

  • Function Module for getting public holidays between two dates

    Dear Freinds,
                     I want  a function module which checks a day is public holiday or not based on the "HOLIDAY CALENDAR ID", i have
    found a function moudule('DATE_CHECK_WORKINGDAY') which checks a  holiday or not  but based on Factory Calender id,
    so could any one please let me know how can i get a day is a public holiday or not based on "HOLIDAY CALENDAR ID".
    regards
    divya.

    Hi,
    Use  HR_FORMS_READ_HOLIDAYS.
    pass calendar id, begin date, end date, holiday date.
    it will fetch the text of holiday... u can put a check that if the text fetched in initial then the holiday date u have passed is not a holiday..
    hope it helps

  • For a function module how can I find its assigned data source name?

    Hi BW Gurus,
    If i know the data source name then the  assigned fn. module/Table/Infoset I could find from RSO2. But for function module How do I know its assigned data source name?
    Thanks a lot for the response.
    Regards
    Ven

    Hi Ram,
    In SE16, enter the table name as ROOSOURCE and in contents choose field EXTRACTOR for selection and enter the name of the function module.
    It will return the list of datasources where the function module has been used.
    Best Regards,
    Ankit Agrawal

  • Function module reqd for fiscal period using current date

    Hi,
    Is there any function module which gives fiscal period using current date.
    Thnaks,
    Maheedhar

    Hi Maheedhar,
    Try the code below.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = '1000'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm    " Current Fiscal Month
        CURRY         = w_curry    " Current Fiscal Year
        PREVM         = w_prevm    " Previous Fiscal Month
        PREVY         = w_prevy.   " Previous Fiscal Year
    Regards,
    Amit.

  • Sharepoint list dataheet view error "Cannot connect to the server at this time. You can continue working with this list, but some data may not be available"

    I have a List which is having around 14000 items in it.while opening that list in datasheet view it is giving error .
    Below is a summary of the issue:
    After selecting datasheet view beow error occurs:
        "Cannot connect to the server at this time.  You can continue working with this list, but some data may not be available."
        "Unable to retrieve all data."
        The item counts displays say 100 out of 14000 items.
    Exporting List to excel is giving only 2000 records out of 14000 records.
    Other Observations   -  
    This is happening to only one list on the site .There are other lists in the site whose no. of records is equal to 8000 to 9000.They are working absolutely fine without any error.
    Also, If I am saving this list as a template and creating another list with it ,then it is working absolutely fine with 14000 records,so the issue does not seem to be related with no. of records as the template list is working fine.
    I have checked the Alternate access mapping setting ,its fine.
    It should not be related to lookup,datefield or any other column as the list created from it template is working fine with all these columns.
    I checked below links also ,but doesn't seem to work in my case.
    http://social.technet.microsoft.com/forums/en-US/sharepointadminprevious/thread/974b9168-f548-409b-a7f9-a79b9fdd4c50/
    http://social.technet.microsoft.com/Forums/en-US/smallbusinessserver/thread/87077dd8-a329-48e8-b42d-d0a8bf87b082
    http://social.msdn.microsoft.com/Forums/en-US/sharepointgeneral/thread/dc757598-f670-4229-9f8a-07656346b9b0

    I have spent two days to resolve this issue. Microsoft has released two KBs with reference to this issue...but are not appearing in search results at the top.
    I am sharing my finding.
    1. First install the
    KB2552989 (Hopefully you might have already installed it. The KB detetcts it and informs the user.)
    2. Then update registry by adding new key for data fetch timeout as mentioned inKB2553007
    These two steps resolved the issue in our environment. Hope it might help others as well.
    Pradip T. ------------- MCTS(SharePoint 2010/Web)|MCPD(Web Development) https://www.mcpvirtualbusinesscard.com/VBCServer/paddytakate/profile

  • I have Adobe Photoshop Elements 10 and I wish to upgrade with Adobe Creative Suite 3 but the option is not coming up on the drop down menu

    I have Adobe Photoshop Elements 10 and I wish to upgrade with Adobe Creative Suite 3 but the option is not coming up on the drop down menu

    The first two issues sound like a video driver problem.
    What is the make/model of your video card/chip?
    What is the installed video driver number and date?
    For the last issue, it could be many things, including the video driver. I'd look over this ARTICLE, and if there is nothing in the first part, then move on to tuning up the OS an computer in the second part. That would probably be a good time to post the full specs. of your computer, and also both your Project and Source footage. Finally, part three covers many troubleshooting tips, and furnishes many links.
    Good luck,
    Hunt

  • Restore from time machine does not list all my backups.  I know they exist but there dates are not present on the restore list.  Any help appreciated.

    Restore from time machine does not list all my backups.  I know they exist but their dates are not present on the restore list.  Any help appreciated.  If I must use one of these older dates to restore, how do I then get the more current data off time machine?

    Ok, so am i correct in saying that the steps to fix are as follows.
    That's one option, but not what I meant by restoring in the time-travel view. The latter is what you get when you enter Time Machine.
    is the fresh install not going to be able to "see" the time machine backups that I have at the moment.
    It should, but sometimes people report that it fails. I'm not sure why that happens.

  • Ive forgotten my security questions for my apple id, it keeps saying that it has sent an email to me with the information but the email is not coming through ????

    ive forgotten my security questions for my apple id, it keeps saying that it has sent an email to me with the information but the email is not coming through ????

    Check the AppleCare number for your country here:
    http://support.apple.com/kb/HE57
    Call them up, and let them know you would like to be transferred to the Account Security Team.

  • RFC - Calling Function Module in a local Windows Program (.exe) on user PC

    Hi Gurus !
    Has anyone ever tried to call a local program on the user side through RFC ? Actually, this programme should allow the use of function module from ABAP programs.
    Indeed we want to use some device locally installed, here a device to pay using Credit Cards.
    However, we've almost successfully filled our requirements if the destination RFC is activated as a Registered Program. But a user B tries to access device of a user A if the code and destination are the same. So we need to create as many RFC destination as users.
    So, we'd like the frontGUI to call the local EXE. This EXE would be coded in VB btw. But we can't figure out how to set the program to register on SM59, using "Start on Front-End Station" option.
    Has anyone any clue on how the program should look like ?
    Thx in advance,
    N H

    Hi MxG,
    I guess we're close to the solution.
    So, using the .Net Connector, and declaring inside our program the Host and Server Class, we've managed to use it, as a registered Server Program. Actually our Registered Program is a Windows Service running on the local computer that the RFC Function Module refers to.
    While testing this it's appeared that user B was trying to use device on User A, event thought devices and services were installed on both computers.
    I guess there's something we're misunderstanding or missing when we try to convert our solution to a Front-End solution. The program is obviously incomplete, something is missing. But I can't find any example or start-up for that program. Even in SAPHelp, there's only something saying that "you can do your own program for front-end and RFC"...   :/
    Well, I've just realized I've reformulated my issue, but since it's confusing for me, it's actually not easy to describe and make sure it's understandable !
    Regards,
    N H

  • Function module works correctly in debugger, but hangs otherwise.

    I am having an issue with a standard function module that 'hangs' when ran.  If i look in sm37, the calling job will just continuously run.  If i look in SM50, there aren't any sql statements which are bringing back large results, it seems to be running a large number of sequential reads against a certain table.  The odd thing is, if i break in this function module, then press F8 to continue, the function module successfully executes and the job finishes. 
    The function module in question is ISU_DUNNING_DEACT_INSTPL_0350, which i have attached to a dunning activity.  This function module SHOULD deactivate any active installment plans for the dunned account.  The FM is odd, as it calls another FM and does a hard EXIT, even though there is code below this line that it can never access. 
    If I set a breakpoint in the function module, and run FPVB (dunning transaction), it will break into the function module.  I can then press F8, the FM completes successfully, then the job completes.  If i do NOT break it (just run in background as normal), the job just continuously runs.  SM50 reveals reads to the BUT000 table (even though i cannot find any calls to this table in the fm).
    Any ideas?

    Nishikant,
    Thanks very much for the help. 
    I did this, and I can see where its getting stuck.  The following entries are repeated indefinitely (until i stop it )
          374 BUT000     FETCH       1      0
            3 BUT000     REOPEN             0 SELECT WHERE "CLIENT" = '120' AND "PARTNER" = '0007024125'
          420 BUT000     FETCH       1      0
            3 BUT000     REOPEN             0 SELECT WHERE "CLIENT" = '120' AND "PARTNER" = '0007024125'
          365 BUT000     FETCH       1      0
            3 BUT000     REOPEN             0 SELECT WHERE "CLIENT" = '120' AND "PARTNER" = '0007024125'
    If i double click the SQL statement, i see these details
    SQL Statement
      SELECT
        "CLIENT"
      FROM
        "BUT000"
      WHERE
    "CLIENT" = :A0 AND "PARTNER" = :A1
    Variable
    A0(CH,3)  = 120
    A1(CH,10) = 0007024125
    I caught it in SM50 where the read was, and it says the select exists in Function Pool SAPLBPT1.  I have done a search in this for anything containing BUT000, but have found nothing.  Any suggestions on how to find where this is occurring, or what might be going on?

  • Same Function module accessible in 4.6c but not in ecc6

    Hi,
    When I am calling the fm in a program with  parameter which is not defined in FM in SAP ver 4.6 C its not giving any dump, but the same thing when I call in ECC 6 its giving error message that field is not defined.
    could any one tell me the reason behind the above senario.
    thanks
    bobby

    Hi Aravinda,
    The function module is the custom FM . While calling THIS fm we are passing the import parameter which is not defined in FM .  the problem is that the Program calling the FM is running in 4.6c but in ECC6 its giving dump i.e parameter not defined. Therefore my question is why its giving dump in ECC6 and not in 4.6c
    thanks
    bobby

  • Why we use ssf function module in mart forms

    urgent

    Hi,
    A function module is generated whenever a Smart Form is activated.
    This Smart Form could be called from the driver program by calling this function module .
    By using "SSF_FUNCTION_MODULE_NAME" the user can obtain
    the function mudule generated by the Smartform. The input
    parameter is the SMARTFORM name the output parameter is the
    function module generated .It has to be type RS38L_FNAM.
    After getting the output parameter . CALL FUNCTION(output
    parameter name).
    Reward if useful.
    Regards,
    Swetha.

  • Function Module Call Via CMOD Logic for Master Data Enhancement

    Hi Friends Please help me to resolve this, would really be very kind of all of you.
    Requirement. I want to Enhance the field ZFACTREG from VIBDBE table in my datasource 0busentity_attr extract structure l_s_REIS_BUSENTITY_ATTR, I want to create the logic in CMOD exit_saplrsap_002 to call my function module for enhancement of master data. Please help me Step by Step
    Thanks
    Poonam Roy
    <b>Step #1</b>
    I put this code which gives me error in CMOD like this
    ERROR : Das formale Argument 'OTHERS' muss am Schluss der Ausnahmeliste stehen.
    ABAP Code#1 IN exit_saplrsap_002     
    DATA: l_d_fmname(30) TYPE c.
    CONCATENATE 'Z_DS_' i_datasource(25) INTO l_d_fmname.
    TRY.
    CALL FUNCTION l_d_fmname
    EXPORTING
    I_DATASOURCE = I_DATASOURCE
    I_UPDMODE = I_UPDMODE
    TABLES
    I_T_SELECT = I_T_SELECT
    I_T_FIELDS = I_T_FIELDS
    I_T_DATA = I_T_DATA
    C_T_MESSAGES = C_T_MESSAGES
    EXCEPTIONS
    RSAP_CUSTOMER_EXIT_ERROR = 1
    OTHERS = 2
    IF FOUND.
    IF SY-SUBRC <> 0.
    RASIE RSAP_CUSTOMER_EXIT_ERROR.
    END IF
    CATCH CX_SY_DYN_CALL_ILLEGAL_FUNC.
    ENDTRY.
    <b>Step#2</b>
    I simple created the Function module Z_DS_BUSINESS
    and put the code in source code  which gives me error . what should i put in other tabs like"Import", Export", Tables" i kept blank
    ABAP CODE give me error : The Dictionary structure or table "FIELD-SYMBOLS" is either not active. i have to remove include in the FM. WHY SO??
    FUNCTION Z_DS_BUSINENSS
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_DATASOURCE) TYPE  RSAOT_OLTPSOURCE
    *"             VALUE(I_CHABASNM) TYPE  SBIWA_S_INTERFACE-CHABASNM
    *"             VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE
    *"       TABLES
    *"              I_T_SELECT TYPE  SBIWA_T_SELECT
    *"              I_T_FIELDS TYPE  SBIWA_T_FIELDS
    *"              I_T_DATA
    *"              C_T_MESSAGES STRUCTURE  BALMI OPTIONAL
    *"       EXCEPTIONS
    *"              RSAP_CUSTOMER_EXIT_ERROR
    INCLUDE ZXRSAU02.
      WRITE: / 'INSIDE THE Z_DS_MEASUREMENTS PROGRAM'.
    TABLES: REIS_BUSENTITY_ATTR,
            VIBDBE,
    field-symbols:.<fs_REIS_BUSENTITY_ATTR> like REIS_BUSENTITY_ATTR.
    DATA: BEGIN OF i_c_t_data OCCURS 0.
              include structure REIS_BUSENTITY_ATTR.
    DATA END OF i_c_t_data.
    DATA: i_c_t_data_copy like i_c_t_data OCCURS 0 WITH HEADER LINE,
          begin of i_vibdbe occurs 0,
          INTRENO like vibdbe-INTRENO,
          ZFACTREG like vibdbe-ZFACTREG,
                  end of i_vibdbe.
    i_c_t_data_copy[] = i_c_t_data[] = c_t_data[].
    sort i_c_t_data_copy by vibdbe.
    Select  INTRENO
            into table i_VIBDBE from VIBDBE
            for all entries in i_c_t_data_copy
            where  INTRENO = i_c_t_data_copy- INTRENO.
    if sy-subrc = 0.
      sort i_VIBDBE by INTRENO.
      loop at i_c_t_data assigning <fs_REIS_BUSENTITY_ATTR>.
        clear: i_VIBDBE.
        read table i_VIBDBE with key INTRENO = <fs_REIS_BUSENTITY_ATTR>-INTRENO
        BINARY SEARCH
        transporting ZFACTREG .
        if sy-subrc = 0.
          <fs_REIS_BUSENTITY_ATTR>-ZZFACTORY = i_vibebe-ZFACTREG
        endif.
    null

    (I leave office until Monday morning, Europe time)
    in include from customer-exit ZXRSAU01, etc.
    CASE I_DATASOURCE.
    WHEN '0CUSTOMER_ATTR'.
       PERFORM 0customer_attr changing i_t_data...
    ENDCASE.
    In each perform, doing what you wrote ; select (needed fields) from complementary-database-table into an internal table with a for all entries. sort the table. LOOP and MODIFY on i_t_data.
    In some case i had to insert lines of i_t_data to an internal table of DS_structure when entering subroutine and back at exit. (on 4.6C PI 2003 if i remember)
    Some optimization done when reading small tables (T001 society and the same, these are filled once and not for each packet of data.
    Your idea of creating different FM is of interest, but the cost of passing i_t_data between two programs (two function groups) may overcome the gain of performance. In a job only one DataSource is processed so only one routine is actually called.
    Regards.

  • Function Module to Update Shipment Document with FURTHER DATES

    Hi All,
    i need to update (create an event entry) with the 'Begin Plan Date' and 'End Plan Date' of one Event in the 'FURTHER DATES' TAB
    (2nd Tab) of the Shipment Document. I got to do this using the separate program after the shipment gets created from external system in ECC.
    Any ideas on how to do it? the function modules belong to the function group
    TSEG.. but am not sure which function module can cater my requirement..  or can we do it with a BDC call.
    Appreciate ur early reply...
    Regards,
    Leona

    hi,
    YOu can use fm 'HR_99S_date_plus_time_unit'.
    hope it helps
    regards,
    pawan

Maybe you are looking for