Bug in SAP B1PL 42 on validate events and exiting functions

I've recently tested an upgrade to PL 42. There seems to be an issue when trying to exit a function or trying to set return false.
Here is a sample code of what i use to accomplish in previous patches.
Case SAPboiuCOM.BoEventTypes.et_VALIDATE
       Select Case pVal.ItemUID
             Case "matPay"
                    If pval.InnerEvent Then
                         do nothing
                     else
                         Dim oMatrix as SAPbouiCOM.Matrix = oForm.Items.item(pVal.ItemUID).Specific
                         Select Case pVal.ColUID
                                Case "RegHours" : if sglRegHours = oMatrix.Columns.Item(pVal.ColUID).Cells.Item(CInt(val(pval.Row)).Specific.Value then Return False
                         End Select
No matter what I try here, Return False, Exit Function, it does not work.  It keeps executing the rest of the code.  And yes, the statement gets executed.
Any one else has found something similar to this odd behavior ?
any comments or suggestions would be greatly appreciated
Edited by: Neftali Figueroa on Jan 31, 2008 10:58 AM

Well
I found a workaround for this odd problem.  What I did was ... since the evaluation part of the code (if statement) was getting executed right, i changed the statement like this
blnValueEdited = (sglRegHours <> Csgl(oMatrix.Columns.Item(pVal.ColUID).Cells.Item(CInt(val(pval.Row)).Specific.Value ))
and then evaluate the blnValueEdited for true

Similar Messages

  • What are the main sap script events and their functionality and usage?

    what are the main sap script events and their functionality and usage?

    Hi,
    Inside the Script, there are events like Top of Page, End of page etc.
    Please elaborate about your requirement.
    Best regards,
    Prashant

  • Process events and business functions: automatic insertion of process event

    Here is the scenario: I defined (in Designer 9.0.4.5.6) a number of business functions. Some of them are basic functions, others are Business Rules. When I am trying to link them up the following happens: I have a function FUNCCON31 that I want to connect to BR_OK41. In FUNCCON31 I define under the Triggering node the BR_OK41 by means of the Create Reference button.
    This is accepted by Designer, but more often than not after this has been done I requery and I will find that instead of the BR_OK41 a Process Event (PE) will have replaced the BR_OK41. For the sake of argument this PE is named END-CON31. When I move to this PE, it will have a number of nodes underneath its definition. One of them will say Triggered by Functions, another Triggering Functions and they are filled with the correct To and From references; it all makes sense. Elements are linked up appropriately, but where does this seemingly automatic insertion of the PE come from??? It is annoying as I have not specifically defined it. Am I missing something vital?
    Hope somebody takes trouble to read this scenario and please get back to me, as it driving me insane. Thanks in advance!
    Kind regards,
    Vik

    Always remember to start the process the itemtype/itemkey combination should be unique. When you try to start the second process through the event, the itemkey remains same for the second process. So it will not start the process, aslo it will not show any error.
    To avoid this try to call the process of another itemtype. Or else if you want to create both process under same itemtype, you have to write a rule function and change the event key in the rule function.

  • Focus after Setting a Form Value within the Validate Event ( =8.8)

    Hi
    Setting Values within Validate Event sets Focus incorrectly on SAP >= 8.8
    The following  example works fine  on SAP 2007.
    Why i don't like this behaviour
      -I didn't found an easy workaround to fix it
      -SetMatrixCellWithoutValidation has the right behaviour but only works with Userdefined - Columns
      -It's a quite common usecase to validate something and in the same step set some values after successful validating (or cancel the input by using BubbleEvent = False)
      -It just worked for 6 years now
      -I have developed around 20+ AddOns and i'm running into this Regression Issue more and more.
    But maybe i'm just missing something.
    So how would you solve the following code now with Versions >= 8.8 ?
    Thanks for any enlightment!
    private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                // 11.08.2011 knp
                // use case is for example setting the price according a custom price table
                // it's triggered by the item column in the sales order matrix and sets the unit price
                // Expected: Focus is on the column after "Item" column
                // Result:   Focus is on column after the "Unit Price" column
    validation
                if (pVal.InnerEvent == false)
                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)
                        if ((pVal.FormTypeEx == "139"))
                            if (pVal.BeforeAction == true)
                                if (pVal.ItemUID == "38")
                                    if (pVal.ColUID == "1") // item code
                                        SAPbouiCOM.Matrix oMtx = (SAPbouiCOM.Matrix)SBO_Application.Forms.Item(pVal.FormUID).Items.Item("38").Specific;
                                        SAPbouiCOM.EditText oEd = (SAPbouiCOM.EditText)oMtx.Columns.Item("14").Cells.Item(pVal.Row).Specific;
                                        oEd.Value = "2";

    Hi
    Try this
    private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                BubbleEvent = true;
                // 11.08.2011 knp
                // use case is for example setting the price according a custom price table
                // it's triggered by the item column in the sales order matrix and sets the unit price
                // Expected: Focus is on the column after "Item" column
                // Result:   Focus is on column after the "Unit Price" column
    validation
                if (pVal.InnerEvent == false)
                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)
                        if ((pVal.FormTypeEx == "139"))
                            if (pVal.BeforeAction == true)
                                if (pVal.ItemUID == "38")
                                    if (pVal.ColUID == "1") // item code
                                        SAPbouiCOM.Matrix oMtx = (SAPbouiCOM.Matrix)SBO_Application.Forms.Item(pVal.FormUID).Items.Item("38").Specific;
                                        SAPbouiCOM.EditText oEd = (SAPbouiCOM.EditText)oMtx.Columns.Item("14").Cells.Item(pVal.Row).Specific;
                                        oEd.Value = "2";
                                        oMtx.Columns.Item("1").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular, 0);
    Regards
    Arun

  • What is the diffrence between sap events and application events

    Hi all,
    what is the diffrence between sap events and application events.Can any one tell me with examples.
    regards,

    Hi,
    Look at this,
    <b>System Events (Default)</b>
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    <b>Application Events</b>
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Hope u understood.
    Thanks&Regards,
    Ruthra.R

  • BUGS IN SAP BI 7.0

    Hi,
    I am new to this forum and am learning SAP BI 7. Can anyone tell me about the real time BUGS in SAP BI 7 and the solutions to them. I will be glad to award points.
    Regards,
    Suman

    Hi,
    this notes contain the SAPBINews for Support Packages for SAP NetWeaver 7.0 BI ABAP. They contain a list of notes that describe BI-relevant corrections and enhancements in BI Support Packages (part of SAP NetWeaver 7.0 Support Packages). This notes will be updated when other notes are added.
    Take a look:
    [SAPBINews NW7.0 BI Support Package 05|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=829625]
    [SAPBINews NetWeaver 7.0 BI Support Package 06|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=872278]
    [SAPBINews NetWeaver 7.0 BI Support Package 07|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=872279]
    [SAPBINews NetWeaver 7.0 BI Support Package 08|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=872280]
    [SAPBINews NetWeaver 7.0 BI Support Package 09|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914303]
    [SAPBINews NetWeaver 7.0 BI Support Package 10|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914304]
    [SAPBINews NetWeaver 7.0 BI Support Package 11|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914305]
    [SAPBINews NW 7.0 BI Support Package 12|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=914306]
    [SAPBINews NetWeaver 7.0 BI Support Package 13|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=991093]
    [SAPBINews NetWeaver 7.0 BI Support Package 14|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=991094]
    [SAPBINews NetWeaver 7.0 BI Support Package 15|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=991095]
    [SAPBINews NetWeaver 7.0 BI Support Package 16|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1074388]
    [SAPBINews NetWeaver 7.0 BI Support Package 17|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1106569]
    SP17 is the latest Support Package delivered with SPS15.
    Regards
    Andreas

  • Multiple validate events generated for a new matrix

    I have added a new tab to the item master form which has a matrix grid on it.
    This works fine until I attempt to move to the previous or next record whilst the new tab is visible.
    What happens then is that every column on every line of the matrix causes a validate event to be triggered, it even triggers the event for hidden columns.
    This is really affecting my form and I cannot understand why so many events are generated, does anyone have any odeas?
    I am not sure if it is relevant but I have noticed that when moving through the data a click event is generated on item 41 within the item master form but i am not certain what this item is - could it be the "Move data" button from the toolbar?
    Gordon Wood

    Hi ...
    I would try putting a BubbleEvent = False at a certain point in the event to cancel further execution.
    You could also use the iteration of If pval.InnerEvent = True to catch and further execution, like this
          CASE et_Validate
                   If pval.InnerEvent = True Then BubbleEvent = False
    hope it helps

  • How do I report a bug for SAP 3D Visual Viewer?

    How do I report a bug for SAP 3D Visual Viewer?
    I have version 8.0.100.27428, Jun 18 2014

    Hi Ellen,
    Hope you are doing good.
    The best option would be to raise a OSS incident in the component: CA-VE-VEV or CA-VE-CAD so that my colleagues can actually investigate this further and release a bug patch if needed.
    Thank you!
    Kind Regards,
    Hemanth
    SAP AGS

  • Jobchain scheduling with EVENTs and in different SAP systems or isol. grou

    Hi,
    I have the following task:
    - Jobchain A in SAP system 1 raises EVENT E1
    - Jobchain B in SAP system 1 raises EVENT E2
    - Jobchain C should run after A and B in SAP system 2.
    Jobchain A and B are defined in isolation group I1.
    Jobchain C is defined in isolation group I2.
    Where and how do I have to define the EVENTs.
    We have a full demo version.
    Thanks.
    Br
    Günne

    Hi Günne,
    The main idea of isolation groups is that there are no dependencies between objects/jobs/... in different isolation groups.
    So the job chains need to be in the same isolation group.
    Kind regards,
    Anton Goselink.

  • Validate event performance problem

    Dear all,
    My problem is B1 run with my addon when copy from purchase order (with a lot of items) to good receipt PO spend a lot of time.
    I tested with 2 cases as follows:
    case 1: add filter to 143
    oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_VALIDATE)
    oFilter.AddEx("143")
    case 2: no filter to 143
    oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_VALIDATE)
    'no filter to 143    oFilter.AddEx("143")
    case 1 time used is 26s, case 2 time used is 10s.
    I have commented my code with validate event but still spend a lot of times to load. It seems a lot of system validate event go into addon and cause performance issue. but I need to check if some value change and then update value and so which other event I can used to replace validate event?
    Regards,
    David

    Dear Eric,
    B1 version: 8.82(8.82.075) PL 11
    In my addon we need to do 2 things:
    1. Update sum of Quantity in matrix on screen:
    If pVal.ItemUID = "38" Then
                            If pVal.InnerEvent = False Then
                                Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.GetForm(pVal.FormTypeEx, pVal.FormTypeCount)
                                If (pVal.ColUID = "U_Itm_Desc" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.ItemChanged = True) Or _
                                (pVal.ColUID = "11" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.ItemChanged = True) Then
    Dim mat As SAPbouiCOM.Matrix = oForm.Items.Item("38").Specific
            Dim sum As Integer = 0
            If mat.VisualRowCount > 0 Then
                For i As Integer = 1 To mat.VisualRowCount
                    Dim curQty As Integer = CInt(mat.Columns.Item("11").Cells.Item(i).Specific.value)
                    sum = sum + curQty
                Next
                oForm.DataSources.UserDataSources.Item("dsQty").ValueEx = sum
            Else
                oForm.DataSources.UserDataSources.Item("dsQty").ValueEx = 0
            End If
                                End If
                            End If
                        End If
    2. set due date = posting date if posting date is changed
    If (pVal.ItemUID = "10" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.ItemChanged = True) Then
                                Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.GetForm(pVal.FormTypeEx, pVal.FormTypeCount)
                                If oForm.Mode <> SAPbouiCOM.BoFormMode.fm_FIND_MODE And oForm.Items.Item("12").Specific.value <> oForm.Items.Item("10").Specific.value Then
                                    oForm.Items.Item("12").Specific.value = oForm.Items.Item("10").Specific.value
                                End If
                            End If
    Regards,
    David

  • [svn:osmf:] 15068: Fix bug FM-603: Need to signal complete event when live stream is unpublished.

    Revision: 15068
    Revision: 15068
    Author:   [email protected]
    Date:     2010-03-26 10:10:58 -0700 (Fri, 26 Mar 2010)
    Log Message:
    Fix bug FM-603: Need to signal complete event when live stream is unpublished.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-603
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamCodes.as
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamTimeTrait.as

    I have at least now managed to narrow down the problem.
    I took a guess at the packages that were causing problems, and seems I guessed right.
    By following this guide: http://wiki.archlinux.org/index.php/Downgrade_packages
    I downgraded both libgl to version 7.7-1 and ati-dri to 7.7-1, and now I can X starts correctly.
    I guess I'll need to figure out how to file a bug on those packages.

  • VALIDATE Event???????? - Help Me

    Hi all,
    I want to validate some fields before saving.If i used VALIDATE event,it will call at the
    textbox lost focus.So i want to validate the fields only after clicking the OK button.
    ''''''''''''''' This my Coding
    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_VALIDATE And pVal.BeforeAction         = False Then
          Select Case pVal.FormUID
             Case "OMForm"
                 '''' Operation Id
                  If CStr(frm.DataSources.UserDataSources.Item("OM_opid").Value).Equals("") Then
                                app.StatusBar.SetText("Operation ID must be entered!!!", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                       BubbleEvent = False
                  End If
                       '''' Description
                   If CStr(frm.DataSources.UserDataSources.Item("OM_desc").Value).Equals("") Then
                            BubbleEvent = False
                         app.StatusBar.SetText("Operation Name must be entered!!!", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                  End If
          End Select
    End If
    PLEASE ANY HELP ADVANCE!!!
    Regards,
    Suresh.G

    Well, yes, you can decide to do the validation only when the OK button is pressed.
    All you have to do is:
    1. catch the press button event BEFORE any processing is done by B1
    2. read the values you want to validate from the form
    3. apply your validation logic
    4. if the validation is successful, then return the control to B1 with BubbleEvent set
    to true, otherwise open a message box informing the user that the validation is not
    passed and why and return the control to B1 with BubbleEvent set to false
    Makes sense ?

  • Bug in 10.1: Moving projects to events

    I converted a bunch of projects after installing 10.1, which now appear under Updated Projects. I am now trying to move each of the updated projects to its corresponding event, which appears to be the way that the new 10.1 libraries are meant to be organized.
    I can just drag and drop small projects, containing say 20 min or less footage, to different projects fairly quickly. However, once I start to drag a project containing an hour or more of DV or HD footage, the spinning ball appears. I literally have to drag the spinning ball to the target event, and apply a weight onto my mouse so that it continues to be pressed down. I then have to leave my computer for several minutes, sometimes 10 minutes or longer, until the spinning ball returns to a normal mouse cursor, and the project actually gets moved to its event. This is ridiculous.

    Hi !
    I found out where the problem is. On startup Default setting is checked in this is problem. When you uncheck this option, encoding list is not repopulated. So you have force it (by closing Preferences window down and opening it again) and then it works. Coworker of mine disovered this quite accidentally. This should be fixed, by either populating list always, or repopulating list after option is checked. I suppose first option would be better.
    Andy

  • [svn:fx-trunk] 12542: When adding a mask to the display list need to validate it and all its children .

    Revision: 12542
    Revision: 12542
    Author:   [email protected]
    Date:     2009-12-04 10:38:32 -0800 (Fri, 04 Dec 2009)
    Log Message:
    When adding a mask to the display list need to validate it and all its children.  Previously the children were not validated and their display list was updated before properties were committed or measure was done.  RichText was not set up to handle this.
    QE notes:
    Doc notes:
    Bugs: SDK-24511
    Reviewer:  Evtim, Deepa
    Tests run: checkintests, fxg, primitives, Group
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24511
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as

    AFAIK, the only way to do this is to write a system modifcation.
    The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
    I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer.

  • Sample prog's on LDB using Get events and also using LDB_PROCESS

    Hello,
    Can any one send me programs on LDB by linking it to an executable program using get event and also by using the Function Module LDB_ PROCESS.
    Please do not provide me the Example prog's available in SAP HELP
    If you have any sample prog's then please provide them.
    Have a great day!
    Thanks & Regards,
    Krishna Chaitanya

    hi,
    A sample prog with LDB PNP
    *& Report ZH_REPT_PAYMENT *
    report zh_rept_payment line-size 80 no standard page
    heading.
    tables: pernr, " Standard Selections for HR Master Data Reporting
    pcl1, " HR Cluster 1
    pcl2, " HR Cluster 2
    pa0009,
    PA9001,
    PA9006,
    pa0002,
    pc260 , " Cluster Directory for Payroll Results
    bnka .
    Infotypes
    infotypes: 0001. " Organizational Assignment
    Declaration of Internal Tables
    data : bnka1 like bnka occurs 0 with header line .
    data: begin of t_int_rep occurs 100,
    bankl like pc209-bankl, " Bank Number
    zlsch like pc209-zlsch, " Payment method
    pernr like pernr-pernr, " Employee Number
    ename like pernr-ename, " Employee Name
    bankn like pc209-bankn, " Bank Account Number
    betrg like pc209-betrg, " Amount to be transfered
    zweck like pa0009-zweck, " Purpose
    end of t_int_rep.
    data: begin of int_rep occurs 100,
    bankl like pc209-bankl, " Bank Number
    zlsch like pc209-zlsch, " Payment method
    pernr like pernr-pernr, " Employee Number
    ename like pernr-ename, " Employee Name
    bankn like pc209-bankn, " Bank Account Number
    betrg like pc209-betrg, " Amount to be transfered
    zweck like pa0009-zweck, " Purpose
    begda like pa0009-begda, "Begin date
    end of int_rep.
    Declaration of Data Variables
    data: ws_betrg like pc209-betrg, " BT Amount
    w_val like spell occurs 0 with header line,
    int_rep1(6), " TYPE I, " Employee Number
    cnt type i value 0, " Counter
    calcmolga like t500l-molga value '40', " Country Grouping
    v_id(15),
    calc_currency like t001-waers value 'INR'. " Currency
    data : ctr type i,
    dt_merge like pa0009-begda.
    data: ws_totemp(6) type c,
    ws_totamt(20) type c,
    r_mth(9) type c,
    ws_fpbeg(6) type c,
    ws_fpend(6) type c,
    ws_mthyr(6) type c,
    ws_mthyr_r(14) type c,
    r_mth_t(3) type c,
    ws_amt(8) type c,
    ws_bankl(14) type c,
    ws_date(6) type c,
    amount_word(500),
    total_page type i,
    pages type i,
    remain type i.
    data begin of i_spell.
    include structure spell .
    data end of i_spell .
    data : c_molga type t500l-molga value '40',
    c_banks type bnka-banks value 'IN'.
    Standard Includes
    include rpc2cd09. "Cluster CD data definition
    include pc2rxin0.
    include rpc2rx09.
    include rpppxd00. " Data Definition buffer PCL1/PCL2
    include rpppxd10. " Common Part buffer PCL1/PCL2
    include rpppxm00. " Buffer Handling RoutinePCL1/PCL2
    include zrpc2rox2. " Data Definition POCLSTERS (not J,K,U)
    Selection Screen
    selection-screen begin of block b1 with frame title text-001.
    parameter: pa_mth(2) type c default sy-datum+4(2) obligatory,
    pa_year(4) type c default sy-datum(4) obligatory,
    p_bankl like pc209-bankl, " Bank Number
    p_zlsch like pc209-zlsch. " Payment method
    selection-screen end of block b1.
    save_calc_currency = calc_currency.
    count_top = 0.
    get_pernr_flag = 0.
    Top-Of-Page
    top-of-page.
    perform convert_month using pa_mth(2) r_mth.
    ws_mthyr_r = r_mth.
    concatenate ws_mthyr_r pa_year into ws_mthyr_r separated by space.
    SKIP 5.
    skip 1.
    skip 4.
    if int_rep-bankl eq ' '.
    if int_rep-zlsch eq 'C' or int_rep-zlsch eq 'E' or
    int_rep-zlsch eq ' '.
    write: /1(85) 'CHEQUE PAYMENT STATEMENT'(047) centered.
    elseif int_rep-zlsch eq 'L'.
    write: /1(85) 'DEMAND DRAFT STATEMENT'(047) centered.
    endif.
    else.
    write: /1(85) 'BANK TRANSFER STATEMENT'(002) centered.
    endif.
    skip.
    write: /34 ws_mthyr_r,
    62 'Page :'(008),69(2) sy-pagno intensified off,
    ' Of ',78(2) pages intensified off.
    clear pages.
    read table bnka1 with key bankl = int_rep-bankl .
    if sy-subrc = 0.
    if int_rep-zlsch eq 'T'.
    write:/03(10) 'Bank Name : ', bnka1-banka.
    write:/03(10) 'Branch : ', bnka1-brnch.
    write:/03(10) 'Address : ', bnka1-stras.
    endif.
    endif.
    skip.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 2(5) 'Sl.No'(002),
    7 sy-vline, 8(8) 'Emp.No.'(003),
    16 sy-vline,17(35) 'Employee Name'(004).
    *--added for Demand Draft
    if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
    write : 47 sy-vline, 48(15) 'Payable at'(005).
    else.
    write : 47 sy-vline,48(15) 'Account No.'(005).
    endif.
    write: 63 sy-vline,64(16) 'Amount'(006),
    80 sy-vline.
    write:/1(80) sy-uline.
    end-of-page.
    write:/1(80) sy-uline.
    write:/2 'Printed on ', sy-datum.
    Start-of-selection.
    start-of-selection.
    *perform h_headr.
    ctr = 0.
    set margin 5.
    call function 'RP_GET_CURRENCY'
    exporting
    molga = calcmolga
    importing
    waers = calc_currency
    exceptions
    others.
    if sy-subrc ne 0.
    calc_currency = 'DEM'.
    calc_currency = save_calc_currency.
    endif.
    get pernr.
    cd-key-pernr = pernr-pernr.
    perform import_cluster.
    get_pernr_flag = 1.
    check : ocd-version-molga eq calcmolga.
    The table 'tabpernr' is filled with the personnel numbers
    and is used after selection is finished.
    move-corresponding pernr to tabpernr.
    append tabpernr.
    The table 'tab_rgdir' is filled
    loop at rgdir.
    rx-key-pernr = pernr-pernr.
    unpack rgdir-seqnr to rx-key-seqno.
    perform int_tab. "fill tab_rgdir
    perform import_bt.
    perform validate.
    endloop.
    End of Selection
    end-of-selection.
    *perform h_headr.
    perform convert_date_a using pa_mth r_mth_t.
    sort int_rep by bankl zlsch pernr betrg descending.
    delete adjacent duplicates from int_rep
    comparing bankl zlsch pernr .
    sort int_rep by bankl zlsch bankn . "PERNR.
    loop at int_rep.
    at new bankl.
    select single * into bnka1 from bnka
    where banks = c_banks and
    bankl = int_rep-bankl .
    append bnka1.
    clear bnka1.
    endat.
    endloop.
    for Demand Draft - purpose added
    loop at int_rep.
    concatenate pa_year(4) pa_mth(2) '01' into dt_merge.
    select single * "zweck into int_rep-zweck
    from pa0009 where
    pernr = int_rep-pernr and
    bankl = int_rep-bankl and
    zlsch = int_rep-zlsch
    and begda <= dt_merge and
    endda >= dt_merge .
    if sy-subrc = 0.
    int_rep-zweck = pa0009-zweck.
    modify int_rep.
    endif.
    endloop.
    *-for DD and Chq sorted by PAyable at and EMPNO wise
    if p_zlsch = 'T' .
    sort int_rep by bankl zlsch bankn . "PERNR.
    else. "added for "payable at" for DD/Chq
    else.
    sort int_rep by zweck pernr . "PERNR.
    endif.
    *delete adjacent duplicates from int_rep.
    t_int_rep] = int_rep[.
    loop at int_rep.
    *-for page of page no.
    total_page = 0.
    loop at t_int_rep where bankl = int_rep-bankl
    and zlsch = int_rep-zlsch.
    total_page = total_page + 1.
    endloop.
    pages = total_page div 25.
    remain = total_page mod 25.
    comment bcoz its adding one extra page no.
    done as on 29/11/2004
    if remain > 0.
    pages = pages + 1.
    endif.
    **-end
    at new bankl.
    ctr = 0 .
    new-page.
    endat.
    at new zlsch.
    ctr = 0 .
    new-page.
    endat.
    clear v_id.
    select single natio
    into pa0002-natio
    from pa0002
    where pernr eq int_rep-pernr.
    *-testing......for soma
    if ctr > 24.
    ctr = 0 .
    write:/1(80) sy-uline.
    new-page .
    endif.
    ctr = ctr + 1 .
    cnt = cnt + 1.
    pack int_rep-pernr to int_rep1.
    write:/1 sy-vline, 2(3) cnt intensified off,
    7 sy-vline, 9(6) int_rep1 intensified off,
    16 sy-vline,17(35) int_rep-ename intensified off .
    if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
    write : 47 sy-vline,48(15) int_rep-zweck intensified off.
    else.
    write:
    47 sy-vline,48(15) int_rep-bankn intensified off .
    endif.
    write: 63 sy-vline,64(16) int_rep-betrg
    intensified off currency 'INR',
    80 sy-vline.
    ws_betrg = ws_betrg + int_rep-betrg.
    *-testing......for soma
    skip.
    write :
    /1 sy-vline, 7 sy-vline ,16 sy-vline ,47 sy-vline,63 sy-vline,80
    sy-vline .
    *-end testing......for soma
    at end of zlsch.
    if int_rep-bankl = ' '.
    call function 'HR_IN_CHG_INR_WRDS'
    exporting
    amt_in_num = ws_betrg
    importing
    amt_in_words = amount_word
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    w_val-word = amount_word.
    concatenate 'INR.' w_val-word into w_val-word
    separated by space.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 7 'Total transfer:'(009),
    64(16) ws_betrg intensified off currency 'INR',
    80 sy-vline.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
    80 sy-vline.
    write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
    80 sy-vline.
    write:/1(80) sy-uline.
    clear: ws_betrg,cnt.
    skip 2.
    write: /2 'Prepared by :'(010), '_______________'(013),
    45 'Checked by :'(011),'_______________'(013).
    skip 2.
    write: /2 'Printed On ', sy-datum,
    45 'Approved by :'(012),'_______________'(013).
    clear sy-pagno.
    endif.
    endat.
    at end of bankl.
    if int_rep-bankl ' '.
    call function 'HR_IN_CHG_INR_WRDS'
    exporting
    amt_in_num = ws_betrg
    importing
    amt_in_words = amount_word
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    w_val-word = amount_word.
    concatenate 'INR.' w_val-word into w_val-word
    separated by space.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 7 'Total transfer:'(009),
    64(16) ws_betrg intensified off currency 'INR',
    80 sy-vline.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
    80 sy-vline.
    write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
    80 sy-vline.
    write:/1(80) sy-uline.
    clear: ws_betrg,cnt.
    skip 2.
    write: /2 'Prepared by :'(010), '_______________'(013),
    45 'Checked by :'(011),'_______________'(013).
    skip 2.
    write: /2 'Printed on ', sy-datum,
    45 'Approved by :'(012),'_______________'(013).
    clear sy-pagno.
    NEW-PAGE.
    endif.
    endat.
    endloop.
    End of Page
    end-of-page.
    write: /2 'Prepared by :'(010), '_______________',
    45 'Checked by :'(011),'_______________'.
    *& Form IMPORT_CLUSTER
    Importing Data from Cluster *
    form import_cluster.
    sy-subrc = 0.
    rp-imp-c2-cd.
    if sy-subrc eq 0.
    if cd-version-number ne ocd-version-number.
    endif.
    endif. " SY-SUBRC EQ 0
    endform. " IMPORT_CLUSTER
    *& Form INT_TAB
    Filling internal table tab_rgdir form int_tab.
    *Fill internal table tab_rgdir.
    move-corresponding rgdir to tab_rgdir.
    tab_rgdir-pernr = pernr-pernr.
    append tab_rgdir.
    endform. " INT_TAB
    *& Form IMPORT_bt
    Import Values from Bank Transactions Table (BT) form import_bt.
    rp-init-buffer.
    RP-IMP-C2-RX.
    rp-imp-c2-in.
    if rp-imp-in-subrc eq 0.
    if in-version-number ne oin-version-number.
    write: / 'Schlüssel des Clusters RX:'(015),
    rx-key-pernr, rx-key-seqno.
    write: / 'The imported version of the cluster'(016), 'RX',
    'is not current'(017).
    write: / 'Imported version :'(018),
    oin-version-number.
    write: / 'Current version of cluster :'(019),
    in-version-number.
    stop.
    else.
    sy-subrc = 0.
    endif.
    else.
    sy-subrc = 8.
    write: /
    'Inconsistencies between cluster directory and directory for'(020).
    write: /
    'No payroll results found for data in cluster directory'(021).
    write : /
    'Please contact hotline to solve the current problem'(022).
    endif.
    ws_fpbeg(2) = versc-fpbeg+4(2).
    ws_fpbeg+2(4) = versc-fpbeg(4).
    ws_fpend(2) = versc-fpend+4(2).
    ws_fpend+2(4) = versc-fpend(4).
    ws_mthyr(2) = pa_mth.
    ws_mthyr+2(4) = pa_year.
    check ws_mthyr = ws_fpbeg.
    check ws_mthyr = ws_fpend.
    loop at bt. "from pc209
    int_rep-pernr = pernr-pernr.
    int_rep-ename = pernr-ename.
    int_rep-bankl = bt-bankl.
    int_rep-bankn = bt-bankn.
    int_rep-betrg = bt-betrg.
    int_rep-zlsch = bt-zlsch.
    append int_rep.
    endloop.
    IF P_BANKL ' ' AND P_ZLSCH ' '.
    DELETE INT_REP WHERE BANKL P_BANKL.
    ELSEIF P_BANKL = ' ' AND P_ZLSCH ' '.
    DELETE INT_REP WHERE ZLSCH P_ZLSCH.
    ELSEIF P_BANKL ' ' AND P_ZLSCH = ' '.
    DELETE INT_REP WHERE BANKL P_BANKL.
    ENDIF.
    endform. " IMPORT_BT
    *& Form CONVERT_MONTH
    Fetching Month Text form convert_month using mth t_mth.
    case mth.
    when '01'.
    t_mth = 'January'(023).
    when '02'.
    t_mth = 'February'(024).
    when '03'.
    t_mth = 'March'(025).
    when '04'.
    t_mth = 'April'(026).
    when '05'.
    t_mth = 'May'(027).
    when '06'.
    t_mth = 'June'(028).
    when '07'.
    t_mth = 'July'(029).
    when '08'.
    t_mth = 'August'(030).
    when '09'.
    t_mth = 'September'(031).
    when '10'.
    t_mth = 'October'(032).
    when '11'.
    t_mth = 'November'(033).
    when '12'.
    t_mth = 'December'(034).
    endcase.
    endform. " CONVERT_MONTH
    *& Form CONVERT_DATE_A
    Fetching Month Text * form convert_date_a using mth_t t_mth_t.
    case mth_t.
    when '01'.
    t_mth_t = 'Jan.'(035).
    when '02'.
    t_mth_t = 'Feb.'(036).
    when '03'.
    t_mth_t = 'Mar.'(037).
    when '04'.
    t_mth_t = 'Apr.'(038).
    when '05'.
    t_mth_t = 'May.'(039).
    when '06'.
    t_mth_t = 'Jun.'(040).
    when '07'.
    t_mth_t = 'Jul.'(041).
    when '08'.
    t_mth_t = 'Aug.'(042).
    when '09'.
    t_mth_t = 'Sep.'(043).
    when '10'.
    t_mth_t = 'Oct.'(044).
    when '11'.
    t_mth_t = 'Nov.'(045).
    when '12'.
    t_mth_t = 'Dec.'(046).
    endcase.
    endform. " CONVERT_DATE_A
    *& Form VALIDATE
    text
    --> p1 text
    <-- p2 text form validate .
    if p_bankl <> ' ' and p_zlsch ' '.
    delete int_rep where bankl p_bankl.
    elseif p_bankl = ' ' and p_zlsch ' '.
    delete int_rep where zlsch p_zlsch.
    elseif p_bankl ' ' and p_zlsch = ' '.
    delete int_rep where bankl p_bankl.
    endif.
    endform. " VALIDATE
    Hope this helps, Do reward.

Maybe you are looking for

  • Printing Text between boxes in sapscript

    Hi Friend , I have a invoice form . There is the adddress window , info window and the main window . I need to insert some text between the space between the MAIN window and the INFO window . Is there a way we can directly print text between Window o

  • Help!!!! Accented characters lost!

    Hi, I have a DOS aplications connected to Oracle. This app. inserts accented characters into a table. When I connect to oracle in SQL PLus, or other GUI Tool, accented characters are lost. How can I solve this problem? ANSI to OEM conversion? This al

  • Report Painter limitation ?

    Hi, I would like to know if there is a limitation in terms of number of columns you can put in a report group. I faced an abap dump: GEN_TOO_MANY_CBS in program :GP4H8AW59EG48IDI1VCN6J35D0J007 I have defined 4 reports - one of the reports have 2 sect

  • Should I trade in my car? High interest 24%

    Please help me decide what to do. I have a Dodge Avenger 2011 with 77,714 miles it's in good shape except a small cosmetic problem at the rear from a bump. I would like to trade it in for a more appropriate vehicle. I am considering trading it in now

  • How do you factory reset iphone 3g from computer

    I am trying to factory reset my iphone 3g for someone else to use it, there was a passcode and cannot remember it.  need to factory reset from computer because soft reset from phone doesn't work.  any help would be appreciated