Need to get last value of the Quater
Hi expert ,
I have data like this
DATE column Amount column
Jan 1st 20 $
|
Jan 30th 50 $
Fed 1st 60
|
Feb 28th 80$
like this for whole year
I will be providing the Quater promt and selects 1st quater,. then it will show Jan, Feb, march in Date column and respective amounts in amount column.
I need to put some formula in the Amount column.... So that I picks the last day of the quater amonut.
Any help is appreciated.
Thanks
V
Edited by: Venkat Krishna on May 25, 2011 6:43 AM
CASE WHEN "Fiscal Date" = TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_QUARTER , 1, TIMESTAMPADD( SQL_TSI_DAY , DAY_OF_QUARTER( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))) THEN "Fact - Amount" END;
Apply the above filter on your amount column.
Thanks,
-Amith.
Similar Messages
-
SSAS Tabular DAX- Need to get MAX value of the MIN (top)hierarchy level row
EDIT:
I got closer to resolving the issue using MAX.
However, If I remove the department hierarchy and just place on the MAX measure I get the single largest value out of all departments.
It would be ideal if the measure could still SUM the "top level" values across everything in the system if the hierarchy is not placed on the rows grouping.
So it returns the largest value for a given department, but if the department hierarchy isn't present I need it to return a SUM of all the level 1 values for all departments...
Basically return MAX value from the MIN L1ID's DeptLevel value, but I can't seem to construct that DAX query. So if DepartmentID hierarchy is on display it gets MAX per row, but if that is removed it dips into MAX GoalValue for each L1ID grouping with
the MIN DeptLevel.
/EDIT
I have a rather odd data table I'm bringing into a SSAS Tabular model.
Instead of having all data at each child level and then it adding up to a grand total in the parent, it has a grand total predefined at each child level.
I just need this tool to display the raw data if at all possible instead of trying to aggregate everything. Filter on active level, ignore child levels.
Is there a way to do that?
Example:
SalesGoalsByDepartmentLevel:
Level1 (top level) = 5,000
Level2( lower level) = 0
Level3(lower still) = 500
Level 4(lowest) = 4,250
So note that adding up all the child levels is still $250 shy of the top 5,000.
IT is just an odd business rule, basically each level is expected to meet that goal or exceed it, the top level goal is 5,000 but management doesn't care where that last 250 comes from, they do are that each defined level is met.
These levels are in a hierarchy so if I view the top level of the hierarchy it adds up to 4250+500+5000=9750 when I just want to see 5,000 at the top level and the details when they drill down.
I added a filter to just filter to the top level, but then when I drill down of course those lower levels are blank.
Is there a way to filter on the current displayed level without aggregating all child levels?
Thanks!You might want to take a look at the Parent-Child Hierarchies pattern here:
http://www.daxpatterns.com/parent-child-hierarchies/
You might write DAX code to check what is the "current" level (see BrowseDepth measure in the sample file you can download) and depending on its level, se the filter to blank to all the levels below, so you don't aggregate "children".
Just an idea, I'm not sure if it corresponds to your requirement and I don't have time to make more tests.
I hope it will be helpful.
Marco Russo (Blog,
Twitter,
LinkedIn) - sqlbi.com:
Articles, Videos,
Tools, Consultancy,
Training
Format with DAX Formatter and design with
DAX Patterns. Learn
Power Pivot and SSAS Tabular. -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to get --Last date of the Last value .
Dear All,
I have a report like
Material Country Current Price
1112----- Singapore -
100
1112----- Japan -
120
1112----- Malesia -
99
Here current price is Last Value of the particular Material on particular Date.
This I can get based on Key figure Aggregation ( Last Value and reference Character 0CALDAY ), It is giving the last Value of the Particular Material.
Now my user wants to see Last date of the value ( Date of the Value )
Example :-
Material Country Date --Current Price
1112----- Singapore -
01/04/2008 -- 100
1112----- Japan -
04/05/2008 -- 120
1112----- Malesia -
05/05/2008 -- 99
If I drill down the date in my report it is showing all dates , my user wants to see only last date .
Hope some one has solved this issue , please help me to solve this issue.
Regards,
SHAIK.I have created a keyfigure with date as a data type.
In aggregation tab, I selected aggregation Maximum.
Upto DSO, data is Loaded perfect. Ok.
I added the same key figure in cube , When I am trying to Activate the Transformation,
It is giving Error message.
Rule 17 is invalid and is being deleted. The reason for this is that a field or InfoObject that is used in rule 17 has been deleted in the source or target of the transformation ODSO ZPL_DSO1 -> CUBE ZPLATT_C (0GH6MHANQ2J79LXZBLGIJ9ZK9LWHK6RS)
Plz Advice.
Regards,
SHAIK
Edited by: shaik on May 7, 2008 5:46 PM -
Need help getting a value from an XML column
Hi,
I need to get a value from an XML column in a table (the column is called TEST_XML). I have tried using the Select TEST_XML.value function but it always returns nulls. Could you please take a look at the following xml sample stored in the TEST_XML column
and help me with the query syntax to get the value of the Bank_Account_Number?.
=================
<?mso-infoPathSolution PIVersion="1.0.0.0" href="http://aaa.bbb.ccc.org/OF/PublicDownload.aspx/6bba49274b494ddcb005512670a5e214.xsn" name="urn:schemas-microsoft-com:office:infopath:BPIP-xsn:OF-Messages-Schemas-OF-Forms" language="en-us"
productVersion="14.0.0" solutionVersion="3.0.29.90" ?>
<?mso-application progid="InfoPath.Document"?>
<tns:OF_Forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="OF_Messages.Schemas.OF_Forms" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-07-22T10:58:18"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<Name />
<Description />
<Settings Name="FormName" Description="Request for new master data.xml" SCE_RouteID="54" ROU_Name="IBP-Group" SCE_FunctionalAreaID="1" FUA_FunctionalAreaName="Data Maintenance" SCE_SchemaCategory="BP"
SCE_SchemaGUID="3c9b391c-26a1-46ec-a202-434453a6e582" SCE_FormGUID="6bba4927-4b49-4ddc-b005-512670a5e214" SCE_InstanceGUID="39595" SCE_SPInstancePath="" FIN_StaffID="" FirstName="" LastName=""
MAIL_SendBy="[email protected]" MAIL_Date="Thu, 12 Jun 2014 14:49:26 +0200" DateRequired="" MissingFields="" NewLine="
" SCE_RequestorAuthorizationMode="1" SCE_AllowSubmissionFromAll="1"
/>
<Init_Information>
<Date_Required xsi:nil="true" />
</Init_Information>
<General_Data>
<Action>U</Action>
<Business_Partner_Number xsi:nil="true" />
<Business_Partner_Grouping>G16</Business_Partner_Grouping>
<Business_Partner_Type>G003</Business_Partner_Type>
<Title>002</Title>
<House_Number xsi:nil="true" />
<Street xsi:nil="true" />
<Street_2 xsi:nil="true" />
<Street_3 xsi:nil="true" />
<City>ABIDJAN</City>
<Country>CI</Country>
<City_Postal_Code xsi:nil="true" />
<Region xsi:nil="true" />
<PO_Box xsi:nil="true" />
<PO_Box_Postal_Code xsi:nil="true" />
<Language>FR</Language>
<Purpose>Z003 UNVs</Purpose>
<Telephone_Number />
<Mobile_Phone_Number>90075777</Mobile_Phone_Number>
<Fax_Number xsi:nil="true" />
<Email_Address>[email protected]</Email_Address>
<First_Name>Mickey</First_Name>
<Middle_Name xsi:nil="true" />
<Last_Name>Mouse</Last_Name>
<Gender>2</Gender>
<Index_Number>999999</Index_Number>
<Date_of_Birth>1969-11-29</Date_of_Birth>
<Nationality>CI</Nationality>
<DOB_Day>29</DOB_Day>
<DOB_Month>11</DOB_Month>
<DOB_Year>1969</DOB_Year>
<RelationBPGroupingBPType xsi:nil="true" />
<BPType_Z016>Z003</BPType_Z016>
<BPType_Z020 xsi:nil="true" />
<BPType_Z021 xsi:nil="true" />
<Sub_Area2>General and Banking</Sub_Area2>
<SR_Description>Business Partner Number:
Business Partner Type: UNVs
First Name: FirstName
Last Name: LastName</SR_Description>
<Sub_Area_Aux>79</Sub_Area_Aux>
<thereis_general>TRUE</thereis_general>
<thereis_banking>TRUE</thereis_banking>
<auxGeneric>GDB</auxGeneric>
<Business_Area_BP>P022</Business_Area_BP>
<Search_Term_1>FirstName</Search_Term_1>
<Search_Term_2>LastName</Search_Term_2>
<Responsible_Institution xsi:nil="true" />
<Add_Additional_Address xsi:nil="true" />
<Add_Additional_Communication xsi:nil="true" />
<BP_Role_Main xsi:nil="true" />
<BP_Role_Additional xsi:nil="true" />
<AddresType xsi:nil="true" />
<Specify xsi:nil="true" />
<BP_Category xsi:nil="true" />
<AddRemoveAddress xsi:nil="true" />
<AddRemoveCommunication xsi:nil="true" />
<BusinessAreaOfBP_Aux>MALI</BusinessAreaOfBP_Aux>
</General_Data>
<Primary_Bank_Account>
<Bank_Location_ID>0001</Bank_Location_ID>
<Bank_Country>ML</Bank_Country>
<Bank_Account_Number>XXXX999888777666555444-00</Bank_Account_Number>
<Bank_Account_Type>1</Bank_Account_Type>
<IBAN xsi:nil="true" />
<CurrencyPrimaryIBAN xsi:nil="true" />
<Account_Holder_Name xsi:nil="true" />
<CurrencyOPrimaryNationalBankAccount>XOF</CurrencyOPrimaryNationalBankAccount>
<Routing_Number_x002F__National_ID>BDMAMLBA</Routing_Number_x002F__National_ID>
<NonIbanAccountHolderName>BANKNAME</NonIbanAccountHolderName>
<NonIbanBankAccountNumber>TESTNIBAN</NonIbanBankAccountNumber>
<CurrencyOPrimaryBankAccountNonIBAN>XOF</CurrencyOPrimaryBankAccountNonIBAN>
<NonIbanPrimaryBankAccountType>1</NonIbanPrimaryBankAccountType>
<NonIbanPrimaryAccountNameOfBank>BANK OF AFRICA</NonIbanPrimaryAccountNameOfBank>
<NonIbanPrimaryAccountBankAddressHouseNumber>CDCI</NonIbanPrimaryAccountBankAddressHouseNumber>
<NonIbanPrimaryAccountBankAddressStreet>DALOA, COMMERCE</NonIbanPrimaryAccountBankAddressStreet>
<NonIbanPrimaryAccountBankAddressCity>DALOA</NonIbanPrimaryAccountBankAddressCity>
<NonIbanPrimaryAccountBankAddressRegion>DALOA</NonIbanPrimaryAccountBankAddressRegion>
<NonIbanPrimaryAccountBankAddressPostalCode>+225</NonIbanPrimaryAccountBankAddressPostalCode>
<Primary_Type_of_Account xsi:nil="true" />
<invisible1>National ID</invisible1>
<bDontHasBankAccount>false</bDontHasBankAccount>
<bBankAccountNotAvailable>false</bBankAccountNotAvailable>
<CashOrCheck xsi:nil="true" />
<CashAccountingClerk xsi:nil="true" />
<BankID_BIC_SWIFT>BIBS</BankID_BIC_SWIFT>
<CheckOptions xsi:nil="true" />
<SameOrDifferent_IBAN_Primary xsi:nil="true" />
<SameOrDifferent_National_Primary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Primary>Yes</SameOrDifferent_NotIBAN_Primary>
<AccountTitle_IBAN_Primary xsi:nil="true" />
<AccountTitle_National_Primary xsi:nil="true" />
<AccountTitle_NotIBAN_Primary xsi:nil="true" />
<ExplainWhy_IBAN_Primary xsi:nil="true" />
<ExplainWhy_National_Primary xsi:nil="true" />
<ExplainWhy_NotIBAN_Primary xsi:nil="true" />
<Bank_Key xsi:nil="true" />
<Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Primary xsi:nil="true" />
<Special_Instructions_National_Primary xsi:nil="true" />
<Special_Instructions_NotIBAN_Primary xsi:nil="true" />
<RecordTypePrimary xsi:nil="true" />
<Payment_Method_UnderCashCheck xsi:nil="true" />
<ValidUntilPrimaryBank xsi:nil="true" />
</Primary_Bank_Account>
<Primary_Intermediary_Bank_Account>
<Intermediary_Bank_Location_ID xsi:nil="true" />
<Intermediary_Bank_Country xsi:nil="true" />
<Intermediary_Bank_Account_Number xsi:nil="true" />
<Intermediary_Bank_Account_Type xsi:nil="true" />
<Intermediary_IBAN xsi:nil="true" />
<CurrencyIntermediaryIBAN xsi:nil="true" />
<Intermediary_Account_Holder_Name xsi:nil="true" />
<CurrencyOIntermediaryNationalBankAccount xsi:nil="true" />
<Intermediary_Routing_Number_National_ID xsi:nil="true" />
<IntermediaryNonIbanAccountHolderName xsi:nil="true" />
<IntermediaryNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOIntermediaryBankAccountNonIBAN xsi:nil="true" />
<NonIbanIntermediaryBankAccountType xsi:nil="true" />
<NonIbanIntermediaryAccountNameOfBank xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressStreet xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressCity xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressRegion xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressPostalCode xsi:nil="true" />
<IntermediaryBankAccountVisible xsi:nil="true" />
<Intermediary_Type_of_Account xsi:nil="true" />
<invisible2 xsi:nil="true" />
<Intermediary_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Intermediary xsi:nil="true" />
<SameOrDifferent_National_Intermediary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Intermediary xsi:nil="true" />
<AccountTitle_IBAN_Intermediary xsi:nil="true" />
<AccountTitle_National_Intermediary xsi:nil="true" />
<AccountTitle_NotIBAN_Intermediary xsi:nil="true" />
<ExplainWhy_IBAN_Intermediary xsi:nil="true" />
<ExplainWhy_National_Intermediary xsi:nil="true" />
<ExplainWhy_NotIBAN_Intermediary xsi:nil="true" />
</Primary_Intermediary_Bank_Account>
<Additional_Bank_Account>
<Additional_Bank_Location_ID xsi:nil="true" />
<Additional_Bank_Country xsi:nil="true" />
<Additional_Bank_Account_Number xsi:nil="true" />
<Additional_Bank_Account_Type xsi:nil="true" />
<Additional_IBAN xsi:nil="true" />
<CurrencyAdditionalIBAN xsi:nil="true" />
<Additional_Account_Holder_Name xsi:nil="true" />
<CurrencyOAdditionalNationalBankAccount xsi:nil="true" />
<Additional_Routing_Number_x002F__National_ID xsi:nil="true" />
<AdditionalNonIbanAccountHolderName xsi:nil="true" />
<AdditionalNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOAdditionalBankAccountNonIBAN xsi:nil="true" />
<NonIbanAdditionalBankAccountType xsi:nil="true" />
<NonIbanAdditionalAccountNameOfBank xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressStreet xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressCity xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressRegion xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressPostalCode xsi:nil="true" />
<AdditionalBankAccountVisible xsi:nil="true" />
<Additional_Type_of_Account xsi:nil="true" />
<invisible3 xsi:nil="true" />
<Additional_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Additional xsi:nil="true" />
<SameOrDifferent_National_Additional xsi:nil="true" />
<SameOrDifferent_NotIBAN_Additional xsi:nil="true" />
<AccountTitle_IBAN_Additional xsi:nil="true" />
<AccountTitle_National_Additional xsi:nil="true" />
<AccountTitle_NotIBAN_Additional xsi:nil="true" />
<ExplainWhy_IBAN_Additional xsi:nil="true" />
<ExplainWhy_National_Additional xsi:nil="true" />
<ExplainWhy_NotIBAN_Additional xsi:nil="true" />
<Additional_Bank_Key xsi:nil="true" />
<Additional_Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Additional xsi:nil="true" />
<Special_Instructions_National_Additional xsi:nil="true" />
<Special_Instructions_NotIBAN_Additional xsi:nil="true" />
<RecordTypeAdditional xsi:nil="true" />
<ValidUntilAdditionalBank xsi:nil="true" />
</Additional_Bank_Account>
<Payment_Information>
<Block_for_payment>1</Block_for_payment>
<Payment_Method xsi:nil="true" />
<Accounting_Clerk xsi:nil="true" />
<PaymentMethodAdditional xsi:nil="true" />
<AccountingClerkAdditional xsi:nil="true" />
</Payment_Information>
<Additional_Field_for_Purchasing_view>
<Purchase_order_currency>XOF</Purchase_order_currency>
<BP_Role_for_Screen_Usage__x0028_Real_State_x0029_ xsi:nil="true" />
<Central_Block_for_Business_Partner>false</Central_Block_for_Business_Partner>
<Posting_block_for_company_code xsi:nil="true" />
<Deletion_Flag_for_Master_Record__x0028_Company_Code_Leve xsi:nil="true" />
<Purchasing_block_at_purchasing_organization_level xsi:nil="true" />
<Deletion_flag_for_vendor_at_purchasing_level xsi:nil="true" />
<BPRoleDateBegin xsi:nil="true" />
<BPRoleDateEnd xsi:nil="true" />
</Additional_Field_for_Purchasing_view>
<Requestor_Information>
<Requested_By>REQUESTOR</Requested_By>
<Org_Unit>MVCON</Org_Unit>
<Date>2014-05-19</Date>
<Reason xsi:nil="true" />
<On_Form xsi:nil="true" />
<Attached xsi:nil="true" />
<Located_In_x002F_At>TIMBUKTOU</Located_In_x002F_At>
<RequestorBusinessArea>P022</RequestorBusinessArea>
<RequestorBusinessAreaValue>MALI</RequestorBusinessAreaValue>
<Display_Review_Approval_Section xsi:nil="true" />
</Requestor_Information>
<Review_Information>
<Review_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Review_Information>
<Approval_Information>
<Approved_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Approval_Information>
<Reception_Information>
<Received_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Reception_Information>
<Entry_Information>
<Entered_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Entry_Information>
<Verification_Information>
<Verified_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Verification_Information>
<Order_Currency>
<Order_Currency_New xsi:nil="true" />
</Order_Currency>
<Change_BP_Group>
<BP_Group_Existing xsi:nil="true" />
<BP_Type_Existing xsi:nil="true" />
<BP_Role_Existing xsi:nil="true" />
<BP_Group_New xsi:nil="true" />
<BP_Type_New xsi:nil="true" />
<BP_Role_New xsi:nil="true" />
<BPTypeAuxVisible1 xsi:nil="true" />
<BPTypeAuxVisible2 xsi:nil="true" />
</Change_BP_Group>
<Expire_or_Add_Validity_Period_to_BP_Role>
<Additional_BP_Role_Entry xsi:nil="true" />
</Expire_or_Add_Validity_Period_to_BP_Role>
<Add_Alternative_Payees>
<Additional_Payee xsi:nil="true" />
</Add_Alternative_Payees>
<Establish_BP_Relationship>
<Additional_Relationship_EntryB xsi:nil="true" />
</Establish_BP_Relationship>
<Block_BP>
<PaymentBlock xsi:nil="true" />
<Reason_Payment_Block xsi:nil="true" />
<PostingBlock xsi:nil="true" />
<Reason_Posting_Block xsi:nil="true" />
<PurchasingBlock xsi:nil="true" />
<Reason_Purchasing_Block xsi:nil="true" />
<CentralBlock xsi:nil="true" />
<Reason_Central_Block xsi:nil="true" />
<FlagforArchiving xsi:nil="true" />
<Reason_Flag_Block xsi:nil="true" />
<TerminateBP xsi:nil="true" />
<Reason_Terminate_Block xsi:nil="true" />
</Block_BP>
<Options>
<Option1>true</Option1>
<Option2>false</Option2>
<Option3>true</Option3>
<Option4>false</Option4>
<Option5>false</Option5>
<Option6>false</Option6>
<Option7>false</Option7>
<Option8>false</Option8>
<Opt_Update_BP_legal_Name>false</Opt_Update_BP_legal_Name>
</Options>
<Sec_Update_BP_Legal_Name>
<NewLegalFirstName xsi:nil="true" />
<NewLegalMiddleName xsi:nil="true" />
<NewLegalLastName xsi:nil="true" />
</Sec_Update_BP_Legal_Name>
<line>
<IDType>
<IDType xsi:nil="true" />
<LegacyIDNumber xsi:nil="true" />
<Responsible_Institution_Legacy xsi:nil="true" />
<AddRemoveID_R xsi:nil="true" />
</IDType>
</line>
<Address>
<Section_Address>
<AddressTypeR xsi:nil="true" />
<StreetR xsi:nil="true" />
<StreetR_2 xsi:nil="true" />
<StreetR_3 xsi:nil="true" />
<House_NumberR xsi:nil="true" />
<City_Postal_CodeR xsi:nil="true" />
<CityR xsi:nil="true" />
<CountryR xsi:nil="true" />
<StateRegionProvinceR xsi:nil="true" />
<PO_BoxR xsi:nil="true" />
<PO_Box_PostalCodeR xsi:nil="true" />
<SpecifyR xsi:nil="true" />
<AddRemoveAddressR xsi:nil="true" />
</Section_Address>
<PO_BoxR2>
<SecPoBoxR2>
<PO_BoxR2 xsi:nil="true" />
<PO_Box_Postal_CodeR2 xsi:nil="true" />
</SecPoBoxR2>
</PO_BoxR2>
</Address>
<Communication>
<Communication_Section>
<Telephone_NumberR xsi:nil="true" />
<Mobile_Phone_NumberR xsi:nil="true" />
<Fax_NumberR xsi:nil="true" />
<Email_AddressR xsi:nil="true" />
<AddRemoveCommunicationR xsi:nil="true" />
</Communication_Section>
</Communication>
<Expire_or_Add_Validaty_to_BP_RoleR>
<Expire_or_Add_Validaty>
<BP_RoleR xsi:nil="true" />
<Expire_or_Add_Validity_PeriodR xsi:nil="true" />
<Valid_FromR xsi:nil="true" />
<Valid_ToR xsi:nil="true" />
</Expire_or_Add_Validaty>
</Expire_or_Add_Validaty_to_BP_RoleR>
<Add_Alternative_PayeesR>
<Alternative_Payees>
<Add_Update_Remove xsi:nil="true" />
<Permited_Payee_BP_NumberR xsi:nil="true" />
<Name_Alt_PayeeR xsi:nil="true" />
<Index_NumberR xsi:nil="true" />
<TitleR xsi:nil="true" />
<First_NameR xsi:nil="true" />
<Middle_NameR xsi:nil="true" />
<Last_NameR xsi:nil="true" />
</Alternative_Payees>
</Add_Alternative_PayeesR>
<Establish_BP_RelationshipR>
<Relationship>
<BP_Number_Main xsi:nil="true" />
<Relationship_CategoryR xsi:nil="true" />
<ValidFromR xsi:nil="true" />
<ValidToRelationshipR xsi:nil="true" />
<BPNumber_SecondaryR xsi:nil="true" />
<Index_Number_Secondary_Relationship xsi:nil="true" />
<Business_Area_Secondary xsi:nil="true" />
<Title_Secondary_BP xsi:nil="true" />
<First_Name_Secondary_BPR xsi:nil="true" />
<MiddleNameSecondaryBPR xsi:nil="true" />
<LastNameSecondaryBP xsi:nil="true" />
<Add_Update_DeleteR xsi:nil="true" />
</Relationship>
</Establish_BP_RelationshipR>
<PO_BoxR>
<SecPoBoxR>
<PO_BoxR xsi:nil="true" />
<PO_Box_Postal_CodeR xsi:nil="true" />
</SecPoBoxR>
</PO_BoxR>
</tns:OF_Forms>See this illustration
declare @x xml='<?mso-infoPathSolution PIVersion="1.0.0.0" href="http://aaa.bbb.ccc.org/OF/PublicDownload.aspx/6bba49274b494ddcb005512670a5e214.xsn" name="urn:schemas-microsoft-com:office:infopath:BPIP-xsn:OF-Messages-Schemas-OF-Forms" language="en-us" productVersion="14.0.0" solutionVersion="3.0.29.90" ?>
<?mso-application progid="InfoPath.Document"?>
<tns:OF_Forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="OF_Messages.Schemas.OF_Forms" xmlns:xdServerInfo="http://schemas.microsoft.com/office/infopath/2009/xslt/ServerInfo" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-07-22T10:58:18" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
<Name />
<Description />
<Settings Name="FormName" Description="Request for new master data.xml" SCE_RouteID="54" ROU_Name="IBP-Group" SCE_FunctionalAreaID="1" FUA_FunctionalAreaName="Data Maintenance" SCE_SchemaCategory="BP" SCE_SchemaGUID="3c9b391c-26a1-46ec-a202-434453a6e582" SCE_FormGUID="6bba4927-4b49-4ddc-b005-512670a5e214" SCE_InstanceGUID="39595" SCE_SPInstancePath="" FIN_StaffID="" FirstName="" LastName="" MAIL_SendBy="[email protected]" MAIL_Date="Thu, 12 Jun 2014 14:49:26 +0200" DateRequired="" MissingFields="" NewLine="
" SCE_RequestorAuthorizationMode="1" SCE_AllowSubmissionFromAll="1" />
<Init_Information>
<Date_Required xsi:nil="true" />
</Init_Information>
<General_Data>
<Action>U</Action>
<Business_Partner_Number xsi:nil="true" />
<Business_Partner_Grouping>G16</Business_Partner_Grouping>
<Business_Partner_Type>G003</Business_Partner_Type>
<Title>002</Title>
<House_Number xsi:nil="true" />
<Street xsi:nil="true" />
<Street_2 xsi:nil="true" />
<Street_3 xsi:nil="true" />
<City>ABIDJAN</City>
<Country>CI</Country>
<City_Postal_Code xsi:nil="true" />
<Region xsi:nil="true" />
<PO_Box xsi:nil="true" />
<PO_Box_Postal_Code xsi:nil="true" />
<Language>FR</Language>
<Purpose>Z003 UNVs</Purpose>
<Telephone_Number />
<Mobile_Phone_Number>90075777</Mobile_Phone_Number>
<Fax_Number xsi:nil="true" />
<Email_Address>[email protected]</Email_Address>
<First_Name>Mickey</First_Name>
<Middle_Name xsi:nil="true" />
<Last_Name>Mouse</Last_Name>
<Gender>2</Gender>
<Index_Number>999999</Index_Number>
<Date_of_Birth>1969-11-29</Date_of_Birth>
<Nationality>CI</Nationality>
<DOB_Day>29</DOB_Day>
<DOB_Month>11</DOB_Month>
<DOB_Year>1969</DOB_Year>
<RelationBPGroupingBPType xsi:nil="true" />
<BPType_Z016>Z003</BPType_Z016>
<BPType_Z020 xsi:nil="true" />
<BPType_Z021 xsi:nil="true" />
<Sub_Area2>General and Banking</Sub_Area2>
<SR_Description>Business Partner Number:
Business Partner Type: UNVs
First Name: FirstName
Last Name: LastName</SR_Description>
<Sub_Area_Aux>79</Sub_Area_Aux>
<thereis_general>TRUE</thereis_general>
<thereis_banking>TRUE</thereis_banking>
<auxGeneric>GDB</auxGeneric>
<Business_Area_BP>P022</Business_Area_BP>
<Search_Term_1>FirstName</Search_Term_1>
<Search_Term_2>LastName</Search_Term_2>
<Responsible_Institution xsi:nil="true" />
<Add_Additional_Address xsi:nil="true" />
<Add_Additional_Communication xsi:nil="true" />
<BP_Role_Main xsi:nil="true" />
<BP_Role_Additional xsi:nil="true" />
<AddresType xsi:nil="true" />
<Specify xsi:nil="true" />
<BP_Category xsi:nil="true" />
<AddRemoveAddress xsi:nil="true" />
<AddRemoveCommunication xsi:nil="true" />
<BusinessAreaOfBP_Aux>MALI</BusinessAreaOfBP_Aux>
</General_Data>
<Primary_Bank_Account>
<Bank_Location_ID>0001</Bank_Location_ID>
<Bank_Country>ML</Bank_Country>
<Bank_Account_Number>XXXX999888777666555444-00</Bank_Account_Number>
<Bank_Account_Type>1</Bank_Account_Type>
<IBAN xsi:nil="true" />
<CurrencyPrimaryIBAN xsi:nil="true" />
<Account_Holder_Name xsi:nil="true" />
<CurrencyOPrimaryNationalBankAccount>XOF</CurrencyOPrimaryNationalBankAccount>
<Routing_Number_x002F__National_ID>BDMAMLBA</Routing_Number_x002F__National_ID>
<NonIbanAccountHolderName>BANKNAME</NonIbanAccountHolderName>
<NonIbanBankAccountNumber>TESTNIBAN</NonIbanBankAccountNumber>
<CurrencyOPrimaryBankAccountNonIBAN>XOF</CurrencyOPrimaryBankAccountNonIBAN>
<NonIbanPrimaryBankAccountType>1</NonIbanPrimaryBankAccountType>
<NonIbanPrimaryAccountNameOfBank>BANK OF AFRICA</NonIbanPrimaryAccountNameOfBank>
<NonIbanPrimaryAccountBankAddressHouseNumber>CDCI</NonIbanPrimaryAccountBankAddressHouseNumber>
<NonIbanPrimaryAccountBankAddressStreet>DALOA, COMMERCE</NonIbanPrimaryAccountBankAddressStreet>
<NonIbanPrimaryAccountBankAddressCity>DALOA</NonIbanPrimaryAccountBankAddressCity>
<NonIbanPrimaryAccountBankAddressRegion>DALOA</NonIbanPrimaryAccountBankAddressRegion>
<NonIbanPrimaryAccountBankAddressPostalCode>+225</NonIbanPrimaryAccountBankAddressPostalCode>
<Primary_Type_of_Account xsi:nil="true" />
<invisible1>National ID</invisible1>
<bDontHasBankAccount>false</bDontHasBankAccount>
<bBankAccountNotAvailable>false</bBankAccountNotAvailable>
<CashOrCheck xsi:nil="true" />
<CashAccountingClerk xsi:nil="true" />
<BankID_BIC_SWIFT>BIBS</BankID_BIC_SWIFT>
<CheckOptions xsi:nil="true" />
<SameOrDifferent_IBAN_Primary xsi:nil="true" />
<SameOrDifferent_National_Primary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Primary>Yes</SameOrDifferent_NotIBAN_Primary>
<AccountTitle_IBAN_Primary xsi:nil="true" />
<AccountTitle_National_Primary xsi:nil="true" />
<AccountTitle_NotIBAN_Primary xsi:nil="true" />
<ExplainWhy_IBAN_Primary xsi:nil="true" />
<ExplainWhy_National_Primary xsi:nil="true" />
<ExplainWhy_NotIBAN_Primary xsi:nil="true" />
<Bank_Key xsi:nil="true" />
<Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Primary xsi:nil="true" />
<Special_Instructions_National_Primary xsi:nil="true" />
<Special_Instructions_NotIBAN_Primary xsi:nil="true" />
<RecordTypePrimary xsi:nil="true" />
<Payment_Method_UnderCashCheck xsi:nil="true" />
<ValidUntilPrimaryBank xsi:nil="true" />
</Primary_Bank_Account>
<Primary_Intermediary_Bank_Account>
<Intermediary_Bank_Location_ID xsi:nil="true" />
<Intermediary_Bank_Country xsi:nil="true" />
<Intermediary_Bank_Account_Number xsi:nil="true" />
<Intermediary_Bank_Account_Type xsi:nil="true" />
<Intermediary_IBAN xsi:nil="true" />
<CurrencyIntermediaryIBAN xsi:nil="true" />
<Intermediary_Account_Holder_Name xsi:nil="true" />
<CurrencyOIntermediaryNationalBankAccount xsi:nil="true" />
<Intermediary_Routing_Number_National_ID xsi:nil="true" />
<IntermediaryNonIbanAccountHolderName xsi:nil="true" />
<IntermediaryNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOIntermediaryBankAccountNonIBAN xsi:nil="true" />
<NonIbanIntermediaryBankAccountType xsi:nil="true" />
<NonIbanIntermediaryAccountNameOfBank xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressStreet xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressCity xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressRegion xsi:nil="true" />
<NonIbanIntermediaryAccountBankAddressPostalCode xsi:nil="true" />
<IntermediaryBankAccountVisible xsi:nil="true" />
<Intermediary_Type_of_Account xsi:nil="true" />
<invisible2 xsi:nil="true" />
<Intermediary_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Intermediary xsi:nil="true" />
<SameOrDifferent_National_Intermediary xsi:nil="true" />
<SameOrDifferent_NotIBAN_Intermediary xsi:nil="true" />
<AccountTitle_IBAN_Intermediary xsi:nil="true" />
<AccountTitle_National_Intermediary xsi:nil="true" />
<AccountTitle_NotIBAN_Intermediary xsi:nil="true" />
<ExplainWhy_IBAN_Intermediary xsi:nil="true" />
<ExplainWhy_National_Intermediary xsi:nil="true" />
<ExplainWhy_NotIBAN_Intermediary xsi:nil="true" />
</Primary_Intermediary_Bank_Account>
<Additional_Bank_Account>
<Additional_Bank_Location_ID xsi:nil="true" />
<Additional_Bank_Country xsi:nil="true" />
<Additional_Bank_Account_Number xsi:nil="true" />
<Additional_Bank_Account_Type xsi:nil="true" />
<Additional_IBAN xsi:nil="true" />
<CurrencyAdditionalIBAN xsi:nil="true" />
<Additional_Account_Holder_Name xsi:nil="true" />
<CurrencyOAdditionalNationalBankAccount xsi:nil="true" />
<Additional_Routing_Number_x002F__National_ID xsi:nil="true" />
<AdditionalNonIbanAccountHolderName xsi:nil="true" />
<AdditionalNonIbanBankAccountNumber xsi:nil="true" />
<CurrencyOAdditionalBankAccountNonIBAN xsi:nil="true" />
<NonIbanAdditionalBankAccountType xsi:nil="true" />
<NonIbanAdditionalAccountNameOfBank xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressHouseNumber xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressStreet xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressCity xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressRegion xsi:nil="true" />
<NonIbanAdditionalAccountBankAddressPostalCode xsi:nil="true" />
<AdditionalBankAccountVisible xsi:nil="true" />
<Additional_Type_of_Account xsi:nil="true" />
<invisible3 xsi:nil="true" />
<Additional_BankID_BIC_SWIFT_code xsi:nil="true" />
<SameOrDifferent_IBAN_Additional xsi:nil="true" />
<SameOrDifferent_National_Additional xsi:nil="true" />
<SameOrDifferent_NotIBAN_Additional xsi:nil="true" />
<AccountTitle_IBAN_Additional xsi:nil="true" />
<AccountTitle_National_Additional xsi:nil="true" />
<AccountTitle_NotIBAN_Additional xsi:nil="true" />
<ExplainWhy_IBAN_Additional xsi:nil="true" />
<ExplainWhy_National_Additional xsi:nil="true" />
<ExplainWhy_NotIBAN_Additional xsi:nil="true" />
<Additional_Bank_Key xsi:nil="true" />
<Additional_Bank_Control_Key xsi:nil="true" />
<Special_Instructions_IBAN_Additional xsi:nil="true" />
<Special_Instructions_National_Additional xsi:nil="true" />
<Special_Instructions_NotIBAN_Additional xsi:nil="true" />
<RecordTypeAdditional xsi:nil="true" />
<ValidUntilAdditionalBank xsi:nil="true" />
</Additional_Bank_Account>
<Payment_Information>
<Block_for_payment>1</Block_for_payment>
<Payment_Method xsi:nil="true" />
<Accounting_Clerk xsi:nil="true" />
<PaymentMethodAdditional xsi:nil="true" />
<AccountingClerkAdditional xsi:nil="true" />
</Payment_Information>
<Additional_Field_for_Purchasing_view>
<Purchase_order_currency>XOF</Purchase_order_currency>
<BP_Role_for_Screen_Usage__x0028_Real_State_x0029_ xsi:nil="true" />
<Central_Block_for_Business_Partner>false</Central_Block_for_Business_Partner>
<Posting_block_for_company_code xsi:nil="true" />
<Deletion_Flag_for_Master_Record__x0028_Company_Code_Leve xsi:nil="true" />
<Purchasing_block_at_purchasing_organization_level xsi:nil="true" />
<Deletion_flag_for_vendor_at_purchasing_level xsi:nil="true" />
<BPRoleDateBegin xsi:nil="true" />
<BPRoleDateEnd xsi:nil="true" />
</Additional_Field_for_Purchasing_view>
<Requestor_Information>
<Requested_By>REQUESTOR</Requested_By>
<Org_Unit>MVCON</Org_Unit>
<Date>2014-05-19</Date>
<Reason xsi:nil="true" />
<On_Form xsi:nil="true" />
<Attached xsi:nil="true" />
<Located_In_x002F_At>TIMBUKTOU</Located_In_x002F_At>
<RequestorBusinessArea>P022</RequestorBusinessArea>
<RequestorBusinessAreaValue>MALI</RequestorBusinessAreaValue>
<Display_Review_Approval_Section xsi:nil="true" />
</Requestor_Information>
<Review_Information>
<Review_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Review_Information>
<Approval_Information>
<Approved_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Approval_Information>
<Reception_Information>
<Received_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Reception_Information>
<Entry_Information>
<Entered_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Entry_Information>
<Verification_Information>
<Verified_By xsi:nil="true" />
<Org_Unit xsi:nil="true" />
<Date xsi:nil="true" />
</Verification_Information>
<Order_Currency>
<Order_Currency_New xsi:nil="true" />
</Order_Currency>
<Change_BP_Group>
<BP_Group_Existing xsi:nil="true" />
<BP_Type_Existing xsi:nil="true" />
<BP_Role_Existing xsi:nil="true" />
<BP_Group_New xsi:nil="true" />
<BP_Type_New xsi:nil="true" />
<BP_Role_New xsi:nil="true" />
<BPTypeAuxVisible1 xsi:nil="true" />
<BPTypeAuxVisible2 xsi:nil="true" />
</Change_BP_Group>
<Expire_or_Add_Validity_Period_to_BP_Role>
<Additional_BP_Role_Entry xsi:nil="true" />
</Expire_or_Add_Validity_Period_to_BP_Role>
<Add_Alternative_Payees>
<Additional_Payee xsi:nil="true" />
</Add_Alternative_Payees>
<Establish_BP_Relationship>
<Additional_Relationship_EntryB xsi:nil="true" />
</Establish_BP_Relationship>
<Block_BP>
<PaymentBlock xsi:nil="true" />
<Reason_Payment_Block xsi:nil="true" />
<PostingBlock xsi:nil="true" />
<Reason_Posting_Block xsi:nil="true" />
<PurchasingBlock xsi:nil="true" />
<Reason_Purchasing_Block xsi:nil="true" />
<CentralBlock xsi:nil="true" />
<Reason_Central_Block xsi:nil="true" />
<FlagforArchiving xsi:nil="true" />
<Reason_Flag_Block xsi:nil="true" />
<TerminateBP xsi:nil="true" />
<Reason_Terminate_Block xsi:nil="true" />
</Block_BP>
<Options>
<Option1>true</Option1>
<Option2>false</Option2>
<Option3>true</Option3>
<Option4>false</Option4>
<Option5>false</Option5>
<Option6>false</Option6>
<Option7>false</Option7>
<Option8>false</Option8>
<Opt_Update_BP_legal_Name>false</Opt_Update_BP_legal_Name>
</Options>
<Sec_Update_BP_Legal_Name>
<NewLegalFirstName xsi:nil="true" />
<NewLegalMiddleName xsi:nil="true" />
<NewLegalLastName xsi:nil="true" />
</Sec_Update_BP_Legal_Name>
<line>
<IDType>
<IDType xsi:nil="true" />
<LegacyIDNumber xsi:nil="true" />
<Responsible_Institution_Legacy xsi:nil="true" />
<AddRemoveID_R xsi:nil="true" />
</IDType>
</line>
<Address>
<Section_Address>
<AddressTypeR xsi:nil="true" />
<StreetR xsi:nil="true" />
<StreetR_2 xsi:nil="true" />
<StreetR_3 xsi:nil="true" />
<House_NumberR xsi:nil="true" />
<City_Postal_CodeR xsi:nil="true" />
<CityR xsi:nil="true" />
<CountryR xsi:nil="true" />
<StateRegionProvinceR xsi:nil="true" />
<PO_BoxR xsi:nil="true" />
<PO_Box_PostalCodeR xsi:nil="true" />
<SpecifyR xsi:nil="true" />
<AddRemoveAddressR xsi:nil="true" />
</Section_Address>
<PO_BoxR2>
<SecPoBoxR2>
<PO_BoxR2 xsi:nil="true" />
<PO_Box_Postal_CodeR2 xsi:nil="true" />
</SecPoBoxR2>
</PO_BoxR2>
</Address>
<Communication>
<Communication_Section>
<Telephone_NumberR xsi:nil="true" />
<Mobile_Phone_NumberR xsi:nil="true" />
<Fax_NumberR xsi:nil="true" />
<Email_AddressR xsi:nil="true" />
<AddRemoveCommunicationR xsi:nil="true" />
</Communication_Section>
</Communication>
<Expire_or_Add_Validaty_to_BP_RoleR>
<Expire_or_Add_Validaty>
<BP_RoleR xsi:nil="true" />
<Expire_or_Add_Validity_PeriodR xsi:nil="true" />
<Valid_FromR xsi:nil="true" />
<Valid_ToR xsi:nil="true" />
</Expire_or_Add_Validaty>
</Expire_or_Add_Validaty_to_BP_RoleR>
<Add_Alternative_PayeesR>
<Alternative_Payees>
<Add_Update_Remove xsi:nil="true" />
<Permited_Payee_BP_NumberR xsi:nil="true" />
<Name_Alt_PayeeR xsi:nil="true" />
<Index_NumberR xsi:nil="true" />
<TitleR xsi:nil="true" />
<First_NameR xsi:nil="true" />
<Middle_NameR xsi:nil="true" />
<Last_NameR xsi:nil="true" />
</Alternative_Payees>
</Add_Alternative_PayeesR>
<Establish_BP_RelationshipR>
<Relationship>
<BP_Number_Main xsi:nil="true" />
<Relationship_CategoryR xsi:nil="true" />
<ValidFromR xsi:nil="true" />
<ValidToRelationshipR xsi:nil="true" />
<BPNumber_SecondaryR xsi:nil="true" />
<Index_Number_Secondary_Relationship xsi:nil="true" />
<Business_Area_Secondary xsi:nil="true" />
<Title_Secondary_BP xsi:nil="true" />
<First_Name_Secondary_BPR xsi:nil="true" />
<MiddleNameSecondaryBPR xsi:nil="true" />
<LastNameSecondaryBP xsi:nil="true" />
<Add_Update_DeleteR xsi:nil="true" />
</Relationship>
</Establish_BP_RelationshipR>
<PO_BoxR>
<SecPoBoxR>
<PO_BoxR xsi:nil="true" />
<PO_Box_Postal_CodeR xsi:nil="true" />
</SecPoBoxR>
</PO_BoxR>
</tns:OF_Forms>'
;WITH XMLNAMESPACES ('OF_Messages.Schemas.OF_Forms' AS tns)
SELECT m.n.value('(Bank_Account_Number)[1]','varchar(100)')
FROM @x.nodes('/tns:OF_Forms/Primary_Bank_Account')m(n)
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to pick up the last value of the input string
Hi there,
I have a requirement in which I have to pick up the last value of the input string.
I don't know the field length, it could be 10 line, it could be 4 line and it could be even 1 line.
Another problem is that the field contains all the alphanumeric values so the sort function is not working.
I believe I need to write a UDF but not sure exact what and how.
Can some body please help me solving this issue.
Input.
1.Abc
2.abc123atxx.com
3.(980)771-2341
4.
5.518VR50V58AD10DSAYBDSAFDSIEGHA:1
In that case I only need to pickup the last value i.e. 518VR50V58AD10DSAYBDSAFDSIEGHA:1
Output
518VR50V58AD10DSAYBDSAFDSIEGHA:1
Note:
1. Length is unknown
2. Alphanumeric data
Thanks,Hi karthick Lakkar,
Thanks for your quick response but unfortunately I am getting mapping exception.
What I did is create a UDF with 2 input
INPUT
a string
b string
and then this code
int Length=Integer.parseInt(a);
int requiredLength=Integer.parseInt(b);
if(Length<=requiredLength)
return(a);
else
return a.substring((Length-requiredLength),Length);
I am wondering about the input as well.
At present I am doing
KTEXT + KTEXT --- UDF
+ does represent concat, means same input will go to the UDF
This is the error which I am getting
Exception:[java.lang.NumberFormatException: For input string: "Kevin Farrar"] in class com.sap.xi.tf._MM_XXXXXXXXXXXXXX_ method calculate[Kevin Farrar, Kevin Farrar, com.sap.aii.mappingtool.tf7.rt.Context@6dbf19db] -
How to get last date of the week
hi,
how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
thnxdata : p_week type KWEEK,
p_Date type SYDATUM.
p_week = <incoming value in week of year>
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = p_week
IMPORTING
DATE = p_date
EXCEPTIONS
WEEK_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To get the last day of the week.
p_date = p_date + 6.
You can find the available fm in the system from se37 transaction code. -
How to get a value from the previous element (XSLT/XPATH gurus ahoy!)
Hi All,
I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
Here's a simplified data example to illustrate the problem.
<ROW>
<START_DATE>01-01-1980</START_DATE>
<END_DATE>01-01-1988</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-1988</START_DATE>
<END_DATE>01-01-1990</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-2000</START_DATE>
<END_DATE>01-01-2005</END_DATE>
</ROW>
With the data above, I should print two lines:
01-01-1980 - 01-01-1990
01-01-2000 - 01-01-2005
I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
Thanks & Regards, Matildause this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
Hi
in the below statement I Need to print last value
means last 5555,i can print all other values but last value 5555 is i am unable to print
pls help me
SELECT REGEXP_SUBSTR('5454 4587454 547451 188745 5555','[^'||' '||']+'||' ',1,5) p1 from dual;Thanks in advance
SantoshKarthick_Arp wrote:
like this
with t
as
select '5454 4587454 547451 188745 5555' str
from dual
select regexp_substr(str, ' [[:digit:]]*$')
from t
Why pull out the space before it?
SQL> ed
Wrote file afiedt.buf
1 with t as (select '5454 4587454 547451 188745 5555' str from dual)
2 --
3 select regexp_substr(str, '[0-9]+$')
4* from t
SQL> /
REGE
5555
SQL> -
User defined function for getting last string in the line
Hi Experts,
I am not java expert, can anyone give me user defined function for getting last string in the line.
for example if the source field is "NEW ARBOUR SQUARE" i want to pass to target field only last string that is "SQUARE"
please help me out of this.
Kind Regards.
Praveen.You don't even need a UDF for this. In the graphical editor look for the standard functions and once you do a scroll over on 'text functions; you will find what you are looking for.
Just a piece of advice, try keeping UDF's to minimum unless really required or it is complicated without it.
regards -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
Problem getting parameter values at the service end point
I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
� Service End Point Definition (in EJB)
public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
System.out.println(propertyName);
System.out.println(PMSCode);
System.out.println(streetNumPrefix);
........ taking printout of all the paramters
� This is my WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types/>
<message name="NMServiceServantInterface_setNewAddress">
<part name="String_1" type="xsd:string"/>
<part name="String_2" type="xsd:string"/>
<part name="String_3" type="xsd:string"/>
<part name="String_4" type="xsd:string"/>
<part name="int_5" type="xsd:int"/>
<part name="String_6" type="xsd:string"/>
<part name="int_7" type="xsd:int"/>
<part name="String_8" type="xsd:string"/>
<part name="String_9" type="xsd:string"/>
<part name="String_10" type="xsd:string"/>
<part name="String_11" type="xsd:string"/>
<part name="String_12" type="xsd:string"/>
<part name="String_13" type="xsd:string"/>
<part name="String_14" type="xsd:string"/>
<part name="String_15" type="xsd:string"/>
<part name="String_16" type="xsd:string"/>
<part name="String_17" type="xsd:string"/>
<part name="String_18" type="xsd:string"/>
<part name="int_19" type="xsd:int"/>
<part name="int_20" type="xsd:int"/>
<part name="String_21" type="xsd:string"/>
<part name="String_22" type="xsd:string"/>
<part name="int_23" type="xsd:int"/>
<part name="int_24" type="xsd:int"/>
<part name="String_25" type="xsd:string"/>
<part name="String_26" type="xsd:string"/>
<part name="String_27" type="xsd:string"/>
<part name="int_28" type="xsd:int"/>
<part name="int_29" type="xsd:int"/>
<part name="int_30" type="xsd:int"/>
<part name="String_31" type="xsd:string"/>
<part name="String_32" type="xsd:string"/>
<part name="int_33" type="xsd:int"/>
<part name="int_34" type="xsd:int"/>
<part name="String_35" type="xsd:string"/></message>
<message name="NMServiceServantInterface_setNewAddressResponse">
<part name="result" type="xsd:string"/></message>
<portType name="NMServiceServantInterface">
<operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
<input message="tns:NMServiceServantInterface_setNewAddress"/>
<output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
<binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
<operation name="setNewAddress">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="NMService">
<port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
<soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
� I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
ThanksI just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy . -
hi ,
is there an existing date funtion to get last day of the month ?
pls advise
else
i'll try to add_month + 1 to current month and format to the first day and minus 1 day from that new month
tks & rdgslast_day function
<br>
jeneesh -
WAD - display only the last value in the chart
hi...
I designed a chart in WAD wich displayed a range of values in a line. Now im searching for a possibility to display the value for the points in my chart, but not for all values, only for the last value in the line! And every month the line will extended with new value-points, so it is necassary that the function is dynamic, always for the last point in the chart the value should displayed!?
thx for some ideas!
davidhi @ all... once more information:
the chart displayed only one keyfigure of a query. for example it display the revenue per month. in jan. = 10, feb. = 15, mar. = 25, apr. = 13, jun. = 23. these values should be displayed in a line in the chart aaaand additional for the last one in the line the valuecaption direct in the chart (f.e.: jun. = 23). not for all "periods-points"only for the last one.
in jul. = 25 the chart changed and only for july the value-caption should be displayed. Is it possible?
Regards,
David
Maybe you are looking for
-
4TB, RAID5, and a P67A-G43. I gotta make it work...
Right now I am creating a new computer setup solely for the purpose of having Windows 7 x64 running off of a single 4TB RAID5 (3X 2TB). I know it's (theoretically) possible, as this board is a UEFI-type board, and there's just no other way for this
-
My ipod wont TURN ON! HELPPP PLEASE!
Okay so my ipod mini wont turn on the LCD screen wont turn on and i have been charging it for like 24 hours now. THe ipod support online is really not helpful i can't reset it because it wont turn on. Nothing is working and i really hope its not brok
-
How to make transparent buttons in Encore CS6?
Hello all ~ I'm making a DVD for a corporate conference. I would like to use the company's logo for the navigation button on the DVD. There will be text indicating the menus, then the "logo button" will navigate to the text so you can select the me
-
Hello I've made the OS 5 update on my 8520 and I don't find the icon to lock the keyboard ! I also find if it's possible to parameter a delay for lock the keyboard. If it's not possible is there an app ? thanks for your answers
-
Hi, I have completed the scenario in Integration Repository and activated. But am not able to see my BS in Integarion Directory? How to get them in ID? Please help me