Return to selected row with refresh after update in edit form
Hi,
I created a database view.When selected a single row and click on button i can edit the row in a form for update.What i want, when doing some update and click on the commit button i return back on the initial row with a refresh to see the update done on this row.I succeeded to modify the form and commit.But when i return on the selected row my update is not visible.How can i return to the same selected row with a refresh.In oracle form i can do a go record with execute_query, but how to do this in ADF.Please someone can help so that i do not spend many days on it.
Thanks
Soodesh
[click for the tutorial|http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&ved=0CFQQFjAF&url=http%3A%2F%2Fandrejusb.blogspot.com%2F2013%2F03%2Fadf-rollback-and-keep-current-row.html&ei=Tnl3Ucn3BoXIrQeemICQAw&usg=AFQjCNHdYcJL8kJKymqbWBT9XDGTWmeUvQ&bvm=bv.45580626,d.bmk&cad=rja]
here you go :)
Similar Messages
-
[Solved] ADF BC - Correlation of Refresh After Update checkbox with Returni
Hello all,
As per JDev (10.1.3.3.0) help system Refresh After Update option is used when there is Before Update trigger on a table.
As far as I know ADF BC framework is using Returing clause of an Update statement to implement Refresh After Update option.
First of all I created the following objects in Oracle DB 10.2.0.3.0:
CREATE TABLE TAB1
ID NUMBER PRIMARY KEY,
EDITED_AT DATE,
VALUE VARCHAR2(64)
CREATE SEQUENCE S_TAB1
INCREMENT BY 1
START WITH 1;
CREATE TRIGGER T_TAB1_BIE
BEFORE INSERT OR UPDATE ON TAB1
FOR EACH ROW
BEGIN
IF INSERTING THEN
SELECT S_TAB1.NEXTVAL INTO :NEW.ID FROM DUAL;
END IF;
:NEW.EDITED_AT := SYSDATE;
END;
/Taking into consideration aforesaid I tried to do the following in SQL Plus:
SQL> insert into tab1(value) values('ddd');
1 row created.
SQL> commit;
Commit complete.
SQL>
SQL> select * from tab1;
ID EDITED_AT VALUE
1 27.03.2008 17:01:24 ddd
SQL>
SQL> declare dt date; val varchar2(64);
2 begin update tab1 set value = 'ddd' where id = 1 returning edited_at, value into dt, val;
3 dbms_output.put_line('txt = ' || dt || ', ' || val);
4 end;
5 /
txt = 27.03.2008 17:01:24, ddd
PL/SQL procedure successfully completed.
SQL>
SQL> select * from tab1;
ID EDITED_AT VALUE
1 27.03.2008 17:02:12 ddd
SQL>As it can be seen Returning clause of an Update statement does not return a new date, i.e. 27.03.2008 17:02:12, that was updated by the trigger, it returns an old one - 27.03.2008 17:01:24.
Should I change any parameter in Oracle DB or what can I do that ADF BC refreshes values generated by a Before Trigger?Yerzhant,
Something is certainly not right. I don't have a 10.2.0.3.0 instance handy at the moment, but I tried verbatim your example in 11.1.0.6.0, and it works properly.
I am using this capability all over the place in ADF BC with no problems, database versions from 10gr1 to 11gr1.
Perhaps time to contact support.
John -
I am facing problems with mails after update iPhone 4S/io7. I have configured yahoo mail in iPhone 4S. When I click on refresh, it shows new mail downloaded but when I go inside inbox the new mail don't show up. Can anyone help me with this iOS 7 issue ?
Hi were you able to resolve yours?
I was very worried losing all my medical stuff on my iPad Air 2, plus i have nothing to use for the next day! So i have to try all the possible things i read on the internet!! And this worked on my part (Thank God, and thank you Google)
Perform a hard reboot
Hold down the Home button and Power button on your iPhone or iPad and keep holding them until you see the Apple logo. Once you do, you can let go. When your device boots back up, go ahead and check to see if the apps have started re-downloading. If they still appear to be stuck, continue on. -
How do I return to OSX 10.7.3 after update. I´ve have only troubles with 10.7.4 update
You can only "downgrade" if you wipe (erase) your hard drive. So, if you made a bootable clone or have an up to date Time Machine backup with 10.7.3, you can boot from the bootable clone, erase the internal drive, and clone your old system back. Not 100% sure about the steps using Time Machine since I don't use it,but there are excellent articles available which I can link to.
As far as I know, the problem with installing an earlier version would be that once you check Software Update, you can no longer choose to download a Combo update of a different/earlier version since Lion is only available through MAS. So, if you check it, it will most likely only offer you the current/latest version. -
Bug at "refresh after update "
I have an EO, PK (CODPEDV,CODPROD), with two (CANT_APROB, CANT_PROG) attributes defined as "Refresh after Update" in
the Attribute Settings of the EO, as they are being corrected by a Trigger on Update in the DB. all that is Ok;
but, What if my update involves the PK of the EO (CODPEDV)?, here's the result:
Error Message: JBO-26041: Failed to post data to database during "Update":
SQL Statement "BEGIN UPDATE ITEM_PEDIDO_VENTA ItemPedidoVenta SET CODPEDV=:1 WHERE CODPEDV=:2 AND CODPROD=:3;
SELECT CANT_APROB, CANT_PROG INTO :4, :5 FROM ITEM_PEDIDO_VENTA ItemPedidoVenta WHERE CODPEDV=:6 AND CODPROD=:7; END;".
As i suppose, the FrameWork is trying to bring the values back for the Attributes updated from the DB of a Row that
no longer exists (CODPEDV,CODPROD) , because was changed by the first sentence (CODPEDV). I'm Wrong??
Alex.
(I've already got a workaround for my case)
nullYes, you're right. And it sounds like you already have a workaround.
Blaise -
Regarding "Change Indicator + History Column + Refresh After Update"
Hi,
In our app, we are not using any separate column for change indicator and using LastUpdateDate as both Change Indicator and History Column(Modified On) as well.
The problem is that when 'Refresh After Update' option is not selected for this column, then RowInconsistentException is throw on commit for multi user scenario, and when 'Refresh After Update' option is selected for this column, then exception is not thrown but value is also not updated. Here is the summary of observations:
Settings for LastUpdateDate Column:
Only Setting History Column (Modified on)
Single User - Value Updated , no exception is thrown.
Multi User - throws (oracle.jbo.RowInconsistentException) JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[3 ]. for second user.
History Column ( Modified on ) & Change Indicator property checked.
Single User - Value Updated , no exception
Multi User - throws (oracle.jbo.RowInconsistentException) JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[3 ]. for second user.
History Column ( Modified on ) & Change Indicator property checked & Refresh After Update option enabled.
Single User - Value not updated, no exception thrown
Multi User - Value not updated, no exception thrown
What I want is that in multi user scenario, the value of LastUpdateColumn should be updated and no exception should also be thrown.
Is this a bug in ADF Techstack or am I missing something?
Thanks,
Lalit.First and Second scenario are as expected.
1) Only Setting History Column (Modified on)-> Last updated value will be updated when a user changes anything in that entity. But if another user tries to update the entity on top of a stale state then lost update detection is performed by ADF by comparing every attribute of entity against current values in database. So it will give error.
2) History Column ( Modified on ) & Change Indicator property checked.
Same thing will happen as in case of first scenario but this time detection of lost update will be more efficient as framework will check only that column for "lost update" detection for which change indicator is selected.
But for the third one where you have selected the history column LastUpdatedDate as a change indicator with "Refresh On Update" selected, the behaviour is strange. I do not know why the last updated date is not updated after a commit. It does not throw any error also which it actually should. It is not detecting lost updates in this scenario. Probably because the only change indicator LastUpdatedDate is not changed.
Regards,
Harmeet -
I'm having problems with itunes after updating. I've lost all my playlists,,finally played around with it and got the songs back but some have an exclamation point beside them and can't be located. they are songs i've purchased. I'm not very computer literate so this is a major problem. I have spent hours with this. I just want all my songs to play even though I'm not happy that I have to recreate my playlists. It would be so much easier if I knew and understood how to correct this. Has anyone else had this problem and if so..is there an easy way to correct it?
Not sure how this is an ipod touch question.
Perhaps you should post in the itunes forum. -
Trouble with safari after updating SL 10.6.8
I updated my OS last night to 10.6.8 and today, in Safari I find that I cannot view amazon.com When I open a page, much of it is blank. Anyone else having trouble with amazon after updating to 10.6.8?
michelle(This is a copy of my post in this thread.)
I updated to 10.6.8 too, was suddenly unable to print to my before perfectly working printer (an HP Color LaserJet CP1515n hooked up to an AirPort Express), and started scouring the web for solutions. The more I tried, the more disappointed and frustrated I became. Then I came here, read about a possible solution in this very thread (the disk image 'Repair10.6.8.dmg') and became hopeful again.
But alas...
Sadly, this isn't working for me at all. I ran the script that supposedly fixes the print problems introduced in 10.6.8, but the print jobs still all pause the printer and fail with a 'broken pipe' error. It has nothing to do with the USB cable, as I can print just fine with the printer directly hooked up to my Mac wit that very same cable. I reinstalled the drivers, updated my printer's firmware, ran the repair script twice just to be sure, reset the printing system, even deleted all preference files with 'hp' in the name and having to do with printing, restarted my Mac. All with no result.
Man, this is so frustrating! Anybody with any other suggestions or possible solutions? -
I am having problem with iMessage after updating my 5s to iOS 8.0.2
I am having problem with iMessage after updating my 5s to iOS 8.0.2. I cannot send any text by iMessage anymore. My friend tries to text me and it did not go through
Hello Huyen,
Thank you for using Apple Support Communities.
You can use the following article to troubleshoot Messages:
iOS: Troubleshooting Messages
Regards,
Jeff D. -
Web dynpro screen with multiple rows with columns that can be edited
Web dynpro screen with multiple rows with columns that can be edited individually:
Hi
I am busy creating a screen in web dynpro for ABAP which we would like to make available via Portal ESS (Portal 7).
I need to add 'n type of table (or almost something like Excel) or something in which someone can type a few paycode numbers (there should be lets say 10 blank rows in which info can be typed in and if I click on a button or so, more rows must be added if necessary. Then in the other colums stuff like amounts must be entered which one should also be able to edit then and there.
Can anyone assist in what I can use for this? There does not seem to be some existing element that I can use.
Help will be appreciated.
Regards
DebbieHi Debbie,
Whiel Creating table you need to be care full that use chose INPUT FIELD as the CELL EDITOR. Just guessing that if ur table is not editable u might have choosen TextView as default cell editor type.
check link for details on TABLE UI
[http://help.sap.com/saphelp_erp2005/helpdata/EN/b5/ac884118aa1709e10000000a155106/frameset.htm]
easy way is to first add UI ELEMENT TABLE to your VIEW, then right click over it & select create binding from context. After you have a pop up where you can select what columns you want what should be its cell editor etc.
Greetings
Prashant -
Has anyone had an issue with the app scramble with friends after upgrading to iOS 6. Tapping the screen will not select the tiles and hold them.
Yes I am having the same problem. I can't find any info about it and nothing seems to help. I am just posting this in hope that if it's a wider problem, there will be a quick solution.
-
Selection Screen getting refreshed after execution..
Hello All,
I have a strange problem..
My selection-screen values are getting refreshed after execution and come back to selection screen. I am using normal ALV Fm to display the values. Can some suggest a possible reason?
Many thanks,
V NairNo .. I have checked it..Selection variables are not getting refreshed.
My Code Below
REPORT yhr_icm_exception_report.
Type Pool declarations
TYPE-POOLS: slis, "For AlV
sdydo, "Dynamic Documents
icon. "For ICON
Table declarations
TABLES : yhr_icm_exp_log, "ICM Exceptions Log
yhr_icm_exp_hist. "ICM Exception History
Include Constants
INCLUDE yhr_icm_constants . "Program to hold constants
Types declarations
*-To hold return field
TYPES: BEGIN OF ty_returntab.
INCLUDE STRUCTURE ddshretval. "Interface Structure
TYPES: END OF ty_returntab.
*-To hold deletion records
TYPES : BEGIN OF ty_icm_del,
tab_name TYPE yhr_tabname, "Internal table name
objid TYPE hrobjid, "Object ID
begda TYPE begda, "Begin Date
otype TYPE otype, "Object Type
END OF ty_icm_del.
*-Message details to be displayed
TYPES : BEGIN OF ty_message,
msgnr TYPE msgno, "System message number
text TYPE yhr_icm_exp_log-msgxx, "Message Text
END OF ty_message.
*-To hold exception log
TYPES : BEGIN OF ty_icm_exp_log,
msgno TYPE msgnr, "Message number
run_id TYPE yhr_icm_erun_id, "Exception Run ID
delta_id TYPE yhr_icm_run_id, "Run ID
record_type TYPE yhr_icm_exp_type, "Record Type
otype TYPE yhr_otype, "Object Type
objid TYPE hrobjid, "Object ID
begda TYPE begda, "Begin Date
msgxx TYPE msgxx, "Message
status TYPE yhr_icm_icon, "Status
delta_relevance TYPE yhr_delta_rel, "Delta Relevance
END OF ty_icm_exp_log.
*-To hold email attachment
TYPES: BEGIN OF ty_attach,
text(500) TYPE c, "Text
END OF ty_attach.
*To hold object type & text
TYPES :BEGIN OF ty_objid_text,
objid TYPE objid, "Object ID
text TYPE emnam, "Object Text
END OF ty_objid_text.
*-To hold counter values - Exp , Del & historical
TYPES :BEGIN OF ty_count,
exp(10) TYPE c, "Exceptions
del(10) TYPE c, "Deletions
hist(10) TYPE c, "Historical Deletions
END OF ty_count.
*- To hold lock details
TYPES : BEGIN OF ty_lock,
live TYPE c, "Live Callidus Program
genr TYPE c, "Generation Program
exp TYPE c, "Exception Program
END OF ty_lock.
Range Declarations
RANGES :
gr_objid FOR hrp1001-objid, "Range for Object ID
gr_pernr FOR pa0000-pernr. "Range for Employee number
Internal Table Declarations
DATA : gt_records TYPE STANDARD TABLE OF yhr_icm_exp_report,
gt_objid_text TYPE STANDARD TABLE OF ty_objid_text,
gt_icm_exp_log TYPE STANDARD TABLE OF ty_icm_exp_log,
gt_returntab TYPE STANDARD TABLE OF ty_returntab,
gt_t777o TYPE STANDARD TABLE OF t777o,
gt_diff_tab TYPE STANDARD TABLE OF yhr_icm_diff,
gt_del_tab TYPE STANDARD TABLE OF ty_icm_del, "#EC *
gt_iattach TYPE STANDARD TABLE OF ty_attach,
gt_message TYPE STANDARD TABLE OF ty_message,
gt_fieldcat TYPE slis_t_fieldcat_alv,
gt_heading TYPE slis_t_listheader,
gt_exceptions TYPE yhr_icm_exp_list_t,
gt_events TYPE slis_t_event.
Structure Declarations
DATA : gs_objid_text TYPE ty_objid_text,
gs_icm_exp_log TYPE ty_icm_exp_log,
gs_records TYPE yhr_icm_exp_report,
gs_exceptions TYPE yhr_icm_exp_list,
gs_count TYPE ty_count,
gs_fieldcat TYPE slis_fieldcat_alv, "#EC *
gs_returntab TYPE ty_returntab,
gs_icm_exp_hist TYPE yhr_icm_exp_hist,
gs_iattach TYPE ty_attach,
gs_message TYPE ty_message, "#EC *
gs_layout TYPE slis_layout_alv,
gs_t777o TYPE t777o,
gs_lock TYPE ty_lock.
Constant declarations
CONSTANTS:
c_yes TYPE string VALUE 'YES',
c_no TYPE string VALUE 'NO',
c_true TYPE c VALUE 'X',
c_deletions TYPE c VALUE 'D',
c_delta_no TYPE c VALUE 'N',
c_delta_yes TYPE c VALUE 'Y',
c_historical TYPE c VALUE 'H',
c_a TYPE c VALUE 'A',
c_error TYPE c VALUE 'E',
c_equal(2) TYPE c VALUE 'EQ',
c_participants TYPE c VALUE 'P',
c_include TYPE c VALUE 'I',
c_position TYPE c VALUE 'S',
c_organization TYPE c VALUE 'O',
c_runlock TYPE string VALUE 'RUN_LOCK',
c_parameter TYPE string VALUE 'P',
c_selfield TYPE string VALUE 'SEL_FIELD' ,
c_type TYPE string VALUE 'TYPE',
c_topofpage TYPE string VALUE 'TOP_OF_PAGE',
c_rectype TYPE string VALUE ' S_RECTYPE',
c_objectkey TYPE string VALUE 'OBJECTKEY1',
c_icon_green TYPE string VALUE '@08@',
c_icon_red TYPE string VALUE '@0A@',
c_icon_amber TYPE string VALUE '@09@',
c_green TYPE string VALUE 'GREEN',
c_amber TYPE string VALUE 'AMBER',
c_red TYPE string VALUE 'RED',
c_tabname TYPE slis_tabname VALUE 'GT_RECORDS',
c_structname TYPE dd02l-tabname VALUE 'YHR_ICM_EXP_REPORT' ,
c_siwb_wallpaper TYPE sdydo_key VALUE 'SIWB_WALLPAPER',
c_user_command TYPE slis_formname VALUE 'F01_ALV_EVENT_USER_COMMAND',
c_genname TYPE trdir-name VALUE 'YHR_ICM_GENERATE_EXCEPTIONS',
c_expname TYPE trdir-name VALUE 'YHR_ICM_EXCEPTION_REPORT',
c_pf_status TYPE slis_formname VALUE 'SET_PF_STATUS',
c_msg_class TYPE string VALUE 'YHR_ICM'.
Global Variable Declarations
DATA: gv_email_error TYPE c,
gv_email_sent TYPE c,
gv_exit TYPE c.
Selection Screen - Block I
SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-s07.
SELECT-OPTIONS:
*- Run ID
s_run_id FOR yhr_icm_exp_hist-run_id,
*- Exception Type
s_rectyp FOR yhr_icm_exp_log-record_type NO INTERVALS,
*- Object Type
s_otype FOR yhr_icm_exp_log-otype NO INTERVALS,
*- Object ID
s_objid FOR yhr_icm_exp_log-objid NO INTERVALS,
*- Start Date
s_begda FOR yhr_icm_exp_log-begda,
*- Message number
s_msgno FOR yhr_icm_exp_log-msgno,
*- Message Text
s_msgxx FOR yhr_icm_exp_log-msgxx.
SELECT-OPTIONS:
*- Delta Relevance
s_relv FOR yhr_icm_exp_log-delta_relevance NO INTERVALS.
PARAMETERS:
*- Long Text
p_ltext AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN: END OF BLOCK b3.
Selection Screen - Block II
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-s08.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(14) text-033.
*-Sucess
PARAMETERS:
p_stat_s AS CHECKBOX. "D11K917251
SELECTION-SCREEN COMMENT 24(14) text-034.
*-Warning
PARAMETERS:
p_stat_w AS CHECKBOX. "D11K917251
SELECTION-SCREEN COMMENT 48(15) text-035.
PARAMETERS:
*-Error
p_stat_e AS CHECKBOX . "D11K917251
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK b2.
Selection Screen - Block III
SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE text-s09.
*-Email Details
PARAMETERS:
p_email(128) TYPE c.
SELECTION-SCREEN: END OF BLOCK b4.
Selection Screen on value request.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_msgno-low.
PERFORM f4_message.
Selection Screen Output.
AT SELECTION-SCREEN OUTPUT.
CHECK gt_returntab[] IS NOT INITIAL.
REFRESH s_msgno.
s_msgno-option = c_equal.
s_msgno-sign = c_include.
LOOP AT gt_returntab INTO gs_returntab.
s_msgno-low = gs_returntab-fieldval.
s_msgno-high = space.
APPEND s_msgno.
ENDLOOP.
At Selection Screen for Validation
AT SELECTION-SCREEN.
CLEAR gv_email_error.
*-Validate Object Type
PERFORM validate_objecttype.
*-Validate Exception ID
PERFORM fetch_exp_header.
*-Validate Exception Type
PERFORM validate_exptype.
*-Validate Message Number
PERFORM validate_msgno.
*-Validate Message Type
PERFORM validate_msgtype.
*-Validate Delta
PERFORM validate_delta.
*-Validate Email ID
PERFORM validate_email USING p_email
CHANGING gv_email_error.
IF gv_email_error IS NOT INITIAL.
MESSAGE e000(yhr_icm) WITH text-027.
ENDIF.
Initialization
INITIALIZATION.
Initialization
PERFORM initialization.
Start Of Selection
START-OF-SELECTION.
CLEAR : gv_email_error,
gv_email_sent,
gv_exit,
gs_lock.
Try locking the main program
PERFORM lock_generation_program.
CHECK gs_lock IS INITIAL.
*-Fetch the messages stored in table
PERFORM fetch_item_records.
Read object type text.
PERFORM read_text.
Get Object Text
PERFORM get_object_text.
*-Fetch the current SAP messages
PERFORM fetch_records.
*-Update Delta Flag
PERFORM update_delta_flag.
*-Compare messages in table & in SAP
PERFORM compare_message.
If receiver is not blank, try sending out mail
PERFORM send_mail USING p_email.
End Of Selection
END-OF-SELECTION.
IF gv_exit IS NOT INITIAL.
EXIT.
ENDIF.
*-Display ALV
PERFORM display_alv.
*-Build the event table for ALV display
PERFORM build_eventtab CHANGING gt_events[].
*-Fill the layout details
PERFORM layout_build .
Release all locks
PERFORM release_locks.
*-Finally call the grid display
PERFORM display_data.
*& Form set_pf_status
text
-->RT_EXTAB text
FORM set_pf_status USING rt_extab TYPE slis_t_extab. "#EC *
Set PF Status
SET PF-STATUS 'STANDARD'.
ENDFORM. "Set_pf_status
*& Form DISPLAY_ALV
text
--> p1 text
<-- p2 text
FORM display_alv .
*- Use FM to create field catalog
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = c_tabname
i_structure_name = c_structname
CHANGING
ct_fieldcat = gt_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 1
OTHERS = 1.
IF sy-subrc = 1.
MESSAGE i000(yhr_icm) WITH text-001.
EXIT.
ENDIF.
*- Remove SEL Field Column as it is not required
DELETE gt_fieldcat WHERE fieldname = c_selfield.
*-If user chooses long text, activate icon
IF p_ltext IS INITIAL.
LOOP AT gt_fieldcat INTO gs_fieldcat WHERE fieldname = c_type.
gs_fieldcat-icon = c_true.
ENDLOOP.
ENDIF.
ENDFORM. " DISPLAY_ALV
*& Form BUILD_EVENTTAB
text
<--P_GT_EVENTS[] text
FORM build_eventtab CHANGING p_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
*-Get the list of event for alv
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = p_events.
*-Add top of page event to event list
READ TABLE p_events
WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE c_topofpage TO ls_event-form.
APPEND ls_event TO p_events.
ENDIF.
ENDFORM. " BUILD_EVENTTAB
*& Form LAYOUT_BUILD
text
--> p1 text
<-- p2 text
FORM layout_build .
gs_layout-zebra = c_true.
gs_layout-colwidth_optimize = c_true.
gs_layout-detail_popup = c_true.
gs_layout-detail_initial_lines = c_true.
gs_layout-detail_titlebar = text-044.
gs_layout-box_fieldname = c_selfield.
ENDFORM. " LAYOUT_BUILD
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data .
*-Display ALV display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_user_command = c_user_command
i_background_id = c_siwb_wallpaper
i_callback_program = sy-repid
i_callback_pf_status_set = c_pf_status
i_default = c_true
i_save = c_a
is_layout = gs_layout
it_fieldcat = gt_fieldcat
it_events = gt_events
TABLES
t_outtab = gt_records.
ENDFORM. " DISPLAY_DATA
*& Form FETCH_RECORDS
text
--> p1 text
<-- p2 text
FORM fetch_records .
REFRESH : gt_diff_tab,
gt_del_tab,
gr_pernr,
gt_exceptions.
CLEAR: gs_icm_exp_log.
*-Get Employee details
PERFORM get_person_data.
*-Get Position Details
PERFORM get_position_data.
*-Get Organization Details
PERFORM get_org_data.
*-Get Exception current SAP exception list.
PERFORM get_exception_list.
*-Add deletion records
PERFORM filter_deletions.
ENDFORM. " FETCH_RECORDS
*& Form top_of_page
text
FORM top_of_page. "#EC *
PERFORM build_comment USING gt_heading.
*-Display Use FM to display Top Of Page
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_heading[].
CLEAR gt_heading.
ENDFORM. "TOP_OF_PAGE
*& Form build_comment
text
-->P_HEADING text
FORM build_comment USING p_heading TYPE slis_t_listheader.
DATA: ls_hline TYPE slis_listheader,
lv_text(120) TYPE c.
*-Display report title
ls_hline-typ = c_historical.
WRITE text-006 TO lv_text.
ls_hline-info = lv_text.
APPEND ls_hline TO p_heading.
CLEAR ls_hline.
ls_hline-typ = c_s.
*-Remove leading & trailing spaces
CONDENSE : gs_count-del, gs_count-exp, gs_count-hist.
*-If the count is space then pass 0
IF gs_count-del = space.
gs_count-del = 0.
ENDIF.
IF gs_count-exp = space.
gs_count-exp = 0.
ENDIF.
IF gs_count-hist = space.
gs_count-hist = 0.
ENDIF.
IF gs_lock IS INITIAL.
*-Display Deletion, Exception, Historical Count
CONCATENATE text-037 gs_count-del
text-032 gs_count-exp
text-039 gs_count-hist
INTO ls_hline-info SEPARATED BY space.
ELSEIF gs_lock-live IS NOT INITIAL.
ls_hline-info = text-007.
ELSEIF gs_lock-genr IS NOT INITIAL.
ls_hline-info = text-008.
ELSEIF gs_lock-exp IS NOT INITIAL.
ls_hline-info = text-009.
ENDIF.
APPEND ls_hline TO p_heading.
CLEAR ls_hline.
ENDFORM. "BUILD_COMMENT
*& Form INITIALIZATION
text
--> p1 text
<-- p2 text
FORM initialization .
Read Previous run
SELECT MAX( run_id )
INTO s_run_id-low
FROM yhr_icm_exp_hist. "#EC *
s_run_id-option = c_equal.
s_run_id-sign = c_include.
APPEND s_run_id.
s_rectyp-option = c_equal.
s_rectyp-sign = c_include.
s_rectyp-low = c_error.
APPEND s_rectyp.
s_rectyp-low = c_deletions.
APPEND s_rectyp.
PERFORM restrict_selections.
*Get the message from Message Class YHR_ICM
SELECT msgnr
text
FROM t100
INTO TABLE gt_message
WHERE arbgb = c_msg_class AND
msgnr GT '000'. "#EC *
ENDFORM. " INITIALIZATION
*& Form F4_MESSAGE
text
<--P_P_MSGNO text
FORM f4_message.
F4 Help - Display all messages
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MSGNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'S_MSGNR'
window_title = text-045
value_org = c_s
multiple_choice = c_true
TABLES
value_tab = gt_message
return_tab = gt_returntab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 1.
IF sy-subrc = 1.
MESSAGE i000(yhr_icm) WITH text-002.
EXIT.
ELSEIF sy-subrc = 2.
MESSAGE i000(yhr_icm) WITH text-003.
EXIT.
ENDIF.
ENDFORM. " F4_MESSAGE
*& Form VALIDATE_OBJECTTYPE
text
--> p1 text
<-- p2 text
FORM validate_objecttype .
CHECK s_otype-low IS NOT INITIAL.
CONDENSE s_otype-low.
Validate object type to check whether user has entered only S, P or O
IF s_otype-low NE c_organization AND
s_otype-low NE c_position AND
s_otype-low NE c_participants .
MESSAGE e000(yhr_icm) WITH 'Enter either S(Position), P(Person) or O(Org Unit)'(021).
ENDIF.
ENDFORM. " VALIDATE_OBJECTTYPE
*& Form VALIDATE_OBJECTTYPE
FORM f01_alv_event_user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield."#EC *
DATA : lv_answer TYPE c,
lt_fields TYPE STANDARD TABLE OF sval,
ls_fields TYPE sval.
*-Get the row user has selected in ALV list
READ TABLE gt_records INTO gs_records INDEX rs_selfield-tabindex.
CASE r_ucomm.
WHEN 'DISP'.
CASE gs_records-otype.
WHEN 'S'.
SET PARAMETER ID 'POT' FIELD gs_records-otype.
SET PARAMETER ID 'PON' FIELD gs_records-objid.
CALL TRANSACTION 'PP01_DISP' AND SKIP FIRST SCREEN.
WHEN 'P'.
SET PARAMETER ID 'PER' FIELD gs_records-objid.
CALL TRANSACTION 'PA20' AND SKIP FIRST SCREEN.
WHEN 'O'.
SET PARAMETER ID 'POT' FIELD gs_records-otype.
SET PARAMETER ID 'PON' FIELD gs_records-objid.
CALL TRANSACTION 'PP01_DISP' AND SKIP FIRST SCREEN.
ENDCASE.
WHEN 'CHNG'.
CASE gs_records-otype.
WHEN 'S'.
SET PARAMETER ID 'POT' FIELD gs_records-otype.
SET PARAMETER ID 'PON' FIELD gs_records-objid.
CALL TRANSACTION 'PP01' AND SKIP FIRST SCREEN.
WHEN 'P'.
SET PARAMETER ID 'PER' FIELD gs_records-objid.
CALL TRANSACTION 'PA30' AND SKIP FIRST SCREEN.
WHEN 'O'.
SET PARAMETER ID 'POT' FIELD gs_records-otype.
SET PARAMETER ID 'PON' FIELD gs_records-objid.
CALL TRANSACTION 'PP01' AND SKIP FIRST SCREEN.
ENDCASE.
WHEN 'EMAIL'.
*- Check whether email has already been sent
IF gv_email_sent = c_true.
*- If yes, then display pop up to confirm for mailing again
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = text-041
text_button_1 = text-042
text_button_2 = text-043
IMPORTING
answer = lv_answer
EXCEPTIONS
text_not_found = 1
OTHERS = 1.
IF sy-subrc = 1.
MESSAGE i000(yhr_icm) WITH text-004.
EXIT.
ENDIF.
*- Continue only if user has selected Yes
CHECK lv_answer = '1'.
ENDIF.
*- Add Email Field & Table
ls_fields-tabname = 'SZA5_D0700'.
ls_fields-fieldname = 'SMTP_ADDR'.
APPEND ls_fields TO lt_fields.
*- Use FM to get new Email ID
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = text-s09
start_column = '5'
start_row = '5'
TABLES
fields = lt_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 1.
IF sy-subrc = 1.
MESSAGE i000(yhr_icm) WITH text-004.
EXIT.
ENDIF.
*- Get the Email user has entered
READ TABLE lt_fields INTO ls_fields INDEX 1.
*- Validate Email ID
PERFORM validate_email USING ls_fields-value
CHANGING gv_email_error.
*- If the flag is not initial, indicates possible error
IF gv_email_error IS NOT INITIAL.
MESSAGE i000(yhr_icm) WITH text-027.
EXIT.
ELSE.
If no error, then try ending email
PERFORM send_mail USING ls_fields-value.
ENDIF.
WHEN 'REFRESH'.
*- Fetch the current SAP messages
PERFORM fetch_records.
*- Update Delta Flag
PERFORM update_delta_flag.
*- Compare messages in table & in SAP
PERFORM compare_message.
*- Refresh alv which is already displayed
rs_selfield-refresh = c_true.
ENDCASE.
ENDFORM. "F01_ALV_EVENT_USER_COMMAND
*& Form RESTRICT_SELECTIONS
text
--> p1 text
<-- p2 text
FORM restrict_selections .
TYPE-POOLS sscr.
STATICS: lt_restrict TYPE sscr_restrict,
lt_opt_list TYPE sscr_opt_list,
ls_*** TYPE sscr_***.
Restrict the wage type selection so the user can only enter
values with the 'EQ' clause.
CLEAR lt_opt_list.
MOVE c_objectkey TO lt_opt_list.
MOVE c_true TO: lt_opt_list-options-eq,
lt_opt_list-options-bt,
lt_opt_list-options-cp,
lt_opt_list-options-eq,
lt_opt_list-options-ge,
lt_opt_list-options-gt,
lt_opt_list-options-le,
lt_opt_list-options-lt.
APPEND lt_opt_list TO lt_restrict-opt_list_tab.
MOVE: c_s TO ls_***-kind,
c_rectype TO ls_***-name,
c_include TO ls_***-sg_main,
space TO ls_***-sg_addy,
c_objectkey TO ls_***-op_main.
APPEND ls_*** TO lt_restrict-***_tab.
*-Restrict the values OTYPE
MOVE 'S_OTYPE' TO ls_***-name.
APPEND ls_*** TO lt_restrict-***_tab.
*-Restrict the values OBJID
MOVE 'S_OBJID' TO ls_***-name.
APPEND ls_*** TO lt_restrict-***_tab.
*-Use FM to restrict the values
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = lt_restrict.
ENDFORM. " RESTRICT_SELECTIONS
*& Form GET_PERSON_DATA
text
--> p1 text
<-- p2 text
FORM get_person_data .
DATA : lt_del_tab TYPE STANDARD TABLE OF yhr_icm_diff.
SORT gt_icm_exp_log BY msgno .
gr_pernr-sign = c_include.
gr_pernr-option = c_equal.
LOOP AT gt_icm_exp_log INTO gs_icm_exp_log WHERE otype = c_participants AND
record_type = c_error.
*- Sort the table based on msgno and collect pernr
gr_pernr-sign = c_include.
gr_pernr-option = c_equal.
gr_pernr-low = gs_icm_exp_log-objid.
APPEND gr_pernr.
CLEAR gr_pernr-low.
AT END OF msgno. "#EC *
*- For the list of Pernr having same PERNR get the current exp details
IF gs_icm_exp_log-msgno = c_msg_100.
*- Export the pernr list to memory id & import in the below FM
*- Selection of records should be based on values exported from here
EXPORT gr_pernr TO MEMORY ID 'PERNR_0001'.
Get Org Assignment 0001 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0001_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_101. "Y_HR_DIFF_PERNR_0001_ORG_DATA
ELSEIF gs_icm_exp_log-msgno = c_msg_102 .
EXPORT gr_pernr TO MEMORY ID 'PERNR_0000'.
Get Actions 0000 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0000_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_103.
EXPORT gr_pernr TO MEMORY ID 'PERNR_0002'.
Get Personal Details 0002 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0002_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_104.
EXPORT gr_pernr TO MEMORY ID 'PERNR_0004'.
Get Disability 0004 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0004_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_105.
EXPORT gr_pernr TO MEMORY ID 'PERNR_0006'.
Get Addresses 0006 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0006_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_106.
EXPORT gr_pernr TO MEMORY ID 'PERNR_0007'.
Get Planned Time 0007 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0007_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_107.
EXPORT gr_pernr TO MEMORY ID 'PERNR_0016'.
Get Contract Element 0016 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0016_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_108.
EXPORT gr_pernr TO MEMORY ID 'PERNR_0077'.
Get Additional Personal 0077 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0077_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_109 .
EXPORT gr_pernr TO MEMORY ID 'PERNR_0105'.
Get Communications 0105 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_0105_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda
refresh = space
UPDATE = space
TABLES
diff_tab = gt_diff_tab
del_tab = lt_del_tab.
ELSEIF gs_icm_exp_log-msgno = c_msg_110.
EXPORT gr_pernr TO MEMORY ID 'PERNR_2001'.
Get Absences 2001 Data
CALL FUNCTION 'Y_HR_DIFF_PERNR_2001_DATA'
EXPORTING
period_begda = gs_icm_exp_hist-begda
period_endda = gs_icm_exp_hist-endda -
I have a Power Query that i have used for few weeks, successfully, but occasionally requires being run a few times to return records. Just lately it seems to require run more than a few times to make it work.
When it doesn't return records , it seems to connects and start retrieving data, but returns only randomly like 100 - 200 rows with 1 error. The error doesn't have any message. So its hard to troubleshoot from that perspective.
Query appends two other large and merges in a few others. The data sources are either csv files, Sharepoint Lists and tables in workbook.
I haven't identified anything in terms of environment or query changes that might cause this.
When it finally does retrieve all records, it might be after i have done the following things, but i can't say for certain exactly what did the trick:
* to run query multiple times
*maybe simply changing anything in query resolves issue
* making upstream queries (that are merged or appended into this query) to Not Load to worksheet or model, eg just have connection
I'd think this type of error and situation while not common is encountered by others.
Does this ring a bell for anyone, and if so, can you please shed some light on the reasons and resolutions for this?
Thanks!If you click on "1 error" it should show the editor with a query that will select the rows with errors. This unfortunately might not show all errors for various reasons, but you should try it.
If that doesn't work, here's an example of how to retrieve error details.
Suppose the following query:
= Table.FromRecords({[A="B", B="C" + 1]})
Notice how we're using the + operator with a string and number. This will result in an error.
I can create a custom column that uses the 'try' operator over the B column. This returns a record with details which I then expand to retrieve the message.
let
Source = Table.FromRecords({[A="B", B="C" + 1]}),
#"Added Custom" = Table.AddColumn(Source, "Custom", each try [B]),
#"Expand Custom" = Table.ExpandRecordColumn(#"Added Custom", "Custom", {"HasError", "Error"}, {"Custom.HasError", "Custom.Error"}),
#"Expand Custom.Error" = Table.ExpandRecordColumn(#"Expand Custom", "Custom.Error", {"Message"}, {"Custom.Error.Message"})
in
#"Expand Custom.Error"
Let me know how this works for you.
Tristan -
Black screen with underscore after updating ubuntu on Lenovo G560
hello everybody, I'm new here. I looked for this problem online during the past few days but I haven't found a solution. I have a Lenovo G560 and I divided my hard drive into two partition, I installed Ubuntu on C:\ and Windows on D:\ and I haven't had any problem, but after updating ubuntu to version 14 my computer couldn't boot anymore. the bios loads and I see the Lenovo icon but then I just get a black screen with an underscore (not a blinking underscore), I tried booting from a bootable USB stick but the same thing happened (I put it as the first device to boot from in BIOS settings). can anyone please tell me what are my other options ? what should I try now ? thanks in advance and have a good day !
Hi s, and welcome to Apple Discussions.
Try this:
Hold down the Option+Command (Apple)PR keys, boot/restart your MBP while continuing to hold down those four keys, and after you hear the startup chime for the second time, release the keys. That should reset your PRAM and resolve the issue.
If the issue persists, while you're booted into Open Firmware, just after the prompt, type in:
reset-nvram
then press return, then type in:
reset-all
and press return. This should restart your MBP and it should go back to starting normally. -
How to delete the selected rows with a condition in alv
dear all,
i am using the code in object oriented alv.
WHEN 'DEL'.
PERFORM delete_rows.
FORM delete_rows.
DATA : lv_rows LIKE lvc_s_row.
data : wa_ROWs like LVC_S_ROW.
FREE : gt_rows.
CALL METHOD alv_grid->get_selected_rows
IMPORTING
et_index_rows = gt_rows.
IF gt_rows[] IS INITIAL.
MESSAGE s000 WITH text-046.
EXIT.
ENDIF.
loop at gt_rows into wa_ROWs .
if sy-tabix ne 1.
wa_ROWs-INDEX = wa_ROWs-INDEX - ( sy-tabix - 1 ).
endif.
delete gt_sim INDEX wa_ROWs-INDEX .
endloop.
the rows to be deleted from int.tab gt_sim not in the alv display.
all the rows should not be deleted if one of the field in gt_sim eq 'R'.
how to check this conditiondear jayanthi,
ok if i am coding like that as u mentioned ,
it will exit the loop when first time the field value is 'R'.
if any of the selected rows contains field value 'R'. it shold not delete all the selected rows.
as u suggested it will not delete after first time the field value is r.
i am deleting it by tab index so,
suppose if i am selecting the row without field value R say its tabix is 1.
the next row with tabix 2 with field value R.
it deletes the first row and exits , it should not delete the first row also.
Maybe you are looking for
-
Why does moving the mouse over an IMAQ image display slow the GUI down so much?
I have a large application with several vi's running simultaneously under labview 8.6.1. When I mouse over an image display control in one of the vi's, everything slows down a shocking amount in all the other vi's. The windows task manager does not
-
Question regarding Receiver Determination and Differente Namespaces
Dear sirs, I have the following scenario: I have a mail account read by a sender communication channel IMAP4 in namespace http://a. The message is sent to a receiver communication channel type XI delivering to an ABAP Proxy at the same namespace. Eve
-
Sony bravia kdl-50ex645 light flashes
Haven't had this tv for long and the lights just flash Red about 5 time's. I read that this is a common problem and i'm sad that this is happening already. Been a Loyal customer my whole life my room is full of sony brands. Please help.
-
Deleting email addresses from Envelope Index?
Hi, I have a few incorrect addresses that pop up via auto-completion-suggestion when I start to enter someone's address into the "TO" field in Mail.app (e.g., I misspelled their name (not address) once upon a time and Mail.app insists on using the mi
-
SAPMV45A: User-Exit to handle sub item quantity
Hello, In SD sales order (VA01) I create line item 10 with sub item 11 such as: 10 89464988 1 M 11 99912001 1 PC 10 If I change the quantity of main item from 1 to e.g. 2 so the quantity of sub item will also be changed to 2. Now,