How is address normally displayed in ALV

Hi guys,
  I am still new at ABAP and my assignment is to display company name and address from KNA1 on an ALV grid given a set of customer number.
  The problem i am facing is that the addresses are not consistent(eg some contains name1 and name2, some only contains name1).
  Do I create seperate columns for each field of KNA1 in the  ALV, or is it possible to create a column with multiple lines to hold the address?
Please advise. sample programs with ALV that displays address would be helpful
Thanks

Hi
It's possible to create only one:
If ITAB is your output table, define a field NAME instead of NAME1 and NAME2 and while you're upoloading the address data concatenate those two fields in NAME.
DATA: BEGIN OF ITAB OCCURS 0,
      NAME1 LIKE KNA1-NAME1,
      NAME2 LIKE KNA1-NAME2,
        NAME(70),
      END    OF ITAB.
I don't know how you load the data:
DATA: LEN TYPE I.
SELECT * KNA1 WHERE KUNNR IS SO_KUNNR
LEN = STRLEN( KNA1-NAME1 ).
WRITE KNA1-NAME1(LEN) TO ITAB-NAME.
LEN = LEN + 1.
WRITE KNAM1-NAME2     TO ITAB-NAME+LEN.
APPEND ITAB.
ENDSELECT.
Max

Similar Messages

  • Controlling how addresses are displayed

    I manage a lot of people and often write group emails. Recently, I need the "Reply to" section to go to my friend's email address so I put it in there. Mail kept converting it to his "nickname" Monkster" which is inappropriate for a business letter. I kept clicking the corner of the blue tube encapsulating the name and selecting "Edit" and could not remove the name from being seen. I finally had to go to the address book and just delete the name altogether.
    Back to the subject, is there a way to control how the addresses are displayed? I tried looking in preferences and could only find "Automatically complete addresses" which I unchecked but was no help.
    Thanks for your assistance in advance.

    Try putting the address in AddressBook, as you'd like it to appear. Then, in Mail, in the "Windows" menu, select "Previous Recipients". Find the offending nickname there, and remove it

  • How to print check box in ALV list display and how to pick selected ones

    Hi
    i am displaying one ALV list dispaly. for that im adding one check box fields by filling the fieldcat as below:
      wa_fldcat-checkbox = 'X'.
      wa_fldcat-edit = 'X'.
    but the check box is showing disable mode only. i want to display that check box and if i select that check box i want pick that records. for ALV grid i found one FM to pick records of selectedones as below.
    DATA ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF ref_grid IS NOT INITIAL.
        CALL METHOD ref_grid->check_changed_data.
      ENDIF.
    but how can i do for list display to pick those selected one records.
    Can any one sugget regarding this.
    Thanks in advance.
    Rahul.

    Hi,
    Thanks. now it's enabled. but how can we pick the records from that list whichever i selected through that check box.
    i found this one for ALV grid:
    DATA ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF ref_grid IS NOT INITIAL.
        CALL METHOD ref_grid->check_changed_data.
      ENDIF.
    but how for ALV normal list display.
    Thanks.
    rahul

  • HT4211 How do you switch from multitasking mode back to normal display mode?

    How do you switch from multitasking mode back to normal display mode?

    You mean switch from showing the recently used apps bar or dock back to regular home screen display mode?
    If so, select the Home button.

  • HT4623 how to change from enlarged display to normal display on IPHONE5

    how to change enlarged display to normal display on IPHONE 5

    Settings > General > Accessibility > Zoom.
    This can also be changed when the iPhone is connected to iTunes. Available under the Summary tab for the iPhone sync preferences with iTunes below Options > Configure Universal Access.

  • How do I get web address to display in Safari. I did something to make it evaporate.

    How do I get web address to display in Safari? I did something to make it evaporate.

    View > Show Toolbar.

  • How to display the alv report blocks wise with out using the blocked alv

    Hi
    How to display the alv report with out using the blocked alv function module.
    Thanks
    Chinnu

    see this Standard Program
    RPR_ABAP_SOURCE_SCAN

  • IPhone stuck on zoom. How to get it back to normal display?

    iphone stuck on zoom. How to get it back to normal display?

    use 2 fingers and pinch the screen with your fingers together and it will zoom out

  • How can i change sequence of structrure when i display in alv grid.

    Hi,
    I am doing object oriented alv. Now i need to change my sequence of alv grid. How can i change sequence of structrure when i display in alv grid. Send me code if possible....
    IF G_CONTAINER IS INITIAL.
         CREATE OBJECT G_CONTAINER
             EXPORTING
                CONTAINER_NAME = 'CONTAINER'.
         CREATE OBJECT ALV_DISP
             EXPORTING
                I_PARENT = G_CONTAINER.
         CALL METHOD ALV_DISP->SET_TABLE_FOR_FIRST_DISPLAY
             EXPORTING
               I_STRUCTURE_NAME  = 'ZPMS_OUTPUT_V3'
              CHANGING
                IT_OUTTAB        = IT_PMT
                IT_FIELDCATALOG  = G_FLDCAT
              EXCEPTIONS
                INVALID_PARAMETER_COMBINATION = 1
                PROGRAM_ERROR                 = 2
                TOO_MANY_LINES                = 3
                OTHERS                        = 4.
         IF SY-SUBRC <> 0.
         ENDIF.
    Regards,
    Gurprit Bhatia
    Message was edited by:
            GURPRIT BHATIA

    Hi Gurprit,
    when you are maintaining the field catalog you can maintain the order by populating the value as 1,2,... into col_pos filed.
    <b><REMOVED BY MODERATOR></b>
    Satish
    Message was edited by:
            Alvaro Tejada Galindo

  • Trying to erase settings from my old iphone but when I have to enter my itunes ID password the old email address is displayed.  How can I change this to my existing itunes account so I can reset this phone?  Thank you.

    Trying to erase settings from my old iphone but when I have to enter my itunes ID password the old email address is displayed.  How can I change this to my existing itunes account so I can reset this phone?  Thanks in advance.

    I know it sounds weird, and that is the reason I posted my question.  Because my case is not like all the ones I've found online and it's confusing.  I added a screen capture of my itunes with my old iphone (the one that houses my playlists) connected to it.
    My playlists "ARE"  in my iphone 4s.  They are still there even though they do not show up when I plug in to itunes in my computer. 
    When connecting my phone to itunes on my macbook, the playlists do not appear anywhere in itunes.  I have found my connected iphone icon, I have clicked on the arrow next to it and it does pull up the standard lists that come with the iphone/itunes:  Music, Movies, TV shows, books.  That's it! below that is "Genius" and below "Geniuns" is "PLAYLISTS"  but the only playlist of mine that shows there is one that I created several years back titled "90's music" and that one I created it on my computer, not my phone.  Under "90's music" there are also other standard playlists that itunes automatically adds.
    Does anyone else have this issue or know how to get around this.  I am starting to think that I am going to have to recreate these lists on my computer

  • How does low-res videos/movies look on the Retina display, compared to a normal display?

    How does low-res videos/movies look on the Retina display, compared to a normal display?

    What is a "low-res" video? It will look as good as the "low-res" is. If the video is 100px x 100px it will display 100px x 100px unless you stretch or otherwise manipulate it.
    If a "low-res" video is an old 1930's grainy video it will look like a 1930's grainy video.
    Maybe I did not understand your question.

  • My screen is at max zoom how do I restore to normal display

    How do I get my screen back to normal display size

    Perhaps you have Zoom enabled (Settings/ General/ Accessibility/ Zoom).  If so, then double-tapping the screen with three fingers zooms in the display.  You can double-tap with three fingers again to go back to normal mode and/or go into settings and turn this off.

  • How to remove the display of DECIMALS in ALV? Any Falg?

    Hi Experts,
    One simle dount that, I am getting some values in some fields as 12.34; 11.22 etc - 2 decimals, but, am looking to hv as 12; 11 - NO DECIMALS.
    So, I looked any flag in Fileds catalog, Lay out in SLIS, but, did not find any flag?
    now, am getting it by moving to a P type field.
    But, pls.  let me know that How to get it done in ALV w/ SLIS? wht is the flag?
    thanq

    Check the field catalog, there is a field called  decimals_out,  set this to 0(zero).
    Regards,
    Rich Heilman

  • How do i prevent display of a particular column in ALV

    How do i prevent display of a particular column
    of a structure in ALV

    Hi Serdar,
    Please do let us know the link , as soon as your code sample is put in sdn.sap.com.
    I request the <b>veteran members</b> of this forum to <b>contribute to WebLogs</b> or <b>code samples</b>, since over the time, the same questions will be asked and instead of repeating the answers, we can direct them to Weblogs or Code Samples.
    There is an ABAP FAQ present in this site, which has given insight to so many things, that I have not even considered remotely possible.
    As seen today, there was a useful piece of code posted. Instead of posting the code in the forum, you can create it as a weblog and post it there.
    Regards,
    Subramanian V.

  • How to make the first row  selected before the display of ALV grid

    Hello Experts,
    I created a ALV grid using custom container in a screen . Now i want do the follwing:
    1. i want that, the  <b>first line must be selected before the display of ALV.</b>
    2. I have selection buttons . But i dont want the multiselect button and the  
        standard  toolbar in the ALV grid.
    Could any one please help me regarding the above?
    Thanks & Regards
    Sudhansu

    can u pls explain in more details with an example?
    I am telling u the scenario.
    1. i have a screen(Modal dialog Box)  containing ALV grid with selection buttons for each row  (top part) and a subscreen(second part).
          Now when i click on a selection button, it will display the corresponding values in the subscreen.
        When this screen will display for the first time , then first row of the ALV grid should be selected and the corresponding values should be displayed in  the subscreen.
    i   wrote the following code in the PAI. But when i select a record its not triggering the PAI.
    DATA:
         gi_index_rows TYPE lvc_t_row, " Internal table for indexes of selected rows
         g_selected_row LIKE lvc_s_row, " Information about 1 row
         l_lines TYPE i.
      CLEAR g_wa_vdmeko.
    *get selected row
      CALL METHOD g_alv_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      LOOP AT gi_index_rows INTO g_selected_row.
        READ TABLE g_int_vdmeko INDEX g_selected_row-index INTO g_wa_vdmeko.
        SELECT SINGLE  *
               FROM vdmepov
               WHERE bukrs = g_wa_vdmeko-bukrs AND
                     styp  = g_wa_vdmeko-styp  AND
                     sbez  = g_wa_vdmeko-sbez  AND
                     svym  = g_wa_vdmeko-svym  AND
                     svnr  = g_wa_vdmeko-svnr.
      ENDLOOP.
    I am displayinng the ALV using method "set_alv_for_first_display".
    Please help if u have any idea..................
    Thanks
    Sudhansu

