Experts plz do smthng help me

i have an internal table itab
which contains22 rows now i want to exchange the position of row no 22 with row p
plz write the code 4 it
plz help me
thanx in advance

Hi,
please check this :
data : begin of itab occurs 0,
field(1),
end of itab.
data wa like itab-field.
data n type i.
data idx type i value 2.
*ITAB contains :
*A
*B
*C
move 'A' to itab-field.
append itab.
move 'B' to itab-field.
append itab.
move 'C' to itab-field.
append itab.
*Getting index of last entry from ITAB
describe table itab lines n.
*Reading last entry of ITAB
read table itab index n into wa.
*Inserting it to wished position
insert wa into itab index idx.
*Deleting last entry (don't forget to increment the index as there is 1 more entry in ITAB now)
n = n + 1.
delete itab index n.
*ITAB now contains
*A
*C
*B
loop at itab.
  write :/ itab-field.
endloop.

Similar Messages

  • Experts plz help its very urgent

    hi expert
    plz help- me
    previously i was getting dump in this statement
    TRANSFER v_tab TO p_file.
    FYI:
    here v_tab is a table which hav som records
    and p_file contains the path of a file like c:\new\ggg.txt
    DATA: v_tab TYPE STANDARD TABLE OF t_line WITH HEADER LINE,
    TYPES: BEGIN OF t_line,
           pspid(9) TYPE c,
           tab1 TYPE x,
           post1 TYPE proj-post1,
           tab2 TYPE x,
           vernr TYPE prps-vernr,
           tab3 TYPE x,
    END OF t_line.
    DUMP I WAS GETTIN :
    For the statement
       "TRANSFER f TO ..."
    only character-type data objects are supported at the argument position
    "f".
    In this case. the operand "f" has the non-character-type "T_LINE". The
    current program is a Unicode program. In the Unicode context, the type
    'X' or structures containing not only character-type components are
    regarded as non-character-type.
    to avoid this dump i used feild symbol
    assign V_TAB to <IN> casting.
          p_file = <in>.
          unassign <IN>.
    nw there is no dump
    but problem is p_file contains the contents of v_tab not the file path .
    plz help me its very urgent
    thanx in advance

    Hey, no probs,
    after your initial declaration, do this.
    TYPES: BEGIN OF n_line,
    pspid(9) TYPE c,
    tab1(15) TYPE c,        "check the length you want
    post1 TYPE proj-post1,
    tab2(15) TYPE c,         "check the length you want
    vernr TYPE prps-vernr,
    tab3(15) TYPE c,         "check the length you want
    END OF t_line.
    DATA: n_tab TYPE STANDARD TABLE OF n_line WITH HEADER LINE.
    now after you fetch data into v_tab,
    move it to n_tab.
    using a loop at v_tab and move corresponding fields to n_tab's work area
    append to n_tab.
    once you have populated n_tab and are ready to TRANSFER.
    OPEN your file using
    open dataset <file> for output in text mode encoding default.
    now
    loop at n_tab.
    TRANSFER n_tab to p_file.
    endloop.
    CLOSE DATASET.

  • Experts plz help me short dump

    hi experts
    plz help me
    in ecc 6.0 gettin a short dump
    THANKS IN ADVANCE
    error is ::
    For the statement
           "TRANSFER f TO ..."
        only character-type data objects are supported at the argument position
        "f".
        In this case. the operand "f" has the non-character-type "T_LINE". The
        current program is a Unicode program. In the Unicode context, the type
        'X' or structures containing not only character-type components are
        regarded as non-character-type.
    and it is coming in line::
    LOOP AT v_tab.
      TRANSFER v_tab TO p_file.  "<b>this line contains error</b>
    ENDLOOP.
    FYI::
    TYPES: BEGIN OF t_line,
           pspid(9) TYPE c,
           tab1 TYPE x,
           post1 TYPE proj-post1,
           tab2 TYPE x,
           vernr TYPE prps-vernr,
           tab3 TYPE x,
           astnr TYPE prps-astnr,
           tab4 TYPE x,
           usr00(12) TYPE c,
           tab5 TYPE x,
    END OF t_line.
    PARAMETERS: p_file LIKE rlgrap-filename OBLIGATORY.         "DMA20040510
      OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    QUESTION:::
    CAN WE USE FEILD SYMBOL IN IT
    LIKE  TRANSFER <Fs> TO P_FILE.

    Hi,
        LOOP AT v_tab ASSIGNING <in>.
        p_file = <in>.
        ENDLOOP.
    Best regards,
    Prashant

  • EXPERTS PLZ HELP ME IN SAP SCRIPT URGENT

    Hi experts
    plz help me
    i m very new in sap scripts
    i have a script WESCHEINVERS1 and the driver prog is SAPM07DR
    i ill have to copy this script and have to add two more feild in the text element W1LGMAT
    fields are :
    CAWNT-ATWTB
    EKPO-REVLV
    now wat i think i cannot make changes to standard driver prog so it wud be better to call a subroutine 4 it
    so plz guide me how i ill have to fetch data nd pass to the script
    plz write the code if possible 4 u
    FYI:
    MSEG : Document Segment Material
    MANDT     Client
    MBLNR     Number of material Document
    MJAHR     Material Document Year
    ZEILE     Item in Material Document
    MATNR     Material Number
    LIFNR     Account number or vendor
    EBELN     Purchase order number
    EBELP     Item number of PO
    EKPO : Purchasing document item
    MANDT     Client
    EBELN     Purchase order number
    EBELP     Item number of PO
    MATNR     Material Number
    REVLV     Revision Level
    LFA1 : Vendor Master (General section)
    MANDT     Client     
    LIFNR     Account number of vendor or creditor     MSEG-LIFNR
    SPRAS     Language key     
    AUSP : Characteristic Values
    MANDT     Client     
    OBJEK     Key of object to be classified     MSEG-MATNR
    ATINN     Internal characteristic     ZO-QUALITY-LEVEL
    ATZHL     Internal counter     
    ATWRT     Characteristic Value     
    CAWNT : Value texts
    MANDT     Client     
    ATINN     Internal characteristic     ZO-QUALITY-LEVEL
    ATZHL     Internal counter     AUSP-ATZHL
    SPRAS     Language Key      LFA1-SPRAS
    ATWTB     Characteristic Value Description     
    thanks in advance

    Refer the links to know about calling subroutines ins cript -
    subroutine in script
    How to call a subroutine in a script ?
    EXTERNAL SUBROUTINE IN SAP SCRIPT
    Regards,
    Amit
    Reward all helpful replies.

  • Again got stuck with textpool experts plz help

    hi experts,
    plz help in resolving this issue this is very urgent.
    error is
    The line type of "RPOOL" must be compatible with one of the types
    "TEXTPOOL".
    and its coming in :
    read textpool  rname into rpool language sy-langu.
    FOR YOUR INFORMATION:
    form init_textpool using rname like rsvar-report.
    FYI:
    DATA: BEGIN OF RPOOL OCCURS 20,
    ID(1),
    NAME(8),
    TEXT(80),
    END OF RPOOL.
    and textpool is also a structure u can check the fields in se11.
    as the structure of textpool and rpool are not same
    i cannot declare the type of rpool as textpool because it ill change the functionality of the prog because in the rest of the prog we r using the fields of rpool. 
    plz help me.

    hi atish
    thanks 4 ur rply
    solution provided by you is not giving error but i think it ill change your functionality.
    i did this::::
    data: begin of rpool occurs 20,
                id(1),
                name(8),
                text(80),
          end of rpool.
    data: rname like rsvar-report.
    data : RPOOL_1 LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
    TYPEs : begin of RPOOL_1 ,
                id(1),
                name(8),
                text(80),
          end of rpool_1.
    read textpool  rname into rpool_1 language sy-langu.
    MOVE-CORRESPONDING rpool_1 TO rpool.
    write : rpool-id, rpool-text, rpool-name.
    later on in the program we r using name and text fields but in this when i debugged it is nt able to identify name and text fields only showing the value of id bcoz id is also dere in textpool structure.

  • Experts plz help ALV issue

    hi all experts
    plz help
    i have an alv based on object oriented method
    in the output i am gettin a toolbar in which i have two buttons like print and export
    problem is
    when i click on these buttons i am gettin short dump
    Field symbol has not yet been assigned.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLKKBL" had to be terminated because
        come across a statement that unfortunately cannot be executed.
    plz tel me for printing do i need to wwrite any seperate event or any method for it
    plz guide me
    thanx in advance .

    *& Report  ZMULTIPLE_ALV
    *REPORT  ZMULTIPLE_ALV.
    report zrich_0006.
    tables: mara.
    type-pools: slis.
    Internal Tables
    data: begin of ialv occurs 0,
          matnr type mara-matnr,
          maktx type makt-maktx,
          end of ialv .
    Internal Tables
    data: begin of ialv2 occurs 0,
          matnr type mard-matnr,
          werks type mard-werks,
          lgort type mard-lgort,
          end of ialv2 .
          CLASS lcl_event_receiver DEFINITION      Handles Double Click
    class lcl_event_receiver definition.
      public section.
        methods handle_hotspot_click
           for event hotspot_click of cl_gui_alv_grid
          importing e_row_id.
      private section.
    endclass.
          CLASS lCL_EVENT_RECEIVER IMPLEMENTATION    Handles Double Click
    class lcl_event_receiver implementation.
      method handle_hotspot_click.
        perform get_details using e_row_id-index.
      endmethod.
    endclass.
    data: alv_container type ref to cl_gui_custom_container,
          event_receiver type ref to lcl_event_receiver,
          alv_grid type ref to cl_gui_alv_grid,
          alv_container2 type ref to cl_gui_custom_container,
          alv_grid2 type ref to cl_gui_alv_grid,
          ok_code like sy-ucomm,
          fieldcat type lvc_t_fcat,
          gs_layout   type lvc_s_layo,
          fieldcat2 type lvc_t_fcat.
    select-options: s_matnr for mara-matnr.
    start-of-selection.
      perform get_data.
      call screen 100.
         Module  status_0100  OUTPUT
    module status_0100 output.
      data: variant type  disvariant.
      data: lt_exclude type ui_functions.
      data: ls_fcat type lvc_s_fcat.
      set pf-status '0100'.
      set titlebar '0100'.
      check alv_container is initial.
      Code for first ALV Grid
    Create Controls
      create object alv_container
             exporting container_name = 'ALV_CONTAINER'.
      create object alv_grid
             exporting  i_parent =  alv_container.
      create Event Receiver
      create object event_receiver.
      clear fieldcat.  refresh: fieldcat.
      clear: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-coltext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'IALV'.
      ls_fcat-hotspot    = 'X'.
      ls_fcat-outputlen  = '18'.
      ls_fcat-col_pos    = 1.
      append ls_fcat to fieldcat.
      clear: ls_fcat.
      ls_fcat-reptext    = 'Material Description'.
      ls_fcat-coltext    = 'Material Description'.
      ls_fcat-fieldname  = 'MATKX'.
      ls_fcat-ref_table  = 'IALV'.
      ls_fcat-outputlen  = '40'.
      ls_fcat-col_pos    = 2.
      append ls_fcat to fieldcat.
      gs_layout-grid_title = 'Flights'(100).
      CALL METHOD alv_grid->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
         I_BUFFER_ACTIVE               =
         I_BYPASSING_BUFFER            =
         I_CONSISTENCY_CHECK           =
         I_STRUCTURE_NAME              =
         IS_VARIANT                    =
         I_SAVE                        =
         I_DEFAULT                     = 'X'
          IS_LAYOUT                     = gs_layout
         IS_PRINT                      =
         IT_SPECIAL_GROUPS             =
         IT_TOOLBAR_EXCLUDING          =
         IT_HYPERLINK                  =
         IT_ALV_GRAPHICS               =
         IT_EXCEPT_QINFO               =
         IR_SALV_ADAPTER               =
        CHANGING
          IT_OUTTAB                     = ialv[]
          IT_FIELDCATALOG               = fieldcat[]
         IT_SORT                       =
         IT_FILTER                     =
       EXCEPTIONS
         INVALID_PARAMETER_COMBINATION = 1
         PROGRAM_ERROR                 = 2
         TOO_MANY_LINES                = 3
         OTHERS                        = 4
      IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    call method alv_grid->set_table_for_first_display
         changing
              it_outtab       = ialv[]
              it_fieldcatalog = fieldcat[].
      handler for ALV grid
      set handler event_receiver->handle_hotspot_click for alv_grid.
      Code for second ALV Grid
    Create Controls
      create object alv_container2
             exporting container_name = 'ALV_CONTAINER2'.
      create Event Receiver
      create object alv_grid2
             exporting  i_parent =  alv_container2.
      clear fieldcat.  refresh: fieldcat.
      clear: ls_fcat.
      ls_fcat-reptext    = 'Material Number'.
      ls_fcat-coltext    = 'Material Number'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'IALV2'.
      ls_fcat-outputlen  = '18'.
      append ls_fcat to fieldcat2.
      clear: ls_fcat.
      ls_fcat-reptext    = 'Plant'.
      ls_fcat-coltext    = 'Plant'.
      ls_fcat-fieldname  = 'MATNR'.
      ls_fcat-ref_table  = 'IALV2'.
      ls_fcat-outputlen  = '4'.
      append ls_fcat to fieldcat2.
      clear: ls_fcat.
      ls_fcat-reptext    = 'Store Loc'.
      ls_fcat-coltext    = 'Store Loc'.
      ls_fcat-fieldname  = 'LGORT'.
      ls_fcat-ref_table  = 'IALV2'.
      ls_fcat-outputlen  = '4'.
      append ls_fcat to fieldcat2.
      call method alv_grid2->set_table_for_first_display
           changing
               it_outtab       = ialv2[]
               it_fieldcatalog = fieldcat2[].
    endmodule.
         Module  USER_COMMAND_0100  INPUT
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK' or 'CANC'.
          if not alv_container is initial.
            call method alv_container->free.
            clear: alv_container.
            free : alv_container.
          endif.
          if not alv_container2 is initial.
            call method alv_container2->free.
            clear: alv_container2.
            free : alv_container2.
          endif.
          if sy-subrc = 0.
            set screen 0.
            leave screen.
          else.
            leave program.
          endif.
      endcase.
    endmodule.
          FORM GET_DATA.
    form get_data.
      select maramatnr maktmaktx
                 into corresponding fields of table ialv
                     from mara
                          inner join makt
                             on maramatnr = maktmatnr
                                    where mara~matnr in s_matnr
                                      and makt~spras = sy-langu.
      sort ialv ascending by matnr.
    endform.
          FORM GET_MORE_DATA.
    form get_more_data.
      select matnr werks lgort
                 into corresponding fields of table ialv2
                     from mard
                               where matnr = ialv-matnr.
      sort ialv2 ascending by matnr.
    endform.
    GET_DETAILS
    form get_details using index.
      read table ialv index index.
      if sy-subrc = 0.
        perform get_more_data.
        call method alv_grid2->refresh_table_display.
      endif.
    endform.

  • Experts plz help report issue need help

    hi experts
    plz guide me in this report
    i hav a transaction MD4C
    when we call this transaction it displays a report showing material numbers with some details for a corresponding sales order number
    if any of material is missing or problem arises it creates an icon in front of tha material number
    now i will have to create a report which will show all the material numbers which are missing orhave this error icon .
    Please guide me how should i proceed
    what should be the best approach of my report .

    hi,
    you can analyze that report and find logic used for that icon generation, take the same logic for writeing u r report program. you can see the code of the transaction code
    1) type the transaction code, press enter
    2) system ---> status
    3) double click on program(screen) field.
        This will take you to source code, their you do analyzation.
    regards,
    pavan

  • I am having a problem with pop pups and small windows with ads constantly opening up on my safari?? Thought that macs didn't get virus? this looks like one- any experts around? please help me fix it with your instructions? really don't know what to do...

    Hi everyone,
    I am having a problem with my Mac OS X 10.7.5 mac book air , there are constant pop pups and small windows with ads blinking constantly opening up on my safari in front of everything?? it is constantly interupting me and makes me mistakingly click on it then another new windows open behind the one im using..
    I am not too sure if thats a virus or trojan.. I always thought that macs didn't get virus? this looks like one to me… any experts around? please help me fix it with your instructions? really don't know what to do... thanks

    Those are not viruses. You have probably installed some malware:
    The Safe Mac » Adware Removal Guide
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using Dr.Web Light from the App Store. It's free, and since it's from the App Store, it won't destabilize the system. If you prefer one of the better known commercial products, then Thomas recommends using Sophos.(Thank you to Thomas Reed for these recommendations.) If you already use Sophos, then be aware of this if you are using Mavericks: OS X Mavericks- Sophos Anti-Virus on-access scanner versions 8.0 - 9.1 may cause unexpected restarts
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect anything targeting the Mac because there
         is no Mac malware in the wild, and therefore, no "signatures" to detect.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • Hey plz i need help i have forgotten my security questions answers how to reset them

    plz i need help i have forgotten my security questions answers how to reset them

    If you have a rescue email address (which is not the same thing as an alternate email address) on your account then the steps half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • HT1918 plz i want help , how can i use credit card visa , im try to fill blank no. card information when i finish appear me msg ( the payment card you entered is not valid in israel p;ease provide avalid payment card for israel , im from palestine ) plz s

    plz i want help , how can i use credit card visa , im try to fill blank no. card information when i finish appear me msg ( the payment card you entered is not valid in israel p;ease provide avalid payment card for israel , im from palestine ) plz solutio?

    Oh thank god i am not the only one with this problem. It started with me on Saturday (aug 28) and still, no solution.
    I live in the border with the USA so i’ve been using my itunes account with a USA debit card and then it started with that **** declined CC problem =S
    The funny thing is that i’ve been trying to change countries, setting my account to Mexico and it would still say that the CC are declined. Tried 2 USA cards and 2 Mexican cards, no results =S
    Wanna read something funny. I even tried to create a brand new account based in Mexico, with another email address and it still wouldn’t let me, tells me my cards are not valid……..the **** apple!!! i cannot update any app and i just got my iphone 4 on friday last week and i am dying to try new apps.
    So far I’ve sent 2 emails and still no **** solution. At least i am not alone =’(

  • I do not have the people and media tabs to allow me to import photos from my iPhotos ,i only have the elive, quick,  guided and expert tabs, can anyone help please?

    Hi,
      Im having problems importing from my iPhotos, i just bought photoshop elements 13 and mac book at the same time and am on a bit of a learning curve, i noticed that on all tutorials there were People and Media tabs which i cannot see, all i can see is elive, Quick, Guided and Expert, can anyone please help?
    Many Thanks In advance
    Nicol

    Elements consists of two separate but interrelated programs: the editor, where you work on your photos, and the organizer, which you can use to organize them. You are looking in the editor. To see the organizer, click the organizer button in the welcome screen or at the bottom of the editor.
    Now, do you want to keep your photos in iphoto or in the organizer? That's a choice you must make, sooner or later. The organizer does include a get photos from>iphoto command, but that will copy all the photos in your iphoto library to a new location and make organizer databases for the copies. Is that what you want to do, or do you want to use iphoto to organize your photos, in which case you would not use the PSE organizer?

  • TS3297 when i restore my ios the massage appear  the i phone cannot restore at this time because the i phone  software update server cannot be contacted or temporary unavailable plz any one help me what i do

    when i restore my ios the massage appear  the i phone cannot restore at this time because the i phone  software update server cannot be contacted or temporary unavailable plz any one help me what i do

    tell me the full prosedure how i remove entries for gs.apple.com i am a new user thanks

  • When i restore my ios the massage appear  the i phone cannot restore at this time because the i phone  software update server cannot be contacted or temporary unavailable plz any one help me what i do

    when i restore my ios the massage appear  the i phone cannot restore at this time because the i phone  software update server cannot be contacted or temporary unavailable plz any one help me what i do

    You try again later.

  • Hi plz ineed a help today ihave aitunes card but not enter in my id

    hi plz ineed a help today ihave aitunes card but not enter in my id

    This is unclear...
    alharith wrote:
    hi plz ineed a help today ihave aitunes card but not enter in my id
    My guess is you cannot Redeem it... If so... Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Note: iTunes Gift Cards are only Valid in Country of issue

  • I hav recently upgraded to ios5.1 but after upgrading my ringer volume got low plz can nyone help me

    I I hav recently upgraded to ios5.1 but after upgrading my ringer volume got low plz can nyone help me

    You may refer to the web below for the upgrade steps.
    http://event.msi.com/2013/win8-1/Update.html
    After you finished the upgrade, try to update your intel/nvidia driver.

Maybe you are looking for