Call Function'BAPI_USER_CHANGE' starting new task 'TEST'

Hi All,
I have problem with starting new task statement, I am using one FM after that am using starting new task 'TEST'
statement but its not working in one system its working fine in other systems, Please help me who this works.
Thanks in Advance.
Eg: Call Function'BAPI_USER_CHANGE' starting new task 'TEST'
Regar

Thanks Lqueiroz  ,
Now again i am getting a DUMP by saying ,
"An error occurred when executing a REMOTE FUNCTION CALL.
It was logged under the name "At least one entry could not be "
on the called page."
so what can be the reason for this
call function 'ZRFC_PER_DIEM' starting new task lc_taskid performing subr on end of task
        exporting
          h_guid      = it_header_guid_n
          request_obj = lt_requested_objects_n.
      wait up to '1' seconds.
      read table gt_scl into ls_scl index 1.
      p_transaction_per_diem =  ls_scl-value.
      read table gt_scl into ls_scl index 2.
      transaction_currency_code = ls_scl-value.
  form subr   using task_id type clike.
  data: p_transaction_per_diem  type  char13,
        transaction_currency_code type  char3.
  receive results from function 'ZRFC_PER_DIEM'
                           tables
                            value = gt_scl.
So basically i am getting dumo when receive statenment is running , by giving above dump.
Regards
PG

