[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Need Peoplecode help



If was my understanding that this mail list is for SQR.  Why is this
discussion about Peoplecode here.





                        sharif almamun
                        <sharif_almamu     To:     SQR-USERS@list.iex.net
                        n@HOTMAIL.COM>     cc:
                        Sent by:           bcc:
                        "Discussion of     Subject:     Re: Need Peoplecode help
                        SQR,
                        Brio
                        Technology's
                        database
                        reporting
                        language"
                        <SQR-USERS@lis
                        t.iex.net>


                        03/29/2001
                        01:50 PM
                        Please respond
                        to sqr-users






Michael,
  I tried executing from SavePreChg but it give me erro' Panle data
inconsistant with database'. There are some peoplecode too.
If %PanelGroup = "Z_ACCOUNT_RECON_D2" Then
   If (Z_DONOT_RECONCILE) = "Y" Then
      Z_RECON_TBL.Z_RECON_TMP_STATUS = "Y";
   End-If;
End-If;


And If I have to write SQL t update status I have to write atleast 10-15 of
them as there are lot of checking to decide this status.

I tried using a push button on the panel hoping that after I hit the save
button which will execute my savepost change then I could hit my 'Push
button' that will update the status but I guess in this case it is trying
to
update the status based on panel buffer not the table info. Is there any
way
to refresh the buffer with current info from the table?????


>From: Michael Chandler <mchandle@QUALCOMM.COM>
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Subject: Re: Need Peoplecode help
>Date: Thu, 29 Mar 2001 12:01:14 -0800
>
>Your right about only updating the panel buffer, which was already written
>to the database after SavePreChg.  Can you just execute this code in
>SavePreChg? If not, then you'll need to write another SQLExec to update
the
>status on the backend. If you do this, you'll only need to do your
>assignment to your status field if you need to have that value available
to
>you in the panel buffer.  Hopefully, you can just move the code to SPc.
>
>Hope this helps.
>
>
>
>At 12:38 PM 3/29/01 -0700, you wrote:
>>I wrote some peoplecode and used SQLExec to update tables in
>>SavePostchange
>>event. This SQL exec actually updates year, period, frequency on
different
>>rows. Now based on these three field's updated information I need to
>>update
>>the status field. Following is the code. It's not updating the status. I
>>think it is because after the SQL exec the code that I wrote to update
>>status is actually being update in the panel buffer. If I could use
>>DOSave()
>>in Savepostchange event it would probably work but unfortunately
>>peoplesoft
>>does not allow DoSave() in Savepostchange event. Any suggesstion?????? I
>>really need to resolve this issue ....
>>Thanks for help in advance.....
>>
>>If %PanelGroup = "Z_ACCOUNT_RECON_D2" Then
>>   If Z_RECONCILE_ALL = "Y" Then
>>      SQLExec("update ps_z_recon_tbl set
>>z_recon_thru_per=:1,z_recon_thru_year=:2 where z_acf2_id=:3 and
>>z_recon_stat
>>in (:4,:5) and z_recon_tmp_status <>:6", Z_RECONCILE_PERIOD,
>>Z_RECONCILE_YEAR, Z_RECON_TBL.Z_ACF2_ID, "C", "N", "Y");
>>   End-If;
>>End-If;
>>/*Update2 */
>>If %PanelGroup = "Z_ACCOUNT_RECON_D2" Then
>>   If All(Z_RECONCILE_ACCT_F) And
>>         All(Z_RECONCILE_ACCT_T) Then
>>      SQLExec("update ps_z_recon_tbl set
>>z_recon_thru_per=:1,z_recon_thru_year=:2 where z_acf2_id=:3 and account
>>between :4 and :5 and z_recon_stat in (:6, :7) and z_recon_tmp_status
>><>:8",
>>Z_RECONCILE_PERIOD, Z_RECONCILE_YEAR, Z_RECON_TBL.Z_ACF2_ID,
>>Z_RECONCILE_ACCT_F, Z_RECONCILE_ACCT_T, "C", "N", "Y");
>>   End-If;
>>End-If;
>>
>>
>>/****************************************************/
>>If %PanelGroup = "Z_ACCOUNT_RECON_D2" Then
>>   If None(Z_RECON_TBL.Z_FREQ) Then
>>      Z_RECON_TBL.Z_FREQ = "MONT";
>>   End-If;
>>   If None(Z_RECON_TBL.Z_RECON_THRU_YEAR) Then
>>      Z_RECON_TBL.Z_RECON_THRU_YEAR = 0;
>>   End-If;
>>   If Z_RECON_TBL.Z_ACCT_ROLLED_AMT = 0 Then
>>      Z_RECON_TBL.Z_RECON_STAT = "X";
>>   Else
>>      If All(Z_RECON_TBL.Z_RECON_THRU_PER) Then
>>         If All(Z_RECON_TBL.Z_FREQ) Then
>>            Evaluate Z_RECON_TBL.Z_FREQ
>>            When = "MONT"
>>               If Z_RECON_TBL.Z_RECON_THRU_PER =
>>Z_RECON_TBL.ACCOUNTING_PERIOD Then
>>                  If Z_RECON_TBL.Z_RECON_THRU_YEAR =
>>Z_RECON_TBL.FISCAL_YEAR
>>Then
>>                     Z_RECON_TBL.Z_RECON_STAT = "C";
>>                  End-If;
>>               End-If;
>>               If Z_RECON_TBL.Z_RECON_THRU_PER <
>>Z_RECON_TBL.ACCOUNTING_PERIOD Then
>>                  If Z_RECON_TBL.Z_RECON_THRU_YEAR <=
>>Z_RECON_TBL.FISCAL_YEAR Then
>>                     Z_RECON_TBL.Z_RECON_STAT = "N";
>>                  Else
>>                     Z_RECON_TBL.Z_RECON_STAT = "E";
>>                  End-If;
>>               End-If;
>>               If Z_RECON_TBL.Z_RECON_THRU_PER <=
>>Z_RECON_TBL.ACCOUNTING_PERIOD Then
>>                  If Z_RECON_TBL.Z_RECON_THRU_YEAR <
>>Z_RECON_TBL.FISCAL_YEAR
>>Then
>>                     Z_RECON_TBL.Z_RECON_STAT = "N";
>>                  End-If;
>>               End-If;
>>               If Z_RECON_TBL.Z_RECON_THRU_PER >
>>Z_RECON_TBL.ACCOUNTING_PERIOD Then
>>                  If Z_RECON_TBL.Z_RECON_THRU_YEAR >=
>>Z_RECON_TBL.FISCAL_YEAR Then
>>                     Z_RECON_TBL.Z_RECON_STAT = "E";
>>                  Else
>>                     Z_RECON_TBL.Z_RECON_STAT = "N";
>>                  End-If;
>>               End-If;
>>               If Z_RECON_TBL.Z_RECON_THRU_PER >=
>>Z_RECON_TBL.ACCOUNTING_PERIOD Then
>>                  If Z_RECON_TBL.Z_RECON_THRU_YEAR >
>>Z_RECON_TBL.FISCAL_YEAR
>>Then
>>                     Z_RECON_TBL.Z_RECON_STAT = "E";
>>                  End-If;
>>               End-If;
>>               Break;
>>            When = "ANNU"
>>               &RC_THRU = (Z_RECON_TBL.Z_RECON_THRU_YEAR * 12) +
>>Z_RECON_TBL.Z_RECON_THRU_PER;
>>               &SB_THRU = (Z_RECON_TBL.FISCAL_YEAR * 12) +
>>Z_RECON_TBL.ACCOUNTING_PERIOD;
>>               &SB_THRU = &SB_THRU - 11;
>>               &M_BEHIND = &SB_THRU - &RC_THRU;
>>               If &M_BEHIND > 0 Then
>>                  Z_RECON_TBL.Z_RECON_STAT = "N";
>>               Else
>>                  Z_RECON_TBL.Z_RECON_STAT = "C";
>>               End-If;
>>               Break;
>>            When = "QUAR"
>>               &RC_THRU = (Z_RECON_TBL.Z_RECON_THRU_YEAR * 12) +
>>Z_RECON_TBL.Z_RECON_THRU_PER;
>>               &SB_THRU = (Z_RECON_TBL.FISCAL_YEAR * 12) +
>>Z_RECON_TBL.ACCOUNTING_PERIOD;
>>               &SB_THRU = &SB_THRU - 2;
>>               &M_BEHIND = &SB_THRU - &RC_THRU;
>>               If &M_BEHIND > 0 Then
>>                  Z_RECON_TBL.Z_RECON_STAT = "N";
>>               Else
>>                  Z_RECON_TBL.Z_RECON_STAT = "C";
>>               End-If;
>>               Break;
>>            When = "SEMI"
>>               &RC_THRU = (Z_RECON_TBL.Z_RECON_THRU_YEAR * 12) +
>>Z_RECON_TBL.Z_RECON_THRU_PER;
>>               &SB_THRU = (Z_RECON_TBL.FISCAL_YEAR * 12) +
>>Z_RECON_TBL.ACCOUNTING_PERIOD;
>>               &SB_THRU = &SB_THRU - 5;
>>               &M_BEHIND = &SB_THRU - &RC_THRU;
>>               If &M_BEHIND > 0 Then
>>                  Z_RECON_TBL.Z_RECON_STAT = "N";
>>               Else
>>                  Z_RECON_TBL.Z_RECON_STAT = "C";
>>               End-If;
>>               Break;
>>            When = "EXEM"
>>               Z_RECON_TBL.Z_RECON_STAT = "X";
>>               Break;
>>            When-Other
>>               Z_RECON_TBL.Z_RECON_STAT = "N";
>>               Break;
>>            End-Evaluate;
>>         End-If;
>>      Else
>>         If Z_RECON_TBL.Z_FREQ = "EXEM" Then
>>            Z_RECON_TBL.Z_RECON_STAT = "X";
>>         Else
>>            Z_RECON_TBL.Z_RECON_STAT = "N";
>>         End-If;
>>      End-If;
>>   End-If;
>>End-If;
>>
>>_________________________________________________________________
>>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>
>Thanks,
>Michael Chandler

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com