Concatenate 6 Fields with Condition

Hello all,
How r u ?
In a scenario we have to Concatenate 6 Fields in BW like,
/BIC/ZCV_ANAAM - FirstName
/BIC/ZCV_TUGBN  - Initial
/BIC/ZCV_GBNAM - MiddleName
TXTSH                  - Gender
/BIC/ZCV_VLETR   - LastName
/BIC/ZCV_TUSEL   - NickName
and in this Format
<b>FirstName - Initial MiddleName, Gender LastName NickName</b>
In the Transfer Routine I used Formula option and gave like this,
<b>/BIC/ZCV_ANAAM & '-' & /BIC/ZCV_TUGBN &' ' & /BIC/ZCV_GBNAM &',' & TXTSH &' ' & /BIC/ZCV_VLETR &' ' & /BIC/ZCV_TUSEL</b>
but the system throws this error
"Invalid formula element: ' & /BIC/ZCV_TUSEL"
Also, the condition is <b>"Initial MiddleName" SHOULD NOT appear
If MiddleName = " "(Empty)</b>
How could I arrive this with Formula or Routine ?
Best Regards....
Sankar Kumar
+91 98403 47141

Hi Sankar,
I would suggest you to use a routine to achieve the result.I am not sure of the ABAP syntax below, but try this logic.
"Declare a variable of character type with the total length."
data : <Variable Name>(100) type c.
If TRAN_STRUCTURE-<Field Name>MiddleName is initial.
" Dont include Middle name in this list"
concatenate TRAN_STRUCTURE-/BIC/ZCV_ANAAM  TRAN_STRUCTURE-/BIC/ZCV_TUGBN..... into <Variable Name>
else
" Include Middle name in this list"
concatenate TRAN_STRUCTURE-/BIC/ZCV_ANAAM  TRAN_STRUCTURE-/BIC/ZCV_TUGBN..... into <Variable Name>
endif.
You can use this variable name as your final result
hope it helps,
regards,
Parth.

