Friday 23 March 2018

Display hard coded data in grid where headerless details form is loaded

Display hard coded data in grid where headerless details form is loaded:

Below code is to be written in post dialogue is initialized event:

If GC Legal Fee Details is equal to <Blank> Or GC Legal Fee Details is equal to <Null>
VA frm_GridRecords_MATH01 = "4"
VA frm_gridRowNumber = "1"
//
While VA frm_gridRowNumber is less than or equal to VA frm_GridRecords_MATH01
//
If VA frm_gridRowNumber is equal to "1.00"
GB Legal Fee Details = "Test1"
GB LineNumber = "1"
//
Else
//
If VA frm_gridRowNumber is equal to "2.00"
GB Legal Fee Details = "Test2"
GB LineNumber = "2"
//
Else
//
If VA frm_gridRowNumber is equal to "3.00"
GB Legal Fee Details = "Test3"
GB LineNumber = "3"
//
Else
//
If VA frm_gridRowNumber is equal to "4.00"
GB Legal Fee Details = "Test4"
GB LineNumber = "4"
End If
//
End If
End If
End If
//
Insert Grid Buffer Row(FC Grid, <After Last Row>, <Yes>, <No>, <Yes>, <Yes>, <No>)
VA frm_gridRowNumber = [VA frm_gridRowNumber]+1
//
End While
//
End If


As I  require 4 records I have written it as above do necessary changes as per your requirement.

How to attach a customized visual assist form to a field

For attaching customized visual assist needed to create are search and select form with required fields.

Now for attaching this form to required field follow the steps below:

   EVENT:  Visual Assist Button Clicked
-----------------------------------------------------------------------
     OPT: Using Defaults
0001 Suppress Default Visual Assist Form

-----------------------------------------------------------------------
     EVENT:  Post Visual Assist Clicked
-----------------------------------------------------------------------
     OPT: Using Defaults
0001 Call( App:P561234 , Form:W561234C )
        FC Project_v <> FI szCommunity
        FC Unit No_V <- FI szUnit


Call the form that is required and pass the data that has to be fetched

How to hide extra line in header less detail form

How to hide extra line in header less detail form

For this in the grid event rules we have a event called " Add Last Entry Row to Grid"

In this event use "Hide Grid Row System Function" and hide the extra row

Insert Multiple records to a non business view table in a Header less details form

Insert Multiple records to a non business view table in a Header less details form:

Code to be written in OK Button Clicked event:

Sample code is as below do the changes as required:



VA frm_GetGridNumber_MATH01 = "1"
Get Max Grid Rows(FC Grid, VA frm_GetMaxGridRows_Math01)
While VA frm_GetGridNumber_MATH01 is less than VA frm_GetMaxGridRows_Math01
Get Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
//
If GC Project is greater than <Blank>
F561234.Select
F561234.Fetch Next
If SV File_IO_Status is equal to CO SUCCESS
F561234.Update
Else
F561234.Insert
End If
End If
VA frm_GetGridNumber_MATH01 = [VA frm_GetGridNumber_MATH01]+1
End While

Fetch Data to GC from non business view table in Header less detail form

For data from a non business view table to GC fields in a headerless detail form.

Code should be written in "Get Custom Grid Row" Event of the grid.

And insert Grid buffer row system function should be used and buffer row must be inserted.

Example code is as below:

Do the necessary changes to it as required

  CONTROL:  GRID Grid
     EVENT:  Get Custom Grid Row
-----------------------------------------------------------------------
     OPT: Using Defaults
0001 //
0002 VA frm_GetGridNumber_MATH01 = "0"
0003 If FC Project_V is not equal to <Null> And FC Phase_V is not equal to <Null>
0004    F44H201.Select
           FC Project_V =  TK Community
           FC Phase_V =  TK Phase
0005 Else
0006    If FC Project_V is not equal to <Null> And FC Block_V is not equal to <Null>
0007       F44H201.Select
              FC Project_V =  TK Community
              FC Block_V =  TK Homebuilder Block
0008    Else
0009       If FC Project_V is not equal to <Null> And FC From Level_V is not equal to <Null>
0010          F44H201.Select
                 FC Project_V =  TK Community
                 FC From Level_V <= TK User Defined Amount 01
0011       Else
0012          If FC Project_V is not equal to <Null> And FC From Unit_V is not equal to <Null>
0013             F44H201.Select
                    FC Project_V =  TK Community
                    FC From Unit_V <= TK Unit
0014          Else
0015             If FC Project_V is not equal to <Null> And FC Block_V is not equal to <Null> And FC Phase_V is not equal to <Null> And FC From Level_V is not equal to <Null> And FC From Unit_V is not equal to <Null>
0016                F44H201.Select
                       FC Project_V =  TK Community
                       FC Phase_V =  TK Phase
                       FC Block_V =  TK Homebuilder Block
                       FC From Unit_V <= TK Unit
                       FC From Level_V <= TK User Defined Amount 01
