Need to concatenate

i am concatenating g_txt04 like tj02t-txt04.
into a string field
CONCATENATE G_S_TXT04 G_TXT04 INTO G_S_TXT04
                  SEPARATED BY ','.
what happens is that , appears in front of the text.
for eg.
,text1,text2.text3.
i need to remove the , infront of text1.
i am trying to use offset command , i am getting an runtime error. pls can u provide me with a coding that
removes the , in front of the text.

Hi Anitha,
Try this code...
if G_S_TXT04+0(1) = ','.
  v_len = strlen( G_S_TXT04 ).
  v_len = v_len - 1.
  G_S_TXT04 = G_S_TXT04+1(v_len).
endif.
Regards,
Raj

Similar Messages

  • In mapping need to concatenate 10 fields

    Hi All
    in Mapping need to concatenate more than 10 fields , is there any way to make it short can concatenate all in one stretch

    Hi Sridhar,
    check this logic, it works.
    data: begin of itab occurs 0,
            word(100),
           end of itab.
    data: begin of jtab occurs 0,
            word(100),
           end of jtab.
    itab-word = 'mahi'.
    append itab.
    itab-word = 'mahe'.
    append itab.
    itab-word = 'mahs'.
    append itab.
    loop at itab.
       concatenate itab-word jtab into jtab separated by space.
    endloop.
        append jtab.
    loop at jtab.
    write:/ jtab-word.
    endloop.
    thanks\
    Mahesh

  • ME51N - need to concatenate the PR # & the item # into a custom field.

    Hi All,
    I need to concatenate the PR number and the item number into a custom field in the customer data tab in transaction ME51N. I been looking at some user exits, but the problem is that when I try to use BAPI_PR_CHANGE in a user exit the BAPI failed, because the PR has not been committed to the EBAN table and it cannot fined it. The custom field is in the EBAN table. The other problem is that most user exits don't have access to the PR number. Can anyone tell me how I can update the custom field on a new PR creation after I click the save button?

    Hi All,
    I need to concatenate the PR number and the item number into a custom field in the customer data tab in transaction ME51N. I been looking at some user exits, but the problem is that when I try to use BAPI_PR_CHANGE in a user exit the BAPI failed, because the PR has not been committed to the EBAN table and it cannot fined it. The custom field is in the EBAN table. The other problem is that most user exits don't have access to the PR number. Can anyone tell me how I can update the custom field on a new PR creation after I click the save button?

  • Need to concatenate more  than 10 fields

    Hi All
    in Mapping need to concatenate more than 10 fields , is there any way to make it short can concatenate all in one stretch, instead of using mutiple conctenate statements
    please help me
    Thanking you
    Sridahr

    If this is a one time activity, better to go for using concatenate function multiple times.
    Regards,
    Prateek

  • Need to Concatenate Data In a Single Record

    Guys
    Here I describe the example on the employee data
    Before
    10 ABC
    10 SCOTT
    10 KING
    20 ROBERT
    20 ALLEN
    AFTER
    10 ABC, SCOTT, KING
    20 ROBERT, ALLEN
    I had a requirement to concatenate employee name in single record by department wise, I have done by creating
    function(Using loop) and call it in sql query, but query is getting much time,
    Is there any other way to improve the query without using loop?
    Kindly help me, Thanks in Advance.

    SQL> ed
    Wrote file afiedt.buf
      1  select deptno,
      2  LTRIM(max(sys_connect_by_path(ename,',')),',') employess
      3  from (select deptno,ename,
      4        row_number() over(partition by emp.deptno
      5        order by empno) r
      6        from emp)
      7  start with r=1
      8  connect by prior r+1=r
      9         and prior deptno=deptno
    10* group by deptno
    SQL> /
        DEPTNO
    EMPLOYESS
            30
    ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
            20
    SMITH,JONES,SCOTT,ADAMS,FORD
            10
    CLARK,KING,MILLERFor more example
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • Concatenate in loop

    Hai,
    As Iam using Loop in a Loop iam getting  time out dump .
    in my internal table itab3 has unique objnr values.
    for each objnr i have different status in itab_jcds.
    each status column has diff status.
    now i need to concatenate the status depending upon same objnr.
    LOOP AT  ITAB3 INTO WA_ITAB3.
        RDX = SY-TABIX.
        LOOP AT ITAB_JCDS INTO WA_ITAB_JCDS WHERE OBJNR = WA_ITAB3-OBJNR.
         CONCATENATE WA_ITAB_JCDS-STATUS1 WA_ITAB3-STATUS1 INTO WA_ITAB3-STATUS1 SEPARATED BY SPACE.
          CONCATENATE WA_ITAB_JCDS-STATUS2 WA_ITAB3-STATUS2 INTO WA_ITAB3-STATUS2 SEPARATED BY SPACE.
          CONCATENATE WA_ITAB_JCDS-STATUS3 WA_ITAB3-STATUS3 INTO WA_ITAB3-STATUS3 SEPARATED BY SPACE.
          CONCATENATE WA_ITAB_JCDS-STATUS4 WA_ITAB3-STATUS4 INTO WA_ITAB3-STATUS4 SEPARATED BY SPACE.
        ENDLOOP.
        MODIFY ITAB3 FROM WA_ITAB3 INDEX RDX
                                            TRANSPORTING
                                            OBJNR
                                            STATUS1
                                            STATUS2
                                            STATUS3
                                            STATUS4.
      ENDLOOP.
    example:
    itab3
    objnr
    123
    145
    itab_jcds.
    objnr                    stat1                    stat2                     stat3                     stat4
    123                       nopr                      mav                     crtd                       rel
    123                       CRTD                    mnav                    rel                        prt
    123                       rel                          orsc                   txt                          crtd
    now i req output as
    itab3
    objnr               stat1                    stat2                    stat3             stat4.
    123           nopr crtd rel         mav mnav orsc        crtd rel txt      rel prt crtd
    could u please help.

    Hi,
    Try this way..
    SORT ITAB3 BY OBJNR.
    SORT ITAB_JCDS BY OBJNR.
    LOOP AT ITAB3 INTO WA_ITAB3.
    RDX = SY-TABIX.
    READ TABLE ITAB_JCDS INTO WA_ITAB_JCDS WITH KEY OBJNR = WA_ITAB3-OBJNR.
                                                                                    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    LOOP AT ITAB_JCDS INTO WA_ITAB_JCDS FROM SY-TABIX.
    IF WA_ITAB_JCDS-OBJNR NE WA_ITAB3-OBJNR.
    EXIT.
    ENDIF.
    CONCATENATE WA_ITAB_JCDS-STATUS1 WA_ITAB3-STATUS1 INTO WA_ITAB3-STATUS1 SEPARATED BY SPACE.
    CONCATENATE WA_ITAB_JCDS-STATUS2 WA_ITAB3-STATUS2 INTO WA_ITAB3-STATUS2 SEPARATED BY SPACE.
    CONCATENATE WA_ITAB_JCDS-STATUS3 WA_ITAB3-STATUS3 INTO WA_ITAB3-STATUS3 SEPARATED BY SPACE.
    CONCATENATE WA_ITAB_JCDS-STATUS4 WA_ITAB3-STATUS4 INTO WA_ITAB3-STATUS4 SEPARATED BY SPACE.
    ENDLOOP.
    MODIFY ITAB3 FROM WA_ITAB3 INDEX RDX
    TRANSPORTING
    OBJNR
    STATUS1
    STATUS2
    STATUS3
    STATUS4.
    ENDIF.
    ENDLOOP

  • Concatenate fields in hr payroll attendance report

    Hi all,
    I need to concatenate three fields PERNR, BEGDA and  ATTIND  into a string.after concatenating I need to count no. of records present for this combination into internal table and compare this count with other oracle database records count.if both counts are not same then need to display these three fields mismatched records in the output.can anyone provide some help to achieve this.
    Thanks in advance,
    Regards,
    Harshada

    Hi,
    Create an internal table with 2 columns; first being the concatenated string field, the other being an integern (name it COUNT or something meaningful).
    Build up your internal table by doing the concatenation - move the concatenated value into the first field.  Set the second field to 1 then COLLECT the entries into the internal table.  After processing, there will be only one entry for each combination and the COUNT column will indicate the number of times that combination was found.
    Regards,   Andy

  • Concatenate different reports in a single PDF file

    Hi,
    I need to concatenate different reports in a single PDF file.
    What I want is to have a single PDF file as a result of a single URL request; but my request runs different reports having a single file as a result.
    In other words, I already have the report A, B and C.
    I'd want to build a new report "D" that invokes A, B and C returning a single PDF that contains A + B + C.
    How can I do it? Is there a SRW function?
    Thanks in advance for your help
    Samuele Gallazzi

    You can concatenate pdf's together using Ghostscript on unix. Just a bit of scripting.

  • Need to combine month and year to get date YYYY-MM-DD format

    Month and year are table fields and they will have values like
    Month in format = mm  example 01
    year in format = YYYY example 2010
    Now i need to concatenate month and year to derive date .
    Expected result Result :2010-01-01
    Example :Month =01
    Year =2010
    Mudassar

    The principle of any tiered architecture is that display formatting is done in a presentation layer. This is not just SQL and Client/Server programming; it is the foundation of all modern programming. Not knowing this is like a doctor who does not know
    about germs or a chemist who does not know about atoms. 
    This is reviewed in the first 1-2 weeks of any database class. Why are you violating it?? 
    Next, you do not even know that column are not fields! 
    T-SQL now has a DATE data type, which defaults to the ISO-8601 display format (yyyy-mm-dd). Are you using it? If you had been polite we would see your DDL and know. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Concatenate results SQL query and CASE use Report Builder Reporting Services

    I need to concatenate the results from a SQL query that is using CASE.  The query is listed below.  I do not need permitsubtype but I need to concatenate the results from the permittype. 
    I tried deleting the permitsubtype query and it would not run correctly.  Please see the query and diagram below.  Any help is appreciated.
    select  PERMIT_NO
    ,(case when
      ISNULL(PERMITTYPE,'') = ''
      then 'Unassigned'
      else (select LTRIM(RTRIM(PERMITTYPE)))
      END) AS PERMITTYPE
    ,(case when
      ISNULL(PERMITSUBTYPE,'') = ''
      then 'Unassigned'
      else (select LTRIM(RTRIM(PERMITSUBTYPE)))
      END) AS PERMITSUBTYPE
     ,ISSUED
     ,APPLIED
     ,STATUS 
     ,SITE_ADDR 
     ,SITE_APN
     ,SITE_SUBDIVISION
     ,OWNER_NAME
     ,CONTRACTOR_NAME
     ,ISNULL(JOBVALUE,0) AS JOBVALUE
     ,FEES_CHARGED
     ,FEES_PAID
    ,BLDG_SF
    from Permit_Main
    where ISSUED between @FromDate and @ToDate

    Hi KittyCat101,
    As per my understanding, you used case when statement in the query, you do not need to display permitsubtype in the report, but when you tried to delete permitsubtype from the query, it could not run correctly. In order to improve the efficiency of troubleshooting,
    I need to ask several questions:
    “I tried deleting the permitsubtype query and it would not run correctly.” As we can see, it has no effect to delete permitsubtype from the query you provided, could you please provide complete sql query for the report?
    Could you please provide detailed information about the report? I would be appreciated it if you could provide sample data and screenshot of the report.
    Please provide some more detailed information of your requirements.
    This may be a lot of information to ask for at one time. However, by collecting this information now, it will help us move more quickly toward a solution.
    Thanks,
    Wendy Fu

  • How to concatenate a "name.target" with string?

    Hello, how are you?
    I have this issue:
    I have a function -let's call this function "dad", that receives a parameter -let's call it "parameter". Inside dad function, I need to concatenate parameter with a string, to call a function outside function dad. Example:
    function dad (parameter) {
    parameter.target.onPress = trace (parameter.target  + "_animation") --> this returns "_level0.button1_animation" which is the same as "button1_animation" right?
    but when i use it to call a function outside it doesnt work:
    parameter.target.onPress = parameter.target + "_animation" ; --> doesn't work.
    parameter.target.onPress = [parameter.target + "_animation"] ; --> doesn't work.
    but this does work:
    parameter.target.onPress = button1_animation
    function button1_animation {
    here i have a tween
    All i wanna do, is concatenate parameter.target with a string, to call a function outside! is it possible ?
    thanks in advance

    Ned, Thanks.
    I dont want to treat the string as a function, because I already have the function "button1_animation" outside. I need to call that function  when i do parameter.target.onPress where parameter is button1, button2, button3 (i am passing to the parameter an array of buttons, and i need each button to call it's own function (button1_animation, button2_animation, an so on...) this functions are outside the function  that receives "parameter".
    I finally could do it this way:
    parameter.target.onPress = eval[parameter.target_name + "_animation"]
    i really appreciate the time you took on helping me. Thank you very much.

  • 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.

  • How to (or can I even) concatenate BLOB

    One practice for storing images files is creating a table with a column (named IMG) of the BLOB data type, then inserting each image into the table. The result is the table contains multiple records:
    ROW1: img1
    ROW2: img2
    ROW3: img3
    ROW4: img4
    Now, for some reason I need to concatenate the image data (not combine them), just concatenate them one after another, into one record, then store it in the table, logically speaking, it will be like this: img1 | img2 | img2 | img4
    When I need it later, I'll issue a SELECT statement such as
    SELECT img into v_img from TABLE_NAME where id = '12345';
    next I need to separate and restore the v_img back to its individual image, i.e., img1, img2, img3, and img4.
    I just wonder can I even do this?
    Thanks
    Scott

    Hello;
    I don't believe that's possible in the database. A blob is just a set of binary-data. One set.
    I would post more about your exact requirements.
    Creating a Table Containing One or More LOB Columns
    http://docs.oracle.com/cd/E11882_01/appdev.112/e18294/adlob_ddl.htm#i1007083
    Oracle Database SecureFiles and Large Objects Developer's Guide:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e18294/toc.htm
    LOB Storage Parameters
    http://docs.oracle.com/cd/E11882_01/appdev.112/e18294/adlob_tables.htm#CIHEBABG
    Multimedia User's Guide
    http://docs.oracle.com/cd/E11882_01/appdev.112/e10777/toc.htm
    Best Regards
    mseberg
    Edited by: mseberg on Mar 12, 2012 12:06 PM

  • Best way to concatenate with a ; in dynamic internal table

    I have dynamic internal table, i need to concatenate each field with a semi colon (
    The following is the code i have written , is any better approach to this
    report zaRs
      no standard page heading line-size 255.
    data : wa_itab      type yctcgsa_out. 
    data : i_itab       type standard table of wa_itab.
    data : i_details    type abap_compdescr_tab.
    data : i_ref_descr  type ref to cl_abap_structdescr.
    i_ref_descr ?= cl_abap_typedescr=>describe_by_data( i_itab ). " Here i_itab is dynamic int table
    i_details[] = i_ref_descr->components[].
    data: output(900) type c.
    data: value(51) type c.
    loop at i_itab into wa_itab.
      loop at i_details.
        assign component sy-tabix of structure <wa_itab> to <fs>.
        condense <fs> no-gaps.
        concatenamte <fs> ';' into value.
        condense value no-gaps.
        v_len = strlen( value ).
        move value to output+v_pos(v_len).
        v_pos = v_pos + v_len.
      endloop.
      move output to i_putput.
      append i_output.
      clear : v_pos, v_len, output, value.
    endloop.

    Hello,
    2/other solution:
    Create a dynamic structure with 2n fields where n is the number of fields i_tab. The structure of this table will be:
    field 1          : Field n°1 of i_tab
    field 2         : one character field  named SEP0001
    field 3         : Field n°2 of i_tab
    field 4         : one character field  named SEP0002
    field 2n - 1: Field n°n of i_tab
    field 2n         : one character field  named SEP000n
    Create a dynamic structure with n fields. this structure will be defined as follow:
    field 1          :one character field  named SEP0001
    field 2          :one character field  named SEP0002
    field n          :one character field  named SEP000n
    For example, we have the below report. This report does not explain how to create dynamic structures wa_sep and wa_itab_sep.
    report zaRs
      no standard page heading line-size 255.
    TYPES:
      BEGIN OF ywa_itab,
         field1 type vbeln,
         field2 type vbeln,
      END   OF ywa_tab,
      BEGIN OF ywa_sep,
         sep0001 type char1,
         sep0002 type char1,
      END   OF ywa_sep,
      BEGIN OF ywa_itab_sep,
         field1  type ywa_itab-field1,
         sep0001 type ywa_sep-sep0001,
         field2  type ywa_itab-field2,
         sep0002 type ywa_sep-sep0002,
      END   OF ywa_itab_sep.
    data : wa_itab      type ywa_itab. 
    data : i_itab       type standard table of wa_itab.
    data : wa_sep       type ywa_sep.
    data : wa_itab_sep  type ywa_itab_sep.
    data: output(900) type c.
    data: value(51) type c.
    *init all fields of wa_sep with ';'
      DO.
        assign component sy-tabix of structure wa_sep to <fs>.
        IF  sy-subrc IS INITIAL. EXIT. ENDIF.
        MOVE ';'   TO <fs>.
      EnDDo.
    loop at i_itab into wa_itab.
      move-correponsding wa_itab to wa_itab_sep.
      move-correponsding wa_sep  to wa_itab_sep.
      move wa_itab_sep           to i_output.
      append  i_output             to output.
    endloop.
    This report does not explain how to create dynamic structures wa_sep and wa_itab_sep.
    Cordialement,
    Chaouki.
    Edited by: Chaouki AKIR on Jun 12, 2009 1:18 AM

  • Append/Concatenate Files?

    How can we concatenate two flat files?
    I have two files and before using it as a parameter , I need to concatenate/append the contents of one file into another and then send it for processing ..!!
    These are two flat files getting orders01 data in EDI850 format . I need to make them a single file and pass it to RSEINB00. ( as the files should be posted as a whole or fail if any error in any of them , thats why i cant call RESINB00 twice with these filename in my job )

    I did it at OS level . Here’re the steps I followed.
    -Create OS command in SM69 and give the UNIX path
    -Test the OS command By tr.SM49
    -Create Shell script
    Cat filename >> newfile  ( this Unix command add the content of the file into the new file .  you can also use extension of the file like
    CAt *.txt >> newfile ( If you’ll search on the UNIX forums( www.google.com )  , you’ll also find the code )
    -Create SAP program with FM "SXPG_COMMAND_EXECUTE" and execute the command using SAP
    Code for OS command
    call function 'SXPG_COMMAND_EXECUTE'
        exporting
          commandname                   = c_os_command
          additional_parameters         = l_os_parameters
          operatingsystem               = sy-opsys
        importing
          status                        = l_status_code
          exitcode                      = l_exit_code
        tables
          exec_protocol                 = log_messages
        exceptions
          no_permission                 = 1
          command_not_found             = 2
          parameters_too_long           = 3
          security_risk                 = 4
          wrong_check_call_interface    = 5
          program_start_error           = 6
          program_termination_error     = 7
          x_error                       = 8
          parameter_expected            = 9
          too_many_parameters           = 10
          illegal_command               = 11
          wrong_asynchronous_parameters = 12
          cant_enq_tbtco_entry          = 13
          jobcount_generation_error     = 14
          others                        = 15.
      if sy-subrc <> 0 or l_exit_code <> 0.
        perform sub_log_error using 'E01' text-m56 wc_report_file c_x c_x c_x.
      endif.
    You can also use GUI_UPLOAD  and download FM
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

Maybe you are looking for

  • In ALV report is possible to display the subtotals in separate column

    Hi, I have made one ALV report, i need to show the subtotals of ekpo-brtwr (Gross Value)  grouped by or sorted by ekko-ebeln (Purshasing Doc) but in separate column  not at the end of the line items of each purshasing doc any idea how can i do this?

  • Returning PDF document

    Hi all, I have been stuck on this problem for long. Please advice I have a servlet that returns a PDF document via streaming. I want the client to open the PDF within the browser using the embedded Adobe PDF Reader rather than having a dialog promoti

  • "IT_SPFLI" is not an internal table "OCCURS n" specification is missing.

    I follow this tutorial. I replaced the 2  tables into sflight and spfli table. http://www.****************/Tutorials/BSP/UsingTableView/demo.htm and this error occurred. "IT_SPFLI" is not an internal table "OCCURS n" specification is missing.

  • I can't use this query on 10G, but can use on 9i

    I have ever used bellow query and no error SQL>select so.* from bsowner.sales_orders so left join bsowner.relation_address rla on (so.customerid = rla.relationid and so.delivery_addressid = rla.addressid ) and rla.addresstype = (select code from bsow

  • Multiple contract assignment using document flow

    hello i need to attach mulitiple contracts to diffrent lines items of the service order using document flow. One needs to attach contract header at the service order header and contract item at the service order item. This works fine if you try to at