To shift one ALV field contents to left side

Hi to all
I have developed an ALV report.
In which contents of one field is not coming aligned.
What to do to make them left align in display.
Please guide.
Regards
Anubhav

hi check this example for this ..
REPORT  zdemo_alvgrid                 .
type-pools: slis.                                 "ALV Declarations
*Data Declaration
data: BEGIN OF itab occurs 0,
      F1(10) TYPE c,
      F2(30) TYPE c,
      F3(20) TYPE c,
      END OF itab.
data: it_fieldcatalog type slis_t_fieldcat_alv ,
       wa_fieldcatalog type slis_fieldcat_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid.
itab-f1 = '1'.
itab-f2 = '10'.
itab-f3 = '1234'.
append itab.
itab-f1 = '2'.
itab-f2 = '40'.
itab-f3 = '1234'.
append itab.
itab-f1 = '3'.
itab-f2 = '50'.
itab-f3 = '1343'.
append itab.
itab-f1 = '4'.
itab-f2 = '60'.
itab-f3 = '1233'.
append itab.
itab-f1 = '5'.
itab-f2 = '90'.
itab-f3 = '234'.
append itab.
itab-f1 = '6'.
itab-f2 = '100'.
itab-f3 = '14'.
append itab.
itab-f1 = '7'.
itab-f2 = '10'.
itab-f3 = '3421'.
append itab.
  wa_fieldcatalog-fieldname   = 'F1'.
  wa_fieldcatalog-reptext_ddic   = 'field1'.
  wa_fieldcatalog-just          = 'C'.
   append wa_fieldcatalog to it_fieldcatalog .
   clear wa_fieldcatalog .
  wa_fieldcatalog-fieldname   = 'F2'.
  wa_fieldcatalog-reptext_ddic = 'field2'.
    wa_fieldcatalog-just          = 'C'.
   append wa_fieldcatalog to it_fieldcatalog .
  clear wa_fieldcatalog .
  wa_fieldcatalog-fieldname   = 'F3'.
  wa_fieldcatalog-reptext_ddic  = 'field3'.
    wa_fieldcatalog-just          = 'L'.
  wa_fieldcatalog-do_sum          = 'X'.
   append wa_fieldcatalog to it_fieldcatalog .
  clear wa_fieldcatalog .
gd_layout-
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_LIST_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            is_layout               = gd_layout
            it_fieldcat             = it_fieldcatalog[]
      tables
            t_outtab                = itab  .
regards,
venkat.

