Why concatenate statement suppressing spaces !!

<i>Hello Friends,
              I like give some spaces in a concatenate statement, but it is suppresing the spaces.
for ex: <b>concatenate 'sundar' '      ' 'g' into name</b>.
but the name contains <b>'sundarg'</b> only.
Thank you for your valuable time.
Senthil</i>

hi senthil
<b>
Syntax:</b>
CONCATENATE dobj1 dobj2 ...  INTO result 
<b>                   [SEPARATED BY sep].
Example:</b>
DATA: t1(10) TYPE c VALUE 'We',
      t2(10) TYPE c VALUE 'have',
      t3(10) TYPE c VALUE 'all',
      t4(10) TYPE c VALUE 'the',
      t5(10) TYPE c VALUE 'time',
      t6(10) TYPE c VALUE 'in',
      t7(10) TYPE c VALUE 'the',
      t8(10) TYPE c VALUE 'world',
      result TYPE string.
CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8
            INTO result.
CONCATENATE t1 t2 t3 t4 t5 t6 t7 t8
            INTO result SEPARATED BY space.
<b>output:</b>
We have all the time in the world

Similar Messages

  • Plz  explain why concatenate statement is used in BDC

    Please do not post subject or content as ALL CAPITALS
    hi friends,
                    for the first time i am doing bdc table control.  i just cant make out the use of concatenate statement in that code.  i have gone thru some bdc table control codes in the forum but almost everywhere the concatenate statement has been used.  can u plz explain the use of that statement . THANKS IN ADVANCE.   
    eg:  THIS IS A CODE FROM ONE OF THE FORUM POSTS, SO I AM NOT COPYING IT FULLY.
         I HAVE HIGHLIGHTED THE  CONCATENATE PART.
    DATA : M(2) TYPE C,
    N(2) TYPE C,
    TEMP(50) TYPE C,
    WA_KUNNR LIKE KNA1-KUNNR.
    ****POPULATING HEADER DATA *******
    LOOP AT IT_HEADER INTO WA_HEADER.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = WA_HEADER-KUNNR
    IMPORTING
    OUTPUT = WA_HEADER-KUNNR
    SELECT SINGLE KUNNR FROM KNA1 INTO WA_KUNNR WHERE KUNNR = WA_HEADER-KUNNR.
    IF SY-SUBRC 0.
    MESSAGE I004(ZZS_MSG).
    ENDIF.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '0101'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'VBAK-SPART'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'VBAK-AUART' WA_HEADER-AUART.
    PERFORM BDC_FIELD USING 'VBAK-VKORG' WA_HEADER-VKORG.
    PERFORM BDC_FIELD USING 'VBAK-VTWEG' WA_HEADER-VTWEG.
    PERFORM BDC_FIELD USING 'VBAK-SPART' WA_HEADER-SPART.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'VBKD-BSTKD' WA_HEADER-BSTKD.
    PERFORM BDC_FIELD USING 'KUAGV-KUNNR' WA_HEADER-KUNNR.
    PERFORM BDC_FIELD USING 'KUWEV-KUNNR' WA_HEADER-KUNNR1.
    PERFORM BDC_FIELD USING 'RV45A-KETDAT'
    '21.10.2008'.
    PERFORM BDC_FIELD USING 'RV45A-KPRGBZ'
    'D'.
    PERFORM BDC_FIELD USING 'VBKD-PRSDT'
    '21.10.2008'.
    **********ITEM LOOP TO FIND NO.OF ITEMS ************
    M = 0.
    LOOP AT IT_ITEMS INTO WA_ITEMS WHERE BSTKD = WA_HEADER-BSTKD.
    M = M + 1
    ENDLOOP.
    CONCATENATE 'VBAP-PS_PSP_PNR(' M ')' INTO TEMP.
    PERFORM BDC_FIELD USING 'BDC_CURSOR' TEMP.
    CLEAR TEMP.
    ******POPULATING ITEMS DATA ********
    N = 1.
    LOOP AT IT_ITEMS INTO WA_ITEMS WHERE BSTKD = WA_HEADER-BSTKD.
    CONCATENATE 'RV45A-MABNR(' N ')' INTO TEMP.
    PERFORM BDC_FIELD USING TEMP WA_ITEMS-MABNR.
    CLEAR TEMP.
    CONCATENATE 'RV45A-KWMENG(' N ')' INTO TEMP.PERFORM BDC_FIELD USING TEMP WA_ITEMS-KWMENG.
    CLEAR TEMP.
    CONCATENATE 'VBAP-PS_PSP_PNR(' N ')' INTO TEMP.
    PERFORM BDC_FIELD USING TEMP WA_ITEMS-WBS.
    CLEAR TEMP.
    N = N + 1.
    ENDLOOP.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'VBKD-BSTKD' WA_HEADER-BSTKD.
    PERFORM BDC_FIELD USING 'KUAGV-KUNNR' WA_HEADER-KUNNR.
    PERFORM BDC_FIELD USING 'KUWEV-KUNNR' WA_HEADER-KUNNR1.
    PERFORM BDC_FIELD USING 'RV45A-KETDAT'
    '21.10.2008'.
    PERFORM BDC_FIELD USING 'RV45A-KPRGBZ'
    'D'.
    PERFORM BDC_FIELD USING 'VBKD-PRSDT'
    '21.10.2008'.
    PERFORM BDC_FIELD USING 'VBKD-ZTERM'
    'N30'.
    PERFORM BDC_FIELD USING 'VBKD-INCO1'
    'FOB'.
    PERFORM BDC_FIELD USING 'VBKD-INCO2'
    'NEW YORK'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'RV45A-MABNR(02)'.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=PKO1'.
    PERFORM BDC_FIELD USING 'VBKD-BSTKD' WA_HEADER-BSTKD.
    PERFORM BDC_FIELD USING 'KUAGV-KUNNR' WA_HEADER-KUNNR.
    PERFORM BDC_FIELD USING 'KUWEV-KUNNR' WA_HEADER-KUNNR1.
    PERFORM BDC_FIELD USING 'RV45A-KETDAT'
    '21.10.2008'.
    PERFORM BDC_FIELD USING 'RV45A-KPRGBZ'
    'D'.
    PERFORM BDC_FIELD USING 'VBKD-PRSDT'
    '21.10.2008'.
    PERFORM BDC_FIELD USING 'VBKD-ZTERM'
    'N30'.
    PERFORM BDC_FIELD USING 'VBKD-INCO1'
    'FOB'.
    PERFORM BDC_FIELD USING 'VBKD-INCO2'
    'NEW YORK'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'VBAP-POSNR(01)'.
    PERFORM BDC_FIELD USING 'RV45A-VBAP_SELKZ(01)'
    'X'.
    LOOP AT IT_ITEMS INTO WA_ITEMS WHERE BSTKD = WA_HEADER-BSTKD.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '5003'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/00'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'KOMV-KBETR(07)'.
    PERFORM BDC_FIELD USING 'KOMV-KSCHL(07)' WA_ITEMS-KSCHL.
    PERFORM BDC_FIELD USING 'KOMV-KBETR(07)' WA_ITEMS-KBETR.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '5003'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=POS+'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'KOMV-KSCHL(08)'.
    ENDLOOP.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '5003'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '/EBACK'.
    PERFORM BDC_FIELD USING 'BDC_CURSOR'
    'KOMV-KSCHL(08)'.
    PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
    PERFORM BDC_FIELD USING 'BDC_OKCODE'
    '=SICH'.
    CALL TRANSACTION 'VA01' USING IT_BDCDATA MODE 'A'.
    REFRESH IT_BDCDATA.
    ENDLOOP.
    u2022     Start new screen *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-PROGRAM = PROGRAM.
    WA_BDCDATA-DYNPRO = DYNPRO.
    WA_BDCDATA-DYNBEGIN = 'X'.
    APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDFORM. "BDC_DYNPRO
    u2022     Insert field *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL SPACE.
    CLEAR WA_BDCDATA.
    WA_BDCDATA-FNAM = FNAM.
    WA_BDCDATA-FVAL = FVAL.
    APPEND WA_BDCDATA TO IT_BDCDATA.
    ENDIF.
    ENDFORM. "BDC_FIELD
    Edited by: Matt on Mar 9, 2009 4:38 PM

    Every input/output field on the screen has its own name.(for example: RV45A-KETDAT)
    PERFORM BDC_FIELD USING 'RV45A-KETDAT' '21.10.2008'.
    means fill the date '21.10.2008' into the screen field 'RV45A-KETDAT'.
    CONCATENATE 'RV45A-MABNR(' N ')' INTO TEMP.
    PERFORM BDC_FIELD USING TEMP WA_ITEMS-MABNR.
    There are some special input fields on the screen (table control). In fact, it's a table.
    RV45A-MABNR
    RV45A-KWMENG
    other fields...
    RV45A-MABNR(01)
    RV45A-KWMENG(01)
    RV45A-MABNR(02)
    RV45A-KWMENG(02)
    RV45A-MABNR(..)
    RV45A-KWMENG(..)
    RV45A-MABNR(N)
    RV45A-KWMENG(N)
    so, the code means fill the values line by line.
    and, I recommend you to learn more basic knowledge of dynpro.

  • Why is RemoteException suppressed?

    Hi, I'm using Weblogic 5.1.If I have a Weblogic RMI client talking to a Weblogic RMI server, and the server goes down, the client will hang went it tries to invoke a method on the no-longer valid remote object in that server. In the Java RMI implementation, a RemoteException would be thrown on the client. Why is this suppressed in Weblogic's implementation? It doesn't make sense to hang up clients instead of letting them know that there's a communctation problem.Rob

    I just tried that and got this:
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read
    at java.net.SocketInputStream.socketRead(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:86)
    at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:210)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    --------------- nested within: ------------------
    weblogic.rjvm.PeerGoneException:
    - with nested exception:
    [java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read]
    at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:76)
    at Hello_WLStub.sayHello(Hello_WLStub.java:85)
    at HelloClient.main(HelloClient.java:63)
    What is it your client (or server) does that would cause it to hang?
    Robert Babinski wrote:
    Hi, I'm using Weblogic 5.1.If I have a Weblogic RMI client talking to a Weblogic RMI server, and the server goes down, the client will hang went it tries to invoke a method on the no-longer valid remote object in that server. In the Java RMI implementation, a RemoteException would be thrown on the client. Why is this suppressed in Weblogic's implementation? It doesn't make sense to hang up clients instead of letting them know that there's a communctation problem.Rob

  • PROBELM WITH TYPE X  VALUE '20' IN CONCATENATE STATEMENT in ECC version

    Hi EXPERTS,
             I am working in ECC 6.0 version.
             PROBELM WITH TYPE X  VALUE '20' IN CONCATENATE STATEMENT in ECC           version
             C_DEL     TYPE X VALUE '09' having solution --C_DEL TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
             If  C_DEL     TYPE X VALUE '20'   what was the solution in ECC version.
             Please let me know. I am awaiting for ur answers
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

    Hi
    welcome to SDN forum
    move that X field to a char field and use in concatenation
    CONCATENATE works only with CHAR fields
    Regards
    Anji

  • Why the IPhone 6  space gray Color doesn't have a front camera , only white and gold has front camera?

    Hello, my question is,
    why my iphone6+ A Space Gray Color doesn't have a front camera, I saw white and gold has ?

    Of course it does have the camera, it is just darker, so you don't see it. You are also in the wrong forum: this one is for the professional audio application MainStage, not for the phone.

  • Why CONCATENATE String2 '*' INTO String1 doesn't work?

    hi ABAP experts,
    We would like to get a wildcard string by using Concatenate and then in select statement.  But when we activate the following simple statement, get the following error:
    Statement is not accessible. at the Concatenate statement.
    Below is the simple piece of code:
    data: String1 TYPE C.
    parameters:String2 like EKPO-EKORG.
    CONCATENATE String2 '*' INTO String1.
    select EBELN EBELP MATNR MENGE from EKPO into table item_itab
         Where MATNR like String1.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Mar 6, 2008 10:39 AM

    data: String1 TYPE C.
    parameters:String2 like EKPO-EKORG.
    Start-of-selection.
    CONCATENATE String2 '*' INTO String1.
    select EBELN EBELP MATNR MENGE from EKPO into table item_itab
    Where MATNR like String1.

  • Why quality sytem disk space  should be the same as Production disk space

    Hi All,
    Why quality sytem disk space should be the same as Production system disk space. Please give few points and also the impact if the disk spaces are not same. Its URGENT.

    Karunakar,
    It all depends on what you do with your QA system. I personally don't think QA and Prod should be of the same size.
    QA is your testing environment, the one where you perform the final tests and validations before going to Prod.
    In my personal experience and practice, for QA:
    - Daily loads of Master Data - Master Data is good to keep it updated, for obvious reasons
    - No daily transactions loads - You can load your transaction data on demand, depending on the specific area you need to test. You can initialize and load sample periods or sets of data. Once you're done, that's it.
    - No copy from BW Prod to QA - You really don't need to. As far as they do "refresh" from R/3 Prod to R/3 QA, you'll have data in QA good enough to test. Also, copying Prod to QA in BW can mess your transports sequence and put the systems out of sync or make you re-transport requests that were already in QA but not in Prod. Also, by doing those copies, it's like having two Production systems to maintain... Your landscape and maintenance costs will grow much faster
    In my opinion, Development and QA have a controlled growing, following those guidelines. Only Prod will keep growing during time, which makes sense.
    My 2 cents...
    Regards,
    Luis

  • Why does undo table space got full even when i commit between inserts??

    Dears,
    I have stored procedure which inserts around 5million record(insert select not applicable); and it always fails because of "ORA-30036: unable to extend segment by 8 in undo tablespace" although the procedure commits after every 10,000 records and the undo table space is 2GB. so my question is why does undo table space got full even if i commit?? & do i have other solution than making the undo auto extend??
    am working on Orcale 9i RAC
    Swaid A. McKey

    Actually, i had the same problem that my UNDO tablespace starting eating too much space, my undo_retention is set as 3hours, but how can estimate it using the view.
    Here the following sample output
    SID     STATISTIC#     VALUE
    3     151     0
    3     152     0
    3     153     0
    Can anyone assist with it ? But i still have the strange feeling why would UNDO get full once commit is being used. Even i did try with AUTOEXTEND and it throw me the errors that can't extend UNDO tablespace.
    Any ideas.....
    Thanks !!
    MB

  • HT3275 Why I'm losing space on my internal HD, after i started to use the Time Machine, and after deleting all my files i still dont have any space on my internal HD!

    Why I'm losing space on my internal HD, after i started to use the Time Machine, and after deleting all my files i still dont have any space on my internal HD?

    Why I'm losing space on my internal HD, after i started to use the Time Machine, and after deleting all my files i still dont have any space on my internal HD?

  • Why ABAP is so space sensitive?

    Why ABAP is so space sensitive?
    I am used to programming in anguages such as JAVA, C++. In these languages
    You can put spaces anywhere. ABAP requires spaces somewhere but not in other places; e.g.
    Select * from mara
    Where (  MATNR = u2018ZCHu2019 OR MATNR = u2018ZXXu2019  )
    One has to have spaces after ( and before ); yet when I was using
    Select * from mara
    Where MATNR IN(u2018ZCHu2019, u2018ZXXu2019)
    There cannot be any spaces after IN or so.
    Are there some rules documented where one needs spaces and where one does not.

    Hi ,
    If you want to know about the exact syntax then write that keyword in abap editor and  while keeping the cursor on it press f1 , it will take you to the syntax and exmple also.
    Regards,
    Uma

  • Why bookmarks have 4 spaces added after the update from FF3.6 to 13?

    Why bookmarks have 4 spaces added after the update from FF3.6 to 13?

    Problems with bookmarks and history not working properly can be caused by a corrupted places.sqlite database file.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    You can also try to repair the places database with this extension:
    *https://addons.mozilla.org/firefox/addon/places-maintenance/

  • Query regarding Concatenate statement functionality from ECC 6.0 to 46B ver

    Hi,
    I got new requirement ie I have to copy reports from ECC6.0 to 46B version. While copying I faced number of issues and I am not clear for below one.
    concatenate i_result1-result p_delim into i_result1-result respecting blanks. ( this is in ECC6.0)
    now my requirement is I have to use the same functionality in 46B version without respecting blanks the statement is working but I need the functinality of respecting blanks also.
    Thanks in advance.
    -Kumar.

    Try like this in 46B:
    concatenate i_result1-result p_delim into i_result1-result SEPARATED BY SPACE.
    Regards,
    Naimesh Patel

  • Why have to append spaces when data type is char?

    I have a tabe MyTable which has tow columns(code char(8),name varchar2(16)) and there is one record ('003','mike') in the table,I retrieve the table use the code :
    ......//get database connection
    String sql = "SELECT * FROM MyTable where code = ?";
    PreparedStatement st = conn.prepareStatement(sql);
    st.setString(1,"003");
    ResultSet rs = st.executeQuery();
    ......//other code
    I cann't retrieve the record,I have to append 5 space to the parameter to get data: st.setString(1,"003 ").
    When column's data type is char , I have to append spaces to the parameter values? why?

    or if you want to do it at the API level, you can use the Oracle extension
    OraclePreparedStatement.setFixedCHAR
    public void setFixedCHAR(int paramIndex,
                             java.lang.String x)
                      throws java.sql.SQLException
        Use this method when binding to a CHAR column in the
    where clause of a Select statement. A non padded
    comparision will be done unlike in setCHAR and setString
    case. Not particularly needed for an insert as the
    database will pad it.
    Parameters:
    paramIndex - index of the bind variablex - the literal/variable to be bound.like..,
    String sql = "SELECT * FROM MyTable where code = ?";
    PreparedStatement st = conn.prepareStatement(sql);
    ((oracle.jdbc.OraclePreparedStatement)st).setFixedCHAR(1, "003");
    pstmt.executeQuery();Regards
    Elango.

  • How to suppress spaces in spool file

    Hi,
    i want to generate a sqlplus spoolfile, but trim doesn't suppress leading spaces. What do i make wrong?
    For example the value in column 4 is 9 not " 9" . It's a char(1) column
    SQL> SELECT STICHTAG||';',
    2 KONTO_LIEFERID||';',
    3 KONTONUMMER||';',
    4 TRIM(ARBEITSZIFFER)||';'
    5 FROM av_abst_mp_ifrs
    6 WHERE stichtag='20081230'
    7 AND kontonummer='9851674900'
    8 /
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;
    20081230; K01; 9851674900; 9;

    Hi,
    The spaces at the output is the spaces for the columns (Not spaces for the column values), you can concat all values at one column, like this...
    SQL> SELECT STICHTAG||';'||
    2 KONTO_LIEFERID||';'||
    3 KONTONUMMER||';'||
    4 TRIM(ARBEITSZIFFER)||';'
    5 FROM av_abst_mp_ifrs
    6 WHERE stichtag='20081230'
    7 AND kontonummer='9851674900'
    8 /Not Tested.
    Other option (without concat all columns) at sqlplus you can use "COLSEP". like this...
    sql> SELECT 'DATE', SYSDATE
      2  FROM DUAL;
    'DAT SYSDATE
    DATE 29/01/09
    1 row selected.
    sql> SELECT 'DATE'||SYSDATE
      2  FROM DUAL;
    'DATE'||SYSD
    DATE29/01/09
    1 row selected.
    -- "OR"
    sql> SET COLSEP ''
    sql> SELECT 'DATE', SYSDATE
      2  FROM DUAL;
    'DATSYSDATE
    DATE29/01/09
    1 row selected.Edited by: dask99 on Jan 29, 2009 9:14 AM
    Added new option.

  • Why do I get Spaces when I add a new line?

    Finally broke down and have retired HomeSite+.  Not sure that is a good idea though... A few things are bugging me about ColdFusion Builder 2 such as:
    I have auto indent turned on for tabs only and a tab is set to 3 spaces wide. I have done this in every editor setting under Preferences (ColdFusion, General, HTML, and Java) yet if the line I am working on has more than one tab as an indent every time I press return I get 3 spaces in place of one of the tabs.  How do I make that go away???
    In my CFML Formatting Profile I have Tag Case and Attribute Case set to upper case yet they always show up lower case.  How do I fix that?
    More often than not when I type a closing angle bracket on a line (>) the ending tag does not appear, and when it does it is always lower case and not upper case.
    Now I remember why I stuck with HomeSite for as long as I did.  It worked the way it was supposed too!!!  :O
    Seriously, I know these are trivial types of things but I am pretty anal when it comes to the formatting aspects of my code and CF Builder is making it harder to do than it should be.   Any help at all would be appreciated!!!

    The more I use ColdFusion Builder 2 the more I miss HomeSite.  The list of undesirable features for this POS development grows daily along with my frustration!!!  If Adobe is serious about being a player in the development space then they need to fix their development environements!!!  h is every time I
    My latest ***** is every time I open up my preferences and select ColdFusion -> Profiles -> Editor -> Formatter it hangs.  Great thanks...
    Let see I now get ending angle brackets every time I type in a variable for things like CFLOOP but it doesn't add the </CFLOOP> unless I first delete the > that it put in first.  When it adds </CFLOOP> it is lower case even though I want it upper case.  Weired thing is when the closing </CFQUERY> tag is addded it is upper case.
    Can you guys just bring back HomeSite please???  That was a solid development environment that worked!!!  Or should I just give up on CF???  After a decade plus of developing in CF I am getting close to never using it again!!!  And this POS development environment is a big reason why!!!   >:(

Maybe you are looking for