0017             Else
0018                F44H201.Select
                       FC Project_V =  TK Community
0019             End If
0020          End If
0021       End If
0022    End If
0023 End If
0024 //
0025 F44H201.Fetch Next
        GB Project <- TK Community
        GB Lot <- TK Lot Number
        GB Phase <- TK Phase
        GB Plan <- TK Plan Number
        GB Elev <- TK Elevation
        GB Block <- TK Homebuilder Block
        GB Unit <- TK Unit
        GB Amount 1 <- TK User Defined Amount 01
0026 While SV File_IO_Status is equal to CO SUCCESS
0027    VA frm_GetGridNumber_MATH01 = [VA frm_GetGridNumber_MATH01]+1
0028    //
0029    If FC From Unit_V is not equal to <Null> And FC To Unit_V is not equal to <Null>
0030       If GB Unit is greater than or equal to FC From Unit_V And GB Unit is less than or equal to FC To Unit_V
0031          //
0032          VA frm_Phase_CPHASE = " "
0033          F59H5202.Select
                 GB Project =  TK Community
                 GB Unit =  TK Unit
0034          F59H5202.Fetch Next
                 VA frm_Phase_CPHASE <- TK Phase
0035          //
0036          If VA frm_Phase_CPHASE is greater than <Blank>
0037             Delete Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
0038          Else
0039             Insert Grid Buffer Row(FC Grid, VA frm_GetGridNumber_MATH01, <Yes>, <No>, <Yes>, <Yes>, <Yes>)
0040          End If
0041          //
0042          If FC From Level_V is not equal to <Null> And FC To Level_V is not equal to <Null>
0043             If GB Amount 1 is greater than or equal to FC From Level_V And GB Amount 1 is less than or equal to FC To Level_V
0044                Show Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
0045             End If
0046          End If
0047          //
0048       Else
0049          Delete Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
0050       End If
0051    Else
0052       F59H5202.Select
              GB Project =  TK Community
              GB Unit =  TK Unit
0053       F59H5202.Fetch Next
              VA frm_Phase_CPHASE <- TK Phase
0054       //
0055       If VA frm_Phase_CPHASE is greater than <Blank>
0056          Delete Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
0057       Else
0058          Insert Grid Buffer Row(FC Grid, VA frm_GetGridNumber_MATH01, <Yes>, <No>, <Yes>, <Yes>, <Yes>)
0059       End If
0060    End If
0061    //
0062    If FC From Level_V is not equal to <Null> And FC To Level_V is not equal to <Null> And FC From Unit_V is equal to <Null> And FC To Unit_V is equal to <Null>
0063       If GB Amount 1 is greater than or equal to FC From Level_V And GB Amount 1 is less than or equal to FC To Level_V
0064          Show Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
0065       Else
0066          Hide Grid Row(FC Grid, VA frm_GetGridNumber_MATH01)
0067       End If
0068    End If
0069    //
0070    F44H201.Fetch Next
           GB Project <- TK Community
           GB Lot <- TK Lot Number
           GB Phase <- TK Phase
           GB Plan <- TK Plan Number
           GB Elev <- TK Elevation
           GB Block <- TK Homebuilder Block
           GB Unit <- TK Unit
           GB Amount 1 <- TK User Defined Amount 01
0071 End While
0072 //

Saturday 10 March 2018

How to place same business view field twice on a form

In general Business view field is allowed place only once on a form.

If you want to place it twice for comparison place a field and go to its properties and select greater than or less than from the comparison operators so that the same field will be displayed for placing the field once again.

If you want to place the fields like this From level and To Level


Go to its properties --> Filter Tab

And select greater than or less than so that you can place the same field once again


Thursday 26 November 2015

Interview Questions


1. How many sections can be placed in a report for Maximum?
Ans. We can add multiple sections but physical size should not exceed 45 inches in length and width

2. Can we call forms from Reports?
Ans. No

3. Can we call reports from Forms?
Ans. Yes, using Report interconnect.

4. Can we call Reports from table Conversions?
Ans.  Yes, using Report interconnect.

5.Is it possible to adopt data selection and data sequence from another section in the same Report?
Ans. Yes, using System Function - Use data selection / Sequence from a section

6. What are the version Overrides that can be done in a Report. 
Ans. Section Layout, Data selection, Event Rules, Data Base Output, Sort sequence.

7.What are the options that are available in Group and Columnar but not in Tabular.
Ans. Tabular cannot be conditional and cannot have level breaks. Level Break information is printed automatically within a tabular section and controlled by items marked as level breaks in Data sequencing. Sub section join is not available in tabular section.

8. What are the types of log files in JDE?
Ans. JDE Log and JDE Debug log

9.What are filter fields?
Ans. filter fields are controls on the form which are not selected into grid on the same form. It builds where clause in SQL Select statement .