Similar Messages

  • Moving a field to the left side in a region closer to a radio button...

    I'm frustrated not being able to place a field on a form closer to a radio group. I have a radio group of 3 options in which I would like to place a field to the right side of the radio button so that the user can type in an ID and then search a table by way of a search button on the screen. I can't place the field any closer to the radio button on the left side of the page...as it appears to the right side.
    A drag and drop format would be nice.....
    Is there a way to place the field in the exact location of where I want it?
    2nd problem is that depending on which radio button the user selects, can I change cursor focus to a particular field on the screen?

    It's been said (although originally by whom is unclear) that +talking about music is like dancing about architecture+. Speaking for myself at least, I think your post proves there's something similar to be said regarding writing about UI and layout problems—+I have absolutely no idea what you mean+. Please do us all a favour and create an example showing this problem on apex.oracle.com, and/or post some screenshots showing the current and required layouts somewhere like tinypic.com
    On Drag and Drop, see:
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldapp.htm#sthref906

  • In smartform quantity field move to left side.

    Hi,
    smartform output quantity field displaying rightside.
    how can i move quantity field to leftside.
    Regards,
    Suresh.

    Hi Suresh,
    check this
    Left/Right Alignment of Quantity field?
    hope it helps you
    Regards!

  • Field to move left side

    i have a document print in which i have two columns, first column is image field (refering to a file in the local machine), second field is a normal text column, if the 1st field is null then i want the second column to move to the left, i have set both the fields HORIZONTAL property as VARIABLE. but still the second column doesnt move to the left

    YET,
    i see that the behaviour when images are concerned is not the same :
    check it out at
    http://www.oracle.com/webapps/online-help/reports/10.1.2/state?navSetId=_&navId=3&vtTopicFile=htmlhelp_rwbuild_hs/rwcontxt/props/pi_lay_horizontal_elasticity.htm&vtTopicId=

  • Decimal Value display in ALV Field display

    Hi Expert,
    I need to dispaly one ALV Field "Routine Work Hour" value up to 2 decimal place in ALV output i.e if value is 2.5 then it should display as 2.50.The field which refers to this is ISMNW and the database table is AFRU.Now if this value is maintained in MINUTE unit, then code converts into HOUR unit and correctly outputs to ALV output up to 2 decimal after i changed the field decimal lenght.But for the value which is mainatined in HOUR unit, it correctlty populated into the final internal table upto 2 decimal and this table data while passing into FM " REUSE_GRID_DISPLAY" it only outputs upto 2 deciamal value for the value which is maintained as MINUTE unit in database table AFRU in ALV output, but for other value(Which are maintained in HOUR unit in table AFRU)  it still shows 1 decimal length.But the internal table correctly populates these values up to 2 decimal for all unit of work(MINUTE/HOUR) while passing though this above FM.
    Please advise where i need to look into.
    Thanks

    hi,
    pass these parameters to fieldcatlog.
    e.g.
    Fcat-ref_fieldname = 'ISMNW'.
    fcat-ref_tabname  = 'AFRU'.
    fcat-decimalsout = 2.
    Hope this will help you.
    Regards,
    Vijay

  • IMac display monitor problems, left side darkens and flickers

    I have an iMac with 2.7 GHz Intel Core i5, 16 GB 1333 MHz DDR3,  AMD Radeon HD 6770M 512 MB running Mac OS X Lion 10.7.5 (11G63). The last year the left side of the monitor was flickering intermittingly. I didnt think much of it. Then in July, one big flicker caused the left side of the screen to darken slightly. Fortunately, my AppleCare was still in effect,. I contacted Apple and they had me zap the PRAM and also reboot into Recovery mode. The darkness was still apparent. So I took it to an authorized dealer and they fixed the display. Now tonight, one big flicker happened and I noticed that the left side had darkened a little again. I zapped the PRAM and it seems to be ok now, but I'm afraid that the same thing will soon happen. And of course the AppleCare has expired finally. Has anyone encountered this?  I have four external hard drives on a shelf right next to the display. This sounds silly, but could they be affecting the display in any way? I moved them a few feet below where they were, hoping that they werent the cause of the problem.
    Any advice would be most welcome.
    Thanks!

    had zapped pram not helped then I would had said that the lcd panel itself was close to the end of it's life and replacement would be required but since it did then I have no real cause to believe the issue would come back

  • Portal left side navigation proble

    Dear All,
    I am facing one strange problem in portal left side navigation. I am having 18 pages in left side navigation panel those pages are appearing when i typed portal url with host name. If i typed portal url with IP address 18 pages are not visible but the first appliction which is default is loading loading.
    I dont know why pages are not loading
    Can any one help me out for this issue its URGENT.
    Regards
    Suresh

    If your portal server IP Address is say 1.2.3.4 and the port no. is 50000
    you are right now accessing portal through http://1.2.3.4:50000/irj
    Now what you need to do is
    go to run command type drivers. When it opens go to etc folder. then hosts file
    there make an entry like
    1.2.3.4 epdev
    now you can access the portal through http://epdev:50000/irj
    Hope this helps!
    Regards
    Atul Shrivastava

  • ALV to Excel Missing field content

    Hi Experts,
    I have a problem during dowloading process of ALV grid to Excel. For some reasons the last row is not completely filled with all field contents.
    I tried 2 things one is working fine and one is not working fine.
    1) List --> Export ---> Spreadsheet : this option is working fine.
    2) Using Excel icon in Grid Toolbar: This is not working correctly. for example if i have 20 fields only 10 fields are coming properly in last row.
    Any ideas?? It looks like some thing to do with OSS Notes.
    Thanks in advance,
    Rajesh

    CTRLSHIFTF9 is SAP standard function.
    But Execl icon is standard tool for ALV in SAP which use Fieldcatlog.
    Just try to change the Options i gave you once.     
    Similar issue was resolved with the same solution :
    [Refer to the link|https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=7181843]
    Regards,
    Gurpreet

  • Shifting field contents in an internal table

    is there any way to shift field contents from one field to another in an internal table
    for eg.
    itab
    fieldA(1)-fieldB(10)
    1--20000--
    2--20001---
    final itab
    fieldA(1)-fieldB(10)
    1--120000---
    2--220001---
    i need to use LOOP to do this. is there any other way to achieve this WITH OUT A LOOP?
    Thanks,
    ravi.

    I wouldn't really call this a shift, because you are keeping the value of fielda.  If fielda were to be blank, then you could "shift" all at one time without a loop.
    For example.
    Data: begin of itab occurs 0,
          fielda(1) type c,
          fieldb(10) type c,
          endo of itab.
    Data: begin of itabf occurs 0,
          fieldb(10) type c,
          endo of itabf.
    itabf[] = itab[].
    I think that the final itab would look like this.
    <b>fieldb</b>
    120000
    220001
    But, of course, this is not your requirement, so I think that you need to do a loop to "copy" the first value in to fieldb.
    Data: begin of itab occurs 0,
          fielda(1) type c,
          fieldb(10) type c,
          endo of itab.
    Data: begin of itabf occurs 0,
          fielda(1) type c,
          fieldb(10) type c,
          endo of itabf.
    Loop at itab.
    itabf-fielda = itab-fielda.
    concatenate itab-fielda itab-fieldb
             into itabf-fieldb.
    condense itabf-fieldb no-gaps.
    append itabf.
    endloop.
    Regards,
    Rich Heilman

  • Filtering the contents of one alv based on another ALV's filter

    Hi,
    I have used a tab element within which i have two tabs.each tab has an alv table.
    Is it possible to restrict the entries of one alv table based on enrties from another alv table(both the alv tables will have some common fields).for example I have filtered entries in alv1 based on field1 .when i go to alv2 entries should be restricted on the field1 (common field)
    Thanks
    Bala Duvvuri
    this is the answer
    refer SALV_WD_FILTER_UI
    Edited by: Bala Duvvuri on Oct 4, 2011 1:20 AM

    hi Mohamed,
    Go through this links ,
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/95/92b2f7d2f14a6da7a8b5d66808d1f6/content.htm">Portal Display Rules</a>
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/4b/29cf122f414721964269e1b675d62c/content.htm">Rulecollection</a>
    Regards,
    Malini.V

  • ICON with field contents in case of ALV GRID

    please have a look at the program. the output of the program display ICONS with the field contents.
    I wanted the same functionality in case of GRID layout.
    But in case of GRID layout I am only getting ICON without field contents.
    In this Example
    if I use ALV LIST the ouput will be STACk ICON with X
    IF I use ALV GRID the output will be STACK ICON.
    REPORT ZTEST_SO1 .
    type-pools : slis.
    data : result(25).
    types : BEGIN OF Ty_MARA,
            gv_flag type char25,
            end of ty_mara.
    data : gt_mara type standard table of ty_mara,
           wa_mara type ty_mara.
    DATA : gt_fieldcat type slis_t_fieldcat_alv,
           wa_fieldcat type slis_fieldcat_alv.
    wa_fieldcat-fieldname = 'GV_FLAG'.
    APPEND WA_FIELDCAT TO GT_FIELDCAT.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
       name                        = '@3B@'
       TEXT                        = 'X'
       INFO                        = 'YY'
       ADD_STDINF                  = 'X'
    IMPORTING
       RESULT                      = wa_mara-gv_flag.
    IF sy-subrc EQ 0.
    APPEND WA_MARA TO GT_MARA.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = 'ZTEST_SO1'
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
       IT_FIELDCAT                    = GT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = GT_MARA
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Read the documentation of FM ICON_CREATE, the purpose of the Function module is entirely different from what you are using it for.
    To print Icons in ALV (Using FMs ) all you need to do is to send the Icon name in the field.
    Also parameters TEXT and INFO of FM ICON_CREATE seem to be flags, that are appended to the icon name so that when you set it on the screen the appropriate info or Text is shown.

  • How can I have multiple fields on the left and one large field on the right?

    I'm trying to conserve space on a form.  I have five "pass/fail" fields on the left and would like a large free text field to the right.  This will be an area to comment on the "pass/fail" section.  When I add the multi-line text box, it moves all my "pass/fail" mulitple selection boxes.
    Any advice?

    Sorry FormsCentral doesn't allow a fields to spam over multiple rows.
    Gen

  • 1000 CHARACTER TEXT IN ALV FIELD

    Hi Experts,
    I have a String type variable containing 1000 character text that I am passing in a field on ALV. But ALV field can display on 132 characters. So now my requirement is that when a user double clicks on that field... then a popup or a screen appears where the user can read the entire text of that field.
    I have tried some FMs (like POPUP_TO_CONFIRM, POPUP_TO_INFORM, POPUP_DISPLAY_TEXT etc...), but all have length restriction.
    Please suggest if there is any FM to get the entire 1000 character text on a popup....  OR if there is any other way to do this...
    Thanks in advance
    Regards,
    Ashish Goyal

    I am using this code provided by you, facing error : Field "OB_GUI_DIALOGBOX_CONTAINER" is unknown. It is neither in one of   the specified tables nor defined by a "DATA" statement. 
    Please take a look and suggest.
    Using REUSE ALV GRID to display ALV.
       TYPES: BEGIN OF tp_text_x .
    TYPES: tdname      TYPE thead-tdname ,
           tdobject    TYPE thead-tdobject ,
           tdid        TYPE thead-tdid ,
           tdspras     TYPE thead-tdspras ,
           tdtxtlines  TYPE thead-tdtxtlines .
    TYPES: tdline      TYPE tline-tdline ,
           it_tline    TYPE tline_tab .
    TYPES: END OF tp_text_x .
    CLASS cl_event_reciever DEFINITION DEFERRED.
    DATA v_event_reciever TYPE REF TO cl_event_reciever.
    CLASS cl_event_receiver DEFINITION .
      PRIVATE SECTION.
        METHODS: close
                 FOR EVENT close OF cl_gui_dialogbox_container
                 IMPORTING sender.
        METHODS: init_container .
        METHODS: display_textedit
                 IMPORTING value(st_text_x) TYPE tp_text_x .
    ENDCLASS .                    "cl_event_receiver DEFINITION
    CLASS cl_event_receiver IMPLEMENTATION.
      METHOD close .
        CALL METHOD sender->set_visible
          EXPORTING
            visible = abap_false.
      ENDMETHOD .                    "handle_close
      METHOD init_container .
    *    DATA: ob_gui_dialogbox_container TYPE REF TO cl_gui_dialogbox_container.
        IF ob_gui_dialogbox_container IS NOT INITIAL .
    *    IF EDITOR_CONTAINER IS NOT INITIAL .
          me->close( EXPORTING sender =  ob_gui_dialogbox_container ) .   " EDITOR_CONTAINER ).
        ENDIF .
        CREATE OBJECT ob_gui_dialogbox_container
          EXPORTING
            parent   = cl_gui_container=>screen0
            top      = 40
            left     = 200
            lifetime = cntl_lifetime_dynpro
            width    = 600
            height   = 100.
      ENDMETHOD.                    "init_container
      METHOD display_textedit .
        me->init_container( ) .
        DATA: ob_gui_textedit TYPE REF TO cl_gui_textedit .
    *    DATA: ob_gui_dialogbox_container TYPE REF TO cl_gui_dialogbox_container.
        CREATE OBJECT ob_gui_textedit
          EXPORTING
            parent = ob_gui_dialogbox_container.
        CALL METHOD ob_gui_textedit->set_readonly_mode
          EXPORTING
            readonly_mode = cl_gui_textedit=>true.
        DATA: it_tdline TYPE TABLE OF tdline .
        DATA: st_tdline LIKE LINE OF it_tdline .
        FIELD-SYMBOLS: <st_tline> LIKE LINE OF st_text_x-it_tline .
        LOOP AT st_text_x-it_tline ASSIGNING <st_tline> .
          APPEND <st_tline>-tdline TO it_tdline .
        ENDLOOP .
        CALL METHOD ob_gui_textedit->set_text_as_stream
          EXPORTING
            text = it_tdline.
      ENDMETHOD.                    "display_textedit
    ENDCLASS .                    "cl_event_receiver IMPLEMENTATION
    INITIALIZATION.
    CREATE OBJECT v_event_reciever.
    DATA: ob_gui_dialogbox_container TYPE REF TO cl_gui_dialogbox_container.
    CREATE OBJECT ob_gui_dialogbox_container.
    START-OF-SELECTION.
    v_event_reciever->display_textedit( EXPORTING st_text_x = <st_alv_data_1>-text_1 ) .

  • Alv field with f4 help without using class

    Hi,
    Can any one give me a program of "Alv field with f4 help without using class".
    Thanking you in advance.

    hi
    <b>Linking F4 Help to Fields</b>
    For the last section, we will deal with linking F4 help to fields. It is easy. As usual, define, implement and register the event “onf4” at proper places in your code. For F4 help, you must register the fields whose F4 request will trigger the “onf4” event. For this you must prepare a table of type “LVC_T_F4” and register this table using the method “register_f4_for_fields”. While preparing table you must include a line for each field which will trigger F4 event. For each field in the structure;
    &#1048766; Pass the fieldname to ‘FIELDNAME’
    &#1048766; Set ‘REGISTER’ to make the field registered,
    &#1048766; Set ‘GETBEFORE’ to provide field content transport before F4 in editable mode
    &#1048766; Set ‘CHNGEAFTER’ to make the data changed after F4 in editable mode.
    DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE .
    lt_f4-fieldname = 'PRICE'.
    lt_f4-register = 'X' .
    lt_f4-getbefore = 'X' .
    APPEND lt_f4 .
    CALL METHOD gr_alvgrid->register_f4_for_fields
    EXPORTING
    it_f4 = lt_f4[] .
    Preparing table for the fields to be registered to trigger F4 event
    METHOD handle_on_f4 .
    PERFORM f4_help USING e_fieldname es_row_no .
    er_event_data->m_event_handled = 'X' .
    ENDMETHOD .
    A sample “onf4” method implementation
    Again, we set the attribute “er_event_data->m_event_handled” to prevent further processing of standard F4 help.
    regards
    Ravish
    <b>
    reward if useful</b>

  • How to display sign in left side in ALV Grid Function module?

    Hi,
    How to Dispaly sign in left side for amount fields in ALV GRID function module?
    Ex : Amount = 1234-
    I want to dispaly it as -1234.
    Is there any option in ALV Grid function module?

    Hi sreedhar,
    Use FM  'CLOI_PUT_SIGN_INFRONT'
    it will giv the value like '-1234' if u pass '1234-'.
    DATA : v_field(17).
    MOVE v_amount to v_field.
    CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
    CHANGING
        VALUE   = v_field.
    MOVE v_field to v_amount.
    OR
    FORM change_sign changing var type c.
    if var LT 0.
    shift var right deleting trailing  '-'.
    shift var left deleting leading  ' '.
    concatenate '-' var into var.
    else.
    shift  var left deleting leading  ' '.
    endif.
    ENDFORM.
    reward pts if it helps.
    Edited by: venkat reddy on Jan 2, 2008 7:19 AM

