Problem in  CALL FUNCTION 'GET_JOB_RUNTIME_INFO'

While working in PDF attachment I am using
Function 'GET_JOB_RUNTIME_INFO' as bellow
  CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
    IMPORTING
      eventid                 = gd_eventid
      eventparm               = gd_eventparm
      external_program_active = gd_external_program_active
      jobcount                = gd_jobcount
      jobname                 = gd_jobname
      stepcount               = gd_stepcount
    EXCEPTIONS
      no_runtime_info         = 1
      OTHERS                  = 2.
But I am getting gd_jobname, gd_jobcount,gd_stepcount blanck
So please help...

Try this.....
PARAMETERS: V_EVTID     LIKE TBTCM-EVENTID,
            V_EVTPRM    LIKE TBTCM-EVENTPARM,
            V_JOBNAM    LIKE TBTCM-JOBNAME.
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
EVENTID         = V_EVTID
EVENTPARM       = V_EVTPRM
JOBNAME         = V_JOBNAM
EXCEPTIONS
NO_RUNTIME_INFO = 1
OTHERS          = 2.
IF SY-SUBRC NE 0.
      WRITE:/'ERROR IN FUNCTION'.
ELSE.
      WRITE:/ 'JOB', V_JOBNAM, 'STARTED WITH EVENT', V_EVTID, 'AND PARAMETER', V_EVTPRM.
ENDIF.
Regards
Ajit

