ALV field catalogue update problem
Dear Friends;
I have a problem with field catalog update of ALV grid. I have designed an initial screen for selections and there are two pushbuttons here. According to the pushbutton selection the field catalogue values change, ie. some fields are hidden etc. After the first selection this works but if i exit the second screen and go to the selection screen to change my selection the fieldcatalogue is not updated accordingly altough i call the relevant fm. i fill in fieldcat with fm LVC_FIELDCATALOG_MERGE.
Can someone suggest a solution pls?
Thx
Ali
Hi Ali,
chk this excellent Link.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
compare your code with the code there.
Regards
anver
Similar Messages
-
Field catalogue update problem
Dear Friends;
I have a problem with field catalog update of ALV grid(ABAP Objects not just fm use). I have designed an initial screen for selections and there are two pushbuttons here. According to the pushbutton selection the field catalogue values change, ie. some fields are hidden etc. After the first selection this works but if i exit the second screen and go to the selection screen to change my selection the fieldcatalogue is not updated accordingly altough i call the relevant fm. i fill in fieldcat with fm LVC_FIELDCATALOG_MERGE.
Can someone suggest a solution pls?
Thx
AliHi,
Check the link below it may be useful to u.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/update-ztable-through-editable-alv-grid-981928 -
Hi ,
Checked in the forum for this issue. => Not a wise plan to hoodwink the Moderators.
Could not find any.Guide me.
SAY i have a table CRICKET with 2 fields
1) PLAYER
2) SCORE
Records are say::
PLAYER SCORE
SACHIN 50
RAHUL 40
SEHWAG 100
In Selection Screen, i have a field PLAYER.
a)If user enters value SACHIN in field PLAYER..
output shd be:
SACHIN
50
b)If user enters value SACHIN,RAHUL,SEHWAG in Selection screen,
output shd be
SACHIN RAHUL SEHWAG
50 40 100
Mean to say dynamically creating the fields based on inputs entered by user.
In ALV field catalog there is option NO_OUT ='X' to hide the fields.
But not able to get how to compare with values entered by user.
Edited by: kishan P on Oct 5, 2010 2:38 PMHi manju
suppose you have a table(itab) in which you have all the data related to player and the score.
before displaying the data to ALV apply the condition like:
fetch score from DBTABLE into table itab where player in s_player.
where s_player is your select option.
and then pass your ITAB to ALV.
i hope it will work.
Thanks
Lalit Gupta -
Error in updating ALV field catalog in selection tool for Planning Book
Hi ,
I am Implementing BADI '/SAPAPO/SDP_SELECTOR' to upload Custom Fields Data in Planning Book Selection Window under APO Location Product. These Custom Fields are maintained in Custom Table.So from Table whatever Custom Fields are availabe all the fields needs to be available in for selection. Once selection is done the same data to be uploaded into Planning Book.
This BADI is working Fine upto 4 fields but if any extra fields are added in the table 'Error in updating ALV field catalog in selection tool' error Pop Up is coming. Here i am using Folloowing Methods
1). INIT_OBJECT_LIST
2). F4
3). LOC_PROD_VALUE_LIST
Please help on the same if u have any idea or clue.
Thanks.Hi Srinivas!
Where did you get your implementation from?
It would be nice if you could debug your code!
For the F4 method, have you seen this note?
Note 544904 - Sample source code f.BAdI /SAPAPO/SDP_SELECTOR ('F4'method)
Also check this note. It contains selection modifications in the BAdI:
Note 376902 - SDP selector: Basis corrections for BADI
I do not know your release and support package in your SCM, but you can find a lot of notes related to this BAdI.
Thank you!
Will
SCM Support Consultant -
Error in updating ALV field catalog in selection
Dear all,
I'm trying to use the standard transaction /SAPAPO/TSKEYFMAIN in order to check the TS values.
After filling the selection variant, the system shows the following error:
'Error in updating ALV field catalog in selection'
Could you please provide me with further details about the error? What could be the possible solution to avoid it?
Many thanks,
SMHi Marius,
thanks for your answer.
I would like to use the /SAPAPO/TSKEYFMAIN transaction to check massively the values in the time series KFs and not just the consistency of them.
So do you know any other transaction to do it or do you have an idea about the error of /SAPAPO/TSKEYFMAIN?
Thanks for your help!
SM -
Field catalogue for ALV Grid when program is run in the background
Hi All,
I have an ALV report that contains approx 27 fields. Not all of these fields will be relevant for different Users, and many will want to change the order the fields appear in.
When running on line the User can set a variant to present the data as they wish. However, I need to email this report to the SAP Inbox with the fields displayed in the same Order with uncessary fields hidden as stated in the Field Catalogue.
On-line none of this is an issue, however GET_FRONTEND_FIELDCATALOG cannot be used in Background, and attribute MT_FIELDCAT_LOCAL is Private and cannot be accessed.
I have looked at using Class CL_ ALV_VARIANT to try to read the Variant being used, but couldn't get the information about the Variant coming back, instead I get an error in CL_ALV_VARIANT->LOAD_VARIANT.
Can anybody recommend how to the Field Cat for a Variant for background processing?
Thanks,
Tony.Hi.
You can not use an ALV report in Background or write to spool because it is a kind of dialog program.
You can write only a List report to spool so please find others sulotions.
Hope it helps.
Sayan. -
How to populate field catalogue fields in ALV using dynamic internal table
Hi All,
Please let me know how to populate field catalogue fields in ALV using dynamic internal table.
I have created <dyn_table> using code below.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = g_t_ifc
it_fieldcatalog = g_t_fieldcat
IMPORTING
ep_table = dy_table.
ASSIGN dy_table->* TO <dyn_table>.
Create dynamic work area and assign to FS
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
Now this <dyn_table> has fields like idoc no.,creation date ,
segment field 1, segment field 2 etc..Now idoc no.,creation date are static fields from table EDIDC. And segment field 1, segment field 2 etc are dynamic fields from table EDSAPPL.
In my ALV report I am getting the final layout properly but I am unable to move values to corresponding fields in the final layout shown.Please let me know how to populate these fields from different tables.
I tried this way but its not working.
SORT g_t_edid4 BY docnum.
LOOP AT g_t_edidc INTO g_r_edidc.
READ TABLE g_t_edid4 into g_r_edid4
WITH KEY docnum = g_r_edidc-docnum
BINARY SEARCH.
IF sy-subrc = 0.
<dyn_wa> = g_r_edid4-sdata.
MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
CLEAR g_r_edid4.
ENDIF.
MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
APPEND <dyn_wa> TO <dyn_table>.You have to assign each field to field symbol and then assign the value to that field symbol and asssign that field symbol to workarea field symbol.
LOOP AT g_t_edidc INTO g_r_edidc.
READ TABLE g_t_edid4 into g_r_edid4
WITH KEY docnum = g_r_edidc-docnum
BINARY SEARCH.
IF sy-subrc = 0.
ASSIGN COMPONENT 'SDATA' OF STRUCTURE <DYN_WA> TO <DYN_FLD>.
<DYN_FLD> = g_r_edid4-sdata.
" <dyn_wa> = g_r_edid4-sdata.
" Assign each fields like this.
" MOVE-CORRESPONDING g_r_edid4 to <dyn_wa>.
CLEAR g_r_edid4.
ENDIF.
" MOVE-CORRESPONDING g_r_edidc to <dyn_wa>.
APPEND <dyn_wa> TO <dyn_table>.
Regards,
Naimesh Patel -
2 Field Catalogues in ALV list
Hi All,
I want to have 2 headers in ALV list. So Can we have 2 field catalogue one after the other in a single ALV List. Where first header(row) gives title like "Previous 5 months " & 2nd header (row) gives sub title like " JAN FEB MAR APR MAY ".
& then the data flows into the columns from the table 't_outtab'.
Thank You ALL.You can do this using ALV list with some extra coding..
But in other cases(Grid etc it is not possible).
cehck this image..
http://img100.imageshack.us/img100/3846/output6ef.th.gif
REPORT ZTEST_ALV message-id zz .
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT type slis_layout_alv,
x_events type slis_alv_event,
it_events type SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
MALE type i,
female type i,
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
x_events-NAME = SLIS_EV_TOP_OF_PAGE.
x_events-FORM = 'TOP_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
L_LAYOUT-NO_COLHEAD = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
it_events = it_events
TABLES
T_OUTTAB = ITAB
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.
FORM TOP_OF_PAGE.
*-To display the headers for main list
FORMAT COLOR COL_HEADING.
WRITE: / SY-ULINE(103).
WRITE: / SY-VLINE,
(8) ' ' ,
SY-VLINE,
(8) ' ' ,
SY-VLINE,
(19) '***'(015) centered,
sy-vline.
WRITE: / SY-VLINE,
(8) 'VBELN'(013) ,
SY-VLINE,
(8) 'POSNR'(014) ,
SY-VLINE,
(8) 'MALE'(016) ,
sy-vline,
(8) 'FMALE'(017) ,
sy-vline.
FORMAT COLOR OFF.
ENDFORM.
or else go for Hierarchy Report. -
Updating problem stcd1,stcd2 fields in bsec table (one time account)
Hi.
I have problem to use one time customer.
stcd1,stcd2 fields in bsec table did not input.
Other fields have no problem.
how can i solve it?
Our SAP version is 4.7. package level is SAPKH47025 (SAP_APPL).done
-
A question about editing ALV fields
Hello Expert,
In my project, we need to read data from DB and display in the ALV. In the ALV output, we should be able to edit the records, and after user clicks the "Save" button in the applicaiton toolbar, the program should be able to save the changed data into DB.
Currently, I can display the data in ALV and all fields are editable. After I change some data and click "Save", the program will go into subroutine 'F_ALV_USER_COMMAND', but the data in the internal table GT_OUTTAB is not changed.
I generate the ALV output by the following calling:
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = wf_pgm
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_callback_pf_status_set = 'F_PF_STATUS_SET'
i_callback_user_command = 'F_ALV_USER_COMMAND'
is_variant = g_variant
tables
t_outtab = gt_outtab
exceptions
program_error = 1
others = 2.
In the subroutine 'F_PF_STATUS_SET', I call a GUI Status defined by myself.
But if I call as below
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = wf_pgm
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_callback_pf_status_set = 'F_PF_STATUS_SET'
i_callback_user_command = 'F_ALV_USER_COMMAND'
is_variant = g_variant
tables
t_outtab = gt_outtab
exceptions
program_error = 1
others = 2.
GT_OUTTAB is changed accordingly after clicking the "Save".
Can any expert tell me why Internal table is not changed in the case I use user-defined GUI Status?
Thanks & Regards, Johnny
Edited by: Yongbo Wu on Jun 10, 2011 10:51 AMHi Yongbo;
Unfortunately REUSE_ALV_GRID_DISPLAY has update problem.
REUSE_ALV_LIST_DISPLAY FM is making automatic update/change itab.
You can change REUSE_ALV_GRID_DISPLAY FM with REUSE_ALV_LIST_DISPLAY FM.
Best Regards.
call function 'REUSE_ALV_LIST_DISPLAY' "'REUSE_ALV_GRID_DISPLAY' -
Dynamical Call of ALV - No data update
Hi,
I tried to use use the ALV dynamically. With dynamically I mean that I that I have diffrent data structures, depending what was selected by the user. The first call of the program is always correct. The data is displayed correctly. But when the data structure is changing, the ALV display is not updated. For a better understanding I post a extract of my coding:
<b>1. Creation of Container</b>
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'PARENT_CONT'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
<b>2.Creation of splitter container</b>
CREATE OBJECT splitter
EXPORTING
parent = g_custom_container
rows = 2
columns = 2
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
container_2 = splitter->get_container(
row = 1
column = 2 ).
<b>3.Dynamic Creation of alv object</b>
CREATE OBJECT go_grid
EXPORTING
i_parent = container_2.
<b>4. Get Fieldcatalogue</b>
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = lv_structure_name
CHANGING
ct_fieldcat = lt_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
ASSERT 1 = 2.
ENDIF.
<b>5. Set table for first display</b>
CALL METHOD go_grid->set_table_for_first_display
* EXPORTING
* i_structure_name = lv_structure_name
CHANGING
it_fieldcatalog = lt_fieldcat
it_outtab = <lt_out_data>.
CALL METHOD ls_alv_ref-alv_ref->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
Perhaps someone could help.....
Best Regards, EdgarHello Edgar
The following sample report <b>ZUS_SDN_TWO_ALV_GRIDS_8</b> shows how to solve your problem. Please note that for the sake of simplicity I replaced the tree containing the structure names with an ALV list. However, the switch between the different structures is triggered by the <b>DOUBLE_CLICK</b> event.
I like to add that the integration of the first displayed ALV list (DD02L) into GT_OUTTAB is not really elegant. In addition, with <b>$TMP</b> I marked a problematic part of the coding with respect to your requirement to have the right layout for each displayed ALV list:
If you have a <b>fixed </b>assignment of <i>tabname -> 4-digit handle</i> then it is ok. I my sample report the layouts only work if you select the tabnames in the very same order.
Before showing the entire coding I describe crucial parts of the coding:
[code]TYPES: BEGIN OF ty_s_outtab.
TYPES: tabname TYPE tabname.
TYPES: layout TYPE lvc_s_layo.
TYPES: variant TYPE disvariant.
TYPES: fcat TYPE lvc_t_fcat.
TYPES: data TYPE REF TO data.
TYPES: END OF ty_s_outtab.[/code]
Every time a new structure is selected the corresponding ALV data are stored as new record in GT_OUTTAB which is of line type TY_S_OUTTAB.
[code] READ TABLE gt_outtab INTO gs_outtab INDEX 2.
ASSIGN gs_outtab-fcat TO <gt_fcat>.
ASSIGN gs_outtab-data->* TO <gt_outtab>.[/code]
Since the ALV list data and the fieldcatalog are fully dynamic I use global field-symbols for these data.
[code]&----
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
SET TITLEBAR 'xxx'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = gs_outtab-tabname
is_layout = gs_outtab-layout
is_variant = gs_outtab-variant
i_save = 'A'
CHANGING
it_outtab = <gt_outtab>
it_fieldcatalog = <gt_fcat>
EXCEPTIONS
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.
ENDMODULE. " STATUS_0100 OUTPUT[/code]
The second ALV list which displays the table records is always newly displayed in the PBO module.
In the event handler method <b>HANDLE_DOUBLE_CLICK</b> we need to do two things:
- store the current fieldcatalog back to GT_OUTTAB
- store the name of the new selected table/structure -> trigger PAI
In routine <b>HANDLE_DB_CLICK</b> we create a new entry for GT_OUTTAB if it does not yet exist. Next we select this entry and display it again as second ALV list.
[code]
*& Report ZUS_SDN_TWO_ALV_GRIDS_8
*& Description: Display two ALV lists in splitter container (left/right)
*& Left ALV list contains DB table names,
*& right ALV list displays entries of selected DB table
*& SDN thread: Dynamical Call of ALV - No data update
*& Link: https:||Dynamical Call of ALV - No data update
*& Screen '0100' contains no elements.
*& ok_code -> assigned to GD_OKCODE
*& Flow logic:
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
REPORT zus_sdn_two_alv_grids_8.
TYPE-POOLS: abap.
DATA:
gd_repid TYPE syst-repid,
gd_okcode TYPE ui_func,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_left TYPE REF TO cl_gui_container,
go_cell_right TYPE REF TO cl_gui_container,
go_grid1 TYPE REF TO cl_gui_alv_grid,
go_grid2 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
TYPES: BEGIN OF ty_s_outtab.
TYPES: tabname TYPE tabname.
TYPES: layout TYPE lvc_s_layo.
TYPES: variant TYPE disvariant.
TYPES: fcat TYPE lvc_t_fcat.
TYPES: data TYPE REF TO data.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gt_dd02l TYPE STANDARD TABLE OF dd02l,
gs_outtab TYPE ty_s_outtab,
gt_outtab TYPE ty_t_outtab.
FIELD-SYMBOLS:
<gt_fcat> TYPE lvc_t_fcat,
<gt_outtab> TYPE table.
CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_tabname_selected TYPE tabname READ-ONLY.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
define local data
DATA:
ls_dd02l TYPE dd02l,
ls_outtab TYPE ty_s_outtab.
CHECK ( sender = go_grid1 ).
READ TABLE gt_dd02l INTO ls_dd02l INDEX e_row-index.
" Store data of currently displayed ALV list (except for DD02L)
IF ( md_tabname_selected = space ).
ELSE.
READ TABLE gt_outtab INTO ls_outtab
WITH KEY tabname = md_tabname_selected. " old
CALL METHOD go_grid2->get_frontend_fieldcatalog
IMPORTING
et_fieldcatalog = ls_outtab-fcat.
MODIFY gt_outtab FROM ls_outtab INDEX syst-tabix.
ENDIF.
md_tabname_selected = ls_dd02l-tabname. " new selected DB table
Triggers PAI of the dynpro with the specified ok-code
cl_gui_cfw=>set_new_ok_code( 'HANDLE_DB_CLICK' ). " not 4.6c
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'HANDLE_DB_CLICK'
IMPORTING
RC =
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
gd_repid = syst-repid.
SELECT * FROM dd02l INTO TABLE gt_dd02l
WHERE tabname LIKE 'KN%1' OR
tabname LIKE 'LF%1' OR
tabname LIKE 'VB%' OR
tabname LIKE 'MAR%' OR
tabname LIKE 'E07%'
AND tabclass = 'TRANSP'. " transparent table
SORT gt_dd02l BY tabname.
PERFORM init_controls.
PERFORM add_first_table.
Set event handler
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid1.
READ TABLE gt_outtab INTO gs_outtab INDEX 1.
Display data
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = gs_outtab-tabname
is_layout = gs_outtab-layout
CHANGING
it_outtab = gt_dd02l
EXCEPTIONS
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.
READ TABLE gt_outtab INTO gs_outtab INDEX 2.
ASSIGN gs_outtab-fcat TO <gt_fcat>.
ASSIGN gs_outtab-data->* TO <gt_outtab>.
NOTE: method called in PBO module
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = gs_outtab-tabname
is_layout = gs_outtab-layout
is_variant = gs_outtab-variant
i_save = 'A'
CHANGING
it_outtab = <gt_outtab>
it_fieldcatalog = <gt_fcat>
EXCEPTIONS
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.
Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
CONTAINER =
EXCEPTIONS
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.
NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
SET TITLEBAR 'xxx'.
CALL METHOD go_grid2->set_table_for_first_display
EXPORTING
i_structure_name = gs_outtab-tabname
is_layout = gs_outtab-layout
is_variant = gs_outtab-variant
i_save = 'A'
CHANGING
it_outtab = <gt_outtab>
it_fieldcatalog = <gt_fcat>
EXCEPTIONS
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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
User has pushed button "Display Details"
WHEN 'HANDLE_DB_CLICK'.
PERFORM handle_db_click.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form HANDLE_DB_CLICK
text
--> p1 text
<-- p2 text
FORM handle_db_click.
define local data
DATA:
ld_handle(4) TYPE n,
ls_outtab TYPE ty_s_outtab.
READ TABLE gt_outtab INTO ls_outtab
WITH KEY tabname = lcl_eventhandler=>md_tabname_selected.
IF ( syst-subrc NE 0 ).
CLEAR: ls_outtab.
ls_outtab-tabname = lcl_eventhandler=>md_tabname_selected.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = ls_outtab-tabname
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = ls_outtab-fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE DATA ls_outtab-data TYPE TABLE OF (ls_outtab-tabname).
ASSIGN ls_outtab-data->* TO <gt_outtab>.
SELECT * FROM (ls_outtab-tabname) UP TO 50 ROWS
INTO TABLE <gt_outtab>.
ls_outtab-layout-no_toolbar = abap_false.
ls_outtab-layout-zebra = abap_true.
ls_outtab-layout-smalltitle = abap_true.
CONCATENATE ls_outtab-tabname ':'
INTO ls_outtab-layout-grid_title.
CONCATENATE ls_outtab-layout-grid_title 'Table Records'
INTO ls_outtab-layout-grid_title
SEPARATED BY space.
ls_outtab-variant-report = gd_repid.
DESCRIBE TABLE gt_outtab.
ld_handle = syst-tfill + 1.
WRITE ld_handle TO ls_outtab-variant-handle. " $TMP: Problem!!!
APPEND ls_outtab TO gt_outtab.
ENDIF.
" NOTE: read into GLOBAL variable gs_outtab !!!!
READ TABLE gt_outtab INTO gs_outtab
WITH KEY tabname = lcl_eventhandler=>md_tabname_selected.
ASSIGN gs_outtab-fcat TO <gt_fcat>.
ASSIGN gs_outtab-data->* TO <gt_outtab>.
ENDFORM. " HANDLE_DB_CLICK
*& Form INIT_CONTROLS
text
--> p1 text
<-- p2 text
FORM init_controls .
Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
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 go_docking->set_extension
EXPORTING
extension = 99999 " full-size screen
EXCEPTIONS
cntl_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.
Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 1
columns = 2
NO_AUTODEF_PROGID_DYNNR =
NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_left.
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = go_cell_right.
CALL METHOD go_splitter->set_column_mode
EXPORTING
mode = cl_gui_splitter_container=>mode_relative
IMPORTING
RESULT =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
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 go_splitter->set_column_width
EXPORTING
id = 1
width = 25
IMPORTING
RESULT =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
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 go_splitter->set_column_sash
EXPORTING
id = 1
type = cl_gui_splitter_container=>type_movable
value = cl_gui_splitter_container=>false
IMPORTING
RESULT =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_left
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_grid2
EXPORTING
i_parent = go_cell_right
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " INIT_CONTROLS
*& Form ADD_FIRST_TABLE
text
--> p1 text
<-- p2 text
FORM add_first_table .
define local data
DATA:
ls_outtab TYPE ty_s_outtab.
ls_outtab-tabname = 'DD02L'.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = ls_outtab-tabname
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = ls_outtab-fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
GET REFERENCE OF gt_dd02l INTO ls_outtab-data.
ls_outtab-layout-no_toolbar = abap_false.
ls_outtab-layout-zebra = abap_true.
ls_outtab-layout-smalltitle = abap_true.
CONCATENATE ls_outtab-tabname ':'
INTO ls_outtab-layout-grid_title.
CONCATENATE ls_outtab-layout-grid_title 'Table Records'
INTO ls_outtab-layout-grid_title
SEPARATED BY space.
ls_outtab-variant-report = gd_repid.
ls_outtab-variant-handle = '0002'.
INSERT ls_outtab INTO gt_outtab INDEX 1.
ls_outtab-layout-no_toolbar = abap_true.
ls_outtab-layout-zebra = abap_true.
ls_outtab-layout-smalltitle = abap_true.
ls_outtab-layout-grid_title = 'DB Tables'.
ls_outtab-variant-report = gd_repid.
ls_outtab-variant-handle = '0001'.
DELETE ls_outtab-fcat WHERE ( fieldname NE 'TABNAME' ).
INSERT ls_outtab INTO gt_outtab INDEX 1.
ENDFORM. " ADD_FIRST_TABLE[/code]
Regards,
Uwe -
Sharepoint 2013 Active Directory Import- Manager field not updating
Hi,
SharePoint 2013 Active directory import -Manager field not updating
Concern/Issue-
We are using SharePoint and configured the Active Directory Import .First import it seems everything is working fine and OOB Organization chart built using User profile data is coming out right.
Now the user is moved from one Organization Unit to Another.
Now our Manager field is not Updating .There is change in AD manager attribute but not reflecting in the SharePoint User profile.
Manger field is mapped to "manager" attribute in SharePoint.
We tried removing the user and Re-Import using Incremental import but no luck.
Thanks for help in advance
SachinMoving a user from one OU to another in AD won't normally change the Manager attribute in AD. You would need to edit the user's organization settings to change the manager value in AD. I've also seen these changes not be picked up unless something
other than just the manager field in AD changing. Try changing something like Office location and see if the manager change is picked up by AD Import.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
Last Played, Play Count, Ratings fields not updating
iTunes 6.0.1.3, 3rd Gen iPod, iPod Shuffle 2005-09-23 firmware
After updating to iTunes 6.0.1.3 I was forced to also update my iPod firmware to 2005-09-23. Since then, the last played, play count and ratings fields associated with music tracks no longer updates when I re-synch my 3G iPod. Ive tested with ripped AAC, ripped MP3, older (FairPlay 1) purchased music as well as new (FairPlay 2) tracks. No matter what Ive tried, the dates, counts and raings remain frozen in their pre-update state.
However, these fields are updated for Podcast tracks!
I also ran a test with my Shuffle. Music file play counts are updated as usual. I do notice that the Last Played field within iTunes is updated with the date and time of re-sync. Has it always been this way? I havent paid attention to this since I first purchased my Shuffle but I thought it only updated play count, not Last Played.
Any advice would be appreciated.Found the problem. After my iPod didn't update after purchasing new songs, I checked my iPod options. For some reason my iTunes iPod Options changed from "Automaticaly update ..." to "Manually manage ...". Once I set this back to automatic everything updated fine.
It is interesting that even when "Manually manage" was selected, a new Podcast trak was downloaded to the iPod and, after listening to it, the Last Played and Play Count fields were updated.
Also, regarding my question about the Last Played update with my Shuffle, I learned that iTunes 5 implemented a change to update this field with the current date and time once the Shuffle is re-synch'd. -
Button Setting Variable - Text Field Not Updating
Hi,
I am working with Acrobat 9 Pro on Windows.
I am unable to make the following work: When the user clicks a Button, a Text Field appears with the text associated with the Button clicked. I have tried accomplishing this with a variable declared in the Document JavaScripts, buttons setting the value of the variable, and a Text Field containing a Custom Calculation Script that returns the text associated with the value of the variable.
Everything works - except the Text Field doesn't return the text associated with the value of the variable. I have an app.alert (for now) in the button scripts so I can see if the variable has the correct value - and it does - but when the Text Field appears - the text never changes.
What I have observed: if I go back into the Custom Calculation Script of the Text Field and do nothing, go back out, go to Preview, and click on a Button, the text updates to the previous variable value (not the Button variable value I just clicked).
So - I think - the Custom Calculation Script isn't seeing the new variable "on the fly". Even though the app.alerts are. I don't think this is a Field Calculation Order problem. But maybe it is. And this is where my brain power ends. Any suggestions would be greatly appreciated. Thank you.
I have this in the Document JavaScripts:
var ITrig = 1;
I have three Buttons (want to have more) that will set the ITrig variable.
Here is what I have in one Button:
var Inpopup = this.getField("PartASectionIIInstructions")
ITrig = 2;
app.alert(ITrig);
if (Inpopup.display == display.hidden) {
Inpopup.display = display.visible
Inpopup.setFocus();
} else {
Inpopup.display = display.hidden;
I have this in the PartASectionIIInstructions Text Field in the Custom Calculation Script:
if (ITrig == 2) {
event.value = "#2";
else if (ITrig == 3) {
event.value = "#3";
else if (ITrig == 4) {
event.value = "#4";Thank you. I had tried something like that earlier - without success. That is why I went to the calculation script. So - I went back to the "Acrobat Forms - JavaScript Object Specification" looking for an answer. It finally sunk in I was guilty of this:
var Inpopup = this.getField("PartASectionIIInstructions").value
Inpopup = "#3"
When I should have been doing this:
var Inpopup = this.getField("PartASectionIIInstructions")
Inpopup.value = "#3" -
Active Directory cn field not updated from sap HR using ldap.
Hi,
Apologies if this is in the wrong forum area.
I am using the LDAP facility to create and modify Active Directory records from sap HR. Initially, the name field cn that was coming across into AD was in the format of the logical system and employee number, eg, RD4CLNT22000000711.
I then implemented the BADI HRLDAP_ATTRIBUTES which then changed this name field cn in the active directory listing to the format; surname, forename.
It works fine when I create a new user, however the problem comes when I update the persons name in the sap hr module. The data that comes across into Active Directory shows the change to the persons surname sn, forename and displayname fields is there but the cn field is still showing as the previous name.
In short, when a new user is created, the cn field in active directory is correct
(surname, forename) but when the employees name is modified, that change is not brought across to the cn field even though the surname, forename and displayname fields are updated correctlyon AD.
We are on release 4.70.
Anyway, if anyone could help I would be very grateful.
Thanks
DavidHi
The problem it is causing us is that the cn field is incorrect and does not mirror the change in sap HR, therefore the Active Directory entry for the employee is not totally accurate.
When an employee changes their name in SAP HR - usually their surname, we would then want to update the employees active directory account to show this change and this includes the cn field also. At the moment the firstname, lastname fields do get updated with the change so we would want the cn field to show this as well otherwise the cn field would be incorrect and not match up with the employee's AD firstname & lastname fields.
Dave
Maybe you are looking for
-
Verizon iPhone - mobile hotspot and other questions about the data options
I just ordered the Verizon iPhone. Can anyone explain the options here: 1) Unlimited corporate email & Web (business and personal email) vs. Unlimited email and web for smartphones (personal email) - what's the difference? 2) "3G Mobile Hotspot 2GB"
-
Hello All, Some of the services are not active in SICF transaction in PI. If I make the servcies active then do I need to restart/reset the PI server? Please tell me if there is any sap note on this... Regards, Moorthy
-
Can i take print out of report
hi my report has line-size 205 czn i take print out of OUTPUT of this on A4 sheet on landscape. my second question is : - - what CIZ refer in SAP script i have seen it like <b> &J_1IEXCHDR-EXBED(CIZ
-
Re-downloading an app suddenly stops when almost finished
Hi, Every time I try to re-download an program/app it suddenly stops at the point that the program should be installed, it says downloading is impossible try it again, but if you try it again it has the same problem. This happens with app's that used
-
Lion upgrade creating odd start-up launch
Since upgrading to Lion Excel, Word and iTunes launch in Start Up. I've tried to change this in Settings with no luck. Recommendation?