Similar Messages

  • Concatenate fields with doc number

    HI
    In cv01n tcode in second tab ADDITIONAL data we have 3 inputs -category,sub category and sub type . now i need to concatenate these three when document no is created .
    doc number generation i created but how to concatenate these 3 filds and displayed when clicked saved button. Those 3 fields of type char.
    please help me out . automatic doc no is generating i wrote tht in stndard program zmcdokznr ..help me in writing the code to concatenate these 3 fields .
    THANKS in advance

    Hi,
    DATA:LV_FLD1 TYPE STRING,
              LV_FLD2 TYPE STRING,
             LV_FLD3 TYPE STRING.
    DATA:LV_FINAL TYPE STRING.
    LV_FLD1 = category,      "CATAGORY INPUT VALUE.
    LV_FLD2 = sub category "SUB CATEGORY VALUE.
    LV_FLD3 = sub type  "SUB TYPE VALUE.
    IF DOUCMENT NUMBER IS CREATED.
    CONCATENATE LV_FLD1 LV_FLD2 LV_FLD3 INTO LV_FINAL.
    ENDIF.
    regards,
    muralii.

  • SAVE XML FILE Only For cetrain field with  Condition

    Hi Team,
    I have to save my journal entries as XML File.
    I have written this code ...It is working
    oJE.GetByKey(3)
                oJE.SaveXML("C:\Documents and Settings\Firos C\Desktop\MyXML3.xml")
    So this code will save all data from OJDT and JDT1. So I dont want to save JDT1.SysCred Field How we do this
    or how we can delete JDT1.SysCred Field  once we save our XML.
    Also I need to give condition while selecting where OJDT.Ref2 <> Null
    How we can resolve this issue...?
    By
    Firos

    Resolved by using XML node deletion operations

  • Concatenate fields with comma

    Hi Friends
    How to write a expression to achieve the following task in SSRS:
    Col_1 
    Col_2 
    Col_3 
    Col_4
      A           B        NULL    
    D
      A         
     B          C      
    NULL
    To       
    A, B, C
    A, B, C
    I wrote a expression like this: =Fields!Col_1.value & "," & Fields!Col_2.value & "," & Fields!Col_3.value
    & "," & Fields!Col_4.value
    and I'm getting result like this: A, B, , D (as
    Col_3 is NULL)
           A, B, C, (getting
    comma after C as Col_4 is NULL).
    Royal Thomas

    you can make expression like this
    =Fields!Col_1.value & IIF(Len(Fields!Col_2.value) = 0 ,"","," & Fields!Col_2.value) & IIF(Len(Fields!Col_3.value) = 0 ,"","," & Fields!Col_3.value) & IIF(Len(Fields!Col_4.value) = 0 ,"","," & Fields!Col_4.value)
    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

  • Conditional fields with Data Merge

    I have, what I believe, would be a common question for people using Data Merge in InDesign for business cards.
    I have multiple phone fields, with a small-caps letter to indicate what type (mobile, direct, fax, etc.), i.e.:
    M <<Phone Mobile>>
    D <<Phone Direct>>
    If an employee has only one phone line, how can I make it so that the entire line will be omitted from the final merged doc?
    In the past, I've just gone through the final set and quickly removed extra lines/characters, but I know there's a way!
    Thanks.

    You could also do a find/replace (or, rather two of them if needed) to remove the leading character.
    So for your "D" phone number example, you would do a F/R after the merge like so:
    D <FEFF>\r
    If I remembered the syntax correctly, anyway. It finds the literal 'D' followed by a space, followed by an empty merge field marker, followed by a return. Replace would be with nothing.
    Else consider using a merge product that has the conditional capabilities. Em Software makes one such plug-in. I use Xdata for QuarkXpress a good bit, their InDesign counterpart is called InData.
    Mike

  • SUM function with condition in RTF template

    Hi All,
    I have a problem in calculating the SUM in RTF template with condition,
    Here is the XML
    - <LIST_G_LINE_NOTES>
    - <G_LINE_NOTES>
    <LINE_TRX_ID>1567856</LINE_TRX_ID>
    <LINE_ID />
    - <LIST_G_TRX_LINE>
    - <G_TRX_LINE>
    <CF_ITEM_NO>SDCN1144B</CF_ITEM_NO>
    </G_TRX_LINE>
    </LIST_G_TRX_LINE>
    - <LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
    - <G_LINE_EQUIVALENT_UNIT_PRICE>
    <LINE_EQUIVALENT_UNIT_PRICE>-15.99</LINE_EQUIVALENT_UNIT_PRICE>
    <LINE_EXCHANGE_EXTENDED_AMOUNT>-223.86</LINE_EXCHANGE_EXTENDED_AMOUNT>
    <CUSTOMER_TRX_LINE_ID>1567856</CUSTOMER_TRX_LINE_ID>
    </G_LINE_EQUIVALENT_UNIT_PRICE>
    </LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
    - <LIST_G_TRX_LINE>
    - <G_TRX_LINE>
    <CF_ITEM_NO></CF_ITEM_NO>
    </G_TRX_LINE>
    </LIST_G_TRX_LINE>
    I need the summation of field LINE_EXCHANGE_EXTENDED_AMOUNT with the condition CF_ITEM_NO!=''
    can anybody help me with the solution.
    Thanks in Advance

    Kavipriya,
    Here is the XML
    <LIST_G_LINE_NOTES>
    <G_LINE_NOTES>
    <LINE_TRX_ID>1567856</LINE_TRX_ID>
    <LINE_ID />
    <LIST_G_TRX_LINE>
    <G_TRX_LINE>
    <LINE_DELIVERY_ID />
    <DISCOUNT>0</DISCOUNT>
    <CP_LN_TAX_AMT />
    <CF_ITEM_NO>SDCN1144B</CF_ITEM_NO>
    </G_TRX_LINE>
    </LIST_G_TRX_LINE>
    <LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
    <G_LINE_EQUIVALENT_UNIT_PRICE>
    <LINE_EXCHANGE_EXTENDED_AMOUNT>-223.86</LINE_EXCHANGE_EXTENDED_AMOUNT>
    </G_LINE_EQUIVALENT_UNIT_PRICE>
    </LIST_G_LINE_EQUIVALENT_UNIT_PRICE>
    </G_LINE_NOTES>
    Edited by: user13012317 on Mar 10, 2011 11:00 PM

  • Key fields and non-key field of condition table

    Hello Gurus,
          what is key fields and non-key field of condition table?
    thanks very much!

    Key field
    Each condition table contains keys that can be used for creating dependent condition records.
    for example let take condition type PR00.
    PR00 uses access sequence PR02 .
    Access sequence PR02 has following tables associated with it namely 304, 305 & 306
    When you create a conditon record for PR00 with transaction VK11 or VK31, you have a button 'key combination' which is nothing but fields associated with tables 304, 305 & 306.
    In brief, Condition records are always created using specific keys. Condition tables are used to define the structure of the keys of a condition record.
    Non key field
    For example take condition table 144 - sales deal basic data.
    Table 144 is associated with access sequence PBUD.
    If you check the fields associated with this table (click technical view button), there are three fields at bottom which do not have 'key' check mark -KDATU, PLTYP, KSTAF
    So, when you create a condition record for PBUD, system does not propose these 3 fields in 'key combination' and hence are non key fields.
    Please reward points for good answers as this would help increase the total donation that SAP will make to the United Nations World Food Programme.

  • Field with time in minutes and seconds

    Dear community,
    first of all, I am using Apex 3.1 on Oracle 10g, if this is necessary to know (yes I know, an old version, but given by the company I'm working for). After I've developed a few applications in Apex, thank to the forum and all the answers inside, I came to a problem that I could not solve:
    I want to have a normal text field, where the user can enter a duration of an event (e.g. "3:45" or "2:30"). That duration will allways be in the format "MM:SS". No hours, no milliseconds... But how can I save the given values in the database, so in which format? A varchar would be a possibility, but I want to build a report later on, where there is a sum of the times. And how to get a sum of varchar?! But how to make it clear to Apex and Oracle DB that the users gives in a time and not a varchar? The only thing oracle offers is a date field, but I want to save a time and not a date!
    Does anybody has a clue for me, cause it seems to me, that possibly I just don't know what I'm searching for, cause people must have had this problem before!?
    THanks for your help!
    Regards
    hoge

    But how to make it clear to Apex and Oracle DB that the users gives in a time and not a varchar? The only thing oracle offers is a date field, but I want to save a time and not a date!All APEX items are character strings, so implicit or explicit conversion is required when the values are stored in database columns. For the recommended <tt>INTERVAL DAY TO SECOND</tt> columns, use <tt>TO_DSINTERVAL</tt> to perform the conversion.
    Use <tt>EXTRACT</tt> to get the minute and second values from the <tt>INTERVAL</tt> going in the other direction.
    but I want to build a report later on, where there is a sum of the times.A user-defined aggregate function can be created to sum <tt>INTERVAL DAY TO SECOND</tt> values: here's an example.
    APEX's lack of built-in support for summaries on <tt>INTERVAL</tt> types can be worked round by including the sum in the report query using a </tt>UNION</tt>:
    SQL&gt; with test_data as (
      2      select
      3                rownum n
      4              , numtodsinterval(ceil(dbms_random.value(0, 3600)), 'SECOND') t
      5      from
      6                dual
      7      connect
      8                by rownum &lt;= 10)
      9  select
    10            n
    11          , t
    12          ,    to_char(extract(minute from t))
    13            || ':'
    14            || to_char(extract(second from t), 'fm00') t1
    15  from
    16            test_data
    17  union all
    18  select
    19            null
    20          , sum_dsinterval(t)
    21          ,    to_char(extract(hour from sum_dsinterval(t)))
    22            || ':'
    23            || to_char(extract(minute from sum_dsinterval(t)), 'fm00')
    24            || ':'
    25            || to_char(extract(second from sum_dsinterval(t)), 'fm00')
    26  from
    27            test_data
    28  order by
    29            1 nulls last
    30  /
             N T                              T1
             1 +000000000 00:04:46.000000000  4:46
             2 +000000000 00:07:05.000000000  7:05
             3 +000000000 00:31:11.000000000  31:11
             4 +000000000 00:53:16.000000000  53:16
             5 +000000000 00:19:02.000000000  19:02
             6 +000000000 00:57:12.000000000  57:12
             7 +000000000 00:43:29.000000000  43:29
             8 +000000000 00:03:11.000000000  3:11
             9 +000000000 00:16:40.000000000  16:40
            10 +000000000 00:20:49.000000000  20:49
               +000000000 04:16:41.000000000  4:16:41A custom named column (row) report template with conditional templates can be used to layout and format such a report so that the summary row(s) are properly handled.

  • Problems with Conditional Display and Read Only

    Hi Everybody,
    I have a form to Add/ Modify Table Info.
    I have column which stores numeric value (like no. of purchases, no.of returns etc.,) and I have a text field with this Database column as Source.
    In some cases the value is a foreign key (Id of the Owner, Buyer etc.,) to another table. In such cases, I want to display a select list containing people information. Is that possible?
    This is what I did to achieve that
    I added a select list with info from second Table. Made both the text field and the select list to conditional display and conditional read only.
    My understanding is that When an item is made read only it should not be saved to the Database.
    But while Updating I am getting the following Error
    ORA-06550: line 1, column 130: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored.
    Any can anybody help me out on this?
    Thanks
    Nimmi

    My understanding is that When an item is made read only it should not be saved to the Database
    No, all page items with a Source Type of "Database Column" will be used by the Automatic DML process to insert/update the database. Form inputs with the "disabled" HTML attribute set are not POSTed to the server.
    Try to create 2 items, one Select List and other Text Field but setup their conditions such that only one of them is rendered on the page at any given time. That might work.

  • How to activate Approval in Sales Order for the UDF with condition

    Dear Expert,
                       I have created the UDF field Rebate(type amount) in Sales Order.I want to activate the approval procedure for this UDF with condition where Rebate is greater then Zero.I had applied the query and Activate it in approval procedure.--
    SELECT (Case When IsNull(count(T0.[DocEntry]),0) <>0 Then 'True' Else 'False' End) AS TF            
    FROM Ordr T0   where DocType='I' AND t0.U_rebate >0 and convert(Varchar(20),T0.[CreateDate],103) =(select convert(Varchar(20),Getdate(),103))
    But I found that the approval procedure activate every time inspite the Rebate field is Zero.
    Plaese suggest some soloution for it.
    regards,
    PankajK

    Hi Pankaj......
    Try this.......
    Select Distinct 'True' From ORDR T0 Where T0.U_Rebate>0 and T0.DocType='I' And T0.DocNum=$[ORDR.DocNum.0]
    Hope this will help you.......
    Regards,
    Rahul

  • How to compare table's date field with dropdown year field

    Hi All,
    I have one requirement to display the selected rows from a database table based on the selection of drop down.
    Here, I have one dropdown of year(like 2009,2010,....) and I have one database table which contains one field with "DATE".
    Now, I want to compare table's DATE field with my dropdown field.
    Problem is that table's DATE field is of type "DATS" and dropdown is of type INTEGER(or) STRING ...
    How to compare this fields?
    Can any one please give me solution for this...!
    Thanks in Advance!

    Hi  sreelakshmi.B,
    try the following:
    DATA lt_dats        TYPE TABLE OF dats.
    DATA l_dat_i        TYPE          i.
    DATA l_dat_c_4(4)   TYPE          c.
    DATA l_dat_c_12(12) TYPE          c.
    DATA l_dats_from    TYPE          dats.
    DATA l_dats_to      TYPE          dats.
    *Move Date from Integer to Char
    l_dat_c_4 = l_dat_i = 2005.
    *Create Date From use in WHERE-Clause
    CONCATENATE '01.01.' l_dat_c_4 INTO l_dat_c_12.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
         EXPORTING
              date_external            = l_dat_c_12
         IMPORTING
              date_internal            = l_dats_from
         EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
    IF sy-subrc <> 0.
    ENDIF.
    *Create Date To use in WHERE-Clause
    CONCATENATE '31.12.' l_dat_c_4 INTO l_dat_c_12.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
         EXPORTING
              date_external            = l_dat_c_12
         IMPORTING
              date_internal            = l_dats_to
         EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
    IF sy-subrc <> 0.
    ENDIF.
    * Select records in range
    SELECT *
           FROM [DBTAB]
           INTO TABLE [ITAB]
           WHERE [DATE] BETWEEN l_dats_from
                        AND     l_dats_to.
    Regards
    REA

  • Hiding fields with same name

    Hi,
    I have a form built in ADOBE LC Designer ES. The form has multiple pages. I have some fields with the same name and distributed across subforms. Is there a way I can hide the fields using the common name or do I have to refernece each and every field to hide it?
    Thanks,
    Nakul

    Is the condition for hiding the fields the same in every case, i.e. a checkbox being checked? If it is, you could put the same script in each field:
    if (checkbox1.rawValue == 1){
         this.presence = "hidden";
    You would still have to either paste the script into each field or make it a function that gets referenced in each field, but at least it would be a copy - paste rather than having to type out the path to each field.

  • V-41 tcode error :Table 304 is not defined for use with condition type PR00

    Hi All,
    I am trying to create a BDC using the transaction V-41. 
    The first screen has fields:
    ConditionType and Table, where I have to fill values ZPM1 and 800 respectively.
    But as soon as I enter the tcode v-41 and say enter, the above mentioned fields are already having the  values 'PR00' and ' 304'. Normally if you take an example fo t-code VA02, all fields are blank.
    Then an error message  is displayed:
    Table 304 is not defined for use with condition type PR00
    This behaviour is not allowing me to use the BDC feature.
    Please advise me on why this is happening. What are the possible solutions I can use to clear these values programmatically?
    Can anything be done via customizing?
    Regards,
    Namita.

    Dear ILHAN ,
    Well the problem you are facing is having the following solution:
    Table 304 is not defined for use with condition type PR00
    Message no. VK024
    Diagnosis
    The selected condition type does not fit in the condition table, that is the basis for the condition record. Alternatively the selected condition type is not included in the condition types that were selected on the selection screen or that are defined in the variant of the standard selection report.
    Procedure
    Úse F4 help to choose a valid condition type.
    If this does not give you the required condition type, check in Customizing for condition types and the related access sequences.
    In the condition maintenance also check Customizing for the selection report (pricing report), that you have selected in the navigation tree, using the standard condition table as a reference.
    I hope this helps.
    It has worked for me.
    I gave it a try and what I am getting using the transaction V-41 is create Price condition (PR00) : Fast Entry.
    Please award points if you find it useful.
    Regards,
    Rakesh

  • Pricing error with condition type HI02

    Hi Friends,
    I have problem in pricing procedure for customer hierarchy condition type HI02. I have created the condition node i.e.6222 and assigned customer 1500 and i also maintained the condition record for the same and also put in the pricing procedure as well. Now while i am creating sales order the condition type HI02 is not coming automatically rather i am able to put the same manually. I want the system should pick the condition type HI02 automatically. Please suggest me IMG setting which i sould maintain for customer hierarchy pricing.
    Thanks in advance,
    Bharat B

    Dear Barath
    You are right
    HI02 is a item condition type only used for customer hierarchy discounts and the access sequence for the same is HI02 with condition table 065  that is customer hierarchy/material and the same is positioned in V/07 in the access sequence details in seven consecutive  steps (the same condition table in all the seven steps) but the field in each table differing
    The field in table 065 which is positioned in no 1 is HIENR 01
    The field in table 065 which is positioned in no 2 is HIENR 02
    The field in table 065 which is positioned in no 3 is HIENR 03
    and the most important thing here is exclusive indicator ticked in all the steps exept the seventh step
    That means if at hierarchy level 1 system finds a record then it stops searching
    I have a feeling that your access sequence alignmemt must be wrong somewhere and check for exclusive indicator marking
    HI01 is a item condition type only used for customer hierarchy discounts and the access sequence for the same is HI01 with condition table 064  that is customer hierarchy and the same is positioned in V/07 in the access sequence details in seven consecutive steps (the same condition table in all the seven steps) but the field in each table differing
    The field in table 064 which is positioned in no 1 is HIENR 01
    The field in table 064 which is positioned in no 2 is HIENR 02
    The field in table 064 which is positioned in no 3 is HIENR 03
    and the most important thing here is exclusive indicator ticked in all the steps exept the last step
    That means if at hierarchy level 1 system finds a record then it stops searching
    I have a feeling that your access sequence alignmemt must be wrong somewhere and check for exclusive indicator marking
    Moreover importantly if there is condition type in a PP then if a condition record is maintained if the same is not picked up in sales order then analysis has to give some hint and what is the hint you are getting
    Regards
    raja

  • Get records number from internal table with condition.

    Internal table itab got more than 1000 records,now i need to get the number of records with condition that itab-field1 = 'XXXX'.
    actully, i got an inefficient logic to count the number in a loop statement. is there better way to implement it?

    hello,
    Every time assigning data into temp table and delete may that may not be much efficient. You can check in loop logic how much time is taken. You can check the below code. here I am trying to check the numbers of plant for for one material.
    In this logic material is the first field. So if there is option to make the required field in to the 1 st position then it will be nice.
    TYPES: BEGIN OF x_count,
            matnr TYPE matnr,
            count TYPE i,
           BEGIN OF x_count.
    DATA: i_marc  TYPE STANDARD TABLE OF marc,
          i_count TYPE STANDARD TABLE OF x_count,
          wa_count TYPE x_count.
    FIELD-SYMBOLS: <wa_marc> TYPE marc.
    SELECT * UP TO 1000 ROWS
      FROM marc
      INTO TABLE i_marc.
    IF sy-subrc = 0.
      SORT i_marc BY matnr.
      LOOP AT i_marc ASSIGNING <wa_marc>.
        wa_count-count = wa_count-count + 1.
        AT END OF matnr.
          wa_count-matnr = <wa_marc>-matnr.
          APPEND wa_count TO i_count.
        ENDAT.
      ENDLOOP.
    ENDIF.
    Thanks
    Subhanakr

Maybe you are looking for

  • Itunes back-up on pc gone, does back-up have a copy?

    i have an ipod, i had allot of songs and clips that i have saved.  I forgot to transfer all of these files to an external hard drive before having my pc sent in for repair work (installing a new hard drive).  Am i out of luck (all of the songs that i

  • Where can I buy a slot cover for my Mac Pro?

    I need a slot cover for my Mac. Any idea where I can get one?

  • Date format conversion in PL/SQL

    Hi, am new to pl/sql can any one please tel me how to wright a function to convert date format. I have date in database with different formats, the data type of the date in database is 'VARCHAR'. I want to convert the date format to standard format s

  • Changing Table maintenance settings

    Hi, The delivery and Maintenance of certain tables required for CIN configuration are set as - Display/Maintenace allowed with restrictions.  Hence these tables could not be maintained using SM30 / SE54. When checked in the SDN forums, certain people

  • My URI

    Hello. I'd like to protect my video (flv/progressive) by assuring it's requested by a 'valid' swf. Valid means hosted in a valid web page. In other words, if someone copies the HTML code (<object/embed> , and paste it in another web page, the swf wil