Space issue in  Internal table

Hi Experts,
       I Have An issue  while Appending into Internal table.
This is an outbound interface  in which I have 7 different types of records. I am  appending all the work area to an internal table with size 500 char. the problem is that  the last field is blank in some records  the spaces are trucated.  I need  those space at the end as that file will be encrypted and send.
Thanks in advance.
Vijay

Hi Madhan,
Try below tricky code to get spaces.
DATA: BEGIN OF t_space OCCURS 0,   " Data table
      name(10) TYPE c,
      dept(10) TYPE c,
      last_fld(480) TYPE c,   " Last field in data table, which you have to check
      END OF t_space,
      wa_space LIKE LINE OF t_space.
DATA: str_space TYPE string.
DATA: BEGIN OF t_final OCCURS 0,        " Final table
      text(500) TYPE c,    " Single field with length 500 characters
      END OF t_final,
      wa_final LIKE LINE OF t_final.
"Below is tricky way to get ASCII value for space.
" Press ALT key and hold it and now press 255 in Numeric Keypad and now release ALT key.
"This is ASCII value for space
CONSTANTS: ascii_space VALUE ' '.    " Give this space as mentioned in above line
wa_space-name = 'A'. wa_space-dept = 'IT'.
APPEND wa_space TO t_space.
wa_space-name = 'B'. wa_space-dept = 'CSE'.
APPEND wa_space TO t_space.
wa_space-name = 'C'. wa_space-dept = 'EEE'.
APPEND wa_space TO t_space.
wa_space-name = 'D'. wa_space-dept = 'ECE'.
APPEND wa_space TO t_space.
IF NOT t_space[] IS INITIAL.
  DO 480 TIMES.    "  480 times because it is length of the last_fld(480) in data table. Change it according to length of your last field
    CONCATENATE str_space ascii_space INTO str_space.
  ENDDO.
ENDIF.
LOOP AT t_space INTO wa_space.
CONCATENATE wa_space-name wa_space-dept INTO wa_final. "Concatenate all data fields into final workarea except final field
  IF wa_space-last_fld IS INITIAL.  " Check whether final field is empty
    CONCATENATE wa_final str_space INTO wa_final.  " Concatenate spaces at end of final work area
  ENDIF.
  APPEND wa_final TO t_final. " Append to Final table
ENDLOOP.
Hope you understand friend.