Maybe you are looking for

  • Slow browsing, not a DNS issue

    Hi I have a late 2013 MacBook Pro 13" and browsing on my home network is ridiculously slow (5 mins to load a page, if at all). I've tried all the fixes related to DNS and have changed to OpenDNS and Google and back again to no avail. Both my iPad Air

  • How to create Batch file to execute sql scripts

    Hi friends,         i want to create batch file to execute all my .sql scripts. I have all table ( all table scripts in single file ) ,Udds ( all udds in single file ) ,Stored procedures( separate file for each SPs ),Functions ( Separate file for eac

  • Exporting .jpg that is HDV

    My client wants to capture stills from her HDV footage BUT I'm having trouble with it looking correct. I realize that HDV is 16x9 but is there a way to export the still without it looking squeezed on the sides and in 4x3 instead of 16x9? Thanks!

  • Call Existing Asset IViews from Web Dynpro using eventing

    Hi,   I am trying to pass a Equipment Number from one of my WebDynPro's converted to IVIEW to a stock IVIEW from SAP called Create Notification. Basically I followed the example and coded WDPortalEventing.fire("urn:com.sap.pct.plm:NotificationCreate"

  • HT4864 my incoming server name in mail preferences

    My incoming server name in mail preferences comes up shaded so I cannot change it, how do i change it?