Error 101 using fp_job_open, fp_job_close in a function module

I have earlier made a program generating a pdf used for printing. Used fp_job_open -> Call function xxx -> fp_job_close. This program works fine.
Now I want to make a function module to generate this pdf for higher reusability, but when I call my generated FM its return sy-subrc = 1 and sy-msgno = 101. As far as I have investigate this error means "Job already open".
I tried to comment out the call to the fp_job_open and fp_job_close, but then I have no possibility to mark the ls_outputparams-getpdf = 'X' and ls_outputparams-nodialog = 'X'.
Any ideas anyone?

I am not sure if this is the right forum for this question. Maybe: ABAP Developmnet -> Form printing [Output Management; is more proper?

Similar Messages

  • Can i  use Two DSO 's in Function module

    hi experts,
    Can i  use Two DSO 's in Function module  .That FM is used for Layout
    I actually  want to  fill one DSO Refering the Data in Another DSO.
    Regard
    Naresh.

    In the first way the DSO's are usually called shared libraries or DSO libraries and named libfoo.so or libfoo.so.1.2. They reside in a system directory (usually /usr/lib) and the link to the executable program is established at build-time by specifying -lfoo to the linker command. In the second way the DSO's are usually called shared objects or DSO files and can be named with an arbitrary extension

  • Why we should use Macros if we have function Module

    Why we should use Macros if we have function Module and what is the Advantage of Macros than function Module
    Moderator Message: Interview-type questions are not allowed.
    Edited by: kishan P on Oct 7, 2010 2:22 PM

    Put it this way... if you have blueprints for a car you wouldn't want to produce only one car, would you? You would want to produce as many as needed. In another example, you don't want to be able to use only 1 window in Windows. Each window has common features but have different values. That's the purpose of non-static entities
    However, there are instances that you want to have only one value for something. That's when you use static entities.
    Get it? =)

  • ME52n - Error Message - Company was not supplied in function module.

    Hello,
    It is giving error Message - "Company was not supplied in function module" in the initial screen of ME52n and ME53n.
    Please help.
    Thanks,
    Piyush

    Hi Vadi,
    when ever you open me52n or me53n ..system by default opnes/shows your last created/ opned PR.
    so if that last created / changed PR is having wrong/faulty data (missing assignment/ plat stolocation deleted etc) ..system will not be able to fetch respective data....thats why you will get above eror message...
    Solution : Create any smaple PR in ME51n/ or  try to chnage  any existing PR.. and then save it.
    try this 1 or 2 times.
    Hope so this will help.
    Regards,
    Nilesh

  • Pls explain me the use and purpose of following Function modules

    pls explain me the use and purpose of following Function modules
    1. G_MAX_PERIOD_AND_OFFSET_GET
    2.  DEQUEUE_E_TABLE
    3. FI_COMPANY_CODE_CHECK
    4. G_PERIOD_GET
    5. alv_display_function
    6. G_SET_GET_ID_FROM_NAME
    thanks ,
    phyrose

    1. <b>G_MAX_PERIOD_AND_OFFSET_GET</b>
    For given No. of period & periods it gives the offset
    <b>2. DEQUEUE_E_TABLE</b>
    To Unlock the table records
    <b>3. FI_COMPANY_CODE_CHECK</b>
    To validate Company Code
    <b>
    4. G_PERIOD_GET</b>
    Returns no. of Posting period & Special period for give company code, posting date & ledger
    <b>5. alv_display_function</b> -
    No such FM exists
    <b>
    6. G_SET_GET_ID_FROM_NAME -</b> Use this module to derive the internal set Id from the name that appears on the user interface, for example, in order then to import the set (see the function group documentation).
    The function module first determines a candidate list of sets based on the set name and the class that might have been specified that could match the set name. The class can also be masked (e.g. 000+ for all FI-SL sets, including dynamic sets).

  • Error in Using FP_JOB_OPEN

    Hi all,
    I am using FP_JOB_OPEN FM to open a PDF form in EP.
    But I am getting an error stating that "Define all the required parameters".
    Please help me on this.
    Regards,
    Amit

    Hi Markus,
    I was trying to open a simple print form, previously I had not defined the connection field in SFPOUTPUTPARAMS
    Now PDF is not giving any error. But nothng is coming up, neither the error nor the form.
    This is the code I have written :
      DATA : lv_fname            TYPE  funcname,
             lt_ie_outputparams  TYPE  sfpoutputparams,
             lt_pernr            TYPE  qisr_tab_type,
             lt_ename            TYPE  qisr_tab_type,
             ls_special_data     LIKE LINE OF special_data,
             ls_pernr            LIKE LINE OF lt_pernr,
             ls_ename            LIKE LINE OF lt_ename.
      DATA fp_docparams TYPE sfpdocparams .
      DATA fp_formoutput TYPE fpformoutput .
      DATA t_head TYPE thead .
       CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
            EXPORTING
              i_name                     = 'Z_ISR_FORM_TEST1'
            IMPORTING
              e_funcname                 = lv_fname
            E_INTERFACE_TYPE           =     .
          lt_ie_outputparams-nodialog = 'X'.
          lt_ie_outputparams-getpdf = 'X'.
          lt_ie_outputparams-connection = 'ADS'.
          CALL FUNCTION 'FP_JOB_OPEN'
            CHANGING
              ie_outputparams = lt_ie_outputparams
            EXCEPTIONS
              cancel          = 1
              usage_error     = 2
              system_error    = 3
              internal_error  = 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.
          fp_docparams-langu = 'E'.
          fp_docparams-country = 'GB'.
          fp_docparams-fillable = ''.
        fp_docparams-fillable = 'X'.
          CALL FUNCTION lv_fname
            EXPORTING
              /1BCDWB/DOCPARAMS        = fp_docparams
              pernr                    = lt_pernr
              ename                    = lt_ename
          IMPORTING
            /1BCDWB/FORMOUTPUT       =
           EXCEPTIONS
             usage_error              = 1
             system_error             = 2
             internal_error           = 3
             OTHERS                   = 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.
          CALL FUNCTION 'FP_JOB_CLOSE'
          IMPORTING
            E_RESULT             =
          EXCEPTIONS
            USAGE_ERROR          = 1
            SYSTEM_ERROR         = 2
            INTERNAL_ERROR       = 3
            OTHERS               = 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.

  • How to use a Logical Database in Function Module.

    Hi Experts,
    I want to use a logical database in a Function Module to fetch data from a standard SAP table into a Internal table for certain filter conditions.
    How can I get get this done????
    I called LDB_PROCESS FM in my FM, but I could not figure out how to store the extract in my IT table since we cant use GET in FM.
    Please provide me a sample code if possible.
    Thanks in Advance,
    Alex.

    Hi,
    i had an example program like this ,in this i want to get the data using pnp logical database with 5 fields in an interface program.
    data: begin of it_final occurs 0,
            pernr like pa0002-pernr,
            vorna like pa0002-vorna,
            nachn like pa0002-nachn,
           usrid like pa0105-usrid,
           usrid_long like pa0105-usrid_long,
           end of it_final.
    get pernr.
      clear : p0000,p0002,p0105.
      rp-provide-from-last p0000 space p_date p_date.
      if p0000-stat2 = '3'.
        v_pernr = pnppernr-low.
      else.
        reject.
      endif.
    *---Get employee pernr, First name ,Last name into final table
      rp-provide-from-last p0002 space p_date p_date.
      if pnp-sw-found = '1'.
       it_final-pernr = p0002-pernr.
       it_final-vorna = p0002-vorna.
       it_final-nachn = p0002-nachn.
      else.
    *---Error message if not infotype 0002 maintained
      T_ERROR-PERNR   = pnppernr-low.
      CONCATENATE TEXT-EMI '0002'
      INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
      APPEND T_ERROR.
      CLEAR T_ERROR.
      endif.
    **--Get SYSTEM USERNAME to final table
      rp-provide-from-last p0105 0001 p_date p_date.
      if pnp-sw-found = '1'.
        it_final-usrid = p0105-usrid.
      else.
    *---Error message if not SYSTEM USERNAME maintained
        T_ERROR-PERNR   = pnppernr-low.
        CONCATENATE TEXT-003 '0105'
        INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
        APPEND T_ERROR.
        CLEAR T_ERROR.
      endif.
    **--Get Email ID to final table
      rp-provide-from-last p0105 0010 p_date p_date.
      if pnp-sw-found = '1'.
        it_final-usrid_long = p0105-usrid_long.
      else.
    *---Error message if not Email ID maintained
        T_ERROR-PERNR   = pnppernr-low.
        CONCATENATE TEXT-004 '0105'
        INTO T_ERROR-MESSAGE SEPARATED BY SPACE.
        APPEND T_ERROR.
        CLEAR T_ERROR.
      endif.
       append it_final.
        clear it_final.
    reward points if useful,
    venkat.

  • Error in Extraction with Generic Datasource via Function Module

    Dear Gurus,
    Iam working for BI-HR module.We are extracting data with generic data source via function module. The client some more extra fields in already existing DS. So we made a copy of that Function module and tried to create new generic DS, we got error while extraction like "Error occured during the extraction process". Can you please help in resolving this issue, your valuable suggestion would be highly appreciated.
    Thanks and regards
    Arun S

    Hi,
    Which structure are you using??
    Are you using the same old structure for this function module as well.
    Have you enhanced the structure with new required fields.
    New extrac fields needs to be added to existing structure if you are using the same or create a new one and make sure that you have all the fields in the structure which you are going to use in the data source.
    You need to take care for the append as well and the issue could be in the code as well.
    Make sure you have written the proper code and just for the new fields done an append
    Thanks
    Ajeet

  • Error on SAPLZ001 program after deletion of Function Module

    Hi,
    I got some problem with my datasource (processed by a function module), this error occurs after I delete the FM in D because this will not be used in Q.
    Below is the details of my problem, Hope you can help me soon. thank you very much
    Includes LSVIMFTX
    Field "FORBIDDEN_FUNC_NAME_CHARS" is unknown
    History of the problem:
    After Q refresh, we need to retransport all TR that are existing to Q01
    before the refresh.
    The Error occurs when retransporting existing Datasource process by a
    function module to Q01
    Error Message:
    Program SAPLZ001, Include LZ001UXX: Syntax error in line 000011
    INCLUDE report 'LZ001U07' not found
    this is because 1 function module is missing in the Q but the FM name
    exist in the LZ001UXX under LZ001U07.
    But since the missing FM is no longer needed, I decided to delete this
    FM in Dev and transport the changes done to Q, hoping that the failed
    datasource transport will be successful after retransport.
    After I did the deletion, a new error occurs when releasing the TR, it
    says:
    Includes LSVIMFTX
    Field "FORBIDDEN_FUNC_NAME_CHARS" is unknown
    I check manualy the program LSVIMFTX and it says there is no syntax
    error.
    But when I check SAPLZ001 program the error occurs.

    The FM is for data extraction, I created a Datasource that processed by a FM.
    Yes, I get this error in Dev originally, but before I deleted the FM in D, this work fine and when I deleted and transported the action "delete FM" to Q it fails, then when I check it in Q the Q now is having the same problem with D.
    I am trying to change the version in D and transported to Q, but transport always fails.
    changing version didnt fix the problem with.
    Thank you very much for your time...

  • Error while passing a table to a function module

    Hi Iam passing a table g_tab of length 376 flat structure to the function module..under TABLES section parameter.
    Changedocument_read_headers.
    iam getting a complile time error like the below displayed thing. Can u tell me how to solve this ?
    In the function module interface, you can specify only
    fields of a specific type and length under "I_CDHDR".
    Although the currently specified field
    "G_CDHDR_TAB" is the correct type, its length is incorrect.
    Edited by: kiran kumar on Jul 7, 2008 8:53 AM

    probably u making a mistake while declaring the table
    declare it like this in the tables section:
    S_JOB     LIKE     RNGE_OBJID
    where s_job is the internal table name and RANGE_OBJID is a structure type and NOT an internal table type.

  • Error while generating Web Service from a function module.

    Hi Experts,
    I am trying to create a web service from function module by doing the steps as mentioned in the below document:
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417800)ID1146834250DB10778842957931285337End?rid=/library/uuid/80fa3dff-ce76-2a10-3f94-f3df8f2db5a2&overridelayout=true
    When i save it as an local object instead of generating the Web Service it gives me the below error:
    "Error during activation of Web Service"
    Kindly let me know what needs to be done inorder to resolve this issue.
    I have a feeling that this error may be with respect to some authorizations, in that case how do we resolve it
    Helpful Inputs Awaited.!!!
    Thanks
    Dhwani

    Hi Dhawani,
    Hi Pavan,
    Can you please elaborate...how this will help??
    Thanks
    Dhwani
    I dont know the specific reason but internally there may some inconsistancy but i faced the same error and i tried with saving it in the package.
    Thanks

  • Use of Logical Database in function module

    Hello Experts,
    Is there a way of using logical database and Get enent inside a function module.
    I am trying to create a RFC for HR module and need this badly. Any help would be highly appriciated.
    Thanks,
    Gregory fernando

    This fm will work fine with all LDBs including PNP
    Have you checked the fm documentation ?

  • Error while creating a extractor based on Functional Module

    Hi,
    I am building an extactor based on afunction module.I created a DS and created a structure in Se11.When i am trying to put the extract structure in the Tables tab of the function module it gives me an error saying Tables parameters are obselete and doesnt allow me to activate or go back and front to other tabs.Can anyone please tell me what might be the reason?
    Thanks,

    Hi,
            Just try to reactivate the structure once again. And when you open the function module, if the problem still persists just try to press Return key several times. The message you are getting is just a warning message.
    PS: I am not sure whether this is the correct way, but i personally resolved this by pressing the ENTER key 4 or 5 times. So just give a try.
    Regards
    Sunil

  • Error while creating import parameters in RFC function module

    Hi,
    I am trying to create import parameter in RFC enabled function module and getting the following error "Reference parameters are not allowed with RFC". Am I doing something wrong.
    Your earlier response is much appreciated
    Regards
    Kasi

    There is a "Pass by Value" checkbox, just check that and you wont get the error.  The basic reason behind is since an RFC is called by a different system the parameters have to be sent as values than as references.
    hith
    Sunil Achyut

  • Crystal Reports for VS2010 using a custom SAP ABAP function module data source

    I recently worked with Crystal Reports 2011 and was able to connect and retrieve data from our R/3 system via an ABAP function module. While researching other features, I found this version that can be installed into Visual Studio 2010. The parameters are not very user friendly in Crystal Reports so I was hoping to create a custom dialog to collect my report parameters.
    Does anyone know if I were to install Crystal Reports for Visual Studio 2010, would I be able to design a front-end selection screen in a Visual Basic form and then pass the input to through the Crystal Reports connection to my ABAP function module to retrieve the data filtered on the back-end by the selection screen parameters and return the results to be reported in the Crystal Reports output?
    I am using Visual Studio 2010 Professional Visual Basic with the .NET Framework 4.0 on 32-bit Windows 7. I was able to connect to our R/3 system in Crystal Reports 2011, so if I were to install Crystal Reports for VS2010, would there be a similar way of connecting to SAP?
    Any assistance or direction would be greatly appreciated.
    Thanks,
    Bryan

    Hello Bryan
    I don't know for sure, but I doubt this will work in CRVS2010. Only hope is that the utility available for download in this KBA will point you in the right direction.
    - Ludek
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Share Your Knowledge in SCN Topic Spaces

Maybe you are looking for

  • Error afer installing - I need to reinstall with 7.0.3 or later quick time

    I got this thing for Christmas and have never gotten it to work yet. Im pretty frustrated. I spent several hours downloading music off my CD's and I can,t get the thing to work. In addition now when I open up the program (Icon on my desk top) it says

  • FAGLFLEXT not appearing in planner profile

    Dear all, I am trying to create a planner profile for profit center planning with new gl. I have created in golden client and transported to production. But when i check in production the totals table for the SAPFAGL profile in the totals table FAGLF

  • Details on Invoice

    When a Repair & Return IB Product repair order is completed and the charges submitted to order management, is it possible to get the serial number and part number of the item repaired listed on the invoice for the customer?

  • Wifi transfer rate issues

    I've had my macbook pro for alitle while now and at one point i was transfering files to and from the internet using programs like skype with a transfer rate of upwards of 3000 kb/s. but for last few months i havn't seen numbers above 300 kb/s. What

  • Need a clear explanation for class.forName()

    Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); Connection conn = DriverManager.getConnection("aadsn","xxxxx","xxxx"); actually what it does behind the scene.