Problem in alv output
Hi All,
For one my reports i used alv grid display as output.
Correct output is coming but the problem is when i press the refresh button the output valus getting duplicated.
For eg :
My output before i press refresh button is
A B C
25 abc xyz
When i press the refresh button the output is changes to
A B C
25 abc xyz
25 abc xyz
here new line added with same entries when i press refresh.I f i again press refresh then one more line added with same entries.
Please let me know what is the problem and suggest me the solution for this.
Thanks a lot.
Hi,
Hae u cretaed the ALV by checking whether it is INITIAL.
DATA : w_grid TYPE REF TO CL_GUI_ALV_GRID,
IF w_grid IS INITIAL.
creating custom container instance
ENDIF.
This will oslve ur problem, or else when u click on the row also it will generate dupliactes.
Reward if this helps.
Similar Messages
-
Problem in alv output download
HI All,
My problem is
My alv output table contains long text with value as 1000 characters.
when i am downloading my alv output into excel, it is downloading only 255 characters length.
is there any ways to download the entire long text into excel.
Please help me on this...
Thanks in advance.
Maruthi Konijetisee the following example.
REPORT z_down_xml LINE-SIZE 132 NO STANDARD PAGE HEADING.
Databases
TABLES:
makt, "Mat description
marc, "Material / plant
t001w, "plant name
bhdgd. "Batch heading
Internal tables
DATA:
BEGIN OF gt_marc OCCURS 0,
werks LIKE marc-werks,
matnr LIKE marc-matnr,
END OF gt_marc,
Table to be downloaded as xml. Each line stores start and end tags
and the value
BEGIN OF gt_xml OCCURS 0,
line(120),
END OF gt_xml,
g_maktx(120).
User-input
SELECT-OPTIONS:
s_werks FOR marc-werks,
s_matnr FOR marc-matnr.
START-OF-SELECTION.
Extract all required data
PERFORM main_processing.
END-OF-SELECTION.
SORT gt_marc BY werks matnr.
LOOP AT gt_marc.
AT FIRST. "First tag must be root
CLEAR gt_xml.
gt_xml-line = ''.
APPEND gt_xml.
CLEAR gt_xml.
display data
FORMAT COLOR 2 ON.
WRITE :/ gt_marc-matnr, makt-maktx.
FORMAT COLOR 2 OFF.
ENDLOOP.
The last tag must be the root closing tag --*
gt_xml-line = '</LOCATIONS>'.
APPEND gt_xml.
CLEAR gt_xml.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
filename = 'C:PLANT1.XML'
filetype = 'ASC'
TABLES
data_tab = gt_xml.
TOP-OF-PAGE.
MOVE sy-title TO bhdgd-line1.
MOVE sy-repid TO bhdgd-repid.
MOVE sy-uname TO bhdgd-uname.
MOVE sy-datum TO bhdgd-datum.
MOVE '0' TO bhdgd-inifl.
MOVE '132' TO bhdgd-lines.
FORMAT INTENSIFIED ON COLOR COL_HEADING.
PERFORM batch-heading(rsbtchh0). "report header
Form READ_PLANT
FORM read_plant.
Get plant name
CLEAR t001w.
SELECT SINGLE name1
INTO t001w-name1
FROM t001w
WHERE werks EQ gt_marc-werks.
ENDFORM. " READ_PLANT
Form MAIN_PROCESSING
FORM main_processing.
Material and plant basic data
SELECT werks matnr
INTO TABLE gt_marc
FROM marc
WHERE werks IN s_werks
AND matnr IN s_matnr.
ENDFORM. " MAIN_PROCESSING
Form READ_DESCRIPTION
FORM read_description.
Material name
CLEAR g_maktx.
SELECT SINGLE maktx
INTO g_maktx
FROM makt
WHERE matnr EQ gt_marc-matnr
AND spras EQ 'E'.
Replace special character
DO.
REPLACE '&' WITH '*ù%;' INTO g_maktx.
IF NOT sy-subrc IS INITIAL. EXIT.ENDIF.
ENDDO.
DO.
REPLACE '*ù%;' WITH '&' INTO g_maktx.
IF NOT sy-subrc IS INITIAL. EXIT.ENDIF.
ENDDO.
DO.
REPLACE '/' WITH '/' INTO g_maktx.
IF NOT sy-subrc IS INITIAL. EXIT.ENDIF.
ENDDO.
ENDFORM. " READ_DESCRIPTION -
Problem with alv output export to text file
hi experts,
when iam exporting alv output to text file,
some data is missing in text file.say for example sold-to-party value is 1155027 in alv out put,but in text file it is showeing only 115502 ,
the last digit is missing,
can anyone help urgent!!!!!and when you export it to excel?
from here you could save it as text file too...
A. -
Hi Experts,
My fieldcatalog table is populated by using FM "REUSE_ALV_FIELDCATALOG_MERGE". But the fields qfieldname & qtabname is populated for one of the records in the catalog table which is creating problem in my output.
qfieldname is populated with previous fieldname in my internal table declared and qtabname with my int.table name. I was trying to sum the field but the value is splitted here.
when i manually remove qfieldname & qtabname am getting proper output.
why this two fields are populated? could anyone help...
sure for points.
Thanks in Adv,
Ponraj.s.Hi,
The two properties QFILDNAME & QTABNAME are for 'field with quantity unit' and the 'table name'. These field will get populated for Quantity fields....
In your case the quantity unit may be different for the records you are suming up...
if you want to remove these fields value ...
loop at i_fieldcat into wa_fieldcat.
if wa_fieldcat-fieldname = field name.
wa_fieldcat-qfieldname = ' '.
wa_fieldcat-qtabname = ' '.
modify i_fieldcat from wa_fieldcat.
endif.
endloop.
Satya. -
Search help problem in ALV output for field TD24A-DISMM
Hi Abap-Experts,
I have one issue regarding simple ALV report.
I need to display search-help for field DISMM. I have used below code in ALV fieldcatalog.
ts_fieldcat - tabname = 'TD24A'.
ts_fieldcat - tabname = 'DISMM'.
I have attached search-help for fields such as MATNR and WERKS too.
The search-helps are getting displayed for MATNR as well as WERKS.
But, the search-help is not gettting displayed for field DISMM(RP-TYPE) .
The output displayed is done using Simple ALV.
Could anyone please help me and correct my code or logic i have used.Hi,
I have changed code a bit...and used T438A table.
CLEAR ts_fieldcat.
ts_fieldcat-col_pos = '5'.
ts_fieldcat-fieldname = 'DISMM'.
ts_fieldcat-seltext_l = text-014.
ts_fieldcat-outputlen = 2.
ts_fieldcat-reptext_ddic = ''.
ts_fieldcat-ref_tabname = 'T438A'.
ts_fieldcat-ref_fieldname = 'DISMM'.
ts_fieldcat-ddic_outputlen = '2'.
ts_fieldcat-input = 'X'.
APPEND ts_fieldcat TO gt_fieldcat.
still it is not showing me the F4 help in simplae ALV output..
kindly help me -
Hi friends,
i have created alv report .no problem of getting output . but i m getting question mark in the standard menu. it is displaying 10 question mark (sub menu has print preview etc), edit ,question marks(ABC Analysis) ,question marks (abap list viewer etc ), settings ,system , help.
i don't want these question marks. how to candle this.i haven't moved to test or production , but iwant to know in development why it is coming..
if any one knows please let me know.
thanks and regards,
kani.The Problem is with some GUI inconsistency.
to overcome there are 2 solutions.
1. You need to run a program Which i don't remember exactly.
2. Using the Status event.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = it_fieldcat
I_CALLBACK_PF_STATUS_SET = 'STATUS' "important
it_sort = it_sort
TABLES
t_outtab = it_data
EXCEPTIONS
program_error = 1.
form status using extab tyoe slis_t_extab.
"This status you can set using the program SAPLKKBL
" go to se41 transaction, enter the program name SAPLKKBL
"status as STANDARD , and click the Button Copy status
"Now in the popup for Option to enter your program name and
"press ok, then save and activate the status
"now come here and activate the code and test now..
set pf-status 'STANDARD' excluding extab.
endform. -
Problem while downloading the alv output to excel file.
Hii,
While downloading the alv output to an excel file i am facing a problem. Either the output comes as 1.23456E+11 or the values get cut .
Cant put in txt file as the users require to calculate directy and i have even tried to increase the output length .But both doesnt help.
So what are the other ways to do so.
Edited by: mansi_v27 on Mar 24, 2010 12:35 PMHi,
Welcome to SCN!!!.
Please go through the forum rules. This has been discussed many times. You can search in the forum for this.
Infact there is no problem. Just expand that excel cell. You can see the full value. This is standard excel property.
Thanks,
Vinod. -
Problem in downloading ALV output in excel
Dear Abapers,
I am facing a problem while downloading alv output in spreadsheet. Report headers and data headings are coming in excle but contents are missing instead of that No Data is displaying on excel sheet. I have debug that and observed the deep structure name T_OUTTAB using by the FM ALV_DATA_EXPORT is empty, It should contain the contents of my output data.
Below I am giving my code.
***********************************************declaration****************
BEGIN OF d_file_out,
index TYPE i, "Index no
msg TYPE string, "Message
msgtyp(1) TYPE c, "Message type
END OF d_file_out,
DATA:t_file_out TYPE TABLE OF d_file_out.
DATA:wa_file_out TYPE d_file_out.
Display Error Logs
PERFORM display_logs USING text-006.
FORM display_logs USING p_text TYPE string.
CONSTANTS: c_count TYPE char5 VALUE 'INDEX',
c_mestyp TYPE char6 VALUE 'MSG',
c_message TYPE char7 VALUE 'MSGTYP'.
*Field catalog
PERFORM: z_field_catalog USING c_count text-010, "Record number
z_field_catalog USING c_mestyp text-011, "Message type
z_field_catalog USING c_message text-012. "Message
*Top of page event
PERFORM z_event USING t_events.
wa_layout-colwidth_optimize = c_x.
ALV grid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = sy-repid
is_layout = wa_layout
I_STRUCTURE_NAME = wa_file_out
it_fieldcat = t_field
it_events = t_events
TABLES
t_outtab = t_file_out
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.
***********************************Fieldcatalog**********************************************
FORM z_field_catalog USING p_field TYPE any
p_name TYPE any.
wa_field-fieldname = p_field.
wa_field-seltext_l = p_name.
IF p_field = 'INDEX'.
wa_field-outputlen = '14'.
wa_field-col_pos = 1.
ELSEIF p_field = 'MSG'.
wa_field-outputlen = '120'.
wa_field-col_pos = 2.
ELSEIF p_field = 'MSGTYP'.
wa_field-outputlen = '08'.
wa_field-col_pos = 3.
ENDIF.
APPEND wa_field TO t_field.
CLEAR wa_field.
ENDFORM.
Here I have given my code, which contain the building of field catalog and Calling ALV Grid. I have already checked the excel micros settings. Other programs are working fine on my system and downloading in excel is also working.
Hope to get reply soon.
Regards,
HimanshuHi ,
use this to down load to xcel
v_file = lv_file.
DATA: BEGIN OF s_head OCCURS 0,
head(40) TYPE c ,
END OF s_head.
s_head-head = text-015."'Sales price'. * for header
APPEND s_head.
s_head-head = text-016."'Purchase price'. * for header
APPEND s_head.
s_head-head = text-017."'Listing Procedure'. * for header
APPEND s_head.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
write_field_separator = '#'
TABLES
data_tab = it_output1[]
fieldnames = s_head[]
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
I have alv output with some values, now I need to put a push button on application tool bar if I change any values in the out put and then press that push button then the new values should be updated with out re execution of the alv program . how to do it.
Hi Kiran,
<li> The below code is more than enough. It works for your requirement.
<li>Define events
DATA: it_events TYPE slis_t_event,
wa_event like line of it_events.
<li>Fill events like below.
wa_events-name = 'PF_STATUS_SET'.
wa_events-form = 'PF_STATUS_SET'.
append wa_events to it_events.
clear wa_events.
wa_events-name = 'USER_COMMAND'.
wa_events-form = 'USER_COMMAND'.
append wa_events to it_events.
clear wa_events.
<li>Set pf status like below.
FORM PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STATUS' EXCLUDING rt_extab.
"When you set pf-status using above statement, you dont see ALV toolbar. To get back all the tools copy status of the any "program status which is using ALV in SE41 transaction code to your program with status you mentioned here.
"Program :SAPLKKBL
"status :STANDARD_FULLSCREEN
ENDFORM.
<li>Use USER_COMMAND event like below
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = 'REFRESH'."Create one button on ALV toolbar with function code REFRESH
RS_SELFIELD-REFRESH = 'X'. "Set this one. It refreshes internal table data with new values
ENDIF.
ENDFORM. "USER_COMMAND
<li>Call function module like below
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = program
it_fieldcat = it_fieldcat
it_events = it_events
TABLES
t_outtab = i_mard.
Let me know if you have any problem.
Thanks
Venkat.O -
Problem in download ALV output
Hi experts,
When I try to download my ALV report output, its giving dump 'Field symbol has not yet been assigned.
In my ALV output, I have 46 fields/columns. When I have 18 fields/columns or less, I able to download, but if it is more than 18. Its giving the above dump.
*Error details:*
Runtime Errors GETWA_NOT_ASSIGNED
Date and Time 05.09.2009 17:56:13
Short text
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 it has
come across a statement that unfortunately cannot be executed.
Error analysis
You attempted to access an unassigned field symbol
(data segment 110).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
Please provid the solution for this.
Thanks and regards,
SubbuHi Sandra,
As you told, There is a problem in populating field catalog.
Actually, I had passed the same field name 2 times while populating field catalog table. Thats why, the issue has been raised. Now I changed it accordingly.
Thanks and regards
Subbu
Edited by: subbu_1983 on Sep 6, 2009 11:10 AM -
Subtotal problem in Export Excel from ALV Output
Subtotal displays correct in alv output, but if i do the export excel , that subtotal value is changed in excel sheet.
is it possible to solve this problem.DATA: lo_grid TYPE REF TO cl_gui_alv_grid.
** get the global reference
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lo_grid.
** get the subtotal
DATA: it_01 TYPE REF TO data.
* CALL METHOD lo_grid->get_subtotals
IMPORTING
ep_collect01 = it_01.
** change the data
FIELD-SYMBOLS: <ft_tab> TYPE ANY TABLE,
<fs_tab> TYPE ANY,
<ff_field> TYPE ANY.
ASSIGN it_01->* TO <ft_tab>.
LOOP AT <ft_tab> ASSIGNING <fs_tab>.
ASSIGN COMPONENT 'PER' OF STRUCTURE <fs_tab> TO <ff_field>.
<ff_field> = '100'.
ENDLOOP.
** Refresh the table display
CALL METHOD lo_grid->refresh_table_display
EXPORTING
i_soft_refresh = 'X'. -
HI ,
I developed ALV report, the output is coming properly. But if i download that output into local file or spreadsheet from ALV output screen am unable to get the data only header and field headers are coming but data is not coming. But for other ALV with same importing parameters it is downloading properly. I donu2019t know whatu2019s problem only for this ALV, any one can please help me out from this situation pls.
ThxHi Lavanya
There can be two possibilities
1.) check the authorization, if it's missing, then this might happen...u hav said that the other report, it's downloading fine...r u trying to download the other report also with the same user id? is it a standard program or a customized report?
2.) just try reducing the security level in excel --> Tools -> Macros -> Security
regards
Sathish -
ALV output problem in displaying the field lengths.( LONG_DES1 & LONG DES)
I have declared itab of ALV output like below...
Internal table for ALV report generation***********
DATA : Begin of pdet_otab_alv occurs 0,
bukrs LIKE bsid-bukrs, "Company code
postm(4), "Posting month (YYMM format)
xblnr LIKE bsid-xblnr, "Reference document number
kunnr LIKE bsid-kunnr, "Customer (Supplier Billing Customer)
name1 LIKE kna1-name1, "Name 1
buzei like bsid-buzei,
gjahr like bsid-gjahr,
filkd like bsid-filkd, "Rep Number
rname like kna1-name1, "Rep Name
belnr LIKE bsid-belnr, "Document number (invoice number)
blart LIKE bsid-blart, "Document type
zfbdt LIKE bsid-zfbdt, "Baseline date
zterm LIKE knb1-zterm, "Terms
netdt LIKE bsega-netdt,"Due date
sgtxt LIKE bsid-sgtxt, "Text
agerg TYPE t_agerg, "Age range of invoice
wrbtr LIKE bsid-wrbtr, "Original invoice amount
due LIKE bsid-wrbtr, "Amount outstanding on invoice
long_des(250) type c, " Long description
<b> long_des TYPE string,
long_des1 TYPE string,</b>
date_s(10) type c, " Date
short_des(20) type c, " Short Description
counter type i,
End of pdet_otab_alv.
And after filling the internal table fields ( fields 'LONG_DES1' & 'LONG_DES' from FM READ_TEXT 's longtext, which are of 265 chars each )
<b>'LONG_DES1' & 'LONG_DES' are trimmed in ALV out put WHY ?</b>
w_fieldcat-fieldname = 'LONG_DES1'.
w_fieldcat-tabname = 'PDEL_OTAB_ALV'.
w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
w_fieldcat-ref_tabname = 'DD03P'.
w_fieldcat-seltext_l = 'Original Note'.
w_fieldcat-col_pos = 17.
APPEND w_fieldcat TO fieldcat.
CLEAR w_fieldcat.
w_fieldcat-fieldname = 'LONG_DES'.
w_fieldcat-tabname = 'PDEL_OTAB_ALV'.
w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
w_fieldcat-ref_tabname = 'DD03P'.
w_fieldcat-seltext_l = 'Latest Note'.
w_fieldcat-col_pos = 18.
APPEND w_fieldcat TO fieldcat.
CLEAR w_fieldcat.
<b>next part i.e., before passing fieldcat.... I have filled s_layout like below.</b>
<b> s_layout-max_linesize = 1000.
s_layout-colwidth_optimize = 'X'.</b>
Call the following function to display output in ALV form
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZFRSBOI0'
is_layout = s_layout
it_fieldcat = fieldcat
it_events = p_events[]
it_sort = p_it_sort[]
i_save = 'A'
TABLES
t_outtab = pdet_otab_alv1
EXCEPTIONS
program_error = 1
OTHERS = 2.
If the function call is not successful, raise error message
and come out from the program
IF sy-subrc <> 0.
message e000(00) with
'Unable to display report'(e01).
exit.
ENDIF.some body suggested me....we can display full length of text by below coding ?
Is that not correct - just asking....
s_layout-max_linesize = 1000.
s_layout-colwidth_optimize = 'X'.
Call the following function to display output in ALV form
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZFRSBOI0'
is_layout = s_layout
it_fieldcat = fieldcat
it_events = p_events[]
it_sort = p_it_sort[]
i_save = 'A'
TABLES
t_outtab = pdet_otab_alv1
EXCEPTIONS
program_error = 1
OTHERS = 2.
If the function call is not successful, raise error message
and come out from the program
IF sy-subrc <> 0.
message e000(00) with
'Unable to display report'(e01).
exit.
ENDIF. -
Problem in Download ALV Output to Excel
Hi All,
When iam going to Download the ALV ( Grid ) Output to Excel, all columns are not coming in Output.
But the ALV Output Contains 140 Columns.
How to solve this issue.
Points Rewarded.
Thanks & Regards,
Kiran . IHi,
You can download the report by going to menu option
List->export->local file.. in this select spreadsheet and give the name for this to download.
You can view all the columns here in xls sheet.
Regards,
Ram Mohan
Pls reward poins if useful... -
Down Loading ALV Output to Excel Sheet
Hi All,
I am working on Vendor Line Items Report which have both Header details as well as line item details.
So i developed Heirarical ALV to display the output and it is working fine.But my problem is Downloading output to Excel sheet functionality is not working.
In output screen LIST->EXPORT->SPREADSHEET functionality is not working.
Please give me suggestions regarding the same or is there any another way to do the same by using ALV List Display.
Points will be rewarded
Thanks and Regards,
Siva.hi ,
this is a working example check this...
REPORT zvenkattest0.
TABLES:pa0002,pa0008.
TYPE-POOLS:slis.
CONSTANTS:c VALUE 'X'.
DATA:BEGIN OF it_pa0008 OCCURS 0,
pernr LIKE pa0008-pernr,
begda LIKE pa0008-begda,
endda LIKE pa0008-endda,
preas LIKE pa0008-preas,
ansal LIKE pa0008-ansal,
lga01 LIKE pa0008-lga01,
expand TYPE xfeld,
END OF it_pa0008.
DATA:BEGIN OF it_pa0002 OCCURS 0,
pernr LIKE pa0002-pernr,
vorna LIKE pa0002-vorna,
nachn LIKE pa0002-nachn,
gbdat LIKE pa0002-gbdat,
gblnd LIKE pa0002-gblnd,
sprsl LIKE pa0002-sprsl,
perid LIKE pa0002-perid,
END OF it_pa0002.
DATA: wa_field_cat TYPE slis_fieldcat_alv,
it_field_cat TYPE slis_t_fieldcat_alv,
wa_keyinfo TYPE slis_keyinfo_alv,
it_layout TYPE slis_layout_alv.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:s_pernr FOR pa0002-pernr NO INTERVALS.
SELECTION-SCREEN: SKIP.
PARAMETERS:p_expand AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM select_data.
PERFORM build_field_cat.
PERFORM disply_data.
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
SELECT pernr
begda
endda
preas
ansal
lga01
FROM pa0008
INTO CORRESPONDING FIELDS OF TABLE it_pa0008
UP TO 10 ROWS.
IF NOT it_pa0008[] IS INITIAL.
SELECT pernr
vorna
nachn
gbdat
gblnd
sprsl
perid
FROM pa0002
INTO CORRESPONDING FIELDS OF TABLE it_pa0002
FOR ALL ENTRIES IN it_pa0008
WHERE pernr = it_pa0008-pernr.
ENDIF.
SORT it_pa0008 BY pernr.
ENDFORM. " SELECT_DATA
*& Form BUILD_FIELD_CAT
text
--> p1 text
<-- p2 text
FORM build_field_cat .
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'PERNR'.
wa_field_cat-seltext_l = 'personnelno'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'BEGDA'.
wa_field_cat-seltext_l = 'begindate'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'ENDDA'.
wa_field_cat-seltext_l = 'enddate'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'PREAS'.
wa_field_cat-seltext_l = 'reason'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'ANSAL'.
wa_field_cat-seltext_l = 'annualsalary'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'LGA01'.
wa_field_cat-seltext_l = 'wagetype'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'VORNA'.
wa_field_cat-seltext_l = 'firstname'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'NACHN'.
wa_field_cat-seltext_l = 'lastname'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'GBDAT'.
wa_field_cat-seltext_l = 'birhtdate'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'GBLND'.
wa_field_cat-seltext_l = 'birthcountry'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'SPRSL'.
wa_field_cat-seltext_l = 'languageused'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'PERID'.
wa_field_cat-seltext_l = 'personnelid'.
APPEND wa_field_cat TO it_field_cat.
ENDFORM. " BUILD_FIELD_CAT
*& Form DISPLY_DATA
text
--> p1 text
<-- p2 text
FORM disply_data .
it_layout-group_change_edit = c.
it_layout-colwidth_optimize = c.
it_layout-zebra = c.
it_layout-detail_popup = c.
it_layout-get_selinfos = c.
IF p_expand = c.
it_layout-expand_fieldname = 'EXPAND'.
ENDIF.
wa_keyinfo-header01 = 'PERNR'.
wa_keyinfo-item01 = 'PERNR'.
wa_keyinfo-item02 = 'SUBTY'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = it_layout
it_fieldcat = it_field_cat
i_tabname_header = 'PA0008'
i_tabname_item = 'PA0002'
is_keyinfo = wa_keyinfo
TABLES
t_outtab_header = it_pa0008
t_outtab_item = it_pa0002.
ENDFORM. " DISPLY_DATA
regards,
venkat.
Maybe you are looking for
-
Updating iPod to 2.2 - Can't get iTunes to Resume download
Hi. I have tried numerous times to download the new Ipod Touch firmware using my dial-up connection. As the firmware is over 250MB I have to Stop/Resume my Internet connection a few times (my dial-up has a 10hr limit). Unfortunately, after downloadin
-
Cannot convert pdf to word file
i cannot convert pdfs to word files using either Adobe Reader or ExportPDF website. Using Adobe Reader, I get "an error occurred while trying to access the service" and for ExportPDDF website, I get an "internal server error" message. I have the mos
-
Oracle 11g Client on windows 7
Hello All, I am trying to install Oracle Client 11g R2 on windows 7 premium. After i successfully installed the Oracle Client, i was trying to connect to an 11g database on the network, but each time i am getting an ORA-12560: TNS:protocol adapter er
-
Dynamic Portal personalization ( themes, languages)
Hello All, I have a requirement which is as below 1) Based on the roles/group attached to a user id, we should limit the list of available languages/themes dynamically in Portal personalization. For e.g when user with "X" role logins in, he can perso
-
Updating Smartlist in Planning through HAL
Hi All, I'm trying to update Smartlist in Planning using HAL. I know HAL is not being used so much now-a-days but still there are people who are really smart in this. Can anyone of those smart people let me know how to update Smartlist from HAL for o