cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Proxy and commit issue

Former Member
0 Kudos

Hi,

I want to send data using an ABAP proxy from SAP ECC to PI.

The location where I call the method is in MV50AFZ1 Form uxerexit_delete_document

In my opinion it is not wise to execute a commit work statement in this location. The proxy however needs a commit work to send the data.

I also tried using a CALL FUNCTION ... IN UPDATE TASK. This also doesn't trigger the proxy to send the data.

(and it is not allowed te execute a commit in update task .. .because it's already a "commit".

Is there a way to get this thing working in this way? Or do you always have to program a separate program for sending the data with a proxy??

Thanks

Ron

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

I think the program SAPMV50A has a commit work, that will trigger the proxy.

So you need not code this in the user exit.

Former Member
0 Kudos

Hi Stephan and everybody else,

I thought also that this program has a commit. Because it's a database update of a delivery. This commit is performed in an update task.

But the Message is not sent. It remains in sxmb_moni with a green flag.

So the commit of SAPMV50A does not do the trick.

Any suggestions?

Ron

stefan_grube
Active Contributor
0 Kudos

> This commit is performed in an update task.

Could you use an update task for sending the ABAP proxy also?

Former Member
0 Kudos

Hi Ron

if the message remains with a green flag in sxi_monitor the commit has been performed correctly and this is not anymore a problem of you proy method call. Check if your queues are registered in transaction SMQR. Normaly you can trigger the queue also manually and you should see that your message will be send.

Regards Oliver

Former Member
0 Kudos

By the way, I forgot to mention if you have a commit problem with your proxy, you will have a white flag (commit missing).

Oliver

Former Member
0 Kudos

You are correct!

Some error messages had stopped the queue!

THanks

Ron

Answers (1)

Answers (1)

former_member206760
Active Contributor
0 Kudos

Hi Ron,

Try submitting a report as a background job from the user exit...and inside this report you can write the code to call the proxy + commit.

*Submit report as job(i.e. in background)

data: jobname like tbtcjob-jobname value

' TRANSFER TRANSLATION'.

data: jobcount like tbtcjob-jobcount,

host like msxxlist-host.

data: begin of starttime.

include structure tbtcstrt.

data: end of starttime.

data: starttimeimmediate like btch0000-char1.

  • Job open

call function 'JOB_OPEN'

exporting

delanfrep = ' '

jobgroup = ' '

jobname = jobname

sdlstrtdt = sy-datum

sdlstrttm = sy-uzeit

importing

jobcount = jobcount

exceptions

cant_create_job = 01

invalid_job_data = 02

jobname_missing = 03.

if sy-subrc ne 0.

"error processing

endif.

  • Insert process into job

SUBMIT zreport and return

with p_param1 = 'value'

with p_param2 = 'value'

user sy-uname

via job jobname

number jobcount.

if sy-subrc > 0.

"error processing

endif.

  • Close job

starttime-sdlstrtdt = sy-datum + 1.

starttime-sdlstrttm = '220000'.

call function 'JOB_CLOSE'

exporting

event_id = starttime-eventid

event_param = starttime-eventparm

event_periodic = starttime-periodic

jobcount = jobcount

jobname = jobname

laststrtdt = starttime-laststrtdt

laststrttm = starttime-laststrttm

prddays = 1

prdhours = 0

prdmins = 0

prdmonths = 0

prdweeks = 0

sdlstrtdt = starttime-sdlstrtdt

sdlstrttm = starttime-sdlstrttm

strtimmed = starttimeimmediate

targetsystem = host

exceptions

cant_start_immediate = 01

invalid_startdate = 02

jobname_missing = 03

job_close_failed = 04

job_nosteps = 05

job_notex = 06

lock_failed = 07

others = 99.

if sy-subrc eq 0.

"error processing

endif.