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

Processing log not getting updated for send immediatly

Former Member
0 Likes
3,547

Hi,

I have a custom output type and a Custom function module for issueing the output for delivery, my prob is that it processing log is getting updated for the send in batch and other options but it is not getting updated for the SEND IMMEDIATLY, I am using the same FM for the Output issue I am checking if they have selected output type as 4 if yes, I am calling a FM in perform by saying

PERFORM xxxxxxxx ON COMMIT

and in the perform I am calling a FM

CALL FUNCTION  xxxxxxxxx in BACKGROUND TASK  AS A SEPARATE TASK,

the functioanlity of issueing the output is working but the Processing log is not getting updated.

What might be the problem ? it is getting updated for Send in batch but not for except 4.

Hi,

I have a custom output type and a Custom function module for issueing the output for delivery, my prob is that it processing log is getting updated for the send in batch and other options but it is not getting updated for the SEND IMMEDIATLY, I am using the same FM for the Output issue I am checking if they have selected output type as 4 if yes, I am calling a FM in perform by saying

PERFORM xxxxxxxx ON COMMIT

and in the perform I am calling a FM

CALL FUNCTION  xxxxxxxxx in BACKGROUND TASK  AS A SEPARATE TASK,

the functioanlity of issueing the output is working but the Processing log is not getting updated.

What might be the problem ? it is getting updated for Send in batch but not for except 4.

19 REPLIES 19
Read only

Former Member
0 Likes
2,925

Hi,

Normally it should work with processing option send immediately also.

Try calling the FM TH_IN_UPDATE_TASK before your FM and check.

call function 'TH_IN_UPDATE_TASK'
      importing
        in_update_task = lv_subrc

Regards,

Ankur Parab

Read only

0 Likes
2,925

Hi ,

This did not resolve my issue, it is still not getting updated.Worst thing is I am unable to debug it to know the reason.Any inputs ? Is any one there ?

Edited by: Varun on Jun 22, 2009 12:17 PM

Read only

0 Likes
2,925

Hi,

To debug; just put a breakpoint on it and in your debugger turn update debuggin on and click the "In background task : Do not process" check box in the debugger in the settings tab.

It should go to your FM. If it goes then your FM will be recorded in SM58.

You can debug your FM from there.

Regards,

Ankur Parab

Read only

0 Likes
2,925

The issue is my Program in Form Routine is not getting triggered I have place a break point there and then issued the output but it did not get into my report but I have received email which is my output .

Read only

0 Likes
2,925

Hi,

What does your subroutine and FM do exactly?

Can you give more details?

Regards,

Ankur Parab

Read only

0 Likes
2,925

Hi,

It will fetch all the delivery details and send an email to the external system.We are receiving the email but the log is not updating.

Read only

0 Likes
2,925

Hi,

How are you updating the LOG?

Regards,

Ankur Parab

Read only

0 Likes
2,925

I am updating Log using this form

at every step I am collecting the messages and passing them to this form.

FORM update_nast_log  USING   p_msgid
                              p_msgnr
                              p_msgty
                              p_msgv1
                              p_msgv2
                              p_msgv3
                              p_msgv4.
* Local data declaration
  DATA: lv_msgid LIKE sy-msgid,
        lv_msgnr LIKE sy-msgno,
        lv_msgty LIKE sy-msgty,
        lv_msgv1 LIKE sy-msgv1,
        lv_msgv2 LIKE sy-msgv2,
        lv_msgv3 LIKE sy-msgv3,
        lv_msgv4 LIKE sy-msgv4.

* clear all the local variables
  CLEAR:lv_msgid,
        lv_msgnr,
        lv_msgty,
        lv_msgv1,
        lv_msgv2,
        lv_msgv3,
        lv_msgv4.

* move message ID,number,msg type and the messsages
*     to local variables
  MOVE: p_msgid TO lv_msgid,
        p_msgnr TO lv_msgnr,
        p_msgty TO lv_msgty,
        p_msgv1 TO lv_msgv1,
        p_msgv2 TO lv_msgv2,
        p_msgv3 TO lv_msgv3,
        p_msgv4 TO lv_msgv4.


* Update nast table using nast protocol update
  CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
    EXPORTING
      msg_arbgb = lv_msgid
      msg_nr    = lv_msgnr
      msg_ty    = lv_msgty
      msg_v1    = lv_msgv1
      msg_v2    = lv_msgv2
      msg_v3    = lv_msgv3
      msg_v4    = lv_msgv4.

ENDFORM.                    " UPDATE_NAST_LOG

Read only

0 Likes
2,925

Hi,

I am sorry but i am getting confused.

If you have written the code to send the mail within a perform which is to be called during update and if you are getting the mail it means that the perform is getting called.

If you want to update the log after this then you should call this perform after sending the email.

So where exactly is the problem which you are facing?

Regards,

Ankur Parab

Read only

0 Likes
2,925

Yes, what we are doing is we are updating an internal table at every point(this is being done in the FM), where we want to update the log then passing this itab to the return of the FM after coming out of the FM we are looping at this return table of the FM and then passing the entries to the above perform.

Read only

0 Likes
2,925

Hi,

I am assuming that your code is like this.

PERFORM xxxxxxxx ON COMMIT.

In this perform you are calling the FM to send the delivery to email.

Now the PERFORM to update the log should be called within the FM and not after the FM.

This is because your FM will be started as a separate TASK. So you wont get any return table from it and your log will not be added.

So call the code to update the log within your FM itself.

Regards,

Ankur Parab

Read only

0 Likes
2,925

Hi , I tried with that but that did not solve my issue.

Read only

0 Likes
2,925

Hi Varun

Incase you have your logic for sending the email within the FM and it is working fine then do one thing.

Go into debugging.

Set the checkbox for "In background task : Do not execute" in the settings tab.

Now your FM will not be called. It will be saved as an LUW in SM58.

Debug your LUW from there. Now check that if you are updating the LOG within the FM then why they are not getting updated.

Regards,

Ankur Parab

Read only

0 Likes
2,925

How to go into the Debugging mode, as soon as I issue output for immediate(4) in vl02n and when I open it, it is already processed.We are using SAP 4.7 version.Any inputs ?

Edited by: Varun on Jun 22, 2009 2:30 PM

Read only

0 Likes
2,925

Hi,

Just before you click on SAVE; activate debugging.

Activate update debugging also. Click the check box and save the settings.

Press F8 and continue. When a new window opens up for update debugging in that also check the check box and save the settings and press F8.

Regards,

Ankur Parab

Read only

0 Likes
2,925

Hi Varun

Did this help you ? Is the problem solved?

Regards,

Ankur Parab

Read only

0 Likes
2,925

What is the importance of this

Perform ****************** on commit

in perform

Call Function ***********  in Background task as separate unit,

once I removed this I am etting the email and also processing log is also getting updated, what happens if I remove this ?

Read only

0 Likes
2,925

Hi,

When you call a perform on commit it means that the perform would be called after commit work happens i.e. in the update task.

when you call a FM in background task as a separate unit it means that the FM will be called as a seperate LUW once the commit occurs.

Regards,

Ankur Parab

Read only

0 Likes
2,925

So there will not be much difference apart from some performace prob, am I correct ? If yes then why is the log gettting updated in this mode, I also tried in Debug but once it is coming to my FM, although I pressed f5 it is executing the FM with out returning any values, so I had to remove them, my concern is will there be any unseen issues if I remove them.