Maybe you are looking for

  • How to copy active documentname to clipboard

    Hi, I need a script for PS which will copy active document name to the clipboard, which then have to manually'll put myself as the text in the picture. Reading the document's name I've already got: MyDoc = app.activeDocument.name; but I can not cope

  • Qatar withholding tax

    Hi folks, I have a query regarding Qatar Withholding tax. In Qatar, withholding taxes are applicable at the time of invoice or payment? For example, in India, the laws says tax should be deducted at the credit book entry or payment. So, withholding t

  • Get Spacing between the two elements

    Hi, I have two groups and  a table in  in my layout . In groups I have two input fields each I want to provide the spacing between the groups. How to do the above, Edited by: SAP LEARNER on Nov 12, 2009 12:29 PM

  • Older nVidia NVS104M driver needed

    I can't get my hands on the original release of the WinXP NVS 140M driver, for the T61.  (Only the original release, 6.14.11.0133 from 5/18/2007, supports a certain video accessory card we have been using on the T60's)  I searched all of the video dr

  • Canon 5D Mark III Loyalty Program

    Hi, I had a couple questions regarding the canon loyalty program. Hopefully I'm in the right place on the forums. 1. When cameras go "Out Of Stock", how long do they take generally to come back into stock? Weeks, Months or completely random? 2. Can y