Move fields

Hallow I have a little problem that I spend a lot of time to solve it with out answer .my problem is that I have id.number NUMC 9 and pernr NUMC 8 .I wont in my loop to move id.number to pernr with out the last number ex. Id number 123456789 I wont perner 12345678 the problem is that in some time I have id number that with 5  or 6 number like 12345 and I wont perner 1234 (cut the last number) how can I do that I try it with 3 solution but it not work well u can see it with asterisk. Thanks for your answeres
DATA : v_strlen TYPE i.
  DATA : w_length TYPE i.
w_length = STRLEN( itab-id_number ).
w_length  = w_length - 1.
  DATA:  i_stell  TYPE i , n_stell(8) TYPE n.
*--table with data from file(csv)--
  LOOP AT itab1.
    SPLIT itab1 AT ',' INTO:
      itab-id_number
      itab-hagbla
      itab-date_open_hagbla
      itab-date_start_hagbl
      itab-date_stop_hagbla
      itab-date_open_hamora
      itab-date_close_hamor.
   i_stell = itab-id_number.
   n_stell = i_stell.
   itab-pernr = n_stell.  <b>solution1</b>*  this bring zero before number ex.id 12345 perner 00012345
   itab-pernr = itab-id_number+0(8).    <b>solution2</b>
   itab-pernr = itab-id_number+0(w_length). <b> solution3</b>
    APPEND itab.
  ENDLOOP.
<b></b>

Hi Antonio,
   I guess solution 3 should work for you, what are you getting values of itab-id_number and w_length.  You are keeping w_length out side the loop , keep that w_length inside the loop and check.
Hope that will work and will solve your problem.
reward points if it is solved your problem.
DATA : v_strlen TYPE i.
DATA : w_length TYPE i.
w_length = STRLEN( itab-id_number ).
w_length = w_length - 1.
DATA: i_stell TYPE i , n_stell(8) TYPE n.
*--table with data from file(csv)--
LOOP AT itab1.
SPLIT itab1 AT ',' INTO:
itab-id_number
itab-hagbla
itab-date_open_hagbla
itab-date_start_hagbl
itab-date_stop_hagbla
itab-date_open_hamora
itab-date_close_hamor.
i_stell = itab-id_number.
n_stell = i_stell.
itab-pernr = n_stell. solution1* this bring zero before number ex.id 12345 perner 00012345
itab-pernr = itab-id_number+0(8). solution2
<b>
w_length = STRLEN( itab-id_number ).
w_length = w_length - 1.</b>
itab-pernr = itab-id_number+0(w_length). solution3
APPEND itab.
ENDLOOP.
Use code with bolded in side the loop.
Regards,
Kiran I
Message was edited by:
        kiran i

