Parallel processing of mass data : sy-subrc value is not changed

Hi,
I have used the Parallel processing of mass data using the "Start New Task" . In my function module I am handling the exceptions and finally raise the application specific old exception to be handled in my main report program. Somehow the sy-subrc is not getting changed and always returns 0 even if the expection is raised.
Can anyone help me about the same.
Thanks & Regards,
Nitin

Hi Silky,
I've build a block of code to explain this.
  DATA: ls_edgar TYPE zedgar,
        l_task(40).
  DELETE FROM zedgar.
  COMMIT WORK.
  l_task = 'task1'.
  ls_edgar-matnr = '123'.
  ls_edgar-text = 'qwe'.
  CALL FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' STARTING NEW TASK l_task PERFORMING f_go ON END OF TASK
    EXPORTING
      line = ls_edgar.
  l_task = 'task2'.
  ls_edgar-matnr = 'abc'.
  ls_edgar-text = 'def'.
  CALL FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' STARTING NEW TASK l_task PERFORMING f_go ON END OF TASK
    EXPORTING
      line = ls_edgar.
  l_task = 'task3'.
  ls_edgar-matnr = '456'.
  ls_edgar-text = 'xyz'.
  CALL FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' STARTING NEW TASK l_task PERFORMING f_go ON END OF TASK
    EXPORTING
      line = ls_edgar.
*&      Form  f_go
FORM f_go USING p_c TYPE ctype.
  RECEIVE RESULTS FROM FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' EXCEPTIONS err = 2.
  IF sy-subrc = 2.
*this won't affect the LUW of the received function
    ROLLBACK WORK.
  ELSE.
*this won't affect the LUW of the received function
    COMMIT WORK.
  ENDIF.
ENDFORM.                    "f_go
and the function is:
FUNCTION z_edgar_commit_rollback.
*"*"Interface local:
*"  IMPORTING
*"     VALUE(LINE) TYPE  ZEDGAR
*"  EXCEPTIONS
*"      ERR
  MODIFY zedgar FROM line.
  IF line-matnr CP 'a*'.
*comment raise or rollback/commit to test
*    RAISE err.
    ROLLBACK WORK.
  ELSE.
    COMMIT WORK.
  ENDIF.
ENDFUNCTION.
ok.
In your main program you have a Logical Unit of Work (LUW), witch consists of an application transaction and is associated with a database transaction. Once you start a new task, your creating an independent LUW, with it's own database transaction.
So if you do a commit or rollback in your function the effect is only on the records your processing in the function.
There is a way to capture the event when this LUW concludes in the main LUW. That is the PERFORMING whatever ON END OF TASK. In there you can get the result of the function but you cannot commit or rollback the LUW from the function since it already have implicitly happened at the conclusion of the funtion. You can test it by correctly comment the code I've supplied.
So, if you  want to rollback the LUW of the function you better do it inside it.
I don't think it matches exactly your question, maybe it lead you on the right track. Give me more details if it doesn't.
Hope it helps,
Edgar