Similar Messages

  • Problem with call function close_form

    Hello ,
    I have a problem with function module close_form.I dont know if I am doing something wrong but please help me.
    the issue is
    declarations:
    data: gt_itcpp type table of itcpp,
             gt_otfdat type table of itcoo.
    CALL FUNCTION 'CLOSE_FORM
    EXPORTING
       RESULT  = gt_itcpp
    TABLES
       otfdata = gt_otfdat
    EXCEPTIONS
       OTHERS  = 1.
    DUMP: FUNCTION PARAMETER RESULT IS UNKNOWN.
    THANKS

    My point was that there are actually two problems with the original code: the one that you pointed out and the one that abapuser pointed out.
    Although both were very helpful individually, I don't think either one actually solved the problem.
    It would be misleading to anyone searching the forum looking for posts that solved a problem similar to theirs and only implemented half the solution.
    In fact abapuser's answer is the one that answers the question that was actually asked.
    Rob

  • Facing problem in call function starting new task taskname

    Hi all,
    when i call a function module using starting new task, it is failing with sy-subrc 3. can anyone guide me in this.
    see the code :
      DATA   lv_taskname(7) TYPE c VALUE 'PEM_EXE'.
        CALL FUNCTION 'PEM_SCHEDULE'  STARTING NEW TASK lv_taskname
             EXPORTING
                  iv_packid             = gv_packid
                  iv_pebid              = ls_alv_out-peb_id
             EXCEPTIONS
                  invalid_state_request = 1
                  database_error        = 2
                  OTHERS                = 3.
    Thanks in advance.
    Best Regards,
    Prashant

    when i change the function module from normal to remote, it gives me a error that the "generic types are not allowed in RFC", but i have not given any generic type in the parameters.
    see the signature of the function module.
    *"  IMPORTING
    *"     VALUE(IV_PACKID) TYPE  CNVMBTPACK-PACKID
    *"     VALUE(IV_PEBID) TYPE  CNVMBTPEB-PEB_ID
    *"  EXPORTING
    *"     VALUE(EV_ERROR_DETECTED) TYPE  C
    *"     VALUE(EV_STOP) TYPE  C
    *"  EXCEPTIONS
    *"      INVALID_STATE_REQUEST
    *"      DATABASE_ERROR
    *"      FORIEGN_LOCK
    Can u please check it and find out the problem
    Thanks,
    Prasanth

  • Problem in Call function .. starting new task

    Hi,
    I want to execute a dialog program in background. I am trying to use call function starting new task.
    I am facing some syntax issue. Can any one guide me how to use call function starting new task. The function module is RFC FM. Do we need to define task some where before use please guide.
    Thanks in advance. A sample program will be gr8.

    Hi,
    Incase you want to call a RFC FM in background you can call ity like this.
         call function 'Y_L_TO_CREATE_HUPAST' in background task
                 exporting
              venum   = y_v_venum
              backg   = 'X'
               buser   = y_lv_uname
              langu   = sy-langu
              objky   = y_lv_objky
              printer = y_lv_printer.
    Here Y_L_TO_CREATE_HUPAST is a RFC FM.
    Regards,
    Ankur Parab

  • Problem when calling function module CV120_DOC_CHECKOUT_VIEW in background

    Hi ,
    I'm currently developping an abap program which extract document from KPRO for printing into a windows Folder.
    For this I use standard function module CV120_DOC_CHECKOUT_VIEW.
    When i run my program in foreground task there's no problem, but when i run it in background task the extract doesn't work. It seems that the system cannot connect to the Windows Network.
    Whe the program is running in foreground task, the function module user SAPHHTP RFC destination, when it runs in background task it use SAPFTP destination .
    Does somebody can help me ?
    thanks in advance

    Hi Ajay,
    The program extract document into a folder on Windows Network that means on a server not on a PC .
    I know that in background task ther's no connection with sapgui.
    For example when i want to create a file on network n background task i use OPEN_DATASET instruction and that works fine.
    My problem is the use of the standard function module CV120_DOC_CHECKOUT_VIEW in background task because when this function module is running in background task it use the SAPFTP rfc destination instead of SAPHHTP rfc destination in foreground task . I check the RFC destination , thoses works both . SO i think the problem comes from parameters given to the function module.
    Regards.

  • Problem in calling  function module CLVF_VB_INSERT_CLASSIFICATION'

    Hello every one
    I need to update the characteristic value of  material by calling a function module
    CLVF_VB_INSERT_CLASSIFICATION.
    but i dont know what parameters should be passed to it, please help me.
    thanking you all
    p.chitrakala

    See standard BAPIs to be used in thread Query on classification material characteristic values update/insert
    These BAPIs are said to be well documented. Ask your functional team if it's not clear.
    Advice: create characteristics manually as they should be created by bapis, then run the BAPI_..._GET_DETAIL bapis (you just need to know the key, that should not be too much complex I hope) to see what values are returned. You will use these values to fill in the exporting parameters of BAPI_..._CREATE or BAPI_..._CHANGE

  • Call Function Destination in a background job

    I am having a problem using:
      CALL FUNCTION 'TABLE_ENTRIES_GET_VIA_RFC'
             DESTINATION p_dest
    in a background job.
    I am working on a program that would compare the same table in 2 different systems and write the differences.  It works when I run it in the foreground.  However, I want to run this in a nightly background job.  However, it is failing and I beleive that it is the result of the program needing a user to interactively logon to the remote system.
    How can I bypass the logon screen or enter information into the logon screen using a background job?
    Thanks.
    Jon

    Hi Jonathan,
    Would you like to reward some points to the poster to thank them as a part of SDN Contributor Recognition Program?
    You can click on the yellow star on the right of each post header to reward points.
    For more information:
    https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    John.

  • Call function with select arguments

    Hi Gurus,
    I have problem to call function inside select statements as follow:
    select a.ID_ELE2, a.ID_ELE3, a.DT_FIS_YR, c.NU_FIS_PER, c.dt,
    (case
    when c.ld is null then
    GET_LD_CHECK (a.DT_FIS_YR,c.NU_FIS_PER, a.ID_ELE3, a.ID_ELE2) -- 1
    -- GET_LD_CHECK ('2009',7, '8010', '7493') --- 2
    else
    c.ld
    end ) description
    from ACCOUNT a, TRANSACTION c
    where a.DT_FIS_YR ='2009'
    and a.ID_ELE3 <> '0000'
    and c.TY_SRC not in ('CL', 'CN')
    and a.DT_FIS_YR = c.nu_fis_yr
    and a.AK = c.AK_FGCHAR
    and trim(a.ID_ELE3) ='8010'
    and c.NU_FIS_PER <> 14
    order by 1,4,5,6
    the 1 doesn't output result but the 2 it does! How can pass the select result to the function?
    Thanks in advance for your help.
    Ben

    The statement / function call seems to be ok. So there are not much chances left for your call to return different (=non) values.
    1) It could be that you have different values in the column then during your test call.
    2) Maybe your function raises an error and that error is supressed in some ugly WHEN OTHERS EXCEPTION => Solution: Get rid of the error handler.
    3) datatype conversion. For example if a.dt_fis_yr is a number value, then you should test with number values and not with strings. GET_LD_CHECK (2009,7, '8010', '7493'). Same logic goes for the other paramters, make sure the datatype is correct and matches the function parameter.

  • Problem while calling RFC function module in java

    Hi all
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    Connect_PM  GWHOST=<system.ab.ydydy.yyyd.com>, GWSERV=sapgw00, ASHOST=<system.ab.ydydy.yyyd.com>, SYSNR=00
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname '<system.ab.ydydy.yyyd.com>' unknown
    TIME        Mon Jun 06 14:50:25 2005
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      ninti.c
    LINE        332
    DETAIL      NiPGetHostByName2: hostname '<system.ab.ydydy.yyyd.com>' not found
    SYSTEM CALL gethostbyname_r
    COUNTER     1
         at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
         at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1098)
         at com.sap.mw.jco.JCO$Client.connect(JCO.java:2983)
         at MyProject.Bapi2.<init>(Bapi2.java:43)
         at MyProject.Bapi2.main(Bapi2.java:231)
    Pl help me
    pradeep

    Hi
    This is my code....
    Created on Jun 2, 2005
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package MyProject;
    @author pradeep
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    import com.sap.mw.jco.*;
    public class Bapi2 extends Object {
       JCO.Client mConnection;
       JCO.Repository mRepository;
       public Bapi2() {
           try {
              // Change the logon information to your own system/user
              mConnection =
                JCO.createClient("122", // SAP client
                   "<pradeep>", // userid
                   "*****", // password
                   "EN", // language
                   "<abc11.aa.abc23.company.com>", // application server host name
                   "<00>");//system no
              mConnection.connect();
              mRepository = new JCO.Repository("HLL", mConnection);
          catch (Exception ex) {
            ex.printStackTrace();
            System.exit(1);
          JCO.Function function = null;
          JCO.Table codes = null;
            try {
               function = this.createFunction("BAPI_COMPANYCODE_GETLIST");
               if (function == null) {
                 System.out.println("BAPI_COMPANYCODE_GETLIST" +
                                         " not found in SAP.");
                 System.exit(1);
               mConnection.execute(function);
               JCO.Structure returnStructure =
                 function.getExportParameterList().getStructure("RETURN");
               if (! (returnStructure.getString("TYPE").equals("") ||
                        returnStructure.getString("TYPE").equals("S")) ) {
                 System.out.println(returnStructure.getString("MESSAGE"));
                 System.exit(1);
               codes =
                 function.getTableParameterList().getTable("COMPANYCODE_LIST");
               codes.setRow(2);
    codes.deleteRow();
    codes.deleteRow(5);
    codes.appendRow();
    codes.setValue("XXXX", "COMP_CODE");
    codes.setValue("Does not exist", "COMP_NAME");
    codes.appendRows(2);
    codes.setValue("YYYY", "COMP_CODE");
    codes.setValue("Does not exist either", "COMP_NAME");
    codes.nextRow();
    codes.setValue("ZZZZ", "COMP_CODE");
    codes.setValue("Nor does this", "COMP_NAME");
    for (int i = 0; i < codes.getNumRows(); i++) {
    codes.setRow(i);
                 System.out.println(codes.getString("COMP_CODE") + '\t' +
                                         codes.getString("COMP_NAME"));
            catch (Exception ex) {
               ex.printStackTrace();
               System.exit(1);
            try {
               codes.firstRow();
               for (int i = 0; i < codes.getNumRows(); i++, codes.nextRow()) {
                 function = this.createFunction("BAPI_COMPANYCODE_GETDETAIL");
                 if (function == null) {
                    System.out.println("BAPI_COMPANYCODE_GETDETAIL" +
                                            " not found in SAP.");
                    System.exit(1);
                 function.getImportParameterList().
                    setValue(codes.getString("COMP_CODE"), "COMPANYCODEID");
                 mConnection.execute(function);
                 JCO.Structure returnStructure =
                    function.getExportParameterList().getStructure("RETURN");
                 if (! (returnStructure.getString("TYPE").equals("") ||
                          returnStructure.getString("TYPE").equals("S") ||
                          returnStructure.getString("TYPE").equals("W")) ) {
                    System.out.println(returnStructure.getString("MESSAGE"));
                 JCO.Structure detail =
                    function.getExportParameterList().
                    getStructure("COMPANYCODE_DETAIL");
                 System.out.println(detail.getString("COMP_CODE") + '\t' +
                                         detail.getString("COUNTRY") + '\t' +
                                         detail.getString("CITY"));
           catch (Exception ex) {
              ex.printStackTrace();
              System.exit(1);
           mConnection.disconnect();
         public JCO.Function createFunction(String name) throws Exception {
           try {
              IFunctionTemplate ft =
                mRepository.getFunctionTemplate(name.toUpperCase());
              if (ft == null)
                return null;
              return ft.getFunction();
          catch (Exception ex) {
            throw new Exception("Problem retrieving JCO.Function object.");
       public static void main (String args[]) {
          Bapi2 app = new Bapi2();
    This is the error i'm getting...
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    Connect_PM  GWHOST=<abc11.aa.abc23.company.com>, GWSERV=sapgw00, ASHOST=<abc11.aa.abc23.company.com>, SYSNR=00
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname '<abc11.aa.abc23.company.com>' unknown
    TIME        Mon Jun 06 17:15:12 2005
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      ninti.c
    LINE        332
    DETAIL      NiPGetHostByName2: hostname
                '<abc11.aa.abc23.company.com>' not
         at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
         at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1098)
         at com.sap.mw.jco.JCO$Client.connect(JCO.java:2983)
         at MyProject.Bapi2.<init>(Bapi2.java:45)
         at MyProject.Bapi2.main(Bapi2.java:233)
    Thx
    PRadeep

  • Problem with call of function F4UT_RESULTS_MAP in search help exit

    Hi everybody,
    i have a problem concerning call of function F4UT_RESULTS_MAP.
    I call this function in this way:
    CALL FUNCTION 'F4UT_RESULTS_MAP'
           TABLES
                shlp_tab          = p_shlp_tab
                record_tab        = p_record_tab
                source_tab        = lt_zv055[]
           CHANGING
                shlp              = p_shlp
                callcontrol       = p_callcontrol
           EXCEPTIONS
                illegal_structure = 1
                OTHERS            = 2.
    in lt_zv055[] there are results from previous select, but i want to select only values,
    that match select options that are specified in p_shlp.
    But it always shows all the values that are in lt_zv055.
    What am i doing wrong?
    Thanks in advance.

    Read the "Notes" part in FM documentation and you will find the reason .

  • Problem to call a easy function in a transformation routine

    Hi,
    I wanted to convert a string ("12") to an integer (12) in my transformation routine.
    Here the code:
    DATA: vaca_number TYPE i.
        CALL FUNCTION u2019conversion_exit_alpha_outputu2019
          EXPORTING
            input  = source_fields-vaca
          IMPORTING
            output = vaca_number.
        IF source_fields-smocker CS 'Y'.
          result = vaca_number * 120.
        ELSEIF source_fields-smocker CS 'N'.
          result = vaca_number * 240.
        ELSE.
          monitor_rec-msgid = 'ZMESSAGE'.
          monitor_rec-msgty = 'E'.
          monitor_rec-msgno = '001'.
          monitor_rec-msgv1 = 'ERROR SMOCKER UNKNOWN FOR PPS'.
          monitor_rec-msgv2 = source_fields-smocker.
          APPEND monitor_rec TO monitor.
          RAISE EXCEPTION TYPE cx_rsrout_abort.
        ENDIF.
    When i check, i have the following error:
    E:"RS_C_ICON_VERSION-" expected, not "#CONVERSION_"
    Have you an idea ?
    Thanks for your help.
    Rodolphe.

    That's one problem.  But if you look at the interface for the FM, it requires a character value.  The following, using an integer, will dump.  Try it and see.  The only way to make it work is to define i_2 as a character, not integer.
    PROGRAM zz_temp.
    DATA:
      c_1  TYPE c VALUE '1',
      i_2  TYPE i.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input  = c_1
      IMPORTING
        output = i_2.

  • Problem with 'GetType' Function calling in MSVC++

    Hello
    I have problem with the function in TestStand API .
    When I call the function " GetType " with the following statements in
    a DLL called from TestStand (NI) implemented in MS VC ++
    , it does not work and this exception is caught by the ONLY ' try catch ' block
    to catch exceptions in TestStand API giving the error message
    " Unexpected operating system error".
    VARIANT_BOOL ok;
    VARIANT_BOOL hi;
    BSTR Name;
    PropertyObject *property = (*step_)->AsPropertyObject();
    ( *step_ is a STEP Object of type Step* *step_ )
    property = property->GetPropertyObject( "TS.SData", 0);
    enum TS:ropertyValueTypes i = property->GetType( "" , 0 , &hi , &ok
    , &Name);//Problem
    Please solve my problem.
    You can email me at [email protected]
    Thankyou very much.
    Best regards
    Fahad Ejaz

    Hello,
    The problem is that the Name is not initialized (the BSTR is defined as OLECHAR*). Thus, replace the
    BSTR Name;
    declaration with the following lines:
    char buf[1024];
    BSTR Name = _bstr_t(buf);
    This should solve the problem.
    Best Regards,
    Silvius
    Silvius Iancu

  • Hey my iphone 4 has a problem regarding carrier. Its always showing searching mode and wifi-address N/A and Bluetooth address 00:00:00:00:00 and call function is disable

    hey my iphone 4 has a problem regarding carrier. Its always showing searching mode and wifi-address N/A and Bluetooth address 00:00:00:00:00 and call function is disable. Please help me. I have tried every thing ..like restore from DFU mode with out sucess.

    Refer to  Note 98458 - SAPMSSY1, CALL_FUNCTION_NOT_FOUND

  • Call function problem

    Hello
    I'm calling a remote function:
    CALL FUNCTION 'Z_RFC_TEST' DESTINATION i_rfc-host
    At first it worked. But now I always get the error: "FUNCTION MODULE Z_RFC_TEST not found.
    Any idea what this could be?
    Greets.

    Hi,
      You have to check out two main things as follows:
      1. Check whether the function module exists in the remote system or not. If it exists just go the properties and check whether the remote enabled option have selected or not.If the function module is not exist just create it as a remote enabled function module. Also there might be some problem with the function group where the function module is resided. So just activate the function group.
      2. Just check out the RFC destination name. I think you are passing the RFC destination name to the variable as i_rfc-host.
    Just make sure the destination name.
    Regards,
    Sankar.

  • Call function with select options problem

    Hi there dear SDN community members.
    I have got an strange ABAP problem wich function call.
    Code1
    CLEAR ls_selec .
    ls_selec-iobjnm = '9AMATNR' .
    ls_selec-sign   = 'I' .                                    
    ls_selec-option = 'EQ' .
    ls_selec-low    = '0000000000000000000000000000000000017714' .
    APPEND ls_selec TO lt_selec .
    CLEAR ls_selec .
    ls_selec-iobjnm = '9AMATNR' .
    ls_selec-sign   = 'I' .
    ls_selec-option = 'EQ' .
    ls_selec-low    = '0000000000000000000000000000000010079409' .
    APPEND ls_selec TO lt_selec .
    CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
      EXPORTING
        iv_bas_plobid  = 'Z_DP_POS'
        it_selection   = lt_selec
        it_group_by    = lt_group
      IMPORTING
        et_plob_values = lt_plobs .
    Function returns data in lt_plobs itab only for the last product which was appended to the selection table lt_selec.
    Whilst
    Code2
    CLEAR ls_selec .
    ls_selec-iobjnm = '9AMATNR' .
    ls_selec-sign   = 'I' .
    ls_selec-option = 'BT' .
    ls_selec-low    = '0000000000000000000000000000000000017714' .
    ls_selec-high   = '0000000000000000000000000000000010079409' .
    APPEND ls_selec TO lt_selec .
    Returns data in lt_plobs for all products included in selection tab lt_selec.
    What am I doing wrong in case of Code1? Why function does not return data for both products included in selection tab lt_selec?
    Will be thankful for help. Regards. P.

    I am very sorry to take your time unnecessarily.
    The problem was caused by data inconsistency in our sandbox system I was developing in.
    Be understanding, please.
    Kind regards. P.
    Ps. 
    Vinod Nair
    The 'Loop' solution has slowed the performance down very much.

Maybe you are looking for

  • Creating a new class

    Hi all, I am new to Java programming and trying to figure out some issues with a class This is the problem I am trying to solve 1. I am trying to parse a xml and represent it in a JTable 2. I have parsed the xml and stored it in vector of vector form

  • What's wrong with this Forum? Why does Adobe take so long to reply to posts?!

    What's wrong with this Forum? Why does Adobe take so long to reply to posts?! This is actually "specific" to this Photoshop Forum. I typically get responses back from other Adobe forum promptly. Chime in.

  • How to reverse Brochure I Fox Mahoney Plugin

    Hello all still new to Motion 5 and learning alot. I am using a plugin called Brochure I by Fox Mahoney. Great Plugin thanks Fox! I have got it to do what I like.... opening...showing some photos then doing a reveal of a video clip but I am not sure

  • Kiosk Mode in QT Not Working?

    Hi Everyone, I've created a movie pop up page, with kioskmode enabled in the code, but in Windows XP, I can still access the save button at the bottom right - it shouldn't show. Test page: http://homepage.mac.com/badelstein/parti/port/splshscr/splshs

  • Window Manager behaviour

    What makes the window bar go away on some applications such as VirtualBox.  It goes away and then the window can't be moved or sized after that.  Kinda like running without a window mananger; such as failsafe.