Setting value in cookie using ABAP code
Hai All,
Is it possible to set value in a cookie using ABAP code.
Regards,
H.K.Hayath Basha.
Hai Thomas Jung,
In Enterprise portal SAP has standard functionality to set inactivity timeout. We can set whatever time we want, say for example if we set the time as 15 minutes. If the user is not interacting with the system for 15 minutes then portal will logout the user automatically without any information.
Our user wants a popup to be shown that the system will be logged out due to inactivity.
Since Portal logout the user automatically without any information. I want to put in my own framework to handle inactivity timeout.
What idea I have is, when ever user interacts with any function in portal. I will set current time in a cookie. Someother application will read this cookie at regular interval, if the time difference between the cookie and system is 15, then I will force the user to logout by showing a popup screen.
In our portal we have three different type of application, they are, Java Webdynpro, ABAP-Webdynpro and BSP.
I think that from Java Webdynpro and BSP we can call a javascript to set value in a cookie, from ABAP-Webdynpro I don't know how to set a value in cookie.
This is my business requirement. Is there anyother solution to fullfill this business requirement.
Thanks & Regards,
H.K.Hayath Basha.
Let me tell the business requirement. Our user want to give a popup message when
Similar Messages
-
Setting value in a cookie using ABAP code
Hai All,
Using ABAP code is it possible to set some value in a cookie.
Regards,
H.K.Hayath Basha.Hai Durairaj,
Can you explain how to do that.
Regards,
H.K.Hayath Basha. -
How to bypass printer setting using abap code?
Dear All,
I want to bypass printer setting using abap code?
I am printing sticker using a code and i dont want to display printer setting .
I want direct ouput ?
Regards
SteveAre you using reports or scripts/smart forms? You can use the parameter for no_dialog = space(use the relevant parameter).
-
Improve data load performance using ABAP code
Hi all,
I want to improve my load performance using ABAP code, how to do this?. If i writing ABAP code in SE38 how i can call
in BW side? if give sample code to improve load performance it will be usefull. please guide me.There are several points that can improve performance of your ABAP code:
1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
3. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
4.Avoid using nested SELECT and SELECT statements within LOOPs.
5. Avoid using INTO CORRESPONDING FIELDS OF. Instead use INTO TABLE.
6. Avoid using SELECT * and select only the required fields from the table.
7. Avoid Executing a SELECT multiple times in the program.
8. Avoid nested loops when working with large internal tables.
9.Whenever using READ TABLE use BINARY SEARCH addition to speed up the search.
10. Use FIELD-SYMBOLS instead of a work area when there are more than 200 entries in an internal table where some fields are being manipulated.
11. Use MOVE with individual variable/field moves instead of MOVE-CORRESPONDING.
12. Use CASE instead of IF/ENDIF whenever possible.
13. Runtime transaction code se30 can be used to measure the application performance.
14. Transaction code st05 can be used to analyse the SQL trace and measure the performance of the select statements of the program.
15. Start routines can be used when transformation is needed in the data package level. Field/individual routines can be used for a simple formula or calculation. End routines are used when you wish to populate data not present in the source but present in the target.
16. Always use a WHERE clause for DELETE statement. To delete records for multiple values, use SELECT-OPTIONS.
17. Always use 'IS INITIAL' instead of equal to '' because null for a character is '' but '0' for an integer.
Hope it helps. -
Creating a long text using ABAP code.. fm SAVE_TEXT
When you create an order via IW31 one of the options is to click on the text button and create a long text. I am basically trying to mimic this action from within my ABAP code.
The text id details are as follows:
Text Name 500000015000046 which is (5000000 + order number)
Language EN
Text ID KOPF Order header text
Text Object AUFK Order text
If i manually create the text within the transaction i am then able to view and update it via function modules READ_TEXT and SAVE_TEXT. But if the text has not already been created READ_TEXT obviously returns nothing as it does not exist and SAVE_TEXT does not seem to created it!
Anyone know how i would go about creating this text using ABAP code?
Hope this make a bit of sense
Thanks in advance
MartI have implemented the code as i think it should be. See below, can any see what is wrong. If i add init_text it makes no difference and adding the commit_text just makes it hang
DATA: IT_TEXTS type standard table of TLINE,
wa_texts like line of it_texts,
wa_txtheader type THEAD.
wa_txtheader-TDID = 'KOPF'.
wa_txtheader-TDSPRAS = 'EN'.
wa_txtheader-TDNAME = '500000015000056'.
wa_txtheader-TDOBJECT = 'AUFK'.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
wa_texts-tdformat = '*'.
wa_texts-tdline = 'hello'.
append wa_texts to it_texts.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = wa_txtheader
INSERT = 'X'
SAVEMODE_DIRECT = ' '
OWNER_SPECIFIED = 'X'
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = IT_TEXTS
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to generate new perner number using Abap Code in pa0002. what is the fu
how to generate new perner number using Abap Code in pa0002. what is the function Module used.
hi
define internal number ranges for ur implementation then when u run PA 40 do not input any employee number , system will generate the employee number automatically.
Regards
sameer -
How to transfer data in change log table of dso to z-table using abap code
Hi can you please explain me how to transfer data in change log table of dso to z-table using abap code ,with out using Function module concept
PROGRAM NAME: ZBW_DELTA_TO_GSTAR **
report ZBW_DELTA_TO_GSTAR no standard page heading
line-size 120
line-count 75
message-id ZBW_MSG_CLS.
tables: ZGIV_DLTA_EBV_BB,
ZGIV_DLTA_EM2_BL,
ZGIV_DLTA_EM2_BK.
Selection Screen Definitions
SELECTION-SCREEN: BEGIN OF BLOCK INNER WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN: SKIP 1.
PARAMETERS: EBVBB RADIOBUTTON GROUP ROLL,
EM2BL RADIOBUTTON GROUP ROLL,
EM2BK RADIOBUTTON GROUP ROLL.
SELECTION-SCREEN: END OF BLOCK INNER.
Data: WS_UPDATE_FLAG Type C,
UCounter(9) Type N,
ICounter(9) Type N.
DATA: T_ZGIV_DLTA_EBV_BB Type Standard Table of ZGIV_DLTA_EBV_BB,
s_ZGIV_DLTA_EBV_BB LIKE line of T_ZGIV_DLTA_EBV_BB.
DATA: T_ZGIV_DLTA_EM2_BK Type Standard Table of ZGIV_DLTA_EM2_BK,
s_ZGIV_DLTA_EM2_BK LIKE line of T_ZGIV_DLTA_EM2_BK.
DATA: T_ZGIV_DLTA_EM2_BL Type Standard Table of ZGIV_DLTA_EM2_BL,
s_ZGIV_DLTA_EM2_BL LIKE line of T_ZGIV_DLTA_EM2_BL.
Standard Internal Tables - Describe usage.
data: begin of i_AEPSD_O0140 occurs 0.
include structure /BIC/AEPSD_O0140.
data: end of i_AEPSD_O0140.
data: begin of i_AEPSD_O0240 occurs 0.
include structure /BIC/AEPSD_O0240.
data: end of i_AEPSD_O0240.
data: begin of i_AEPSD_O0340 occurs 0.
include structure /BIC/AEPSD_O0340.
data: end of i_AEPSD_O0340.
data: begin of i_GIV_DLTA_EBV_BB occurs 0.
include structure ZGIV_DLTA_EBV_BB.
data: end of i_GIV_DLTA_EBV_BB.
data: begin of i_GIV_DLTA_EM2_BK occurs 0.
include structure ZGIV_DLTA_EM2_BK.
data: end of i_GIV_DLTA_EM2_BK.
data: begin of i_GIV_DLTA_EM2_BL occurs 0.
include structure ZGIV_DLTA_EM2_BL.
data: end of i_GIV_DLTA_EM2_BL.
Miscellaneous Program Variables and Constants.
TOP-OF-PAGE
top-of-page.
START-OF-SELECTION
start-of-selection.
Clear: i_GIV_DLTA_EBV_BB,
i_GIV_DLTA_EM2_BK,
i_GIV_DLTA_EM2_BL,
UCounter, ICounter.
IF EBVBB = 'X'.
PERFORM 100_EXTRACT_EBV_BB_DELTA_RECS.
ELSEIF EM2BK = 'X'.
PERFORM 100_EXTRACT_EM2_BK_DELTA_RECS.
ELSE.
PERFORM 100_EXTRACT_EM2_BL_DELTA_RECS.
ENDIF.
FORM 100_EXTRACT_EBV_BB_DELTA_RECS
FORM 100_EXTRACT_EBV_BB_DELTA_RECS.
Refresh: i_AEPSD_O0140,
i_GIV_DLTA_EBV_BB.
Clear: UCounter, ICounter, s_ZGIV_DLTA_EBV_BB .
Select * From /BIC/AEPSD_O0140
Into TABLE i_AEPSD_O0140.
IF SY-Subrc = 0.
LOOP AT i_AEPSD_O0140.
MOVE-CORRESPONDING i_AEPSD_O0140 TO s_ZGIV_DLTA_EBV_BB.
MOVE SY-DATUM to s_ZGIV_DLTA_EBV_BB-create_dt.
INSERT ZGIV_DLTA_EBV_BB FROM s_ZGIV_DLTA_EBV_BB.
IF SY-Subrc = 0.
ICounter = ICounter + 1.
ELSE.
UPDATE ZGIV_DLTA_EBV_BB FROM s_ZGIV_DLTA_EBV_BB.
IF SY-Subrc = 0.
UCounter = UCounter + 1.
ELSE.
Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. "100_EXTRACT_EBV_BB_DELTA_RECS
FORM 100_EXTRACT_EM2_BK_DELTA_RECS
FORM 100_EXTRACT_EM2_BK_DELTA_RECS.
Refresh: i_AEPSD_O0240,
i_GIV_DLTA_EM2_BK.
Clear: UCounter, ICounter, s_ZGIV_DLTA_EM2_BK .
Select * From /BIC/AEPSD_O0240
Into TABLE i_AEPSD_O0240.
IF SY-Subrc = 0.
LOOP AT i_AEPSD_O0240.
MOVE-CORRESPONDING i_AEPSD_O0240 TO s_ZGIV_DLTA_EM2_BK.
MOVE SY-DATUM to s_ZGIV_DLTA_EM2_BK-create_dt.
INSERT ZGIV_DLTA_EM2_BK FROM s_ZGIV_DLTA_EM2_BK.
IF SY-Subrc = 0.
ICounter = ICounter + 1.
ELSE.
UPDATE ZGIV_DLTA_EM2_BK FROM s_ZGIV_DLTA_EM2_BK.
IF SY-Subrc = 0.
UCounter = UCounter + 1.
ELSE.
Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. "100_EXTRACT_EM2_BK_DELTA_RECS
FORM 100_EXTRACT_EM2_BL_DELTA_RECS
FORM 100_EXTRACT_EM2_BL_DELTA_RECS.
Refresh: i_AEPSD_O0340,
i_GIV_DLTA_EM2_BL.
Clear: UCounter, ICounter, s_ZGIV_DLTA_EM2_BL .
Select * From /BIC/AEPSD_O0340
Into TABLE i_AEPSD_O0340.
IF SY-Subrc = 0.
LOOP AT i_AEPSD_O0340.
MOVE-CORRESPONDING i_AEPSD_O0340 TO s_ZGIV_DLTA_EM2_BL.
MOVE SY-DATUM to s_ZGIV_DLTA_EM2_BL-create_dt.
INSERT ZGIV_DLTA_EM2_BL FROM s_ZGIV_DLTA_EM2_BL.
IF SY-Subrc = 0.
ICounter = ICounter + 1.
ELSE.
UPDATE ZGIV_DLTA_EM2_BL FROM s_ZGIV_DLTA_EM2_BL.
IF SY-Subrc = 0.
UCounter = UCounter + 1.
ELSE.
Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. "100_EXTRACT_EM2_BL_DELTA_RECS
END-OF-SELECTION
end-of-selection.
perform D1000_REPORT_DATA.
D1000_REPORT_DATA
form D1000_REPORT_DATA.
*Display the title of the program
write: /25 SY-TITLE.
skip.
Diaplay the details of the user and time
write: /1 'Executed by', 15 SY-UNAME, 30 'Date',
38 SY-DATUM, 53 'Time', 60 SY-UZEIT.
skip 2.
write: / 'Delta Records have been extracted ',
/ 'Updates : ', UCounter,
/ 'Inserts : ', ICounter.
skip.
skip 3.
write: /20 'End of the report'.
endform. "D1000_REPORT_DATA
chgeck it out this also may hep you -
How to extract data from info cube into an internal table using ABAP code
HI
Can Anyone plz suggest me
How to extract data from info cube into an internal table using ABAP code like BAPI's or function modules.
Thankx in advance
regds
AJAYHI Dinesh,
Thankq for ur reply
but i ahve already tried to use the function module.
When I try to Use the function module RSDRI_INFOPOV_READ
I get an information message "ERROR GENERATION TEST FRAME".
can U plz tell me what could be the problem
Bye
AJAY -
How to Use CMOD and SMOD in SAP using ABAP Code
Hello anyone,
Please help me How to use CMOD and SMOD in SAP using ABAP code.
Give Me Some Sample Example.
Mail ID: [email protected]
Thanks,
Regards,
S.Muthu,
SAP Developer.Hi,
User Exits.
http://www.erpgenie.com/sap/abap/code/abap26.htm
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
customer exits
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
Menu Exit.
http://www.sappoint.com/abap/spmp.pdf
http://www.sappoint.com/abap/userexit.pdf
http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
USER EXIT
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.sap-img.com/ab038.htm
http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html -
Change Prg name in classes using abap code
Hello Experts,
I'm having following req:-
I need to change program name using abap code .
I have prepared report which changing prg name & also it is replecting target name into T-code & Programes where source prg name is being used.
My next req is i want to replace sorce prg name in Classes usinf abap coding.
<Priority normalized by moderator>
Thanxs in Advance.
Moderator message : Requirements dumping not allowed, thread locked.
Edited by: Vinod Kumar on Feb 7, 2012 12:32 PMThe application name is not necessarily uniqueue! Customers may create two applications with same name in different systems/clients and transport them into the same target system/client!
You do the mapping with the query:
CL_FDT_FACTORY=>GET_INSTANCE( )->GET_QUERY()->...
There are two methods. One for mapping ID to name and one for name to ID.
There is also a sample report in package SFDT_DEMO_OBJECTS. -
Trigger Process chain using ABAP code
Hi All,
As per my knowledge there are 2 ways to trigger a process chain using ABAP code :
1) Using FM RSPC_API_CHAIN_START and passing process chain name as the parameter
2)Using FM 'BP_EVENT_RAISE' and passing process event as the parameter, which you can create using SM62 transaction.
I would like to know which one is better to use, in terms of advantage and disadvantage.
Thanks,
PraveenaHi praveena,
check these links ..u .may get some help
Process Chain
Process Chain
How to run a Process Chain
Process chain-parallel process
Regards
BILL -
Changing Field Label length for Data Element using ABAP code.
Hi Experts,
We have a scenario where we have to update the maximum length of the various Field Labels (Short, Medium, Long..) for a Data Element using ABAP code.
Does anyone know how to do this ? Is there a Function Module available for this purpose ?
Appreciate your valuable inputs.Hi ,
Use the view
DD03M
Give
TABNAME as table name,
DDLANGUAGE = EN / sy-langu
and order by position. (for correct sequencing)
You will get description of the fields (short,medium, long etc). You will also get the length and other details. -
Create new survey data for opportunity using abap code
Hello to all,
I have one requirement.
create survey data for given opportunity ID using abap code. or copy survey data from one opportunity to another opportunity using abap.
any ideas..
many thanks
BabuHello Babu,
You can do this through the CRM_ORDER_MAINTAIN FM, this is the generic FM to edit any transaction in CRM.
The FM contains an internal table IT_SURVEY that must be filled. Actually, this table will only contain a reference to the (completed) survey, it doesn't store the data of the survey itself.
For some example coding, take a look at the SrvTSurvey.do controller. If you want to see what data is stored in the IT_SURVEY table, create a transaction and attach a completed survey to it (you can easily do it in the standard views of the webclient) and take a look at the survey structure in the CRM_ORDER_READ FM/Report.
Let me know if you need more guidance,
Reward points if useful,
Regards,
Joost -
How to set value in selectOnemenu using binding
hi all.
i have bind htmlSelectOneMenu. it contains some value. I want to set or display a value after a process.
How to change value
i have tried using setValue method of both binding property and value property of htmlSelectOneMenu.
Same issue is with InputTextArea. how to set value in it via code(RowSelectionListener of icefaces)Balaji wrote:
hi all.
i have bind htmlSelectOneMenu. it contains some value. I want to set or display a value after a process.
How to change value
i have tried using setValue method of both binding property and value property of htmlSelectOneMenu.
Same issue is with InputTextArea. how to set value in it via code(RowSelectionListener of icefaces)The html SelectOneMenu is bound to a value of a backing bean. You have to change the value of that backing bean, not the JSF component directly. JSF takes care of updating the model, you shouldn't be touching it unless you know what you are doing. -
How to disable client cookie using Servlet code
Hi All,
I want to disable the client cookie using JSP or servlet code.Is it possible how I can do it.
Thanks in Advance .Hi,
first of all, the URL rewriting option (URLRewritingEnabled) in the weblogic.xml must be set to true.
Now, for all first-timer web requests the BEA WLS always uses URL rewriting in addition to cookies to see wether the browser accepts cookies or not.
I would try to rip of all of the cookies in the header, then flush the response to force the http header to be written.
I have never tried it and has no idea if it will work, however the teory behind supports the idea.
This will not work for toggling session tracking mechanism from a session already established with cookies, the session will be lost if attempted to do this without the URL-rewriting enabled on the page.
- Anders M.
Maybe you are looking for
-
in the iccasion of appstores 5th birthday apple is giving free apps to all.i dont know how to get them someone somebody please help me please.thankyou
-
Query runs in management studio but not in SQLAgent job
I have the following query which runs fine in Management Studio but when I put it in a SQLAgent job it fails saying Error formatting query, probably invalid parameters (SQLState 42000 Error 22050)I have tried changing Quote characters but to no avail
-
My sent items are not in the sent folder
I went to Preferences and chose to have sent items in the folder but they are not there. Anyone have any suggestions?
-
Can I sideload folios to my iPad?
Sideloading is a process that lets you use iTunes to manually add a .folio file to the Adobe Content Viewer. With the newest release of tools (Drop 12), sideloading is no longer available. Instead, if you sign in using the same Adobe ID on the viewer
-
Scene Detect not functioning in Premiere Pro CS6
Hello all, Having an issue with Scene Detect not recognizing individual scenes when I Capture HDV footage from my Canon XH series cameras. Tapes just come in as one long file rather than individual scenes. I am using CS6 on my MAC computers (OS 10.7.