SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Show internal table as table control



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Thu Jun 26, 2008 11:11 am    Post subject: Show internal table as table control Reply with quote

Code:
REPORT zlistprog.

TABLES: kna1.

DATA: BEGIN OF i_kunden OCCURS 0,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1,
END OF i_kunden.


DATA: i_data_tab LIKE hrdatatab OCCURS 20 WITH HEADER LINE.
DATA: i_fieldnames LIKE hrfieldnam OCCURS 20 WITH HEADER LINE.

CONSTANTS: c_filename(7) VALUE 'SAPDATA'.


START-OF-SELECTION.

* Data Selection
  SELECT kunnr name1 FROM kna1
  INTO CORRESPONDING FIELDS OF TABLE i_kunden.

* Master data table for transfer to Fubau
  LOOP AT i_kunden.
    i_data_tab-langtext1 = i_kunden-kunnr.
    i_data_tab-langtext2 = i_kunden-name1.
    APPEND i_data_tab.
  ENDLOOP.

*Master heading table
  i_fieldnames-field = 'Kundennummer'.
  i_fieldnames-field2 = 'KNA1'.
  i_fieldnames-field3 = 'KUNNR'.
  i_fieldnames-key = 'X'.
  APPEND i_fieldnames.

  CLEAR i_fieldnames.
  i_fieldnames-field = 'Kundenname'.
  i_fieldnames-field2 = 'KNA1'.
  i_fieldnames-field3 = 'NAME1'.
  APPEND i_fieldnames.

*  List of Control as table
  CALL FUNCTION 'DISPLAY_BASIC_LIST'
       EXPORTING
            file_name           = c_filename
       TABLES
            data_tab            = i_data_tab
            fieldname_tab       = i_fieldnames
       EXCEPTIONS
            download_problem    = 1
            no_data_tab_entries = 2
            table_mismatch      = 3
            print_problems      = 4
            OTHERS              = 5.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.