Similar Messages

  • How to move field symbol internal table to internal table with header line?

    Dear all,
    hi...hereby i would like to ask how i can move field symbol internal table to a internal table?
    as i know field symbol internal table is without header line..
    so, may i know how to do this....to move field symbol internal table to internal table which consist of header line and field and record will same as field symbol internal table...in additional, my field symbol internal table is dynamic table mean everytime will have flexible columns..?
    Please advise...
    Thanks
    Regard,
    ToToRo.
    Edited by: @ToToRo@ on Aug 20, 2009 6:16 AM

    Hello,
    Try this way:
    If both the type of internal tables are same then you can directly assign dynamic internal table to static internal table.
    itab = <itab>.
    Suppose you have field symbol internal table <itab> which is different in structure from ITAB.
    Now, you can create <wa> as follow:
    FIELD-SYMBOLS <wa>.
    DATA wa TYPE REF TO DATA.
    CREATE DATA wa TYPE LINE OF <itab>.
    ASSIGN wa->* to <wa>.
    This way your work area is read.
    Using [ASSIGN COMPONENT|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3923358411d1829f0000e829fbfe/content.htm] syntax you can read required component of <wa>.
    Finally you can use that value to load static internal table.
    You can also refer to my thread on [Dynamic table|Re: Creating Dynamic table].
    Hope this helps!
    Thanks,
    Augustin.
    Edited by: Augustarian on Aug 20, 2009 10:06 AM

  • QA32 or QA11 - reason for movement field enable to QA32 ,inspection screen

    Hi friends,
    while doing goods receipt MIGO 101 quality stock. material document posted.
    i added field(Reason for movement ) for 101 mov type.
    When i want try at QA32 for quality to blocked stock i need to enter reason for blocked stock like pending or waiting for approval.
    here system not appeare reason for movement field in QA32 screen.
    how to enable reason for movement at QA32 inspection stock screen.
    Edited by: sivasankar cherukuri on Jul 7, 2010 11:53 AM

    Issue closed. my self

  • Move Field symbol data to Internal table

    Dear All,
                     Please suggest how to move field symbol data to internal table. The requirement is I have dynamic data in Field symbol which to move to table parameter of a function module.
    Thanks in Advance
    Rams.

    Dear All,
                    In need to pass tabular data  i.e. multiple entries from field symbol to the table parameter of the custom function module.
    Field symbol is declared as below:
    FIELD-SYMBOLS: <FS_EXCEL_TAB> TYPE STANDARD TABLE,
                                 <FS_TABLE_HEADER> .
    DATA WA_PD LIKE PRICE_DOWNLOAD.
    APPEND <FS_TABLE_HEADER> TO <FS_EXCEL_TAB>.
    CLEAR <FS_TABLE_HEADER>.
      WA_PD-VKORG = <FS_EXCEL_TAB>-VKORG.u201D Problem while using this statement
      APPEND WA_PD TO PRICE_DOWNLOAD.
       CLEAR WA_PD.
    Field symbol <FS_EXCEL_TAB>  is populated like this.
    VKORG | KUNNR_SH | KUNNR_SP |
    0015      | 102105       | 102105       |
    Now I need to move this data to table in tables parameter of custom fucntion module.
    Thanks in advance,
    Rams

  • Want know a table name in which material movement field exits

    hi,
    if any know the table name which contains "material movement" field and  ("vendor number" or any vendor related field)

    Material movements are in tables MSEG and MKPF.
    Regards,
    Rich Heilman

  • Move fields from one table to another

    Hi,
    I would like to move fields from one internal table into corresponding fields of another internal table.
    move-corresponding syntax seems only to work with structures. How do you accomplish this for internal tables? Do I have to use for loops?
    regards
    Baran

    Yes you have to use loops and move-correspoding statements unless you have all the common fields in the same order on both internal table and no different fields to the left most.
    eg:
    data: begin of itab1 occurs 0,
             field1 type i,
          end of itab1.
    data: begin of itab2 occurs 0,
             field1 type i,
             field2(1),
          end of itab2.
    do 5 times.
    itab1-field1 = sy-index.
    append itab1.
    enddo.
    itab2[] = itab1[].
    loop at itab2.
    write:/ itab2-field1.
    endloop.
    The above code would give you some idea.
    Regards,
    ravi

  • Copying Fields from one PDF to an Updated PDF - can't move fields on destination pdf

    I'm using Word as the authoring software for a PDF.  In version 9, I never had problem copying fields from one to another.  But in Version 11 I copy them to the new revised form and the fields won't move.  I can't move them with the mouse or the keyboard arrows.  I do see a bunch activity in the right pane called fields (tab order) but the fields don't move.
    Any help understanding why and how to solve is greatly appreciated.
    Thanks in advance for your time and experience.

    Highlight all the fields with CTRL +A, click on properties, and uncheck "Locked"  in the bottom left.

  • Move Field from Stacked Canvas to Tab Canvas

    Forms R2 10.1.2.0.2. Adding tab canvas to an existing form and want to retrofit a tab canvas into the form. When I move an existing field via the property sheet by changing Canvas and Tab page to Page, the field does not show. I can create a new field on the tab canvas with no problem. Is there a trick here that I am missing?

    I figured it out. You have to reset the X & Y position with an offset of the 0,0 position. The Tab Canvas has it own Grid separate from the Main Canvas, which starts at 0,0. I should have seen it before creating this post.

  • Move fields from Custom Tab to Standard Tab.

    Hi all,
       I have created one field through EEWB.The NewField is Displaying In the new tab 'CUSTOM TAB' Now i want to move this field to standard tab. I am using CIC0 tcode ( Service Contract ) pls. help me ....for moveing fields from one custom tab to standard tab.
    Thanks Inadvance,
    Siva Kumar.B

    Hi Siva,
      I think you need standard modification to do it.
    Regards.
    Manuel

  • Move Field  (MARA-KOSCH) to MVKE

    Hello All ,
    Need your help in this issue ,
    Product allocation determination procedure ( MARA-KOSCH ) is available in Material Master data 1 screen , we want to move it to MVKE table and Sales Data 1 view .
    Can anybody let me know how to do it
    Regards
    Saurabh

    MM17 is for Mass Maintenance of Material List. So, I dont Think we can add Fields like MKVE-KOSCH.
    Its not Possible.
    Regards,
    Ashok

  • Move field to VBKD

    Normally sales order pick payment terms from Customer master by
         moving ZTERM-KNVV   (Payment term from sales area data) to ZTERM-VBKD
    But we suppress payment terms of sales area data in customer master.
    and want that sales order should pick payment terms from company code data.
    i.e.   Move ZTERM-KNB1 ( payment terms company code data) to ZTERM-VBKD
    Can anybody give me a full process how to do this.

    Hi Friend,
      Try to check out this link and confirm : http://scn.sap.com/message/14134942
    Hope this will you in some what.
    Regards,
    Kundan

  • Move fields in bseg table

    Hi
    Below is my bseg table data. My requirement is  if   line item 1 of zuonr is space i want to get this value from line 2 of kunnr.
    BUKRS   BELNR        GJAHR    BUZEI    ZUONR      KUNNR
    7063       0140951570  2009       001
    7063   0140951570 2009  002   0000017017         0000055555
    my output will be
    BUKRS   BELNR        GJAHR    BUZEI    ZUONR      KUNNR
    7063       0140951570  2009       001   0000055555     
    7063   0140951570 2009  002   0000017017         0000055555

    Hi Kumar,
    Define one more table (itab2) of same structure.
    Loop at 1st table.
    Itab2-bukrs = itab1-bukrs.
    Itab2-belnr = itab1-belnr.
    Itab2-gjahr = itab1-gjahr.
    Itab2-bezei = itab1-bezei.
    If itab1-zuonr = space.
    Itab2-zuonr = itab1-kunnr.
    Else.
    Itab2-zuonr = itab1-zuonr.
    Endif.
    Append itab2.
    Endloop.
    Hope this will help you.
    Best Regards,
    Deepa Kulkarni

  • Move Corresponding Fields

    Hi
    I would like to move fields from a structure that has the following fields
    data Struc1 type table1.
    Fields:
    BUKRS
    WAERS
    MENGE....
    (similarly another 50 such fields)
    into another structure that has following fields,
    data Struc2 type table2.
    Fields:
    ZZ_WAERS
    ZZ_MENGE
    ZZ_BUKRS
    The data elements linked to the fields in both the structures would be the same. Move-Corresponding will not work as the field names do not match... also the order of the fields in both the structures do not match
    What is the easiest way to do this task other than moving each field one at a time?
    Can I apply any field symbols concept here... please let me know

    Hi Grame,
    if you want to create a generic solution, you can use RTTI Runtime Type Information to determine the datatype of the components in both structures. Then you could create assignments for equal types in source and target structure.
    This could work as long as you do not have more than one component of the same data type (data element) in the structures.
    Something like
    FIELD-SYMBOLS:
        <data1> TYPE ANY,
        <data2> TYPE ANY.
      DATA:
        lo_typedescr1 TYPE REF TO cl_abap_typedescr,
        lo_typedescr2 TYPE REF TO cl_abap_typedescr.
      DO.
        ASSIGN COMPONENT sy-index OF STRUCTURE itab1 TO <data1>.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          DO.
            ASSIGN COMPONENT sy-index OF STRUCTURE itab2 TO <data2>.
            IF sy-subrc NE 0.
              EXIT.
            ELSE.
              lo_typedescr1 = cl_abap_typedescr=>describe_by_data( <data1> ).
              lo_typedescr2 = cl_abap_typedescr=>describe_by_data( <data2> ).
              IF lo_typedescr1 =  lo_typedescr2.
                <data2> = <data1>.
              ENDIF.
            ENDDO.
          ENDIF.
        ENDDO.
    I have some doubts about performance if you do this for every table line. It will be better to do it once, keep the results in some kind of internal assignment table and use it in the loop. For this I don't write the code, thats your homework
    Regards,.
    Clemens

  • Web form fields not staying in order

    Does anyone know why the fields in my forms keep re-arranging themselves. For example I will move "Field 2" below "Field 6" and everything looks like it works but when I insert the form on a page the fields are not in the order I set. Any advice?

    Hi,
    That is a bit strange do you have an example form on your site that we can look into further? 
    Please also provide the exact steps that you are doing so we can closely replicate to see where the issue could be coming from. 
    Cheers!
    -Sidney

  • In MIGO quantity & Item OK check box should be supressed for 543 movement

    Dear all,
    I am doing Subcontracting goods receipt. when the item OK check box for the PO item with movement type 101 is checked, it automatically applied for the line items with movement type 543.
    But the quantity & Item OK check box can be edited for the line items with movement type 543. I want to suppress the same only for line items with movement type 543.
    So the quantity consumed of the send items will be same as per BOM quantity.
    How to do this?

    Hi,
    In SPRO- MM-Inventory Management-Setting for Enjoy Transaction-Setting for Good Movement - Field selection per Mvt type ,add the neccessary fields and select the radio button "Suppress"
    Thanks and Regards,
    Maheshwari

Maybe you are looking for

  • How to create new OC4J instance in AS 10.1.3 with BC4J- and ADF-Libraries

    Hi I have done all the steps mentioned in this thread: How to create new OC4J instance in AS 10.1.3 However, the new created OC4J instance obviously misses some libraries. If I deploy my Application to this OC4J I get an internal error: Class not fou

  • How to create infopackage for Cube to Cune to transaction

    HI Experts I have performed following steps for cube to cube load. 1. Created source cube and loaded the data from R3 2. Created Destination cube 3. Generated Export Data source for the source cube. Here I'm able to see my datasource Icon(8ZFIGL_C01)

  • Flash Video Lost when Published

    I included a flash video in my captivate project. It looks fine in the preview. When I published my project the flash video does not play it just displays a blank slide. I appreciate any advice.

  • Moving Scroll bar in ALV?

    Hi, Is it possible to move scroll bar in ALV table programatically,  if i have more fields? Thanks, GS

  • Move-Corresponding

    Hi, I'm just interested to know what people make of this article: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30c02051-852d-2c10-3c91-ba2bcf404510 Malcolm.