Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call FM in update Task ?

Former Member
0 Likes
621

Dear All,

I've created a custom FM and I want to call this FM in update task.

I'm passsing a tables parameter to this FM in update Task.

Everything is fine but when I'm coming back to the main program the tables paramter is not having any value.

It's becoming null.

Can you tell me the reason y it's so ?

Regards,

Deepu.K

..

Dear All,

I've created a custom FM and I want to call this FM in update task.

I'm passsing a tables parameter to this FM in update Task.

Everything is fine but when I'm coming back to the main program the tables paramter is not having any value.

It's becoming null.

Can you tell me the reason y it's so ?

Regards,

Deepu.K

..

4 REPLIES 4
Read only

Former Member
0 Likes
583

Hi Deepu,

Please check the below URL.

http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3bd1358411d1829f0000e829fbfe/content.htm

Hope this will solve your problem.

Regards,

SB.

Read only

0 Likes
583

Hello Sunil,

I tried even that.

But it's not working.

May I know why the data is not being available in the table when it's coming out of the Update FM ?

But, when I call the FM without update task syntax it's working fine.

Regards,

Deepu.K

Read only

Former Member
0 Likes
583

Hi deepu,

in update task only starts after the commit instruction of your program and it doesn't accept importing, changing parameters or exceptions. And table parameters are only valid for input.

You might want to check the starting new task mode:


  CLEAR w_end.
  ltask = 'HELLOWORLD'.
  CALL FUNCTION 'Z_UPDATE_ZDSDM01' STARTING NEW TASK ltask PERFORMING f_go ON END OF TASK
    EXPORTING
      in = lin.

  WAIT UNTIL w_end IS NOT INITIAL.

  WRITE: 'Hi', lnew, l_subrc.

*&---------------------------------------------------------------------*
*&      Form  f_go
*&---------------------------------------------------------------------*
FORM f_go USING par TYPE clike.
  w_end = 'X'.
  RECEIVE RESULTS FROM FUNCTION 'Z_UPDATE_ZDSDM01'
          CHANGING xnew    = lnew
                  EXCEPTIONS lixo = 1 system_failure = 2 communication_failure = 3 OTHERS = 9.
  l_subrc = sy-subrc.
ENDFORM.                    "f_go

regards,

Edgar

Read only

Former Member
0 Likes
583

Hi Deepu,

did you checkd in the debugging...if they are updating and not reflecting in the report.

can you make those parameters to the Global parameters...

then it will reflect..

hope it helps you.

Regards!