REUSE_ALV_GRID_DISPLAY_LVC and checkboxes
Hi all,
please forgive the HUGE post, the code snip is quite significant. My task is to provide a search option for contract numbers then, after selection's done, show a grid with all the results from the search option where every row represents a contract. Addictionally, I want a checkbox for selection for every row, in order to provide a second, decisional step before processing these contracts.
In order to do so, I used the REUSE_ALV_GRID_DISPLAY but cannot manage to make the checkboxes visible. Note that the solution is working, because clicking in the first field of a row implies adding the row (so, the contract) to a table that will then processed after a particular event's raised (in this case, clicking a specified button).
Can anybody help me understanding why there are no checkboxes in the first columns? A very similar solution worked for me on another project... can't understand what's wrong with this.
Here's the code:
REPORT z_myproject .
* PARAMETERS
TYPES: BEGIN OF t_ztab_alv,
sel,
* cancellato TYPE c,
object_id TYPE crmt_object_id,
description TYPE crmt_process_description,
logical_system TYPE crmt_logsys,
END OF t_ztab_alv.
TYPES: ty_tt_crmd_orderadm_h TYPE TABLE OF crmd_orderadm_h.
DATA: it_contract TYPE TABLE OF t_ztab_alv,
wa_contract TYPE t_ztab_alv,
l_index TYPE i,
conditions TYPE string.
INITIALIZATION.
* Selection Screens and Parameters
SELECTION-SCREEN BEGIN OF BLOCK main_sel WITH FRAME TITLE text-001.
SKIP.
SELECT-OPTIONS s_ctrid FOR wa_contract-object_id.
SKIP.
SELECTION-SCREEN END OF BLOCK main_sel.
PARAMETERS: flag TYPE xfeld.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ctrid-low.
DATA: it_help_item TYPE TABLE OF t_ztab_alv,
it_return TYPE TABLE OF ddshretval.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE it_help_item
FROM crmd_orderadm_h
WHERE object_type = 'BUS2000113'.
IF sy-subrc = 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'OBJECT_ID'
dynprofield = 'OBJECT_ID'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = it_help_item
return_tab = it_return.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ctrid-high.
DATA: it_help_item TYPE TABLE OF t_ztab_alv,
it_return TYPE TABLE OF ddshretval.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE it_help_item
FROM crmd_orderadm_h
WHERE object_type = 'BUS2000113'.
IF sy-subrc = 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'OBJECT_ID'
dynprofield = 'OBJECT_ID'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = it_help_item
return_tab = it_return.
ENDIF.
START-OF-SELECTION.
* Retrieve values from the sel_opt.
SELECT * FROM crmd_orderadm_h
INTO CORRESPONDING FIELDS OF TABLE it_contract
WHERE object_id IN s_ctrid.
* Now let's kick our ALV out!
* General Data
TYPE-POOLS: slis.
DATA: gs_layout TYPE lvc_s_layo,
g_exit_caused_by_caller,
gs_exit_caused_by_user TYPE slis_exit_by_user,
g_repid LIKE sy-repid.
DATA:
gt_events TYPE slis_t_event,
gt_list_top_of_page TYPE slis_t_listheader,
g_status_set TYPE slis_formname VALUE 'PF_STATUS_SET',
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
g_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST',
g_end_of_list TYPE slis_formname VALUE 'END_OF_LIST',
it_fieldcat TYPE lvc_t_fcat,
wa_fieldcat TYPE lvc_s_fcat.
*"Variants
DATA: gs_variant LIKE disvariant,
g_save.
g_repid = sy-repid.
g_save = 'A'.
* This is the main flow. Initialize the layout and manage events.
PERFORM layout_init USING gs_layout.
PERFORM eventtab_build USING gt_events[].
gs_variant-report = g_repid.
g_save = 'A'.
END-OF-SELECTION.
*"List Header for Top-Of-Page
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
* I_BACKGROUND_ID = 'ALV_BACKGROUND'
i_buffer_active = 'X'
i_callback_program = g_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = g_user_command
i_structure_name = 'ZCTR_TAB_ALV'
is_layout_lvc = gs_layout
it_fieldcat_lvc = it_fieldcat
i_save = g_save
is_variant = gs_variant
it_events = gt_events[]
* I_SCREEN_START_COLUMN = 0 "Use coordinates for
* I_SCREEN_START_LINE = 0 "display as dialog box
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
IMPORTING
e_exit_caused_by_caller = g_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
TABLES
t_outtab = it_contract
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
IF g_exit_caused_by_caller = 'X'.
*" Forced Exit by calling program
*" <do_something>.
ELSE.
*" User left list via F3, F12 or F15
IF gs_exit_caused_by_user-back = 'X'. "F3
*" <do_something>.
ELSE.
IF gs_exit_caused_by_user-exit = 'X'. "F15
*" <do_something>.
ELSE.
IF gs_exit_caused_by_user-cancel = 'X'. "F12
*" <do_something>.
ELSE.
*" should not occur!
*" <do_Abnormal_End>.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ELSE.
*"Fatal error callin ALV
* MESSAGE AXXX(XY) WITH ...
ENDIF.
*"Form routines
*& Form LAYOUT_INIT
* text
* -->RS_LAYOUT text
FORM layout_init USING rs_layout TYPE lvc_s_layo.
*"Build layout for list display
rs_layout-cwidth_opt = 'X'.
rs_layout-zebra = 'X'.
rs_layout-box_fname = 'SEL'.
ENDFORM. "LAYOUT_INIT
*& Form EVENTTAB_BUILD
* text
* -->RT_EVENTS text
FORM eventtab_build USING rt_events TYPE slis_t_event.
*"Registration of events to happen during list display
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = rt_events.
READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE g_top_of_page TO ls_event-form.
APPEND ls_event TO rt_events.
ENDIF.
ENDFORM. "EVENTTAB_BUILD
*& Form TOP_OF_PAGE
* text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
* I_LOGO = 'ENJOYSAP_LOGO'
it_list_commentary = gt_list_top_of_page.
ENDFORM. "TOP_OF_PAGE
* FORM SET_PF_STATUS *
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD'.
"Copy of 'STANDARD' pf_status from fgroup SALV
ENDFORM. "set_pf_status
* FORM USER_COMMAND *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA : it_sel_lines TYPE TABLE OF t_ztab_alv,
l_lines TYPE i,
l_mult_lines TYPE flag,
l_obj_id TYPE char35,
t_contratti TYPE ty_tt_crmd_orderadm_h,
wa_contratti TYPE crmd_orderadm_h.
* Calculate sel_lines.
REFRESH it_sel_lines.
CASE r_ucomm.
WHEN 'ZCANCELLA'. "set attribute button
REFRESH t_contratti.
LOOP AT it_contract INTO wa_contract WHERE sel = 'X'.
SELECT SINGLE *
FROM crmd_orderadm_h
INTO wa_contratti
WHERE object_id = wa_contract-object_id.
IF sy-subrc = 0.
APPEND wa_contratti TO t_contratti.
ENDIF.
ENDLOOP.
MOVE 'X' TO rs_selfield-refresh.
* do something with the selected entries.
PERFORM do something USING t_contratti.
ENDCASE.
COMMIT WORK AND WAIT.
CLEAR r_ucomm.
MOVE 'X' TO rs_selfield-refresh.
ENDFORM. "USER_COMMAND
Hello Byju, hello all...
...first of all, sorry for the BIG delay in answering but I had to leave a bit this task for other priorities... now I'm back on it to work. Oh, and obviously, happy new year mates
I tried by myself to follow what you called "option(2)"... a popup screen (simpliest possible).
In order to do so, I tried the following code, but I don't know how to manage the "no" answer.... I mean, the popup works but if I press "No", I don't want the code to follow to be executed (sounds like I have to translate into code "do nothing of what follows, simply return to the alv screen").
The code:
WHEN 'ZCANCELLA'. "set attribute button
REFRESH t_contratti.
LOOP AT it_contract INTO wa_contract WHERE sel = 'X'.
IF wa_contract-object_id BETWEEN 8400000000 AND 8499999999.
popupneeded = 'X'.
ENDIF.
ENDLOOP.
IF popupneeded EQ 'X'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
* TITLEBAR = 'ATTENZIONE'
* DIAGNOSE_OBJECT = ' '
text_question = '84* contracts in the selection. Continue? '
* TEXT_BUTTON_1 = 'Yes'(001)
* ICON_BUTTON_1 = ' '
* TEXT_BUTTON_2 = 'No'(002)
* ICON_BUTTON_2 = ' '
* DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = SPACE
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
* IV_QUICKINFO_BUTTON_1 = ' '
* IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
ANSWER = w_answer.
* TABLES
* PARAMETER =
* EXCEPTIONS
* TEXT_NOT_FOUND = 1
* OTHERS = 2
IF w_answer ne '1'.
* to manage -> refresh the alv of selection and do nothing.
endif.
ENDIF.
LOOP AT it_contract INTO wa_contract WHERE sel = 'X'.
SELECT SINGLE *
FROM crmd_orderadm_h INTO wa_contratti
WHERE object_id = wa_contract-object_id.
IF sy-subrc = 0.
APPEND wa_contratti TO t_contratti.
ENDIF.
ENDLOOP.
MOVE 'X' TO rs_selfield-refresh.
* delete selected contracts.
PERFORM cancella_ctr USING t_contratti.
Also...I added a new field in the ALV mask, called "deleted"... it's a checkbox I'd like to check after the deletion phase to show that a selected contract's been deleted. The behaviour in my mind should be as follows:
- ALV screen that shows contracts;
- selection of some of these contracts;
- click on the button "delete";
- eventually, popup of the warning screen;
- after the deletion, return to the previous ALV in which the previously selected lines have the "deleted" field marked (it's not significant to verify that these entries have really been deleted... if something goes wrong, an exception is raised and managed).
Guess it's a simple "come back to the alv screen and refresh" issue, so maybe you can help me with a clarifying example
Thanks in advance!
Edited by: Matteo Montalto on Jan 7, 2009 10:15 AM
Similar Messages
-
Is it possible to have sorting by group and checkboxes in the same ALV
Hi there,
Does anyone know whether it is possible to have sorting and group on one field in ALV and checkboxes set on another field in ALV?
eg.
Fieldname
===========
Name----
Text
Allowance----
Numeric -> Sort & Group
Verified----
Checkbox
How do I code it if it is possible to have grouping and check box all in one ALV. Meaning I want some data that are the same to merge using sort, while still having the checkbox available for my other field (Verified).
Thanks in advance.
Lawrencehi,
GROUP BY clause is used on database tables with select statement.
sort is used on internal tables.
can u clearly explain y u need group by and sort on the same field.
if u are extracting from dbtable using grou by clause on a field, then no need to sort it again.
if u want sort u can do it by giveing "sort itab by field". thats not a problem.
now coming to check box.instead of using SLIS type field catalog, u use LVC type.
in LVC_S_LAYO, u can fine box_fname.
while defining layout, u declare a variable of type LVC_S_LAYO
AND GIVE BOX_FNAME = internal table field name -
Commandlink and checkbox in a region(.jsff).
Hi all,
I have a commandlink and checkbox in a region(.jsff).
when i tried to call a method using propertychangeListener or Actionlistener ..
methosd is not calling ...
Plase give any solution...Hi,
not enough information - sorry
Frank -
Guys,
Ive a problem with a ALV and checkboxs. i have one with column type checkbox, i need mark rows and take them afterward using a button (in ALV) but rows arent marked when i use button. i have seen that it only happend when i use double click in grid (alv).
How could i use only button after marked my rows ?????
Thankswa_fieldcat-edit = 'X'.
modify i_fieldcat from wa_fieldcat index sy-tabix.
* Form f_alv_edit_oruser *
* Form for display alv *
form f_alv_edit_oruser.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = i_fieldcat[]
is_layout = pt_grplayout2
i_callback_program = 'YSCCU0007'
i_callback_html_top_of_page = p_header
i_callback_user_command = v_user_command1
it_events = i_events[]
tables
t_outtab = i_yscchdr.
endform. " F_alv_edit_oruser
* Form f_user_command1 *
* This form will handle the user command from fm REUSE *
form f_user_command1 using p_ucomm type sy-ucomm
rs_selfield type slis_selfield.
data p_ref1 type ref to cl_gui_alv_grid. "<<<
call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' "<<<
importing "<<<
e_grid = p_ref1. "<<
call method p_ref1->check_changed_data. " <<<<
case p_ucomm.
when '&DATA_SAVE'.
endcase.
rs_selfield-refresh = c_x. " Grid refresh
endform. " F_user_command1 -
Ok... i wish i can show my form without letting everyone have axx to it.
But anyway, ive searched and i think i found part of the answer but i am still confused. http://forums.adobe.com/message/2033382#2033382
I have a form created completely. It has radio fields, text fields and checkboxes. I have two problems
One when ppl are typing in the text field area, it seems to lend in with the question, so if not paying attn, u wont know that they answered a question.
Currently i have the stuff set at Myriad Pro size 10.. Thats what i used to type comments and what not.
But when the end user flls out the form, i want it to at least be in bold or something.. Or maybe Times new roman Or something different from the question font itself.
Two.. in checkboxes, the default is X. Thats very light. I need that to be noticeable... So either make em a bod X or a way to increase the size of the tick without increasing the size of the box itself.. I just tried to use the STAR..And its bold enuf, but its small. It would be better if the star was a lil bigger.
Currently i think i have 150 checkboxes and about 50 text area and fields.
I thought about making the text thing rich format, but they cant do that for every field... id rather tdo that by default in the back end of the form itself.
I hope im not sounding confusinfi know the square and circle are a bit ugly - but there is no chance you'll miss them
alternatively try adjusting the size a bit under -size you can take a standard checkboxes size from 10 to 12 without increasing its area for example - select the checkbox-objects-field-size - change to 12 eg - adds a bit of weight
i use squares when i need visual weigh -
for the text - might be worth having a test at setting input field values with a baseline shift -- thats basically make text bigger or smaller than, you guessed it, baseline -- this from the livecycle scripting reference
TextField1.font.baselineShift = "+5pt"; should do it for example --
scripting reference follows --- good luck
""baselineShift
Specifies a positive measurement that shifts a font up from the baseline or a negative measurement that
shifts a font down from the baseline.
Syntax
Reference_Syntax.baselineShift = "0in | measurement"
Type Values
String ● fit (default)
The application scales the image proportionally to the maximum size of the container’s
content region.
● none
The application scales the image to the size of entire container’s content region. This may
result in different scale values being applied to the image's X and Y coordinates.
● actual
The image is rendered using the dimensions stored in the image content. The extent of the
container’s region does not affect the sizing of the image.
● width
The application scales the image proportionally to the width of the container’s content
region. The image might be taller or shorter than the content region.
● height
The application scales the image proportionally to the height of the container’s content
region. The image might be wider or narrower than the content region.
Model Object
Form Model image
Adobe LiveCycle Designer ES Scripting Properties
LiveCycle Designer ES Scripting Reference before 156
Values
Applies to
Version
XFA 2.1
Examples
JavaScript
TextField1.font.baselineShift = "-5pt";
FormCalc
TextField1.font.baselineShift = "-5pt" -
Radio buttons and checkboxes using panels......
Please help..
I am using radiobuttons and checkboxes with prices on them.. and once an item is selected the total is output.. this works when I don't use panels.. the minute I use panels it does not register what I am using.. can anyone help..
is there something that I am leaving out.. the basics would be great. please help.
AsmeenAre you really sure this is an advanced language topic?
-
IF EXIT and Checkbox.. need help
Hi there,
i have a Problem.
I am new in ABAP and try out now a lot of thing. Now i have a problem and i dont know how to solve it... Here is my Code.. After that i tell you my problem.
*& Report Z_TEILNEHMERLISTE_EINFUEGEN
REPORT Z_TEILNEHMERLISTE_EINFUEGEN.
*Tabelle deklarieren
TABLES zteilnehmer02.
SELECTION-SCREEN BEGIN OF BLOCK teilnehmer WITH FRAME TITLE text-001.
*Eingabefelder deklarieren
PARAMETERS: nummer TYPE zteilnehmer02-tnummer,
name TYPE zteilnehmer02-tname LOWER CASE,
gebdat TYPE zteilnehmer02-tgeburtsdatum LOWER CASE,
geschl TYPE zteilnehmer02-tgeschlecht LOWER CASE,
kurspr TYPE zteilnehmer02-tkurspreis LOWER CASE,
waehru TYPE zteilnehmer02-twaehrung LOWER CASE,
kfz TYPE zteilnehmer02-zzkfztyp LOWER CASE,
kursti TYPE zteilnehmer02-zzkurstitel LOWER CASE.
SELECTION-SCREEN END OF BLOCK teilnehmer.
*Workarea deklarieren die dann in die DB Tabelle zteilnehmer02 gechrieben wird
DATA: wa_teil LIKE zteilnehmer02.
*deklarieren der Felder
wa_teil-tnummer = nummer.
wa_teil-tname = name.
wa_teil-tgeburtsdatum = gebdat.
wa_teil-tgeschlecht = geschl.
wa_teil-tkurspreis = kurspr.
wa_teil-twaehrung = waehru.
wa_teil-zzkfztyp = kfz.
wa_teil-zzkurstitel = kursti.
*Daten werden nun aus der Workarea wa_teil in die Tabelle zteilnehmer02 geschrieben
INSERT INTO zteilnehmer02 VALUES wa_teil.
*Wenn das Feld tnummer leer ist dann mache nichts... AUSSER es ist oben die Checkbox vollstli angehackt.. dann zeige die komplette Liste
IF wa_teil-tnummer IS INITIAL.
EXIT.
ENDIF.
*wenn Returncode irgendwas anderes als NULL dann gib Fehlermeldung aus und schreibe den Datensatz NICHT
IF sy-subrc NE 0.
ROLLBACK WORK.
WRITE: / 'Fehler beim anlegen des neuen Teilnehmer mit der Nummer', wa_teil-tnummer, '. Diese Nummer existiert bereits.'.
ELSE.
*Wenn RC=0 dann gib folgende Meldung aus nachdem der Datensatz geschrieben wurde
WRITE: / 'Neuer Teilnehmer mit Teilnehmernummer ', wa_teil-tnummer, 'eingetragen'.
ENDIF.
SELECTION-SCREEN BEGIN OF BLOCK anzeige WITH FRAME TITLE text-002.
PARAMETERS vollstli AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK anzeige.
*Checkbox prüfen
IF NOT vollstli IS INITIAL.
* vollständigen Tabelleninhalt ausgeben
SELECT * FROM zteilnehmer02.
WRITE: / zteilnehmer02-tnummer,
zteilnehmer02-tname,
zteilnehmer02-tgeburtsdatum,
zteilnehmer02-tgeschlecht,
zteilnehmer02-tkurspreis,
zteilnehmer02-twaehrung,
zteilnehmer02-zzkfztyp,
zteilnehmer02-zzkurstitel.
ENDSELECT.
SKIP.
ENDIF.
As you can see above i wrote:
IF wa_teil-tnummer IS INITIAL.
EXIT.
ENDIF.
But in a another BLOCK i have a CHECKBOX. When i "check" the Box i become a List of all Members. But this will not work because the field wa_teil-tnummer IS INITIAL so the program EXIT.
How can i solve this?
Thanks
Bjoern
Edited by: bjoern bayerschmidt on Jun 3, 2009 1:27 PM
Edited by: bjoern bayerschmidt on Jun 3, 2009 1:28 PMSorry,
i did not see that the code look so horrible ^^
So i have a EXIT here:
IF wa_teil-tnummer IS INITIAL.
EXIT.
ENDIF.
But AFTER this Code i have a CHECKBOX too.
SELECTION-SCREEN BEGIN OF BLOCK anzeige WITH FRAME TITLE text-002.
PARAMETERS vollstli AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK anzeige.
*Checkbox prüfen
IF NOT vollstli IS INITIAL.
* vollständigen Tabelleninhalt ausgeben
SELECT * FROM zteilnehmer02.
WRITE: / zteilnehmer02-tnummer,
zteilnehmer02-tname,
zteilnehmer02-tgeburtsdatum,
zteilnehmer02-tgeschlecht,
zteilnehmer02-tkurspreis,
zteilnehmer02-twaehrung,
zteilnehmer02-zzkfztyp,
zteilnehmer02-zzkurstitel.
ENDSELECT.
SKIP.
ENDIF.
So the CHECKBOX do not work when the FIELD wa_teil-tnummer IS INITIAL, because it comes BEFORE the CHECKBOX comes. Do you know what i mean.
The CHECKBOX do Only work when i put some DATA in the field wa_teil-tnummer. But i want that the CHECKBOX works too when the Field is empty.
Thanks
Bjoern
Edited by: bjoern bayerschmidt on Jun 3, 2009 1:33 PM
Edited by: bjoern bayerschmidt on Jun 3, 2009 1:34 PM -
How can I update multiple rows in table using a single form button and checkboxes
I have a project where the visitors can select multiple productos and once the click on the PURCHAS button it updates the selected records.
You have not mentioned the programming language that you are using, but here's a link that could help you if you are using ASP.
http://csharpdotnetfreak.blogspot.com/2009/05/edit-multiple-records-gridview-checkbox.html
Also, have a look at this discussion thread
http://forums.asp.net/t/1470882.aspx -
So you call up an account in email
Account Information is selecgted in the 3-choice menu-bar/button (what is that thing called, anyway? An "inspector"? (frown).
Then check "enable this account"--is selectable
Then Account type: iCloud IMAP or example--this is NOT selectable.
Then "Description field" What's it for, where does it show up, especially if it shows up in other "related" or "integrated" programs?
Alias popup: What's this for? How do you use it. What approaches, strategies, effects might one employ?
Email address is pretty straight forward--but see "user.name" in the "server sub-box/sub-pane" below.
Full Name: What full name? Where does it appear in use? I cannot access it from the pane/panel, so how do I set it, or who/what sets it?
Outgoing mail server (SMTP): OK, here's a popup that isn't congruent with "account type" in the first sub-pane. Or is IMAP only an extroverted function/setting, and (SMTP) is a introverted one (IMAP for outbound, SMTP for inbound)?
Now comes Confusion: Outgoing Mail Server popup menu, which leads you off to a wholenother pane that lets you create new/delete old incoming server names.
There's a Description (what's that for, what does it do? Ditto Server name--I get than's something like smtp.ISP.Com or IMAP.ISP.com). You can set those fields in the + menu Account Information Pane, with its blank text fields. And you can also "double-click to enter" that field in the list itself. Why is that?And then I can select Advanced, and get another batch of checkboxes, fields, and popups.
But I left the Account Information pane before asking, What is this Thread-Lock Stitching Certificate thing? (Or is that Transport Layer Secrecy Sertificate, what? None is displaying now, but if I popup what's beneath it a humongously long "ID" string, which I take to be, what, my Apple ID? A public key/ provate key encryption string/key? How do I use it if I'm trying to keep the National Surveillance Agency from eavesdropping, "in the clear," my every blessed keystroke, "phrase-stroke" (think VoIP), and if I use the thing, can the president just press a button and send a drone to blow me off the planet (and anyone near me at the time--always great fun for friends and family)?
And never mind router and FiOS, etc., modem settings. and the Network settings outside of email....
I guess my bottom line is, the user is presented with a rich smorgasbord of significant choices by all of the panes and panels, etc., on the mac, iMac, iPad-Phone-Watch real soon now, mac pro, macbook pro, etc. But the specific description of the proper use of these description/instruction on their use and function is impoverished. I think manuals used to handle some of these issues. But where are the manuals? Or am I just so overwhelmed by the complexity of what was once a simple user interface that I can't see pointers (in light grey type on lighter grey backgrounds--what the heck is wrong with black type, I'd like to know!) staring me in the phiz. Oh, help.Hi Cff7dxp,
I am glad to hear that your issue has been resolved from the provided troubleshooting steps. Please feel free to post in Lenovo Community Forums if you have any further queries!
Did someone help you today? Press the star on the left to thank them with a Kudo’s!
Cheers!
Hemanth Kumar
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
I'm using the function 'reuse_alv_grid_display' to display an internal table with the first column as a checkbox. Everything displays fine, but the checkbox column is grayed out and I can't check or uncheck the rows as needed. How do I activate this column so I can check or uncheck rows as needed.
Edward,
For all the fields where you want the user to enter / edit the data, you should check EDIT field of the field catalog for that field.
Regards,
Ravi
Note : Please mark the helpful answers. -
How to create dropwdown list box values and checkbox in screen painter.
Hi Experts,
I need to know the creation of dropdown list box values and the checkbox to use in screen painter.
I have 3 values to insert as:-
INR,USD,EUR
if user selects INR/USD/EUR, then it will store into the table field.
And also want to know the checkbox functioning in screen painter, i.e. what should we write in PBO/PAI.
I have found some sites to get knowledge, but didnot found anything that relates to my questions.
So please help me!
Thanks,
DeepanshuHi,
For dropdown list box in Screen create a input field and choose Drop down by index.
To populate the values write the logic in PBO as follows
TYPE-POOLS : VRM
DATA : field_id TYPE VRM_ID ,
values TYPE VRM_VALUES,
value LIKE LINE OF values.
PROCESS BEFORE OUTPUT
MODULE list_fill_100
MODULE list_fill_100 OUTPUT
SELECT f1 f2 f3 FROM tab WHERE condition.
value-KEY = f1.
value-TEXT = f2
APPEND value TO VALUES
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'i/o screen field'
values = values.
ENDMODULE. -
Having some trouble with hidden and checkboxes on tabular forms
My query is as follows:
select distinct tt.name tasktype,ct.name costtype,htmldb_item.checkbox(3,1,NULL,'Y:N',':') "Add Cost", htmldb_item.text(4,defabscost,9) defabscost,
htmldb_item.hidden(5,tt.tasktypeid) tasktypeid, htmldb_item.hidden(6,ct.costtypeid) costtypeid
from acct.defabscost d
inner join work.tasktype tt
on d.tasktypeid = tt.tasktypeid
inner join acct.costtype ct
on d.costtypeid = ct.costtypeid
I have it wrapped within a function, which works fine. My issues are that I want to have the checkboxes function as row selectors. Basically, not pointing to primary keys (I have a compound primary key on this table). If selected, fill in the table, if not selected, erase from table. Also, My hidden items kinda contain the "primary keys". When I set these as hidden, I see the column, but there is no data. I don't want to see the columns at all, but when I set these to "hidden" in the attributes, I can't reference them with htmldb_application.g_FXX. Any suggestions?I actually figured out how to get the htmldb_item.hidden part working properly. I misread the guide, thought it was a comma between fields and not a concatenation. Works fine. But I still need to get the checkbox to work like I want.
-
hi all, i have a few problems here.
Firstly, i need to display records in an ALV from an internal table.
Secondly, i need to include checkboxes beside each and every records for the user to choose which records he wants to see.
Thirdly, after the user has checked the fieldss that he wants, i need to display the details of all the records based on the ticked checkboxes in another screen.
please help me if anyone knows.
thx!Hi Meei,
Thats very simple ....
1 . In the internal table where you are displaying declare some thing like below.
Data : begin of i_department occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Docu No
deprt like ztmsh-deprt, "Department
meala like ztmsd-meala, "Meal Allowance
sitea like ztmsd-sitea, "Site Allowance($)
CHECKBOX(1) TYPE C,declare some thing here for creating check box
end of i_department.
2. Build a field catlog for the check box something like below..
i_temp-fieldname = 'CHECKBOX'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-col_pos = 1.
i_temp-CHECKBOX = 'X'.
i_temp-outputlen = 4.
i_temp-seltext_l = 'Flag'.
i_temp-input = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
3. Now u can see the checkbox in the output once you select it will automatically flag in your internal table.and using the USer-command u can play around.
I have pasted a entire coding here pls check the flow.
REPORT Z_TIME_SHEET_REPT.
TABLES
Tables : ztmsh, "Time Sheet Header
ztmsd, "Time Sheet Data
zempy. "Employee
Data Definations
Internal Table for Employee input data
Data : begin of i_employee occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
empid like zempy-empid, "Employee ID
empnam(50) type c , "Employee Name
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
meala like ztmsd-meala, "Meal Allowance
sitea like ztmsd-sitea, "Site Allowance($)
end of i_employee.
Internal Table For Department Input Data
Data : begin of i_department occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
hlftm like ztmsd-hlftm, "1.5 Time
dbltm like ztmsd-dbltm, "Double Time
meala like ztmsd-meala, "Meal Allowance
sitea like ztmsd-sitea, "Site Allowance($)
CHECKBOX(1) TYPE C,
end of i_department.
Temp Internal tablee for holding department values
Data : begin of i_t_dept occurs 0,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
end of i_t_dept.
internal table for detailed data
data : begin of i_detail occurs 0 ,
vbeln like ztmsh-vbeln, "Sales and Distribution Document Number
deprt like ztmsh-deprt, "Department
tmsdt like ztmsh-tmsdt, "Date
jbcpl like ztmsh-jbcpl, "Job Complete
nmltm like ztmsd-nmltm, "Normal Time
ovrtm like ztmsd-ovrtm, "Over Time
cadsv like ztmsh-cadsv, "CAD Services
stsvy like ztmsh-stsvy, "SiteSurvey
cstdw like ztmsh-cstdw, "Construction Drawing
sppln like ztmsh-sppln, "Space Planning
dsndw like ztmsh-dsndw, "Design Drawings
drw3d like ztmsh-drw3d, "3D Drawings
dwplt like ztmsh-dwplt, "Drawing Plots
otamt like ztmsh-otamt, "Others
inact like ztmsh-inact, "In store Activity type
ictnq like ztmsh-ictnq, "In store Activity Quantity
inctn like ztmsh-inctn, "In store Activity Loading
mitim like ztmsh-mitim, "Movement Volume in Type
mivlm like ztmsh-mivlm, "Movement Volume in Loading
motim like ztmsh-motim, "Movement Volume Out Type
movlm like ztmsh-movlm, "Movement Volume Out Loading
outtm like ztmsh-outtm, "Out of Store Activity Type
outact like ztmsh-outact, "Out of Store Activity Loading
frklft like ztmsh-frklft, "Forklift
strpt like ztmsh-strpt, "Storage Protection
rbbsh like ztmsh-rbbsh, "Rubbish
crtes like ztmsh-crtes, "Crates
vhlhr like ztmsh-vhlhr, "Vechile
toll like ztmsh-toll, "Toll
park like ztmsh-park, "Parking
hrdwr like ztmsh-hrdwr, "Hardware
trlly like ztmsh-trlly, "# of Trollys
dolly like ztmsh-dolly, "# of Dollies
oepno like ztmsh-oepno, "# of Other Equipment
oteqp like ztmsh-oteqp, "Other Eqipment
end of i_detail.
ALV Field Catlog declaration
TYPE-POOLS : slis.
data : i_depart TYPE slis_t_fieldcat_alv,
i_emp TYPE slis_t_fieldcat_alv,
i_design TYPE slis_t_fieldcat_alv,
i_warehouse TYPE slis_t_fieldcat_alv,
i_transport TYPE slis_t_fieldcat_alv,
i_install TYPE slis_t_fieldcat_alv,
i_temp TYPE slis_fieldcat_alv,
l_layout TYPE slis_layout_alv.
Events
DATA: v_events TYPE slis_t_event,
wa_event TYPE slis_alv_event.
Tempary Variables
data: wa_nmltm type p decimals 2,
wa_ovrtm type p decimals 2,
wa_meala type p decimals 2,
wa_sitea type p decimals 2,
wa_HLFTM type p decimals 2,
wa_DBLTM type p decimals 2,
w_nmltm(5) type c,
w_ovrtm(5) type c,
w_meala(5) type c,
w_sitea(5) type c,
wa_first(25) type c,
wa_last(25) type c.
data : repid type sy-repid.
Selection Screen
*Select options
selection-screen begin of block blk1.
select-options : s_vbeln for ztmsh-vbeln,
s_tmsdt for ztmsh-tmsdt.
selection-screen end of block blk1.
Radio Buttons
selection-screen begin of block blk2 WITH FRAME TITLE TLT1.
Parameters: dept radiobutton GROUP SX,
emp radiobutton GROUP SX.
selection-screen end of block blk2.
Intialization
INITIALIZATION.
TLT1 = 'Time Sheet Summary Report'.
repid = sy-repid.
s_tmsdt-low = sy-datum.
s_tmsdt-high = sy-datum.
append s_tmsdt.
START-OF-SELECTION.
START-OF-SELECTION.
if dept = 'X'.
perform 100_time_sheet.
perform 200_build_field_catlog.
perform 400_ALV_Display.
elseif emp = 'X'.
perform 100_time_sheet.
perform 500_build_field_catlog.
Perform 600_ALV_display.
endif.
*& Form 100_time_sheet
text
FORM 100_time_sheet.
select * from ztmsh
where vbeln in s_vbeln
and tmsdt in s_tmsdt.
if ztmsh-vbeln ne space.
perform empl_calcuation .
if emp = 'X'.
clear i_employee.
elseif dept = 'X'.
clear i_department.
endif.
ENDIF.
endselect.
ENDFORM. " 100_time_sheet
*& Form 200_build_field_catlog
Department Wise Summary Report
FORM 200_build_field_catlog .
refresh i_depart.
i_temp-fieldname = 'CHECKBOX'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-col_pos = 1.
i_temp-fix_column = 'X'.
i_temp-CHECKBOX = 'X'.
i_temp-outputlen = 4.
i_temp-seltext_l = 'Flag'.
i_temp-input = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'VBELN'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'VBELN'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Work Order No'.
i_temp-col_pos = 2.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'DEPRT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'DEPRT'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Department'.
i_temp-col_pos = 3.
i_temp-outputlen = 15.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'TMSDT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'TMSDT'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Time Sheet Date'.
i_temp-col_pos = 4.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'JBCPL'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'JBCPL'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Time Sheet Status'.
i_temp-col_pos = 5.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'NMLTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'NMLTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total NH'.
i_temp-col_pos = 6.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'OVRTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'OVRTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total AH'.
i_temp-col_pos = 7.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'HLFTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'HLFTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total 1.5 Time'.
i_temp-col_pos = 8.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'DBLTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'DBLTM'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Total 2.0 Time'.
i_temp-col_pos = 9.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'MEALA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'MEALA'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Tot Meal Allowence'.
i_temp-col_pos = 10.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
i_temp-ref_fieldname = 'SITEA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'SITEA'.
i_temp-tabname = 'I_DEPARTMENT'.
i_temp-seltext_l = 'Tot Site Allowence($)'.
i_temp-col_pos = 11.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_DEPART.
CLEAR i_temp.
ENDFORM. " 200_build_field_catlog
*& Form 300_populate_events
Top Of Page Events for Warehouse Report
FORM 300_populate_events .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = v_events.
READ TABLE v_events
INTO wa_event
WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc EQ 0.
wa_event-form = 'TOP_OF_PAGE'.
MODIFY v_events
FROM wa_event TRANSPORTING form
WHERE name = wa_event-form.
endif.
ENDFORM. " 300_populate_events
*& Form 400_ALV_Display
Department ALV Display
FORM 400_ALV_Display .
sort i_department by vbeln deprt tmsdt.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = 'PO_STATUS '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME = 'i_department'
IS_LAYOUT = l_layout
IT_FIELDCAT = i_depart
IT_EVENTS = v_events
TABLES
T_OUTTAB = i_department
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.
ENDFORM. " 400_ALV_Display
*& Form 500_build_field_catlog
Employee wise Summary Report
FORM 500_build_field_catlog .
refresh i_depart.
i_temp-ref_fieldname = 'VBELN'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'VBELN'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Work Order No'.
i_temp-col_pos = 1.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'DEPRT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'DEPRT'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Department'.
i_temp-col_pos = 2.
i_temp-outputlen = 15.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'TMSDT'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'TMSDT'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Time Sheet Date'.
i_temp-col_pos = 3.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'JBCPL'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'JBCPL'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Time Sheet Status'.
i_temp-col_pos = 4.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'EMPID'.
i_temp-ref_tabname = 'ZEMPY'.
i_temp-fieldname = 'EMPID'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Employee ID'.
i_temp-col_pos = 5.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'JBCPL'.
i_temp-ref_tabname = 'ZTMSH'.
i_temp-fieldname = 'EMPNAM'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Employee Name'.
i_temp-col_pos = 6.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'NMLTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'NMLTM'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Total NH'.
i_temp-col_pos = 7.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'OVRTM'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'OVRTM'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Total AH'.
i_temp-col_pos = 8.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'MEALA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'MEALA'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Tot Meal Allowence'.
i_temp-col_pos = 9.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
i_temp-ref_fieldname = 'SITEA'.
i_temp-ref_tabname = 'ZTMSD'.
i_temp-fieldname = 'SITEA'.
i_temp-tabname = 'I_EMPLOYEE'.
i_temp-seltext_l = 'Tot Site Allowence($)'.
i_temp-col_pos = 10.
i_temp-fix_column = 'X'.
APPEND i_temp TO i_emp.
CLEAR i_temp.
ENDFORM. " 500_build_field_catlog
*& Form 600_ALV_display
Employee Wise ALV Display
FORM 600_ALV_display .
sort i_employee by vbeln deprt tmsdt.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = repid
I_CALLBACK_PF_STATUS_SET = 'PO_STATUS '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME = 'i_employee'
IS_LAYOUT = l_layout
IT_FIELDCAT = i_emp
IT_EVENTS = v_events
TABLES
T_OUTTAB = i_employee
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.
ENDFORM. " 600_ALV_display
*& Form Po-Status.
FORM po_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZBUTTON' EXCLUDING rt_extab.
ENDFORM. "po_status
*& Form User_command.
FORM user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
data : valid type i,
cnt like ztmsh-deprt.
clear i_department.
loop at i_department where CHECKBOX = 'X'.
on change of i_department-deprt.
if cnt ne space.
if valid ne 0.
message 'Please select same department' type 'I'.
valid = 2.
exit.
cnt = i_department-deprt.
endif.
endon.
valid = 1.
endloop.
if valid = 1.
case ucomm.
when 'DESIGN' .
perform transfer_table.
perform design_report.
perform des_build_field_catlog.
Perform design_ALV_display.
when 'WAREHOUSE'.
perform transfer_table.
perform design_report.
perform war_build_field_catlog.
perform 300_populate_events.
perform warehouse_ALV_display.
when 'TRANSPORT'.
perform transfer_table.
perform design_report.
perform tran_build_field_catlog.
perform top_of_page.
perform Transport_ALV_display.
when 'INSTALLAT'.
perform transfer_table.
perform design_report.
perform inst_build_field_catlog.
perform Install_ALV_display.
endcase.
elseif valid = 0.
message 'Please select a department' type 'I' .
endif.
endform. "user_command
*& Form empl_calcuation
Employee total hours calculation
FORM empl_calcuation .
data : w_hours(3) type C,
w_min(3) type c,
w_hours1(3) type c,
w_min1(3) type c,
w_hours2(3) type c,
w_min2(3) type c,
w_hours3(3) type c,
w_min3(3) type c,
w_hours4(3) type c,
w_min4(3) type c,
t_nmltm(5) type c,
t_ovrtm(5) type c,
t_meala(5) type c,
t_sitea(5) type c,
t_HLFTM(5) type c,
t_DBLTM(5) type c,
temp type i.
clear :wa_nmltm,
wa_ovrtm,
wa_meala,
wa_sitea,
wa_HLFTM,
wa_DBLTM.
To convert into Minutes
select * from ztmsd
where vbeln = ztmsh-vbeln
and tmsdt = ztmsh-tmsdt
and deprt = ztmsh-deprt.
*uncommenting the below code between the select and endselect will work
*for normal time scenario (eg: 2.55+3.55 =6.50) *
Normal Time
t_nmltm = ztmsd-nmltm.
SPLIT t_nmltm at '.' into w_hours w_min.
temp = w_hours.
w_hours = temp.
w_hours = w_hours * 60.
wa_nmltm = wa_nmltm + t_nmltm.
Over Time
t_ovrtm = ztmsd-ovrtm.
SPLIT t_ovrtm at '.' into w_hours1 w_min1.
temp = w_hours1.
w_hours1 = temp.
w_hours1 = w_hours1 * 60.
wa_ovrtm = wa_ovrtm + t_ovrtm.
Meal Allowence
t_meala = ztmsd-meala.
SPLIT t_meala at '.' into w_hours2 w_min2.
temp = w_hours2.
w_hours2 = temp.
w_hours2 = w_hours2 * 60.
wa_meala = wa_meala + t_meala .
Site Allowence
t_sitea = ztmsd-sitea.
wa_sitea = wa_sitea + t_sitea.
if dept = 'X'.
1.5 Time
t_HLFTM = ztmsd-HLFTM.
SPLIT t_HLFTM at '.' into w_hours3 w_min3.
temp = w_hours3.
w_hours3 = temp.
w_hours3 = w_hours3 * 60.
wa_HLFTM = wa_HLFTM + t_hlftm.
Double Time
t_DBLTM = ztmsd-DBLTM.
SPLIT t_DBLTM at '.' into w_hours4 w_min4.
temp = w_hours4.
w_hours4 = temp.
w_hours4 = w_hours4 * 60.
wa_DBLTM = wa_DBLTM + t_dbltm.
endif.
endselect.
if sy-subrc = 0.
uncommenting the below will work for normal time scenario
(eg: 2.55+3.55 =6.50)
and change in the appending coloum wa_ to t_
to convert into Hours
perform min_to_hrs_nmltm using wa_nmltm changing t_nmltm.
perform min_to_hrs_ovrtm using wa_ovrtm changing t_ovrtm.
perform min_to_hrs_meala using wa_meala changing t_meala.
perform min_to_hrs_sitea using wa_sitea changing t_sitea.
if emp = 'X'. "Report By Employee
Employee Id
select single empid deprt into ztmsd
from ztmsd
where vbeln = ztmsh-vbeln.
if sy-subrc = 0.
Employee Name
select single empye_f empye_l
into (wa_first,wa_last )
from zempy
where empid = ztmsd-empid.
if sy-subrc = 0 .
concatenate wa_first
wa_last
into i_employee-empnam.
Appending To internal Table
i_employee-empid = ztmsd-empid.
i_employee-deprt = ztmsh-deprt.
i_employee-nmltm = wa_nmltm.
i_employee-ovrtm = wa_ovrtm.
i_employee-meala = wa_meala.
i_employee-sitea = wa_sitea.
i_employee-vbeln = ztmsh-vbeln.
i_employee-tmsdt = ztmsh-tmsdt.
i_employee-jbcpl = ztmsh-jbcpl.
APPEND i_employee.
endif.
endif.
elseif dept = 'X'. "Report By Department
uncommenting the below will work for normal time scenario
(eg: 2.55+3.55 =6.50)
and change in the appending coloum wa_ to t_
perform min_to_hrs_HLFTM using wa_HLFTM changing t_HLFTM.
perform min_to_hrs_DBLTM using wa_DBLTM changing t_DBLTM.
Appending To internal Table
i_department-deprt = ztmsh-deprt.
i_department-nmltm = wa_nmltm.
i_department-ovrtm = wa_ovrtm.
i_department-meala = wa_meala.
i_department-sitea = wa_sitea.
i_department-vbeln = ztmsh-vbeln.
i_department-tmsdt = ztmsh-tmsdt.
i_department-jbcpl = ztmsh-jbcpl.
i_department-hlftm = t_hlftm.
i_department-dbltm = t_dbltm.
APPEND i_department.
endif.
endif.
ENDFORM. " empl_calcuation
*& Form min_to_hrs_nmltm
text
-->P_WA_NMLTM text
FORM min_to_hrs_nmltm USING P_WA_NMLTM
CHANGING P_T_nmltm.
data : hours(2) type c,
minutes_n(2) type c,
nmltm(10) type c.
if p_wa_nmltm >= 60.
hours = P_WA_NMLTM / 60.
endif.
minutes_n = P_WA_NMLTM MOD 60.
concatenate hours
minutes_n
into P_T_nmltm.
ENDFORM. " min_to_hrs_nmltm
*& Form min_to_hrs_ovrtm
text
FORM min_to_hrs_ovrtm USING P_WA_OVRTM
CHANGING P_T_OVRTM.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_ovrtm >= 60.
hours = P_WA_OVRTM / 60.
endif.
minutes_n = P_WA_OVRTM MOD 60.
concatenate hours
minutes_n
into P_T_OVRTM.
ENDFORM. " min_to_hrs_ovrtm
*& Form min_to_hrs_meala
FORM min_to_hrs_meala USING P_WA_meala
CHANGING P_T_MEALA.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_meala >= 60.
hours = P_WA_meala / 60.
endif.
minutes_n = P_WA_meala MOD 60.
concatenate hours
minutes_n
into P_T_meala.
ENDFORM. " min_to_hrs_meala
*& Form min_to_hrs_sitea
FORM min_to_hrs_sitea USING P_WA_sitea
CHANGING P_T_SITEA.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_sitea >= 60.
hours = P_WA_sitea / 60.
endif.
minutes_n = P_WA_sitea MOD 60.
concatenate hours
minutes_n
into P_T_sitea.
ENDFORM. " min_to_hrs_sitea
*& Form min_to_hrs_HLFTM
FORM min_to_hrs_HLFTM USING P_WA_HLFTM
CHANGING P_T_HLFTM.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_hlftm >= 60.
hours = P_WA_HLFTM / 60.
endif.
minutes_n = P_WA_HLFTM MOD 60.
concatenate hours
minutes_n
into P_T_HLFTM.
ENDFORM. " min_to_hrs_HLFTM
*& Form min_to_hrs_DBLTM
FORM min_to_hrs_DBLTM USING P_WA_DBLTM
CHANGING P_T_DBLTM.
data : hours(2) type c,
minutes_n(2) type c.
if p_wa_dbltm >= 60.
hours = P_WA_DBLTM / 60.
endif.
minutes_n = P_WA_DBLTM MOD 60.
concatenate hours
minutes_n
into P_T_DBLTM.
ENDFORM. " min_to_hrs_DBLTM
*& Form design_report
FORM design_report .
select * into corresponding fields of table i_detail
from ztmsh for all entries in i_t_dept
where vbeln = i_t_dept-vbeln
and deprt = i_t_dept-deprt
and tmsdt = i_t_dept-tmsdt .
loop at i_detail.
read table i_t_dept with key vbeln = i_detail-vbeln
deprt = i_detail-deprt
tmsdt = i_detail-tmsdt .
if sy-subrc = 0.
i_detail-nmltm = i_t_dept-nmltm.
i_detail-ovrtm = i_t_dept-ovrtm.
modify i_detail.
endif.
endloop.
ENDFORM. " design_report
*& Form transfer_table
Doin some operation using the checkbox
FORM transfer_table .
clear i_t_dept[].
loop at i_department where checkbox = 'X'.
move-corresponding : i_department to i_t_dept.
append i_t_dept.
endloop.
ENDFORM. " transfer_table
Regards,
karthik.
Edited by: karthikeyan sukumar on Jan 3, 2008 9:46 AM -
Question on Dynamic Select Lists and Checkboxes
Hello,
I am new to APEX, and this is my first posting, I have a question about how to implement dynamic checkboxes from a select list.
Basically I would have a select list, and based on what item is selected a set of checkboxes would appear.
I was originally using the Select and Submit property on the select box, which works fine, all of the checkboxes appear appropriately. But the thing is, APEX refreshes the page each time, and since this select box is lower in the page, the user would have to scroll all the way down to where they were before.
The main requirement is so that the user won't have to scroll down the that position where the select box is each time they select a new option.
So a work around attempt is to create a javascript that will automatically scroll down to that position on page load ...
i.e.
function pageScroll() {
window.scrollBy(0,50);
But that didn't work, because for some reason the javascript wasn't appearing.
Is there a way to either:
1. Have a dynamic checkbox appear using ajax? -or-
2. Have the javascript scrolling effect
Sorry if this is a confusing question, I was wondering if anyone else came across this issue.
Thanks in advance!!Since this Select List plays such an important role on the page, why not create a side-region and put that select list there so you don't have to overwhelm the user and his 'persistence of vision ' with a page that scrolls all by itself to the 1000th line to, then , change the options ?
just an idea. -
Generate Comp based on dropdown list and checkbox selection?
I currently have a dropdown list with three sizing options in it. Then I have two check mark boxes, one if checked ideally would create the template at its normal composition size and if the other checkbox is checked it would inverse the widthxheight of the composition size. Then below that I have a "generate" button that I want to be able to click and depending on my selections it creates the comp.
It sounds like I need some sort of if then statement but I'm having a hard time putting the two together. See below what I have so far.
There may be parts missing but I have it all working in a decibel pallate currently. I just don't have the functionality tied to a button yet.
Any help would be much appreciated!!!
(also I don't know how to format the extend script on here so apologies for that)
// palette controls
templateGen.VerticalCheckbox = new Object();
templateGen.HorizontalCheckbox = new Object();
// define values for the controls
templateGen.comLookup = new Object();
templateGen.compLookup = 'Template1';
templateGen.compLookup = 'Template2';
templateGen.compLookup = 'Template3';
function templateGen_getHashValues(hash)
var ary = new Array();
for (k in hash) {
ary.push(hash[k]);
return ary;
// "composition" menu
var panelGrp1 = templateGen.palette.add('Panel', undefined, 'Comp Templates');
compGrp1 = panelGrp1.add('group', undefined, 'Templates List');
compGrp2 = panelGrp1.add('group', undefined, 'Orientation');
compGrp3 = panelGrp1.add('group', undefined, 'Generate');
templateGen.compList = compGrp1.add('dropdownlist', LIST_DIMENSIONS, templateGen_getHashValues(bapple.compLookup));
templateGen.compList.helpTip = "Choose the type device template you want here. All comps are 60fps.";
templateGen.compList.selection = 'Template1';
templateGen.compList.graphics.foregroundColor = darkColorBrush;
templateGen.VerticalCheckbox = compGrp2.add('checkbox', undefined, 'Vertical');
templateGen.VerticalCheckbox .value = true;
templateGen.HorizontalCheckbox = compGrp2.add('checkbox', undefined, 'Horizontal');
templateGen.HorizontalCheckbox .value = false;
templateGen.generateBtn1 = compGrp3.add('button', undefined, 'Generate');
//applyBtn.onClick =????;When I work with dropdowns I always like to attach the data they represent (like width and height of the comp in this case) directly to the items.
I didn't execute the code to really check it, but it should work like this:
// add templates to your dropdown and store the items in an array
var templates = [];
templates[0] = templateGen.compList.add('item','template1');
templates[1] = templateGen.compList.add('item','template2');
templates[2] = templateGen.compList.add('item','template3');
// attach a width and height to each item
templates[0].width= 1280;
templates[0].height= 720;
templates[1].width= 1024;
templates[1].height= 768;
templates[2].width= 1920;
templates[2].height= 1080;
// choose the item that should be selected by default
templates[0].selected = true;
applyBtn.onClick = function(){
// read the width and height from the selected item
var width = templateGen.compList.selection.width;
var height =templateGen.compList.selection.height;
if(templateGen.VerticalCheckbox.value){
// swap width and height
var temp = width;
width = height;
height = temp;
// now create your comp here with the given width and height
Maybe you are looking for
-
I got an iPhone 5c a little under a month ago, and haven't been able to put music on it since then. iTunes keeps trying to sync contacts and calendars, which I already have in place on the phone (via iCloud). However, when my I plugged my moms brand
-
Can't update my iPod 30gb vision + problem uploading songs on it.
I could upload songs to my iPod in the beginning, but then I connected the iPod with iTunes on a mac and from that time I'm not able to upload any new songs on it anymore. So I downloaded the new itunes V 7 to see if it maybe would work with it, but
-
How can I remove backups on the backup disk by date
I want to save some room on my Time Machine drive. Time Machine keeps weekly backups endlessly. What I want to do is for longer ago, I only want a monthly backup. I know these backups are just hard links if nothing has changed, but removing older bac
-
1099 Issues in ECC6 -Urgen)
This is a new ECC6 implementation and first time 1099 reporting from SAP We are facing two issues with 1099-MISC reporting. I guess these are not unique problems and you might have faced in other projects as well. 1. We have multiple vendor records/n
-
Importing graphics... blurry or possible to make clickable?
Admittedly, I am no expert with this software but Ive been using it for over 10 years and I am stumped (probably due to exhaustion and a failing memory). What I am trying to do is so simple, and yet I cant seem to find the right process for the end r