Similar Messages

  • CALL FUNCTION func STARTING NEW TASK task

    hi,
    i developed rfc to extract data and send to xi
    as my interface is Async
    as per soem documents it was mentioned the syntax
    CALL FUNCTION func STARTING NEW TASK task
    wat is the task ? in the syntax
    and how do i use it
    jeff

    Hi suresh,
    this is the code of  RFC. if i execute without RFCDESTINATION it executes successfully. when i use RFC DESTINATION it shows error
    call to messaging system failed: com.sap.aii.af.ra.ms.api.DeliveryException
    i created RFC destination using TCP/IP and registered program. same parameters i am mentioning in XI.
    FUNCTION z_bank_reconciliation.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(COMP_CODE) TYPE  BUKRS
    *"     VALUE(HOUSE_BANK) TYPE  HBKID
    *"     VALUE(ACCOUNT_ID) TYPE  HKTID
    *"  TABLES
    *"      CHQDETAILS STRUCTURE  ZPAYR
      DATA: itab LIKE payr OCCURS 0 WITH HEADER LINE.
      DATA: jtab LIKE payr OCCURS 0 WITH HEADER LINE.
      DATA: it_bank LIKE zbankrecon OCCURS 0 WITH HEADER LINE.
      DATA: it_bank1 LIKE zpayr OCCURS 0 WITH HEADER LINE.
      TYPES :  BEGIN OF ty_bseg ,
                 bukrs LIKE bseg-bukrs,
                 hbkid LIKE bseg-hbkid,
                 belnr LIKE bseg-belnr,
                 zlsch LIKE bseg-zlsch,
                 kostl LIKE bseg-kostl,
                 hkont LIKE bseg-hkont,
                 bzdat LIKE bseg-bzdat,
             END OF ty_bseg.
      TYPES : BEGIN OF ty_t012 ,
                  bukrs  LIKE t012-bukrs,
                  bankl  LIKE t012-bankl,
                  bankn  LIKE t012k-bankn,
             END OF ty_t012.
      TABLES : payr, t012, t012k, bseg.
      DATA : itpayr LIKE zpayr OCCURS 0 WITH HEADER LINE,
             itt012 TYPE STANDARD TABLE OF ty_t012,
             itbseg TYPE STANDARD TABLE OF ty_bseg,
             wa_itt012 TYPE  ty_t012,
             wa_itbseg TYPE  ty_bseg,
             total TYPE n.
      SELECT * FROM zbankrecon INTO TABLE it_bank
                       FOR ALL ENTRIES IN itab
                       WHERE chequeno EQ itab-chect.
      SELECT  abukrs abankl b~bankn
                  INTO CORRESPONDING FIELDS OF TABLE
                  itt012 FROM t012 AS a
          INNER JOIN t012k  AS b ON bbukrs = abukrs AND b~hbkid =
    house_bank AND b~hktid = account_id
                WHERE abukrs = comp_code AND ahbkid = house_bank.
      DELETE ADJACENT DUPLICATES FROM itt012.
      SELECT  zbukr  hbkid hktid vblnr gjahr zaldt checf chect  znme1 rwbtr
      waers zaldt zbnkl FROM payr INTO CORRESPONDING FIELDS OF TABLE itpayr
        WHERE  ( zbukr = comp_code AND hbkid = house_bank ) AND hktid =
        account_id.
    SELECT bukrs hbkid belnr zlsch kostl hkont bzdat  FROM bseg INTO TABLE
    itbseg
      WHERE bukrs = comp_code AND hbkid = house_bank.
      SORT  itt012 BY bankl.
      SORT itbseg BY belnr.
      READ TABLE itt012 INTO wa_itt012 INDEX 1.
      LOOP AT itpayr.
        read table itbseg into wa_itbseg with key bukrs = itpayr-zbukr
    hbkid =  itpayr-hbkid.
        if sy-subrc = 0.
          itpayr-kostl = wa_itbseg-kostl.
          itpayr-hkont = wa_itbseg-hkont.
         itpayr-bldat = wa_itbseg-bzdat.
          itpayr-zlsch = wa_itbseg-zlsch.
        endif.
        itpayr-zbnkl = wa_itt012-bankl.
        itpayr-zbnkn = wa_itt012-bankn.
        MODIFY itpayr.
        APPEND itpayr TO chqdetails.
      ENDLOOP.
      LOOP AT chqdetails.
        READ TABLE it_bank WITH KEY chequeno = chqdetails-chect.
        IF sy-subrc NE 0.
          MOVE chqdetails TO it_bank1.
          APPEND it_bank1.
          CLEAR it_bank1.
        ENDIF.
      ENDLOOP.
      REFRESH chqdetails.
      chqdetails[] = it_bank1[].
      LOOP AT it_bank1.
        MOVE : it_bank1-chect TO zbankrecon-chequeno,
        sy-datum TO zbankrecon-check_date,
        sy-uzeit TO zbankrecon-check_time.
        INSERT zbankrecon.
        CLEAR zbankrecon.
      ENDLOOP.
    ENDFUNCTION.

  • CALL FUNCTION  WITH STARTING NEW TASK

    Hi All,
    i'm call a function module through
    CALL FUNCTION 'Y_WIN'  DESTINATION 'rfc_destination' then it's give right result but when i want to call with starting new task then
    CALL FUNCTION 'Y_WIN'  STARTING NEW TASK 'INFO' DESTINATION 'rfc_destination'
    it does nt provide me any data. i have check in debugger call fm is wkging fine so pls clear me why i'm nt geeting result.
    pls give ur suggestions,
    Anuj

    Did you use the PERFORMING <form> ON END OF TASK to get the results back; like in the following sample
              CALL FUNCTION 'SAPWL_STATREC_READ_FILE'
                   STARTING NEW TASK taskname
                   DESTINATION list-name
                   PERFORMING read_outtab ON END OF TASK
                   EXPORTING
                        read_start_date   = s_date
                        read_start_time   = '000000'
                        read_end_date     = s_date
                        read_end_time     = '235959'
                   EXCEPTIONS " failure when calling RFC
                        communication_failure = 1 MESSAGE msg_text
                        system_failure        = 2 MESSAGE msg_text
                        RESOURCE_FAILURE      = 3.
    and
    FORM read_outtab USING taskname.
    * Receive results back
      RECEIVE RESULTS FROM FUNCTION 'SAPWL_STATREC_READ_FILE'
        TABLES
          v2_normal_records = outtab
        EXCEPTIONS " from the called FM
          nodata    = 1.
    Regards

  • ABAP Dump when calling Function Module Starting New Task

    Hi all. I have a tricky situation now, I am doing a POC on parallel processing.
    I am getting an ABAP dump on the following Call Function line which is in class lcl_steer_114numc (See below for full program):
    METHOD start.
        CALL FUNCTION 'Z_ZZCLS_STEER_114NUMC'
          STARTING NEW TASK me->id
          CALLING me->finish ON END OF TASK.
      ENDMETHOD.                    "start
    However I get the following ABAP dump:
    Short text
        Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"
    The function module only contains a wait statement to simulate parallel processing. It is strange that it dumps here, because when I change the FM call to another call that has been triggered successfully from other classes, it still produces the same ABAP dump.
    The background of the Proof Of Concept is to see if I can get an event to trigger the next process that depends on the outcome of the previous process. Parallel processes are run in the start methods by calling RFC.
    <Garbled code removed>
    Moderator Message: Please post relevant portions of the code only.
    Edited by: Suhas Saha on Jul 17, 2011 1:17 PM

    Well, the thing is I did manage to run 3 other Function Modules asynchronously succeesfully prior to that function call, with the same exact function call syntax. Further more, I have tried editing it with your suggestion but I get the exact same dump.
    The complete function group can be downloaded here (slinkee file):
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4ZmFhNzcwMTgtYzQ0Mi00NzQ4LTg5YTMtNDNlNWUxYTM2NTg3&hl=en_US
    The complete program can be downloaded here (slinkee file):
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4YWJmNjU3ODYtODRmMy00Nzg2LThkNTUtZjNkNDRhZGQ3MTUw&hl=en_US
    The complete ST22 dump can be found here:
    https://docs.google.com/leaf?id=0B3sua1Bw4XK4ZDU1YmFkZDAtOTU5MS00ZTgwLWFlZTktNWZhMDUxMzJlZWNl&hl=en_US
    Basically I ST22 gives me the following:
    Runtime Errors         RPERF_ILLEGAL_STATEMENT
    Date and Time          17.07.2011 05:29:54
    |Short text                                                                                |
    |    Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"                 |
    |What happened?                                                                                |
    |    Error in the ABAP Application Program                                                         |
    |                                                                                |
    |    The current ABAP program "Z_ZZB1_CLOSE_PERIOD_TEST2" had to be terminated                     |
    |     because it has                                                                               |
    |    come across a statement that unfortunately cannot be executed.                                |
    And it explains it here (but is not helpful / relevant at all) as I ran the program from SE38.
    |Error analysis                                                                                |
    |    There is probably an error in the program                                                     |
    |    "Z_ZZB1_CLOSE_PERIOD_TEST2".                                                                  |
    |    The program was probably called in a conversion exit                                          |
    |    or in a field exit. These are implemented by                                                  |
    |    function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or                                 |
    |    USER_EXIT_xxxxx_INPUT.                                                                        |
    |    Conversion exits are triggered during screen field transports or                              |
    |    WRITE statements, field exits during field transports from the                                |
    |    screen to the ABAP/4 program.                                                                 |
    |    In this connection, the following ABAP/4 statements are not allowed:                          |
    |                                                                                |
    I hope you try to download the slinkee files and you will notice the call function I performed was no different than the other call function RFC calls that really are working.

  • Behaviour of CALL FUNCTION fname STARTING NEW TASK DESTINATION 'NONE'

    As per ABAP help documentation, the statement CALL FUNCTION fname  STARTING NEW TASK DESTINATION 'NONE' should create a new main session in  same user session.The behaviour is wrong as per documentation.
    But  current behaviour:
    The statement CALL FUNCTION fname STARTING NEW TASK DESTINATION 'NONE'   is creating a new user session.
    Any reason?

    Hi Prakash,
    I'd agree with Suhas, that you're reading the documentation wrong. Here's your quote:
    As per ABAP help documentation, the statement CALL FUNCTION fname STARTING NEW TASK DESTINATION 'NONE' should create a new main session in current user session.
    If you look at the help, you can see that it says:
    When the destination NONE is used, a new main session is opened for the current user session.
    Do you see the difference? Also, note that in this context main session basically means that we're talking about a new external session:
    Each task ID defines a separate RFC connection with its own context, meaning that, in the case of repeated function module calls of the same task ID, the global data of the relevant function group can be accessed, if the connection still exists.
    In dialog processing, note that the maximum number of six main sessions cannot be exceeded, else an error message is displayed.
    If you're still in doubt, check out the online ABAP documentation for [CALL FUNCTION - STARTING NEW TASK|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_STARTING.htm]. So I'd say the documentation is in line with the actual behavior.
    Cheers, harald

  • 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

  • How to call RFC with  STARTING NEW TASK...performing my_form... in a class?

    Hello,
    I created a test report for parallel processing and this works perfectly fine but when I try to build this into a class I somehow cannot create the receiving form inside the method of the class...
    method test.
            CALL FUNCTION 'ZZCR_PARALLEL' STARTING NEW TASK lv_index DESTINATION IN GROUP DEFAULT
              PERFORMING transfo_result ON END OF TASK
              EXPORTING
                input_xstring = lx_clause_text.
    endmethod.
    I tried to place the form before the endmethod but this doesn't work and afterwards is also not an option.
    Is ABP OO not supporting parallel processing?
    Thanks and regards,
    Christoph

    Hello Christo ,
                         I am also trying to use the same in OO context . Just in he early stages of collecting information.If you could just tell what you found out in the document it could be opf immense help.
    Comradely,
    K.Sibi

  • Call function module in new task

    I need to call a function module starting new task but the problem is that it has inporting parameters also. Please help me in doing this. Points will be rewarded.

    Look at the ABAP keywords RECEIVE RESULTS FROM FUNCTION.  This is where you can get the results from the CALL FUNCTION MODULE... NEW TASK...
    It's all in the ABAP help for CALL FUNCTION MODULE.
    matt

  • CALL FUNCTION FUNCTION NAME STARTING NEW TASK 'TASK_NAME'.

    Hello Experts,
    I want to call a function in new task. I am not aware as to what advantages I would have. This approach is recomended because of a memory sharing issue. However the currently I would like to know what is the significance of the 'TASK_NAME' string that I am using. What does this signify? Can I use any string? should I end the task once the function is executed? If I should end it how?
    I have tried with the syntax Call Function < Function Name> Starging New Task 'TASK_NAME'.
    and this works.
    Kindly advice..
    Thanks, Anumodh

    There is a nice article on SCN about this:
    [RFC Calls|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f078394a-4469-2910-c4bf-853c75674694]
    And like the ABAP keyword documentation also states is this:
    For task, you must specify a character-type data object, which contains a task identifier for the called remote function module, which can be up to eight characters long and chosen at will. This task ID should be unique for each call; it is passed to the callback routines to identify the function. Every task ID defines its own RFC connection with its own context, so that for repeated calls of function modules of the same task ID, the global data of the respective function group can be accessed, provided that the connection still stands.
    Hope this will do.

  • Webgui - function module starting new task

    Hello,
    we want to call a function module which opens a new task from a webgui transaction. This webgui transaction is integrated into EP 6.0.
    Does anybody know how to handle this matter?
    Thanks in advance and best regards,
    Petra

    Hi Petra,
    "call function .... starting new task " creates a new external session for the current login session. This is the same as doing a /o or "system - Create session". Due to technical restrictions in webgui only one external session is possible.
    Best regards,
    Klaus

  • Calling Function Module starting new job

    Hallo !
    I'm calling a 'Z' function module from a class method.
    I want the calling will start immediately a new job.
    (That I will see in SM37)
    (Like we can do with submit statement)
    Is there a way to this ?
    (I need the function will start a job - because
    I want to save the function log in the Job list.)
    Thanks in advance,
      N.S.

    step : 1
    Sample Program: Creating a Job with JOB_OPEN
    <b>explanation :</b>
    Use JOB_OPEN to create a background job. The function module returns the unique ID number which, together with the job name, is required for identifying the job.
    Once you have "opened" a job, you can add job steps to it with JOB_SUBMIT and submit the job for processing with JOB_CLOSE.
    Create your job with JOB_OPEN. The module returns a unique job
    number. Together with the jobname, this number identifies the
    job. Other parameters are available, but are not required.
    JOBNAME = 'Freely selectable name for the job(s) you create'.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    JOBNAME = JOBNAME
    IMPORTING
    JOBCOUNT = JOBNUMBER
    EXCEPTIONS
    CANT_CREATE_JOB = 01
    INVALID_JOB_DATA = 02
    JOBNAME_MISSING = 03
    OTHERS = 99.
    IF SY-SUBRC > 0.
    <Error processing>
    ENDIF.
    step 2;
    Sample Program: Adding an ABAP Job Step
    <b>explanation :</b>
    Use JOB_SUBMIT to add a job step to a background job that you have opened with JOB_OPEN.
    A job step is an independent unit of work in a job, the execution of an ABAP or external program. Each job step can have its own authorizations user and printer/optical archiving specifications.
    Add a job step: ABAP program
    CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
    AUTHCKNAM = SY-UNAME " Runtime authorizations
    " user
    JOBCOUNT = JOBNUMBER " Value from JOB_OPEN
    JOBNAME = JOBNAME " Value from JOB_OPEN
    REPORT = 'REPORT' " Report to be run
    VARIANT = 'VARIANT' " Variant to use with
    " report
    PRIPARAMS = USER_PRINT_PARAMS " User printing options
    ARCPARAMS = USER_ARC_PARAMS " User archiving options
    " Both sets of options
    " come from
    " GET_PRINT_PARAMETERS
    EXCEPTIONS
    BAD_PRIPARAMS = 01
    INVALID_JOBDATA = 02
    JOBNAME_MISSING = 03
    JOB_NOTEX = 04
    JOB_SUBMIT_FAILED = 05
    LOCK_FAILED = 06
    PROGRAM_MISSING = 07
    PROG_ABAP_AND_EXTPG_SET = 08
    OTHERS = 99.
    step 3
    Sample Program: Immediate Start with JOB_CLOSE
    <b>explanation :</b>
    Use JOB_CLOSE to pass a background job to the background processing system to be run. Once you have "closed" a job, you can no longer add job steps to it or change job/job step specifications.
    The function module returns an indicator as to whether the job was automatically released or not. A job is automatically released to run only if the user who scheduled the job has RELE release authorization for the authorization object Operations on background jobs.
    A job step is an independent unit of work in a job, the execution of an ABAP or external program. Each job step can have its own authorizations user and printer/optical archiving specifications.
    Submit job for processing: immediate start
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    JOBCOUNT = JOBNUMBER " Job identification: number
    JOBNAME = JOBNAME " and name.
    STRTIMMED = 'X' " Schedules the job for
    " immediate start. The job
    " is started immediately
    " only if the user has the
    " RELE authorization to
    " release a job to run.
    IMPORTING
    JOB_WAS_RELEASED = JOB_RELEASED " If user has authorization
    " to release jobs to run, job
    " is automatically released
    " when it is scheduled. This
    " field is set to 'x' if the
    " job has been released.
    " Otherwise, the job is sche-
    " duled but must be released
    " by an administrator before
    " it can be started.
    EXCEPTIONS
    CANT_START_IMMEDIATE No longer used. Replaced by IMPORTING
    parameter JOB_WAS_RELEASED.
    INVALID_STARTDATE = 01
    JOBNAME_MISSING = 02
    JOB_CLOSE_FAILED = 03
    JOB_NOSTEPS = 04
    JOB_NOTEX = 05
    LOCK_FAILED = 06
    OTHERS = 99.
    IF SY-SUBRC > 0.
    <Error processing>
    ENDIF.
    in step 1  we will create a job with name etc..
    in step 2 we will assign work to this job
    step 3 : we will close the job inorder make it scheduled .
    Regards
    srikanth
    added descriptions to each steps

  • CALL FUNCTION STARTING NEW TASK  DESTINATION

    Hi All,
    I have tried to use CALL FUNCTION 'ZWHV_TEST' STARTING NEW TASK 'TEST' DESTINATION 'NONE' But it didnt work.
    Please explain me  to use above statement and detail me more about NEW TASK 'TEST'.
    How to declare TEST in new task ?
    Thanks ,
    Vinay.

    >
    Vinay parakala wrote:
    > ...But it didnt work.
    Moderator message - Give more information please in a new thread - post locked

  • STARTING NEW TASK - no button in the taskbar

    Hi experts.
    I present a PDF report from my SAP-application in it's own session, using CALL FUNCTION 'ZXXX' STARTING NEW TASK 'TEST'.
    It works fine but the new session/task has no button in the taskbar.
    If I press ALT+TAB I can see the session on the list, but I would like to see it in the taskbar as well, just like all my other open sessions.
    What is wrong?

    That's fine, but not a solution to my problem.
    Can I make some kind of workarround to show the taskbar-buton?

  • 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

  • Question on parallel processing using the STARTING NEW TASK keyword

    I have the following code in a program on my development system:
    call function 'FUNCTION_NAME'
        starting new task ld_taskname
        performing collect_output on end of task
          exporting
            pd_param1       = ld_param1
          tables
            pt_packet       = lt_packet.
    You'll notice in the code above I left out the following part of the function call:
    DESTINATION IN GROUP group
    In my one-server development system the topmost code executes fine, but I'm getting a 'REMOTE FUNCTION CALL ERROR' when I execute this in a multi-server Q&A system. 
    My question: Is the missing 'DESTINATION' keyword required in order for this technique to work in a multi-server environment or is it optional keyword?  I made the assumption that since it worked in my development environment that without the 'DESTINATION' addition the system simply used the current logged on system to start the new processes.
    Any input appreciated.
    Thanks,
    Lee

    Hi Lee,
    Just take F1 help on CALL FUNCTION key word and go to the variant
    CALL FUNCTION func STARTING NEW TASK task
                  [DESTINATION {dest|{IN GROUP {group|DEFAULT}}}]
                  parameter_list
                  [{PERFORMING subr}|{CALLING meth} ON END OF TASK].
    This gives you very clear information about this Key word.
    No one would give you better information better than this, i hope
    Cheers
    Ram

Maybe you are looking for