Similar Messages

  • Memory space issue in internal table

    Hi ,
    My report is dumping because there is no memory space availabe for extending the memory of an internal table, after it gets filled with about 2500000 lakh records.
    the dump analysis is as follows :-
    Error analysis
    The internal table (with the internal identifier "IT_317") could not be
    enlarged any further. To enable error handling, the internal table had
    to be deleted before this error log was formatted. Consequently, if you
    navigate back from this error log to the ABAP Debugger, the table will
    be displayed there with 0 lines.
    When the program was terminated, the internal table concerned returned
    the following information:
    Line width: 1700
    Number of lines: 106904
    Allocated lines: 106904
    New no. of requested lines: 8 (in 1 blocks)
    How to correct the error
    The amount of storage space (in bytes) filled at termination time was:
    Roll area...................... 7272944
    Extended memory (EM)........... 603339264
    Assigned memory (HEAP)......... 396390176
    Short area..................... " "
    Paging area.................... 40960
    Maximum address space.......... 529887568
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    Please suggest what can be done.
    Regards,
    Vikas Arya

    Hi,
    This solution might not sound good. But give a thought.
    While appending data u may take more than one internal table.
    Append first 10lakh records to 1st table, Second 10 lakhs to second table etc.
    But from where are u getting the source data? It should be present in some internal table correct?
    Probably u can use dynamic internal tables concept.
    Also check ur code carefully. After the place of appending if u are not going to use any internal tables then use FREE itab
    statement to free the memory allocated.
    Also reduce the global declarations as much as possible
    Thanks,
    Vinod.

  • Issue In internal table data population in the o/p

    Dear Guru , I have encountered an issue for which i am not able to findout the logic  . I have an internal table through which i am populating the below data for detail report format :->
    Plant     Material Number          Storage Loc     Movement Type          Avg Days
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    019     0820B0073          MOD3          101               space
    020     0820B0074          MOD4          101               space
    020     0820B0074          MOD4          101               2
    020     0820B0074          MOD4          101               3
    The requirment is like this the summary report should show o/p like below addition of all the rows with respect to plant , material, storage location and movement type :-
    Plant     Material Number          Storage Loc     Movement Type          Avg Days
    019     0820B0073          MOD3          101               space
    020     0820B0074          MOD4          101               5
    but when i am adding it with respect to plant, material, storage location and movement type the o/p i am getting is like below
    Plant     Material Number          Storage Loc     Movement Type          Avg Days
    019     0820B0073          MOD3          101               0
    020     0820B0074          MOD4          101               5
    becasue addition of 5 spaces ( Avg Days )of plant 019 is coming as ZERO --> 0
    so Guru what logic i should use to get the proper o/p,..I have Used Following logic to perform summation with respect to plant, material , storage loc and movement type.
    CLEAR: wa_mkpf_mseg, w_werks, w_matnr, w_lgort, w_bwart.
    LOOP AT t_mkpf_mseg INTO wa_mkpf_mseg.   
    IF wa_mkpf_mseg-werks EQ w_werks AND wa_mkpf_mseg-matnr EQ w_matnr AND wa_mkpf_mseg-lgort EQ w_lgort AND wa_mkpf_mseg-bwart EQ w_bwart.
          CLEAR: wa_p_coi.
          READ TABLE t_p_coi INTO wa_p_coi WITH KEY werks = wa_mkpf_mseg-werks matnr = wa_mkpf_mseg-matnr lgort = wa_mkpf_mseg-lgort bwart = wa_mkpf_mseg-bwart.
         IF sy-subrc = 0.
         wa_p_coi-Avg Days    = wa_p_coi-Avg Days   + wa_mkpf_mseg-Avg Days.
         MODIFY t_p_coi FROM wa_p_coi TRANSPORTING Avg Days   .
         CLEAR: wa_p_coi, wa_p_coi.
         endif.
    ELSE.
          wa_p_coi-werks                     = wa_mkpf_mseg-werks.
          wa_p_coi-matnr                     = wa_mkpf_mseg-matnr.
          wa_p_coi-bwart                   = wa_mkpf_mseg-bwart.
          wa_p_coi-lgort                     = wa_mkpf_mseg-lgort.
          wa_p_coi-Avg Days                  = wa_mkpf_mseg-Avg Days   .
         APPEND wa_p_coi TO t_p_coi.
               CLEAR: wa_p_coi.
    ENDIF.
        w_werks = wa_mkpf_mseg-werks.
        w_matnr = wa_mkpf_mseg-matnr.
        w_lgort = wa_mkpf_mseg-lgort.
        w_bwart = wa_mkpf_mseg-bwart.
       CLEAR: wa_mkpf_mseg.
      ENDLOOP.

    The soln what i found after working out
    CLEAR: wa_mkpf_mseg, w_werks, w_matnr, w_lgort, w_bwart.
    LOOP AT t_mkpf_mseg INTO wa_mkpf_mseg.
    IF wa_mkpf_mseg-werks EQ w_werks AND wa_mkpf_mseg-matnr EQ w_matnr AND wa_mkpf_mseg-lgort EQ w_lgort AND wa_mkpf_mseg-bwart EQ w_bwart.
    CLEAR: wa_p_coi.
    READ TABLE t_p_coi INTO wa_p_coi WITH KEY werks = wa_mkpf_mseg-werks matnr = wa_mkpf_mseg-matnr lgort = wa_mkpf_mseg-lgort bwart = wa_mkpf_mseg-bwart.
    IF sy-subrc = 0.
    if wa_p_coi-Avg Days  = ' ' and wa_mkpf_mseg-Avg Days = ' '.
    wa_p_coi-Avg Days = ' '.
    ELSE
    wa_p_coi-Avg Days = wa_p_coi-Avg Days + wa_mkpf_mseg-Avg Days.
    Endif.
    MODIFY t_p_coi FROM wa_p_coi TRANSPORTING Avg Days .
    CLEAR: wa_p_coi, wa_p_coi.
    endif.
    ELSE.
    wa_p_coi-werks = wa_mkpf_mseg-werks.
    wa_p_coi-matnr = wa_mkpf_mseg-matnr.
    wa_p_coi-bwart = wa_mkpf_mseg-bwart.
    wa_p_coi-lgort = wa_mkpf_mseg-lgort.
    wa_p_coi-Avg Days = wa_mkpf_mseg-Avg Days .
    APPEND wa_p_coi TO t_p_coi.
    CLEAR: wa_p_coi.
    ENDIF.
    w_werks = wa_mkpf_mseg-werks.
    w_matnr = wa_mkpf_mseg-matnr.
    w_lgort = wa_mkpf_mseg-lgort.
    w_bwart = wa_mkpf_mseg-bwart.
    CLEAR: wa_mkpf_mseg.
    ENDLOOP.

  • How to delete space in an internal table

    Hi All,
    In internal table I want to compress the leading space
    After searching I found Condense and SHIFT LEFT DELETE leading space commands work it is written...
    but when I write code A single space is appreaing in between the two fields...can any body help me where I am going wrong??
    Ex:
    data: begin of itab occurs 1 ,
    PSAtext TYPE CHAR15,
    psa type btrtl,
    end of itab.
    now o/p BEFORE CHANGE IS :
    SBI-CT    |1023
    After condense is SBI-CT |1023
    bETWEEN SBI-CT AND | there is a additional space. How can we avoid that?
    Sas
    Edited by: saslove sap on Sep 29, 2010 7:43 AM

    Well this is what I am going to solve this
    data:begin of STRING OCCURS 1 ,
    S1 TYPE STRING,
    END OF STRING.
    loop at itab.
    concatenate itab-f1 itab-f2 into string-s1 seperated by '|'.
    append string.
    end of itab.
    then I can transfer this string to Application server.
    Thanks for all the contributions.
    Regards
    sas

  • Issue in Internal Table for calculating MAX value

    Hi Abapers,
    I have internal table with data as follows:
                         Materail                               Currency      Quantity    Dominant_Currency
    1     000000000007001896     GBP     396
    2     000000000007001896     EUR     25
    3     000000000007001310     USD      7
    4     000000000007001310     GBP     646
    5     000000000007001310     EUR     195
    6     000000000007000949     GBP     947
    7     000000000007000949     EUR     117
    Now I have to find out the max quantity for each materail and currency against max quantity which will be put in the dominat currency fields of Internal Table.
    Eg: For material 000000000007001896, 396 is the max quantity and Currency for this is GBP so dominant currency will be GBP for first 2 records.
    Similarly 646 is max for 000000000007001310 therefore GBP will be dominant curr for the records containg material 000000000007001310
    Please solve the issue.
    Regards,
    Rahul Sinha

    lv_quantity --> quantity parameter
    sort itab by matnr quantity
    loop at itab.
    at new material.
    clear lv_quantity.
    endat,
    if itab-quantity > lv_quantity.
      lv_quantity = itab-quantity.
      itab-dominant_curr = itab-curr.
      modify itab transporting dominant_curr where material = itab-material.
    endif.
    "please write  modify statement with some logic..so that it is called once for one item
    endloop.
    if you find any issue revert back.

  • Issue with Internal Table

    Hi All,
    I have defined an internal table 'with occurs 0'.
    While debuggining, i am observing that only 50,000 lines are getting populated in that internal table.
    How to increase the capacity of the internal table, so that it can hold more number of lines?
    Regards
    Pavan

    I would like to explaing you all about this issue.
    I have defined an internal table as follows...
    data:  IT_CATSDB       TYPE BAPICATS2 OCCURS 0 WITH HEADER LINE.
    I have used a BAPI called "BAPI_CATIMESHEETRECORD_GETLIST" which will retirieve the Timesheet details of all employees within a given date range.
    Now, the number of entries that we got from this BAPI are stored in the internal table it_catsdb.
    I have observed that this internal table is holding max of 50k lines.
    If i check the database table (CATSDB) for the same conditions in SE11, i am able to get around 1L lines.
    Hence my report is showing incorrect output.
    Kindly help me out with some logic, so that this internal table can hold as much as data possible without any restriction.....
    Regards
    Pavan

  • Issue regarding internal tables

    Dear all,
    My issue is that , I need to enter data into a single internal table by fetching data from two sap tables using two different selct quries. I should not use joins or for all entries. And display the internal table data in the list.
    Problem am facing is only one select query is geeting fetched and the other table data in not in the list.
    Pleas provide the possible solutions.
    Thanks & Regards,
    Madhavi.M

    DATA: BEGIN OF itab1 OCCURS 0,
          qmnum LIKE qmel-qmnum,
          qmtxt LIKE qmel-qmtxt,
          indtx LIKE qmel-indtx,
          qmdat LIKE qmel-qmdat,
          ltrmn LIKE qmel-ltrmn,
          priok LIKE qmel-priok,
          aufnr LIKE qmel-aufnr,
          bezdt LIKE qmel-bezdt,
          qmnam LIKE qmel-qmnam,
          qmart LIKE qmel-qmart,
          END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0,
          qmnum LIKE qmih-qmnum,
          btpln LIKE qmih-btpln,
          ingrp LIKE qmih-ingrp,
          END OF itab2.
    DATA : itab3 TYPE TABLE OF z_notif WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS : notnum FOR qmel-qmnum OBLIGATORY,
                     notype FOR qmel-qmart,
                     floc FOR qmih-btpln,
                     name FOR qmel-qmnam.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    To fetch the values in the internal table ****************
    from ztable corresponding to the entries made *************
    by the user in the selection screen ******************
    SELECT qmnum qmtxt indtx qmdat ltrmn priok aufnr bezdt qmnam qmart INTO
    TABLE itab1 FROM qmel WHERE qmnum IN notnum
    AND qmart IN notype AND qmnam IN name.
    SELECT qmnum btpln ingrp INTO TABLE itab2 FROM qmih FOR ALL ENTRIES IN
    itab1 WHERE qmnum = itab1-qmnum AND btpln IN floc.
    To move the contents of ITAB1 to ITAB3 ***************
        LOOP AT itab1.
          itab3-qmnum = itab1-qmnum.
          itab3-qmtxt = itab1-qmtxt.
          itab3-indtx = itab1-indtx.
          itab3-qmdat = itab1-qmdat.
          itab3-ltrmn = itab1-ltrmn.
          itab3-priok = itab1-priok.
          itab3-aufnr = itab1-aufnr.
          itab3-bezdt = itab1-bezdt.
          itab3-qmnam = itab1-qmnam.
          itab3-qmart = itab1-qmart.
          READ TABLE itab2 WITH KEY qmnum = itab1-qmnum.
    To move the contents of ITAB2 to ITAB3 ***************
          itab3-btpln = itab2-btpln.
          itab3-ingrp = itab2-ingrp.
          APPEND itab3.
        ENDLOOP.
    have a look at this example this may help you.....
    reward if helpful.....

  • Issue with internal table in object oriented ABAP.

    Hello Gurus,
    I am having trouble defining internal table in Object oriented ABAP. for following:
    DATA: BEGIN OF IT_TAB OCCURS 0.
            INCLUDE STRUCTURE ZCUSTOM.
    DATA    tot_sum   TYPE char40.
    DATA END OF IT_TAB.
    Can someone help ?
    Regards,
    Jainam.
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Edited by: Jainam Shah on Feb 5, 2010 8:33 PM
    Moderator message - Please post in the correct forum. You can easily find out for yourself by looking at SAP help for internal tables using OOP - thread locked
    Edited by: Rob Burbank on Feb 5, 2010 2:49 PM

    No, you can not declare internal table with header line in OO context. You have to declare the work are/header line separately
    Example:
    TYPES: BEGIN OF ty_it_tab.
            INCLUDE STRUCTURE mara.
    TYPES:  tot_sum TYPE char40.
    TYPES: END OF ty_it_tab.
    DATA: it_tab TYPE STANDARD TABLE  OF ty_it_tab.
    DATA: wk_tab TYPE ty_it_tab.
    LOOP AT it_tab INTO wk_tab.
    ENDLOOP.
    Edited by: Dean Q on Feb 5, 2010 8:50 PM

  • Logic issue with Internal Table

    Hi All,
    I have an internal table with following structure.
    Name of Internal table: ITAB
    Fields:   userid      login date     number
    Values:  abc         01012008    
                 abc         02012008
                 abc         02012008
                 abc         03012008
    Now i should store the value for the field itab-number, based on the ita-logindate.
    If the field logindate is having same date for 2 times (for the user 'abc'),
    the field itab-number should have the value as '2' .
    Basically i want to display a report to show how many times a user has logged into SAP system for a given date.......
    How to incorporate this logic?
    Regards
    Pavan

    Hi,
    Use the below logic.
    data: begin of itab1 occurs 0,
           uid  like sy-uname,
           date like sy-datum,
          end of itab1.
    data: begin of itab2 occurs 0,
           uid  like sy-uname,
           date like sy-datum,
           count type i,
          end of itab2.
    data v_count type i.
    start-of-selection.
    itab1-uid = 'abc'.
    itab1-date = '20080101'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080102'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080102'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080103'.
    append itab1.
    itab1-uid = 'abc'.
    itab1-date = '20080104'.
    append itab1.
    sort itab1 by uid date.
    loop at itab1.
    v_count = v_count + 1.
    at end of date.
    itab2-uid = itab1-uid.
    itab2-date = itab1-date.
    itab2-count = v_count.
    append itab2.
    clear  v_count.
    endat.
    endloop.

  • Performance issue in internal tables

    Hi,
    I am having an internal table with large volume (around 10  Lacs ) of records. Right now it has been sorted with required fields and using the same fileds in the where condtion of loop. But it is taking lot of time to read the records while loop the internal table.
    Could you please suggest the best way to read the internal table so that read time should be reduced.
    Points will be assinged for the better soultions.
    Thanks  in Advance,
    Chandra Mohan Vempati

    Hi..
    When you execute a LOOP using WHERE condition, it will actually process all the rows from first row to Last row.
    To Avoid this we have to use LOOP AT IT_VBAK from <row> .
    Try this code .. it will surely improve the performance.
    For eg IT_VBAK is my internal table with 10 lacks records .
    But i want to process only records with KUNNR = 1000.
    DATA: V_START TYPE I.
    DATA : V_KUNNR TYPE VBAK-KUNNR.
    SORT IT_VBAK BY KUNNR.
    READ TABLE IT_VBAK INTO WA_VBAK
       with KEY KUNNR = '0000001000'
       TRANPORTING NO FIELDS
       BINARY SEARCH.
    IF SY-SUBRC = 0.
      V_START = SY-TABIX.  "Capture the row position of first row
      V_KUNNR = WA_VBAK-KUNNR.
      LOOP AT IT_VBAK INTO WA_VBAK
                                    From V_START.
    **Terminate the loop after the completion of the records for the KUNNR
         IF  WA_VBAK-KUNNR <> V_KUNNR.
           EXIT.
         ENDIF.
    **Process the records here      
    WRITE:/ WA_VBAK-VBELN,
                 WA_VBAK-VKORG.
       ENDLOOP.  
    ENDLOOP.
    <b>Reward if Helpful</b>

  • AT END OF  Issue in internal tables

    Hi all,
    My requirement is I have to sum all the VBRP-NETWR and VBRP-WAVWR Fields and move it to one table.
    example;
    AT END OF pernr.
       SUM.
    here I have to move the total value of VBRP-NETWR and *VBRP-WAVWR values to internal table fields (i.e *tab_item-netwr & tab_item-wavwr, how can we do this
    ENDAT.
    Please help me.
    Thanks & Regards,
    Sivaram Kandula

    Hi,
    sort tab_item by pernr.
    loop at tab_item.
      v_total_netwr = v_total_netwr + tab_item-netwr.
      v_total_wavwr = v_total_wavwr + tab_item-wavwr)
      At end of pernr.
        move 'Y; to v_flg.
      endat.
      if v_flg eq 'Y'.
         move v_total_netwr to another internal table and append
         move v_total_wavwr to another internal table and append
         clear: v_flg. clear : v_total_netwr, v_total_wavwr.
      endif.
    endloop.
    Thanks
    aRs

  • SUM issue in Internal table

    Hi All,
    I have an internal table as follows.
    Now if the KUNNR, PRCTR and VERNA field are similar, i have to sum up the QTY columns accordingly.
    I mean to say, in this case, the rows 1, 2 and 3 have same kunnr, prctr and verna fields. Henc ei should sum up the corresponding columns (qty1, qty2, qty3 and SUM) and make it as one row.
    kunnr  |    prctr    |   verna  |   qty1  |  qty2  |    qty3  |  sum
    11       |    100      |  Raj     | 10.0   |  5.0     |   0.0    |  15.0
    11       |   100       |  Raj     | 8.0     |  1.0     |   2.0    |  11.0
    11       |    100      |  Raj     | 0.0     |  0.0     |   6.5    |  6.5
    12       |    200      |  Ram   | 2.0     |  0.0     |   0.0    |  2.0
    How to carry out this calculation....???
    Regards
    Pavan

    Hi Friend,
               Use the Control Break Statement for this,  Go through the following steps
    1.     Sort  the Internal Table
    2.     Loop the Internal Table
    3.     Use the Control Break Statement
    4.     Sum
    5.    Write Statement
    6.     Endloop.                                      
    Ex.
    sort itab.
    loop at itab.
       at end of kunnr.
               sum.
      write:  'mara-kunnr'.
    endat.
    endloop.
    Hope the answer of your question.
    Regards,
    Md Ziauddin.
    Edited by: MD ZIAUDDIN on Dec 31, 2008 7:40 PM

  • Deleting Space - Internal Table

    Hi All,
    I wish to know how to delete the leading / trailing spaces in <b>Internal Table's</b> field & bolding the field name in Report Output.
    Ex: In report output - when i output BSID-WRBTR via an Internal table how to delete the blank spaces.
    I appreciate ur time.
    Regards
    Tina

    hi Tina,
       Use <b>Condense</b> Statement
    i.e,
    <b>The CONDENSE statement deletes redundant spaces from a string:</b>
    CONDENSE <c> [NO-GAPS].
    This statement removes any leading blanks in the field <c> and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
    DATA: STRING(25) VALUE ' one two three four',
    LEN TYPE I.
    LEN = STRLEN( STRING ).
    WRITE: STRING, '!'.
    WRITE: / 'Length: ', LEN.
    CONDENSE STRING.
    LEN = STRLEN( STRING ).
    WRITE: STRING, '!'.
    WRITE: / 'Length: ', LEN.
    CONDENSE STRING NO-GAPS.
    LEN = STRLEN( STRING ).
    WRITE: STRING, '!'.
    WRITE: / 'Length: ', LEN.
    Output:
    one two three four !
    Length:           25
    one two three four !
    Length:           18
    onetwothreefour !
    Length:           15
    Note that the total length of the field STRING remains unchanged, but that the deleted blanks appear again on the right.
    Regards,
    Santosh

  • Confused with the internal table

    Hello,
    I am getting confused again by the usage of work space for an internal table.
    Say for example I have a internal table itab that is defined as:
    DATA:ITAB TYPE STANDARD TABLE OF Txxx.
    Then I define a work space for the internal table.
    DATA:WS_ITAB LIKE ITAB.
    Now say for example, I would like to fill in some data to this internal table, can I do:
    WS_ITAB-FIELD1 = 3.
    APPEND WS_ITAB INTO ITAB INDEX 1.
    where FIELD1 is a valid field in Txxx?
    If not, how should I accomplish my goal? Thanks a lot!

    Yes, you have the right idea.  When working with work areas it is a good idea to define them like line of itab. This way, anytime itab changes, the wa will also be updated.
    DATA: ITAB TYPE STANDARD TABLE OF Txxx.
    <b>data: wa like line of itab</b>.
    You can add a line to your internal table by filling the work area and appending to the internal table.
    wa-fld1 = 'A'.
    wa-fld2 = 'B'.
    wa-fld3 = 'C'.
    append wa to itab.
    You can insert into a specific index by using INSERT.
    Insert wa into itab index 1.
    Regards,
    Rich heilman

  • Space removed from character data type when move to internal table issue...

    Hi Friends,
                        I converted material code and other details into internal table which have corresponding data types.But in internal table,I can see material code as left justified ,but after that space was removed.For example if material code is 'ABC' then rest of the space(material char(18)) are removed.But I need remaining spaces.I tried to concatenate material  code with spaces (caoncatenate matnr `        ` int etc .. )at right side and moved to another internal table.Its working.But the problem is material codes have different values like one material 'ABC' and another like '123893-h' etc.So I need to calculate the space(out of char 18) dynamiclly and need to put space based on material code value.
    << Moderator message - Everyone's problem is important >>
    .Thank you all..
    Regards,
    Kumaran..
    Edited by: Rob Burbank on Oct 26, 2010 11:18 AM

    Hi Ramkumaran,
    You have not told the purpose of having these spaces.
    is it for transfering to a file?
    If that is the case, use a table with fixed lenght lines instead of many fields.
    i.e. try something like this
    DATA : i_tab type standard table of BUSDATA,
    wa_tab type BUSDATA.
    wa_tab+0(10) = material number.
    wa_tab+10(10) = material code.
    wa_tab+20(4) = company code...
    append wa_tab to i_tab.
    Thanks
    Vimal

Maybe you are looking for

  • How to load data from a ODS to CUBE Request ID - by - Request ID?

    <i>How to load data from a ODS to CUBE Request ID - by - Request ID?</i> The problem is that... some requests had been eliminated of the cube and the delta control between the ODS and CUBE was lost. The flag "<b>data mart status of request</b>" of al

  • Error while starting WLI server on Solaris Machine

    Hi While starting WLI server using startWLI.sh command I am getting following error. <i>Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server</i>:-( Please help me for rectifying this error. Thanking you. Amol

  • SQL Server Query Plan Generation take longer

    Dear all, We are dealing with a wired issue where queries on there first execution take approx 1 min to 2 mins to execute and later execution completes in less than a second,Can you please help us understand why sql server is taking longer time to ge

  • Tried to restart apple tv. Now it is frozen on the apple

    My apple TV has been running poorly. Attempted to update software but it was unsuccessful. Attempted to restart and now it is frozen on the apple screen.  Help

  • UCM 10gR3 - handling metadata on check-in action

    Hi, I've started on UCM and I've been playing with Java custom components to alter the behavior of some services...I used for guidance the book: "The Definitive Guide to Stellent Content Server Development". I want to alter some metadatas of a docume