ALV: how to display only subtotals and total rows in the output
ALV: how to display only subtotals and total rows in the output
i am getting output
i am getting subtotals for respective fields
but i want to display only subtotals and totals rows in the output
i have tried the
totals_only parameter in slis_layout_alv
but it is not working.
hi,
For TOTAL
For the amount field / quantity field in the field catalog give DO_SUM = 'X' for WHOLE total
For SUBTOTAL
For subtotal you will have to create an internal table sort..Let's say you want to do subtotal for each customer..
DATA: lt_sort type SLIS_T_SORTINFO_ALV,
ls_sort type slis_sortinfo_alv.
CLEAR ls_sort.
ls_sort-spos = 1.
ls_sort-fieldname = 'Give the field name that you do the sum'.
ls_sort-up = 'X'.
ls_sort-subtot = 'X'.
APPEND ls_sort TO lt_sort.
fieldcatalog-do_dum = 'X'.
for subtotals
WA_SORT-FIELDNAME = 'ERSDA'.
WA_SORT-SPOS = '2'.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOTAL = 'X'.
APPEND WA_SORT TO IT_SORT.
Refer
http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e056d52611d2b468006094192fe3/content.htm
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/doesnt-function-event-subtotal_text-in-alv-713787
regards,
Prabhu
reward if it is helpful
Similar Messages
-
ALV: how to display only subtotals lines in theoutput
hi
in the alv list output
if we display subtotals based on 3 feilds out of 10
we see subtotals (sum) based on the end of each field
now i want to display only the lines which are displayed as subtotals in the output
we have parameter
totals_only(1) type c, " show only totals
in the structrure slis_layout_alv
i have used it but i can see no change in the outputhai
data : GT_SORT TYPE SLIS_T_SORTINFO_ALV,
ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'ITAB1'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = GT_EVENTS[]
IT_EVENT_EXIT =
IS_PRINT = GS_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 = ITAB1
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM.
DATA SORTING AND SUBTOTAL
DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD1'.
GS_SORT-SPOS = 1.
GS_SORT-UP = 'X'.
GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'FIELD2'.
GS_SORT-SPOS = 2.
GS_SORT-UP = 'X'.
*GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
ENDFORM.
regard
nawa -
How to pass tag name and value dynamically in the output of PCo notification?
Hi,
I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
Thanks in advance.
Regards,
SumanHi Suman/Jeedesh,
As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
For above issue, My suggestion
1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
4. And in the mean time, send those Tag details vie mail trigger or as per requirement
Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
Hope it might solve your problem
Regards,
Praveen Reddy -
How to add a comment for each row on the output of a report?
I would like to add a comment (field) for each row on the output of report? This comment should to be saved as well. Is there a way i can do that?
Regards,
RamHi Dimitri,
through the instead of trigger functionality i am able to update the view. This is view is based on different views which should be linked to a table (as you suggested) in which comments can be stored. Hower this table is empty and how to link this table with the view now? I face the following challenge.
View consists the following columns, for example
select name, sex, age from test_view
name sex age
John M 20
Anton M 30
Willy M 40
shirley F 38
sharon F 37
The report has the following output, for example
name sex age
John M 20
Anton M 30
Willy M 40
Shirley F 38
Sharon F 37
Now i would like to add comment through a button.
The report layout looks like
name sex age
John M 20 <add comment button>
After submitting the <add comment button> you can enter text which deals with John
text='John doesnot like me'
Finally the report display the comment as well
name sex age
John M 20 'John doesnot like me' <update/delete comment button>
Anton M 30 <add comment button>
Willy M 40 <add comment button>
Shirley F 38 <add comment button>
Sharon F 37 <add comment button>
After submitting the <update/delete button> you can change or delete the entered text.
I hope this example clears things up.
Regards,
Ram -
How to enter individual defect and total defects for the same opeartion
Hi Gurus,
My client has a new requirement.
Currently we are entering results for an Chemistry operation with following characteristics.
Refusal Defects
AQL 0.10%
AQL 0.40%
AQL 0.65%
AQL 1.0%
AQL 4.0%
these characteristics are assigned with different sampling procedures with sampling schemes based on their AQL level.
But now my client wants to check each characteristics based on Individual defects ( 0.065 AQL) and Total permitted defects ( 0.25 AQL).
Please give your suggestions to map this scenario.
Thanks,
SDN.Hi Sujit,
Yes. I could think of it. Thank you.
Can we do anything through config or Master data set up to accomplish this?
Regards,
SDN. -
How to get required tags and name spaces in the output File?
Hello,
I am doing IDOC to File sceanrio and I am able to get the file but the problem is that I am unable to get the required tag names. Out put file is having ns0 ns1 and so on..
Eg:
ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>CU_NET_WEIGHT</ns2:ID></ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>EAN_SKU</ns2:ID></ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>CUPerCase</ns2:ID>
and so on..
Source structure is IDOC
Target structure is External Defination imported with references.
How can I get the output file with the exact namespaces and tags as imported through External Definations.
Thanks in Advace.HI! Rajeev,
I have gone through this forum and we having 100% same to same requirement here in my project.
We want this at the top of the Output Payload..
<?xml version="1.0" encoding="UTF-8" ?>
- <SyncMaterialDefinition xmlns="http://www.siemens.com/ad/mes/b2mt-1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bml="http://www.wbf.org/xml/b2mml-v02" xmlns:sit="http://www.siemens.com/ad/mes/b2mml-v02-SITExt-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oag="http://www.openapplications.org/oagis">
- <oag:ApplicationArea>
and also isome part of payload nstead of ns0: and ns1:
we want it as below for some part of same output payload
<oag:ApplicationArea>
- <oag:Sender>
<oag:LogicalId>SAP</oag:LogicalId>
<oag:Component>PMConnector</oag:Component>
<oag:ReferenceId />
<oag:Confirmation>Always</oag:Confirmation>
</oag:Sender>
<oag:CreationDateTime>2009-06-14T22:23:29.42Z</oag:CreationDateTime>
</bml:MaterialDefinitionProperty>
- <bml:MaterialDefinitionProperty>
<bml:ID>XXXXXXX</bml:ID>
- <bml:Value>
<bml:ValueString>0.0</bml:ValueString>
<bml:DataType>string</bml:DataType>
<bml:UnitOfMeasure>n/a</bml:UnitOfMeasure>
<bml:Any />
*</bml:*Value>
Check the above code how we want but we are getting in normal way .
Could you please review this and guide me in detailed way how to do in a step by step manner if possible by taking my above payload condition.
Regards:
Amar Srinivas Eli -
How to display current postion and previous position in the same row?
I need to produce a promotions/transfer report that gives the employee's current position as well as his/her previous position in the same row.
for example:
Employee current position current organization current company previous postion previous organization previous company
Jane Smith Executive PA ZYX ltd Harmony personal assistant ABC ltd Yahoo
I am using the per_all_people_f, per_all_assignments_f, per_periods_of_service, hr.all_organization_units, per_all_positions tables
Somehow i cannot manage to display the previous position. I can only get so far to display the current postions
Any ideas? here is the full code
--this query gives current info
select ppf.employee_number, ppf.full_name
, (DECODE (ppf.sex, 'M', 'Male', 'F', 'Female') ) gender
, (DECODE (ppf.per_information4
,'01', 'Indian'
,'02', 'African'
,'03', 'Coloured'
,'04', 'White') ) race
, ppf.ORIGINAL_DATE_OF_HIRE
, paf.EFFECTIVE_START_DATE current_postion_start_date
, RTRIM (SUBSTR (hpt.NAME, 1, INSTR (hpt.NAME, ';') ),';')Current_Position
, ho.name Current_Organization
, xx_return_structures.xx_return_company_name
(paf.person_id,
paf.effective_start_date
) current_company
from per_all_assignments_f paf,
hr_all_positions_f_tl hpt,
hr_all_organization_units_tl ho,
per_all_people_f ppf
--where paf.person_id = 16170
and paf.POSITION_ID=hpt.POSITION_ID
and paf.ASSIGNMENT_NUMBER is not null
and ho.organization_id = paf.organization_id
and ppf.person_id=paf.person_id
and paf.EFFECTIVE_START_DATE between ppf.EFFECTIVE_START_DATE and ppf.EFFECTIVE_END_DATE
order by paf.EFFECTIVE_START_DATE
--this query gives previous position, organization and company
select ass.EFFECTIVE_START_DATE
, RTRIM (SUBSTR (hpt.NAME, 1, INSTR (hpt.NAME, ';') ),';')Previous_Position
, ho.NAME previous_organization
, xx_return_structures.xx_return_company_name
(paf.person_id,
paf.effective_start_date
) previous_company
from per_all_assignments_f paf, hr_all_positions_f_tl hpt, hr_all_organization_units_tl ho
where paf.person_id = 16170
and paf.EFFECTIVE_START_DATE not in (select max(paf.EFFECTIVE_START_DATE)
f rom per_all_assignments_f paf
where ass.person_id = 16170)
and paf.PRIMARY_FLAG ='Y'
and paf.POSITION_ID=hpt.POSITION_ID
and paf.ORGANIZATION_ID=ho.ORGANIZATION_IDOk so here is my problem. The current position display 3 times. The rest is correct. it only display once. Any ideas on how to get rid of the 2 extra rows that is being displayed with the current position?? I only need the current position to display once with the previous position info.
select distinct pvs.person_id,
peo.EMPLOYEE_NUMBER empno,
peo.FULL_NAME,
(DECODE (peo.sex, 'M', 'Male', 'F', 'Female') ) gender,
(DECODE (peo.per_information4
,'01', 'Indian'
,'02', 'African'
,'03', 'Coloured'
,'04', 'White') ) race,
peo.ORIGINAL_DATE_OF_HIRE,
pvs.EFFECTIVE_START_DATE curr_start_date,
RTRIM (SUBSTR (pvs.job, 1, INSTR (pvs.job, ';') ) ,';') current_position,
pvs.ORGANIZATION current_organization,
substr(pvs.PAYROLL,5)current_company,
a1.previous_position,
a1.previous_organisation,
a1.previous_company
from per_periods_of_work_v pv,
per_assignments_v2 pvs,
per_all_people_f peo,(select distinct RTRIM (SUBSTR (pvs.job, 1, INSTR (pvs.job, ';') ) ,';') previous_position,
pvs.ORGANIZATION previous_organisation,
substr(pvs.PAYROLL,5)previous_company,
pvs.job_id job_id,
pvs.organization_id,
pvs.position_id,
pvs.location_id,
pvs.PERSON_ID,
pvs.PEOPLE_GROUP_ID,
pvs.EFFECTIVE_END_DATE,
pvs.EFFECTIVE_START_DATE
from per_assignments_v2 pvs
where sysdate > pvs.EFFECTIVE_END_DATE
and pvs.person_id=4723
)a1
where peo.person_id = pvs.person_id
and pvs.person_id = pv.person_id
and a1.person_id = pvs.person_id
and pvs.EFFECTIVE_START_DATE between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
and pvs.PEOPLE_GROUP_ID <> a1.people_group_id
and pvs.JOB_ID <> a1.job_id
and pvs.ORGANIZATION_ID <> a1.organization_id
and pvs.position_id <> a1.position_id activating this elimnates 1-Feb-2008 info
and pvs.effective_start_date -1 = a1.effective_end_date activating this eliminates 1-feb-2008, 1-jul-2006, 1-april-1996 info
and pv.person_id = 4723
order by pvs.effective_start_date desc -
I need to display only subtotals in the ALV and not the details.
Hi,
I have an ALV report . I have totals and subtotals in the same with details.
My requirement is to have only subtotals and totals in my output. I do not want the details of all the items. I want only the subtotals row.
Pls advice on this.Hi Shweta,
FOR TOTAL:
there is a property of fieldcatalog, that is do_sum.
USE COED LIKE:
PERFORM fieldcat USING:
'1' 'KUNNR' 'I_MARD' 'CUSTOMER NO' ,
'2' 'DMBTR' 'I_MARD' 'CURRENCY' ,
FORM fieldcat USING value(p_0029)
value(p_0030)
value(p_0031)
value(p_0032)
wa_fieldcat-col_pos = p_0029.
wa_fieldcat-fieldname = p_0030.
wa_fieldcat-tabname = p_0031.
wa_fieldcat-reptext = p_0032.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
clear wa_fieldcat.
ENDFORM. " FIELDCAT
in final output you will get the total of currency field.
FOR SUB TOTAL:
decleare: i_sort type standard table of slis_sortinfo_alv,
wa_sort type slis_t_sortinfo_alv.
wa_sort-spos = '1'.
wa_sort-fieldname = 'field1'.
wa_sort-tablename = 'i_final'
wa_sort-subtot = 'X'.
wa_sort-group = 'X'.
append wa_sort to i_sort.
clear: wa_sort.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = it_fieldcat
it_sort = i_sort
Hope this can solve your pbs.
Regards,
Tutun -
Do not include some lines in Subtotals and totals in ALV
Hello All,
I am printing a report with all sale order details and Quantities( delveered ,conformed etc..) iam doing subtotals based on the material and Plant.
In this if the document date is less than the SY-DATUM, we should not include the quantity into the subtotals and totals, Only the orders wiht doc date GQ to Sy-datum then display them..
As of now I am using ALV grid display and doing the sums by
l_wa_fcat-do_sum = c_x. (field catalog) for the whole colom) but i want to avoid sum row from tehe calculation based on the condition.
<b>Do we have any way to achive this, like if we want to have separate color for a purticular Cell then we add an extra field in outout table and we link this field with layout-coltab_fieldname in the same way or any other way if we have</b>.
I will be thankfull to if you can provide me your valuable suggesstions on this. it is very urgent. I am trying in all the ways from my side.Hi,
see this code,
Complete code for the ALV grid example
This example shows and ALV grid with flights. After selecting a line a change button can be pushed to display a change screen. After the changes have been saved, the ALV grid screen is displayed again, and the grid is updated with the changes.
The example shows:
How to setup the ALV grid
How to ste focus to the grid
How to set the title of the grid
How to allow a user to save and reuse a grid layout (Variant)
How to customize the ALV grid toolbar
Refresh the grid
Set and get row selection and read line contents
Make and exception field (Traffic light)
Coloring a line
Steps:
Create screen 100 with the ALV grid. Remember to include an exit button
Add a change button to the ALV grid toolbar
Create screen 200 the Change screen
The screens:
The code:
REPORT sapmz_hf_alv_grid .
Type pool for icons - used in the toolbar
TYPE-POOLS: icon.
TABLES: zsflight.
To allow the declaration of o_event_receiver before the
lcl_event_receiver class is defined, decale it as deferred in the
start of the program
CLASS lcl_event_receiver DEFINITION DEFERRED.
G L O B A L I N T E R N A L T A B L E S
*DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
To include a traffic light and/or color a line the structure of the
table must include fields for the traffic light and/or the color
TYPES: BEGIN OF st_sflight.
INCLUDE STRUCTURE zsflight.
Field for traffic light
TYPES: traffic_light TYPE c.
Field for line color
types: line_color(4) type c.
TYPES: END OF st_sflight.
TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
DATA: gi_sflight TYPE tt_sflight.
G L O B A L D A T A
DATA: ok_code LIKE sy-ucomm,
Work area for internal table
g_wa_sflight TYPE st_sflight,
ALV control: Layout structure
gs_layout TYPE lvc_s_layo.
Declare reference variables to the ALV grid and the container
DATA:
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container,
o_event_receiver TYPE REF TO lcl_event_receiver.
DATA:
Work area for screen 200
g_screen200 LIKE zsflight.
Data for storing information about selected rows in the grid
DATA:
Internal table
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
C L A S S E S
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING
e_object e_interactive,
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
Event handler method for event toolbar.
CONSTANTS:
Constants for button type
c_button_normal TYPE i VALUE 0,
c_menu_and_default_button TYPE i VALUE 1,
c_menu TYPE i VALUE 2,
c_separator TYPE i VALUE 3,
c_radio_button TYPE i VALUE 4,
c_checkbox TYPE i VALUE 5,
c_menu_entry TYPE i VALUE 6.
DATA:
ls_toolbar TYPE stb_button.
Append seperator to the normal toolbar
CLEAR ls_toolbar.
MOVE c_separator TO ls_toolbar-butn_type..
APPEND ls_toolbar TO e_object->mt_toolbar.
Append a new button that to the toolbar. Use E_OBJECT of
event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
This class has one attribute MT_TOOLBAR which is of table type
TTB_BUTTON. The structure is STB_BUTTON
CLEAR ls_toolbar.
MOVE 'CHANGE' TO ls_toolbar-function.
MOVE icon_change TO ls_toolbar-icon.
MOVE 'Change flight' TO ls_toolbar-quickinfo.
MOVE 'Change' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
METHOD handle_user_command.
Handle own functions defined in the toolbar
CASE e_ucomm.
WHEN 'CHANGE'.
PERFORM change_flight.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMETHOD.
ENDCLASS.
S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
SET SCREEN '100'.
*& Module USER_COMMAND_0100 INPUT
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
DATA:
For parameter IS_VARIANT that is sued to set up options for storing
the grid layout as a variant in method set_table_for_first_display
l_layout TYPE disvariant,
Utillity field
l_lines TYPE i.
After returning from screen 200 the line that was selected before
going to screen 200, should be selected again. The table gi_index_rows
was the output table from the GET_SELECTED_ROWS method in form
CHANGE_FLIGHT
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines > 0.
CALL METHOD go_grid->set_selected_rows
EXPORTING
it_index_rows = gi_index_rows.
CALL METHOD cl_gui_cfw=>flush.
REFRESH gi_index_rows.
ENDIF.
Read data and create objects
IF go_custom_container IS INITIAL.
Read data from datbase table
PERFORM get_data.
Create objects for container and ALV grid
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_custom_container.
Create object for event_receiver class
and set handlers
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
Layout (Variant) for ALV grid
l_layout-report = sy-repid. "Layout fo report
Setup the grid layout using a variable of structure lvc_s_layo
Set grid title
gs_layout-grid_title = 'Flights'.
Selection mode - Single row without buttons
(This is the default mode
gs_layout-sel_mode = 'B'.
Name of the exception field (Traffic light field) and the color
field + set the exception and color field of the table
gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
gs_layout-info_fname = 'LINE_COLOR'.
LOOP AT gi_sflight INTO g_wa_sflight.
IF g_wa_sflight-paymentsum < 100000.
Value of traffic light field
g_wa_sflight-traffic_light = '1'.
Value of color field:
C = Color, 6=Color 1=Intesified on, 0: Inverse display off
g_wa_sflight-line_color = 'C610'.
ELSEIF g_wa_sflight-paymentsum => 100000 AND
g_wa_sflight-paymentsum < 1000000.
g_wa_sflight-traffic_light = '2'.
ELSE.
g_wa_sflight-traffic_light = '3'.
ENDIF.
MODIFY gi_sflight FROM g_wa_sflight.
ENDLOOP.
Grid setup for first display
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'SFLIGHT'
is_variant = l_layout
i_save = 'A'
is_layout = gs_layout
CHANGING it_outtab = gi_sflight.
*-- End of grid setup -
Raise event toolbar to show the modified toolbar
CALL METHOD go_grid->set_toolbar_interactive.
Set focus to the grid. This is not necessary in this
example as there is only one control on the screen
CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0200 INPUT
MODULE user_command_0200 INPUT.
CASE ok_code.
WHEN 'EXIT200'.
LEAVE TO SCREEN 100.
WHEN'SAVE'.
PERFORM save_changes.
ENDCASE.
ENDMODULE. " USER_COMMAND_0200 INPUT
*& Form get_data
FORM get_data.
Read data from table SFLIGHT
SELECT *
FROM zsflight
INTO TABLE gi_sflight.
ENDFORM. " load_data_into_grid
*& Form change_flight
Reads the contents of the selected row in the grid, ans transfers
the data to screen 200, where it can be changed and saved.
FORM change_flight.
DATA:l_lines TYPE i.
REFRESH gi_index_rows.
CLEAR g_selected_row.
Read index of selected rows
CALL METHOD go_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
Check if any row are selected at all. If not
table gi_index_rows will be empty
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a line'.
EXIT.
ENDIF.
Read indexes of selected rows. In this example only one
row can be selected as we are using gs_layout-sel_mode = 'B',
so it is only ncessary to read the first entry in
table gi_index_rows
LOOP AT gi_index_rows INTO g_selected_row.
IF sy-tabix = 1.
READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
ENDIF.
ENDLOOP.
Transfer data from the selected row to screenm 200 and show
screen 200
CLEAR g_screen200.
MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
LEAVE TO SCREEN '200'.
ENDFORM. " change_flight
*& Form save_changes
Changes made in screen 200 are written to the datbase table
zsflight, and to the grid table gi_sflight, and the grid is
updated with method refresh_table_display to display the changes
FORM save_changes.
DATA: l_traffic_light TYPE c.
Update traffic light field
Update database table
MODIFY zsflight FROM g_screen200.
Update grid table , traffic light field and color field.
Note that it is necessary to use structure g_wa_sflight
for the update, as the screen structure does not have a
traffic light field
MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
IF g_wa_sflight-paymentsum < 100000.
g_wa_sflight-traffic_light = '1'.
C = Color, 6=Color 1=Intesified on, 0: Inverse display off
g_wa_sflight-line_color = 'C610'.
ELSEIF g_wa_sflight-paymentsum => 100000 AND
g_wa_sflight-paymentsum < 1000000.
g_wa_sflight-traffic_light = '2'.
clear g_wa_sflight-line_color.
ELSE.
g_wa_sflight-traffic_light = '3'.
clear g_wa_sflight-line_color.
ENDIF.
MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
Refresh grid
CALL METHOD go_grid->refresh_table_display.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN '100'.
ENDFORM. " save_changes -
Hi guru's in SMART FORMS how i can get subtotals , and page totals
hi guru's in SMART FORMS how i can get subtotals , and page totals plz help me
Hi
check this
Subtotals - Check the link...
<b>Re: Subtotal with Table Node in smartforms can use the PROGRAM LINES node to calculate the page totals in Table node.
Table Node has three sections:
Header: (Triggered once in the beginning of a page)
Create a Program lines node to reset the value of TOTAL to 0.
Main Area (For each row of internal table)
Create a Program lines node to add the Value to TOTAL
Footer (Triggered once in the End of a page)
Display the TOTAL
Note: 1) You can declare the TOTAL variable in the GLOBAL Definitions under GLOBAL DATA.
2) In the PROGRAM lines always pass the TOTAL in both INPUT and OUTPUT parameters
Regards
Anji -
Want to Display only Subtotals
Hi All,
I Have report which Dispays Segment wise in that currency wise totals.
I want to Display only Subtotals in the Report currency wise.
Not to Display grand Total and each line items.
Can any help me how to go ahead.
Points will be rewarded
Thanks in advacnce
Rameshin the layout click on the layout symbol and check the subtotal checkbox for the filed you want to display the subtotals.. sort as per the sequence you want and save the layout...
this can be done if the field catalog is defined to do sum for that fields.. -
How to display your email and a message to finder on the lock screen of an iPhone?
Hi,
I loose things, including phones and keys...
To prevent a worst case scenario: How to display your email and a message to finder on the lock screen of an iPhone? (6 plus, current iOS)
That is, I assume most people finding an iPhone would want to try to contact me to give it back to me, if they know how: how can leave my contact information in the phone? This needs to be on the lock screen, naturally, as this is the only view the finder can see. It would be useful to be able to add a message of sorts a la "if found please call my wife ### or email me ###".
How can this be done other than editing the JPG of the wallpaper, or sticking a business card to the back of the phone (these are the only solutions I came up with, there must be something better).
Cheers!Greetings _daniel_,
Thank you for contributing to the Apple Support Communities.
It seems like you'd like to display a message on your iPhone 6 Plus in the event it is lost. Good news--you can do this with the Find my iPhone feature of iCloud.
Check out these links for more information:
iCloud: Set up iCloud
iCloud: Use Lost Mode
If you can’t find your device, use Lost Mode right away to lock it with a passcode, display a custom message on the screen, and keep track of its location.
Cheers,
Jeremy -
Displaying metadata, how to display ONLY the Date
I would like to display the Date below each image in Aperture 3. When I select "Date" in the Browser & Viewer Metadata window, the result is a very long string with the Date, the Time and the Time Zone. meaning that most of the time I see nothing because the string is much too long to be displayed...
How to display ONLY the Date ?
Thank you.
Olivierom28 wrote:
I will do that but still... if the Date could be ONLY the Date "without time and time zone", I would be able to display more information.. and it will look nicer.
I said at the top of my first response above: +Afaik, there is no way within Aperture to change the date format of the date metadata overlay.+
Send Aperture feedback to Apple via "Aperture→Provide Aperture Feedback"
In the past I used Expression Media and the config for displaying such info was better.
Aperture has a strange interface for it (and for other parameters), it does not behave at all like an Apple software (for the GUI), probably an external development team... but I agree it is more complex than iPhoto.
Aperture is 10x more complex than iPhoto.
If you want to see a rigid, boxed, "engineer"-style image database interface, take a look at Lightroom 3. It's a great program -- but it's a very different concept of information presentation and interaction.
Thanks again. -
How to display Current Year and Month in Drop Down list
Hi Dear friends,
I am devloping a report. It has got 2 pages--input and output(Report) page.
IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
Now, my problem is:
HOw to display current month and year by default in the dropdown list...........
I hope my question is clear.
Please help.
Regards,
AShNO da,
it is not working.
First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
So, i posted the question.
I tried your code. It is giving following error.
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
first.set(Calendar.YEAR, 2003)
^
An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
^
4 errors
Pls. Help.
Regards,
Ashu -
Firefox page images do not display only text and links
New desktop (not this one) with windows 8.1 Pro, Firefox 29, Norton Internet security. When I go to many of the Firefox pages images do not display, only text and links. This is true for the "get add-ons" page. I can search for add-ons, but when I try to install one, the installation fails. Is there a security setting in windows or NIS that is blocking Firefox images and installations? The Firefox installation went smoothly without error. Other sites do not have this problem.
Wow! I never would have thought of that! My time settings were incorrect when I set up the PC, and I thought I set them. I did have the day, date, and time set correctly. But I did not have AM/PM set right. So, I was off by 12 hours. I corrected it and, voila, all works well.
I'm so happy now, because I can now get all the security extensions I've grown to love:
- NoScript
- Ghostery
- Better Privacy
- Adblock Plus
You guys are great! Thank you so much for your help.
Maybe you are looking for
-
Buffered Function Modules for EKKO, EKPO, EKBE, EKES etc
Hi, Could you please let me know of some buffered function modules for reading data from EKKO EKPO EKBE EKES EKET? Regards, Suraj
-
Using filestream without opening the file
Sir I am trying to save a file to the SQL database using the following code. The code runs successfully but the file opens up during the process. Dim fs As FileStream fs = New FileStream(strFileName, FileMode.Open, FileAccess.Read) Dim docByte As Byt
-
Why can't I save Joomla changes in Firefox 19.0?
I upgraded Firefox 19 and since then can't save any changes in Joomla 2.5.8 ... I'm having no problem in Safari and can't trace the problem to Firefox. I can't find anyone else having this problem in any search so I am truly perplexed.
-
Ical upload from Google or Outlook
Since updating my iPhone 5 to iSO 7.0.2 I cannot import calendar Files. I used to upload my work shift patterns from excel to Google Calendar for a year at a time then download the calendar file to my desktop, email it to my iPhone and the file would
-
myHow to importing personal photos and videos from iOS devices to computer with Windows 8? Nothing indicating iPhone 4s folder for images and videos in Win 8 anymore after plugged in USB cable to PC with the iPhone 4s. Nothing pop up anymore asking