Application Development 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: 

Calling a Function in SAP

Former Member
0 Kudos

I'm calling a Transaction form my Function module like

CALL TRANSACTION 'ZLVSCRAP' USING i_bdcdata

  • MODE v_mode

  • UPDATE c_s

  • MESSAGES INTO i_messages.

But when I’m in the PGM, i can not do commits, because it jumps back into my Function, and dose not finish the rest of the logic in the called pgm? And with me doing commits it thinks i have hold on orders that were created in the called pgm which also hangs me up?

Please help?????

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Just a check - have you tried changing the update-mode in the call-transaction?

11 REPLIES 11

Former Member
0 Kudos

Just a check - have you tried changing the update-mode in the call-transaction?

0 Kudos

Change Wich one ?

MODE v_mode

UPDATE c_s

0 Kudos

Hi,

Mode is to select whether Foreground or Background or only when Errors,

Update is to inform whether the update is synchronous or asynchronous.

Try to do a commi and wait after the Call Transaction. Sometimes the system takes some time to commit the changes.

Regards

Subramanian

0 Kudos

Hi ,

i try that, but is dose not help.

i have a problem when i',m in the calling pgm and it hangs up in the pgm when it needs to do a commit. Is there any command that can be use that it will not jump out of the pgm?

0 Kudos

Hi Richard,

This is an intended behaviuor of 'Call transaction'. To avoid this you should use the addition 'call transaction...options from opt' ...

inside the options table there is a field called 'RACOMMIT', this has to be set to 'X"..then it will not return to the calling program on encountering a commit.....

Thanks.

0 Kudos

Hi

i try this optons but i can not make it work

getting error on call

CALL TRANSACTION 'ZLVSCRAP' USING i_bdcdata

OPTIONS FROM RACOMMIT

MODE v_mode

UPDATE c_s

MESSAGES INTO i_messages.

give me and error that you can not use mode and update with options ?

any idea's

thanks

0 Kudos

Hi,

DATA: ctu_params_tmp LIKE ctu_params.

CLEAR: ctu_params_tmp.

ctu_params_tmp-dismode = 'N'.

ctu_params_tmp-updmode = 'S'.

ctu_params_tmp-defsize = 'X'.

ctu_params_tmp-racommit = 'X'.

CALL TRANSACTION 'MB01' USING i_bdcdata3 OPTIONS FROM ctu_params_tmp

MESSAGES INTO messtab.

Try this.

Regards

Subramanian.

0 Kudos

Hi,

thank you very very much, this help me out a lot. This was the answer i was looking for. This will solve any other calls that are in my Function.

If you ever need any thing from me just let me know.

Richard H ARellano

Sikorsky Aircraft

203-386-4348

again Thanks

0 Kudos

Hi ,

i did use your idea but when i excute the statment in the v_mode "a" it works fine but when i set it back to "N" mode it give me 1001 error in the message which its telling me that ther is 00 344 No batch input data for screen & &

DATA: ctu_params_tmp LIKE ctu_params.

CLEAR: ctu_params_tmp.

ctu_params_tmp-dismode = v_mode.

ctu_params_tmp-updmode = c_s.

ctu_params_tmp-defsize = 'X'.

ctu_params_tmp-racommit = 'X'.

CALL TRANSACTION 'ZLVSCRAP' USING i_bdcdata

OPTIONS FROM ctu_params_tmp

MESSAGES INTO i_messages.

Former Member
0 Kudos

after CALL TRANSACTION , try this and check out if it works

LEAVE TO LIST-PROCESSING.

Former Member
0 Kudos

Hi ,

i did use your idea but when i excute the statment in the v_mode "a" it works fine but when i set it back to "N" mode it give me 1001 error in the message which its telling me that ther is 00 344 No batch input data for screen & &

DATA: ctu_params_tmp LIKE ctu_params.

CLEAR: ctu_params_tmp.

ctu_params_tmp-dismode = v_mode.

ctu_params_tmp-updmode = c_s.

ctu_params_tmp-defsize = 'X'.

ctu_params_tmp-racommit = 'X'.

CALL TRANSACTION 'ZLVSCRAP' USING i_bdcdata

OPTIONS FROM ctu_params_tmp

MESSAGES INTO i_messages.