Similar Messages

  • The user exit-sy-ucomm value is not changing

    Hi Everyone,
                      I have created a subscreen to be called from the program SAPLXQQM (Notification header).Within that suscreen (0115) I am calling another screen (say,1000) after wrapping it in a FM, as shown below:
    Code in the flow logic of subscreen 0115-> Call Function 'XYZ' .
    FM 'XYZ':
    Function XYZ
    Call screen '1000'
    End Function XYZ
    This is done by pressing a button created on the subscreen with F-code already provided in the enhancement.
    After the processing of the FM the control comes back to the calling screen of the subscreen 0115. Here the value of sy-ucomm is the same as that while calling the FM 'XYZ' .Now the problem here is that this value is not changing even when the control comes back and I do any other event like pressing an 'Enter' or 'Scrolling'.So the FM gets called again and again.
    I want to know why is this hapening and how can I rectify this?Is this because of the way I called the screen 1000 from the subcreen 0115.
    Please reply.
    Regards
    Abhishek

    Hi abhishek,
    Once after completing the processing of ur sub subscreen(0115) u r cming to ur subscreen
    and still getting the same screen(0115) for any other event, it might mean that the events which u r calling are not defined with the respective ok code.
    Bcoz of which every time after calling other events ur sy-ucomm is not getting modified
    bt persists the same old value.
    Pls chk the Function codes neccessary to trigger other events. eg: back button
    regards,
    ajit.

  • In classical report list output  checkbox is value is not changed

    Hi Abapers,
      I am developing one classical  report program, out put list hast one check box.
      I need to read wheather checkbox is checked or not dynamically .
      but the check box value is not changed  if I check or uncheck How can I  
      solve this problem.
      Regards.
       Shashikumar.G

    Hi Abapers,
    I codded as.
    DATA: CHKBOX TYPE C.
    WRITE: CHKBOX AS CHECKBOX INPUT ON.
    it will be displayd on output list  if click on it It will be ticked or unticked it is fine.
    but the value of chkbox is not changed.
    but I need to change the value of chkbox regarding to clicking on it(check, uncheck).
    Regards,
    Shashikumar.G

  • I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.

    I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.
    ===Answer===
    Comment on usual method and solution, by a forum Moderator.
    As long as there are no confounding factors, such as certain extensions, or a user.jsfile the procedure is as follows
    # Open a new tab and type "about:config" in the address bar.
    # In the Search bar type: "newtab"
    # Locate and double click "browser.newtab.url"
    # In the "Enter String Value" box change "'''about:newtab'''" to "'''about:blank'''" and click OK.
    # Verify that the value has changed and now all new tabs will be blank.
    See post under by ''pirate048'' [/questions/976589?page=2#answer-509482] ~J99

    Have to say that I rather agree with Mark..all we want is a simple, unadorned clean page that doe not track and show usage!! WHY NOT!! Is it too simple for developers..we aren't all (nor do we want to be!) software experts! Come on Mozilla..tidy up and clean up..it might be a quicker programme too!!

  • Number of parallel process definition during data load from R/3 to BI

    Dear Friends,
    We are using Bi7.00. We have a requirement in which i should increase the number of parallel process during data load from R/3 to BI.  I want to modify this for a particular data source and check.Can experts provide helpful answers for the following question.
    1) When load is taking place or have taken place, where can we see how many parallel process that particular load has taken.
    2) Where should i change the setting for the number of parallel process for data load (from R/3 to BI) and not within BI.
    3) How system works and what will be net result of increasing or decreasing the number of parallel process.
    Expecting Experts help.
    Regards,
    M.M

    Dear Des Gallagher,
    Thank you very much for the useful information provided. The following was my observation.
    From the posts in this forum, i was given to understand that the setting for specific data source can be done in the infopackage and DTP level, i carried out the same and found that there is no change in the load, i.e., system by default takes only one parallel process even though i maintained 6.
    Can you kindly explain about the above mentioned point. i.e.,
    1) Even though the value is maintained in the infopackage level , will system consider it or not. -> if not then from which transaction system is able to derive the 1 parallel process.
    Actually we wanted to increase the package size but we failed because i could not understand what values have to be maintained  -> can you explain in detail
    Can you calrify my doubt and provide solution?
    Regards,
    M.M

  • Parallel process with reentrant VI have same value in both threads

    Has it been so long since I programmed LabVIEW that I forgot some basic stuff??
    I have a main VI which originally called dynamic processes in parallel.
    I then called the sub-vi's dirtectly and still run them in parallel, but thwey now have seperate names.
    I use a QSM.  Each parallel thread now has it's own QSM, because although I was using a Queue Name for each dynamic queue, the data that was being extracted was shared or done between the two threads.  If I confused everyone with the statement, I shall explain.
    Two parallel processes, calling a QSM (re-entrant).  They have the same number of elements and matching sets.
    EX:
    Process 1          Process 2
    Task1                 Task1
    Task2                 Task2
    Task3                 Task3
    Task4                 Task4
    Task5                 Task5
    Task6                 Task6
    I was expecting each thread (each process) to extract from the queue the list of tasks as entered (from Task1 to Task6).  What the processes were getting was the following:
    Process 1          Process 2
    Task1                 Task1
    Task2                 Task3
    Task4                 Task5
    Task6                 default
    Each Process was sending a different Queue Name to the QSM.  Each queue should have it's own name.
    I need to get this running by tomorrow with no excuse!  So I decided to do a lame workaround by also having 2 QSMs.  That fixed it..
    In each parallel process (which are a copy of each other with different names) there is a call to open a telnet session.  I probed and placed breakpoints in the code.  Although each process has a different name and the call to the function that opens the telnet session is re-entrant, the very same telnet reference number is assigned to both processes.
    Why?  Why would they get the same reference number?  I made all vi's down to (and including) Telnet Open Connection as re-entrant (although it was not needed) and it still assigns the same reference number to each telnet session.  Why?  What I am not seeing?  What am I missing?
    Unfortunately, I cannot post the code..  But it is not complicated code.  Just 2 sessions with different IP addresses.  I would expect different telnet session references... 
    As a matter of fact, I need to try something silly.. 

    I should provide more details with the solution....
    I just have to stop saying "D'Oh!!"
    Okay... here goes...
    In the LVOOP, I am using Notifiers and Semaphores to ensure that a race condition cannot occur.  Works well with previously written code.
    In this particular implementation, I have the same / similar object being created more than once (twice at this time).
    Where I went wrong (D'Oh!!!!), was to have a static name for a given object when creating the Notifier and Semaphore references.  Since the same name was given, so was the reference.  SInce the references were the same, so was the data, and so on.
    D'Oh!!!!!!
    D'Oh!!!!!!
    Now I know why a particular bird was called D'Oh-D'Oh bird... 
    D'Oh!!!  Such a silly mistake...
    D'Oh!!!
    Hope it makes a few people laugh...  or help another bird....

  • Mass data update in Value mapping table

    Hi ,
      I have used Value mapping replication to update the mass data from external source to Value mapping table . Its updatating in Runtime Cache but i want the data to be visible in GUI Value mapping table as well. Is it possible ? Because i doubt that the data in Runtime Cache may get  removed if the system restarts . Can any one help ?
    Thanks
    Laks

    Hi NALLAM GUNA RANJAN,
      Thanks for your prompt reply but i didn't get what you are trying to convey . My issue here is
    Instead of manually entering key-value pair in Value mapping table , I used Value mapping replication ( http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/frameset.htm )
    Its updating the data in Runtime Cache ( you can see this using Cache Monitoring )  but not able to view the data in Actual Value mapping Table (GUI in Directory of SAPXI) I want the data updated using Replication to be visible in GUI table is it possible ?
    Hope you got the question much better now
    Thanks
    Laks

  • How to set a process with more than 10 item values to be changed?

    I am trying to make a "default" button where it resets the Column checkboxes to its original state but I have more than 10 iems and I cant fill them all in the 10 slots that they have. Anyone have any ideas? thanks.
    For example I have columns 1-20 and I want something like col 1-5 to be checked and col 6-20 to be unchecked as default.

    I tried to use process where i declare the new values i.e. ID=1/true, Name=0/false etc. and still nothing happens, anyone have any suggestions?

  • Delivery dates in schedule lines is not changing in sales order

    Dear all,
    delivery dates in schedule lines on line item in sales order is not changing.delivery dates are different in schedule line of partial qtys.i have to do same delivery date on all schedule lines.
    Regards,
    Praveen

    Hi Praveen
    1. Schedule Line dates can be changed manually or by doing an availability check only.
    2. In case if you change the delivery date in the header it will not change automatically in the line item level.
    3. You need to do it manually only.
    kindly let me know more details.
    reg
    dsk

  • Excise base value is not changing in MIGO excise tab for Import  PO scenari

    Dear Gururs,
    We are using MIGO to capture & Post Excise Invoice for our Import PO (PO type ZIMP). the problem is, when we change the qty in MIGO Qty tab, corresponding base value is not getting update in Excise tab. we are not creating the planned cost mIRO directly we do the GRN.
    Please suggest a solution.
    Thanks
    Shital

    Hello Shital  ,
    You are using the India Scenario right?
    The issue can be because you have not assigned a zero tax code to the line item. For India please make the tax code field in PO as mandatory so that the user does not save the PO without atleast a zero tax code.
    Maintain the tax code & proceed. You will see the tab in MIGO.
    Regards
    Plauto

  • Data form input value does not equal spread value

    ***Edit on this.
    Hyperion Planning 9.3.1.2, we are testing out a new application and data form. The data form has the users enter in at the year total level and then spreads out the 12 months upon save.
    If I enter in 100 then save or toggle off then back on the cell, the data form shows as 99.999999999 both on the form and in Essbase via export.
    Our form has the decimals set to a Max of 2 for currency, non-currency and percentage
    Are their any rounding issues in 9.3.1 with using the spread technique?
    Curious to find if others are have or have experienced this problem
    JTS
    Edited by: jts on Dec 10, 2009 11:28 AM

    Still not getting the warm fuzzy. Oracle indicates that this is a Java issue and not a Hyperion issue. It is how Java handles numeric values.
    I indicated that it is a view issue and I need a fix.
    I got Bug 8540616 for this but now I am trying to find the eta on this
    JTS

  • Help! why the value does not change?

    in ViewStack at index=0 (home page) , I pass object to placements (index=1) when I click on a datagrid item.  The name on placements has the value that passed from home page.
    when I return to home page and click on another item on datagrid, I want the new value pass to placements page, but the first item data is still on the placements. How to refresh it?
    I need the value (text) of
    TextInput id="txtName"  on placement page changes as I assign at home page.
    See below
    [Bindable] public var objPlacementMain:Object = new Object;      
    private  function gotoPlacements(event:ListEvent):void{   this.objPlacementMain.name = this.dg.selectedItem.col1;
    this.homePlacement.selectedIndex = 1;
    <mx:ViewStack id="homePlacement">
    <mx:V
    <mx:DataGrid id="dg" itemClick="gotoPlacements(event)">
    <mx:columns>
     <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
     <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
     <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
     </mx:columns>
    </mx:DataGrid>
    <h:placements
    objPlacement="{objPlacementMain}" />
    </mx:ViewStack>
    at placements
    [Bindable] public var objPlacement:Object = new Object;
    <mx:HBox   
    width="100%" height="30">
    <mx:Spacer width="48" height="25"/>
    <mx:Label text="Name " fontWeight="bold" width="51"/> <mx:TextInput id="txtName" text="{this.objPlacement.name }" width="193" editable="false"/>
    </mx:HBox>

    Flex harUI ,
    Thank you very much. I forgot key word [Bindable].
    It works after I add it.

  • :system.cursor_block value does not change when mouse click

    Form created with Forms version 6.0.8.8.0. Consists of a control block that has the toolbar buttons, a filter control block that contains item, and a data block. The filter control block and data block are on a tabbed canvas. There are 3 tabs with corresponding filter control block and data block on each.After the data block is queried, code sets the navigation to the control block with the go_item built-in. The user would use a mouse click on the filter control block on one of the tabs to activate an LOV, code is in a generic when-mouse-click trigger that will determine the item focus with the value in the system variable :system.cursor_block. Works for the first tab. Does not work for 2nd or 3rd tab. On-error trigger does not capture any error. Values for :system.cursor_block for tab 1 show that value before mouse click is 'control.detail' and after mouse click is 'filter.a'. For tabs 2 and 3 the value before mouse lick is 'control.detail' and after mouse click is 'control.detail' instead of 'fiter.b' or 'filter.c'. Verified that the 3 filter blocks are identical. Can anyone shed some light on this anomoly? I have been looking for this solution (many different iterations and changes to trap it) for too long.

    :System.Cursor_Block reports the name of a block, NOT a BlockName.ItemName.
    Use :System.Trigger_Item with your mouse click, or :System.Cursor_Item.

  • Route value is not changing for item level in VA02 when we change shipping

    Hi experts,
    I was facing a problem in VA02. When we change shipping condition type in header level,
    the item level route data has to be changed. But in  my case it is not happening. This is happening for only one line item and rest of the line items route values are same as prvious(last) shipping condition type.
    Where do i change the code.
    Can anyone please explain this one and help me out this.<priority normalized by moderator>
    regards,
    Sree.
    Edited by: Vinod Kumar on Aug 26, 2011 1:29 PM

    a

  • SAP renamed 'Purchase Order Data' tabs but it is not changed in menu bar

    In VA01/VA02/VA03  transactions,  SAP has renamed the "Purchase  Order Data" tabs at header and item level to "Order Data" but the Goto > Header   and    Goto > Item    menu paths still have "Purchase Order Data" as the name.  This is inconsistent.  Is there an SAP fix for it?

    Try wit this report RSLANG20
    Best regards,
    Mirek

Maybe you are looking for

  • Date format Problem in OAF R12 Urgent Please help!!!

    We have acustom application in OAF which was developed in 11i. Now we migrated the same to R12. In this there are two date fileds getting dispayed on the page and the query for the same is SELECT TO_CHAR (SYSDATE, 'dd-mm-yyyy') AS CURRENT_DATE, UPPER

  • Simple pulse generation toggle

    Below is an excerpt from the 6602 manual.  The figure may not show so I've attached a word document showing it.  I want to do exactly what this says but am not sure how to make it happen.  I need to generate a quadrature signal and I think this would

  • Problem with placing dynamic images.

    I have a 800x600 file. It is being used for a PhotoSlide show. The images are displayed dynamically, as external files. Some of the photos will be taken 1 hour before the presentation, so I have it set up to display img001.jpg, img002.jpg, img003.jpg

  • Report info about a specific machine

    Hi, Does somebody have a report that gives all information in SCCM about a specific machine between a timespan (like between November 1st and November 21st)? We would like as much as possible info about a specific workstation that's available in the

  • 27" imac flashes colored pixels and freezes

    I have recently notices a stream of flashing colored pixels on my screen whenever there is significant activity. These pixels look like asterisks, and they flash in diferent colors in diferent areas of the screen, almost like christmas lights I have