question: private void generateRequest ( HttpServletRequest httpRequest , org . compiere . cm . cache . XML thisXML , Properties ctx ) { HttpSession thisSession = httpRequest . getSession ( false ) ; WebInfo wi = null ; if ( thisSession != null ) { if ( thisSession . getAttribute ( WebInfo . NAME ) != null ) wi = ( WebInfo ) thisSession . getAttribute ( WebInfo . NAME ) ; xmlCode . append ( "<requestTables>\n" ) ; int l_nClientID = Integer . parseInt ( ctx . getProperty ( "#AD_Client_ID" ) ) ; if ( wi != null ) { if ( wi . getC_BPartner_ID ( ) != - 1 ) { genTable ( "AD_User" , "(AD_User.IsActive='Y' AND AD_User.AD_Client_ID=" + l_nClientID + "  AND AD_User.C_BPartner_ID=@C_BPartner_ID@) ORDER BY AD_User.AD_User_ID" , false , ctx , wi ) ; genTable ( "C_BPartner" , "(C_BPartner.IsActive='Y' AND C_BPartner.AD_Client_ID=" + l_nClientID + "  AND C_BPartner.C_BPartner_ID=@C_BPartner_ID@)ORDER BY C_BPartner.C_BPartner_ID" , false , ctx , wi ) ; genTable ( "C_Invoice" , "(C_Invoice.IsActive='Y' AND C_Invoice.AD_Client_ID=" + l_nClientID + "  AND C_Invoice.C_BPartner_ID=@C_BPartner_ID@) ORDER BY C_Invoice.C_Invoice_ID" , false , ctx , wi ) ; genTable ( "C_Order" , "(C_Order.IsActive='Y' AND C_Order.AD_Client_ID=" + l_nClientID + "  AND C_Order.C_BPartner_ID=@C_BPartner_ID@) ORDER BY C_Order.C_Order_ID" , false , ctx , wi ) ; genTable ( "C_Payment" , "(C_Payment.IsActive='Y' AND C_Payment.AD_Client_ID=" + l_nClientID + "  AND C_Payment.C_BPartner_ID=@C_BPartner_ID@) ORDER BY C_Payment.C_Payment_ID" , false , ctx , wi ) ; genTable ( "C_Project" , "(C_Project.IsActive='Y' AND C_Project.AD_Client_ID=" + l_nClientID + "  AND C_Project.C_BPartner_ID=@C_BPartner_ID@) ORDER BY C_Project.C_Project_ID" , false , ctx , wi ) ; genTable ( "M_InOut" , "(M_InOut.IsActive='Y' AND M_InOut.AD_Client_ID=" + l_nClientID + "  AND M_InOut.C_BPartner_ID=@C_BPartner_ID@) ORDER BY M_InOut.M_InOut_ID" , false , ctx , wi ) ; genTable ( "R_Request" , "(R_Request.IsActive='Y' AND R_Request.AD_Client_ID=" + l_nClientID + "  AND R_Request.C_BPartner_ID=@C_BPartner_ID@) ORDER BY R_Request.R_Request_ID" , true , ctx , wi ) ; genTable ( "R_RequestUpdate" , "(R_RequestUpdate.IsActive='Y' AND R_RequestUpdate.AD_Client_ID=" + l_nClientID + "  AND R_RequestUpdate.R_Request_ID IN (SELECT R_Request.R_Request_ID FROM R_Request WHERE R_Request.IsActive='Y' AND R_Request.AD_Client_ID=" + l_nClientID + "  AND R_Request.C_BPartner_ID=@C_BPartner_ID@)) ORDER BY R_RequestUpdate.R_RequestUpdate_ID" , true , ctx , wi ) ; } genTable ( "A_Asset" , "A_Asset.IsActive='Y' AND A_Asset.AD_Client_ID=" + l_nClientID + "  ORDER BY A_Asset.A_Asset_ID" , false , ctx , wi ) ; genTable ( "C_Activity" , "C_Activity.IsActive='Y' AND C_Activity.AD_Client_ID=" + l_nClientID + "  ORDER BY C_Activity.C_Activity_ID" , false , ctx , wi ) ; genTable ( "C_Campaign" , "C_Campaign.IsActive='Y' AND C_Campaign.AD_Client_ID=" + l_nClientID + "  ORDER BY C_Campaign.C_Campaign_ID" , false , ctx , wi ) ; genTable ( "M_Product" , "M_Product.IsActive='Y' AND M_Product.AD_Client_ID=" + l_nClientID + " AND M_Product.Value like 'cd_%' ORDER BY M_Product.M_Product_ID" , false , ctx , wi ) ; genTable ( "M_RMA" , "M_RMA.IsActive='Y' AND M_RMA.AD_Client_ID=" + l_nClientID + "  ORDER BY M_RMA.M_RMA_ID" , false , ctx , wi ) ; genTable ( "R_Category" , "R_Category.IsActive='Y' AND R_Category.AD_Client_ID=" + l_nClientID + "  ORDER BY R_Category.R_Category_ID" , false , ctx , wi ) ; genTable ( "R_Group" , "R_Group.IsActive='Y' AND R_Group.AD_Client_ID=" + l_nClientID + "  ORDER BY R_Group.R_Group_ID" , false , ctx , wi ) ; genTable ( "R_MailText" , "R_MailText.IsActive='Y' AND R_MailText.AD_Client_ID=" + l_nClientID + "  ORDER BY R_MailText.R_MailText_ID" , true , ctx , wi ) ; genTable ( "R_RequestType" , "R_RequestType.IsActive='Y' AND R_RequestType.AD_Client_ID=" + l_nClientID + "  ORDER BY R_RequestType.R_RequestType_ID" , false , ctx , wi ) ; genTable ( "R_Resolution" , "R_Resolution.IsActive='Y' AND R_Resolution.AD_Client_ID=" + l_nClientID + "  ORDER BY R_Resolution.R_Resolution_ID" , false , ctx , wi ) ; genTable ( "R_StandardResponse" , "R_StandardResponse.IsActive='Y' AND R_StandardResponse.AD_Client_ID=" + l_nClientID + "  ORDER BY R_StandardResponse.R_StandardResponse_ID" , false , ctx , wi ) ; genTable ( "R_Status" , "R_Status.IsActive='Y' AND R_Status.AD_Client_ID=" + l_nClientID + "  ORDER BY R_Status.R_Status_ID" , false , ctx , wi ) ; genTable ( "_PriorityRule" , "(AD_Ref_List.IsActive='Y' AND AD_Ref_List.AD_Reference_ID=154) ORDER BY AD_Ref_List.AD_Ref_List_ID" , false , ctx , wi ) ; genTable ( "R_Request_Confidential" , "(AD_Ref_List.IsActive='Y' AND AD_Ref_List.AD_Reference_ID=340) ORDER BY AD_Ref_List.AD_Ref_List_ID" , false , ctx , wi ) ; genTable ( "R_Request_Due_Typ" , "(AD_Ref_List.IsActive='Y' AND AD_Ref_List.AD_Reference_ID=222) ORDER BY AD_Ref_List.AD_Ref_List_ID" , false , ctx , wi ) ; genTable ( "R_Request_Next_Action" , "(AD_Ref_List.IsActive='Y' AND AD_Ref_List.AD_Reference_ID=219) ORDER BY AD_Ref_List.AD_Ref_List_ID" , false , ctx , wi ) ; genTable ( "R_Request_TaskStatus" , "(AD_Ref_List.IsActive='Y' AND AD_Ref_List.AD_Reference_ID=366) ORDER BY AD_Ref_List.AD_Ref_List_ID" , false , ctx , wi ) ; } xmlCode . append ( "</requestTables>\n" ) ; } }
target:  Creates the XML tree for request tables.