Longtext update by using save_text F.M
Hi All ,
I am updating longtext using F.M save_text the problem is
my longtext is in the form longtext type c length 1000.
Now how do i split this longtext such that i can pass the data in save_text.
the parameter TDLINE is only 132 character.
i tried using F.M tr_split_text at 132 char but the input parameter of this F.M can only take data of certain
length
Do any bdy know hw to go about it?
Regards
Bhanu
Hi,
If your long text is in multiple lines of an internal table use the below code and take the text into some string varaible (lv_text_string here).
Concatenate the text into a string variable
LOOP AT lt_lines INTO lw_lines.
CONCATENATE lv_text_string lw_lines-tdline INTO
lv_text_string SEPARATED BY space.
CLEAR : lw_lines.
ENDLOOP.
Split the text into 132 char lines
CALL FUNCTION 'RSDG_WORD_WRAP'
EXPORTING
textline = lv_text_string
delimiter = space
outputlen = 132
IMPORTING
out_line1 = lv_outline1
out_line2 = lv_outline2
out_line3 = lv_outline3
TABLES
out_lines = lt_text_lines
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
Now use lt_text_lines for calling save_text FM. (Here lt_text_lines should be delared as an internal table of char132).
Hope this helps you !!!
Regards,
Ganga
Similar Messages
-
Loading complex report data into a direct update DSO using APD
Dear All,
Recently, I had a requirement to download the report data into a direct update DSO using an APD. I was able to perform this easily when the report was simple i.e it has few rows and columns. But I faced problems If the report is a complex one. Summing up, I would like to know how to handle the scenarios in each of the following cases:
1. How should I decide the key fields and data fields of the direct update DSO ? Is it that the elements in ROWS will go to the
key fields of DSO and the remaining to the data fields? Correct me.
2. What if the report contains the Restricted KFs and Calculated KFs? Do I have to create separate infoobjects in the BI
system and then include these in the DSO data fields to accommodate the extracted data ?
3. How do I handle the Free Characteristics and Filters ?
4. Moreover, I observed that if the report contains selection screen variables, then I need to create variants in the report and
use that variant in the APD. So, if I have 10 sets of users executing the same report with different selection conditions, then
shall I need to create 10 different variants and pass those into 10 different APDs, all created for the same report ?
I would appreciate if someone can answer my questions clearly.
Regards,
D. Srinivas RaoHi ,
PFB the answers.
1. How should I decide the key fields and data fields of the direct update DSO ? Is it that the elements in ROWS will go to the
key fields of DSO and the remaining to the data fields? Correct me.
--- Yes , you can use the elements in the ROWS in the Key fields, but in case you get two records with same value in the ROWS element the data load will fail. So you basically need to have one value that would be different for each record.
2. What if the report contains the Restricted KFs and Calculated KFs? Do I have to create separate infoobjects in the BI
system and then include these in the DSO data fields to accommodate the extracted data ?
Yes you would need to create new Infoobjects for the CKF's and RKF's in the Report and include them in your DSO.
3. How do I handle the Free Characteristics and Filters ?
The default filters work in the same way as when you yourself execute the reoprt. But you cannot use the Free characterisitics in the APD. only the ROWS and cloumns element which are in default layout can be used.
4. Moreover, I observed that if the report contains selection screen variables, then I need to create variants in the report and
use that variant in the APD. So, if I have 10 sets of users executing the same report with different selection conditions, then
shall I need to create 10 different variants and pass those into 10 different APDs, all created for the same report ?
--- Yes you would need to create 10 different APD's. Its very simple to create, you can copy an APD. but it would be for sure a maintance issue. you would have to maintain 10 APD's.
Please revert in case of any further queries. -
How to send an updated list using batch job
Hi All,
The program displays data on the screen, if the data looks ok, then there is an option to update.
When I run update, the program submits a batch job and the basic list gets updated, but my batch job is still sending the data on the screen. how can i send the updated list using batch job.
Ex: output of the program
1 2
there is an update button on the screen, when i press update button, my program submits in batch job, the above list becomes
1 2
3 4
but when i check the spool, it shows the o/p as 1 2 ..it is not sending the updated list.
Please suggest me how to send the updated data
Thanks,
KumarHi Krishna,
I have added a button on the alv list. when i press update button, my program updates the list, then submits the batch job. I am attaching the sample test program i am trying with, please suggest me how can i get the updated list.
*& Report ZTESTSSSSS
REPORT ZTESTSSSSS.
DATA: gt_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat type slis_t_fieldcat_alv,
gt_sort TYPE slis_t_sortinfo_alv,
g_repid LIKE sy-repid,
gt_layout TYPE slis_layout_alv.
start-of-selection.
lt_return-type = 'S'.
lt_return-message = 'test message'.
append lt_return.
CLEAR gt_fieldcat.
gt_fieldcat-fieldname = 'TYPE'.
gt_fieldcat-outputlen = '3'.
gt_fieldcat-tabname = 'LT_RETURN'.
gt_fieldcat-seltext_l = 'Type'.
gt_fieldcat-seltext_m = 'Type'.
gt_fieldcat-seltext_s = 'Type'.
APPEND gt_fieldcat TO lt_fieldcat.
CLEAR gt_fieldcat.
gt_fieldcat-fieldname = 'MESSAGE'.
gt_fieldcat-outputlen = '15'.
gt_fieldcat-tabname = 'LT_RETURN'.
gt_fieldcat-seltext_l = 'Message'.
gt_fieldcat-seltext_m = 'Message'.
gt_fieldcat-seltext_s = 'Message'.
APPEND gt_fieldcat TO lt_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = lt_fieldcat
TABLES
T_OUTTAB = lt_return
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*& Form set_pf_status
text
-->RT_EXTAB text
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD'.
ENDFORM. "Set_pf_status
*& Form user_command
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: li_count TYPE I.
IF r_ucomm EQ 'UPD'.
Adding another message
lt_return-type = 'S'.
lt_return-message = 'Another test message'.
APPEND lt_return.
rs_selfield-refresh = 'X'.
rs_selfield-col_stable = 'X'.
rs_selfield-row_stable = 'X'.
l_upd = 'X'.
LOOP AT lt_return.
WRITE: / lt_return-type, lt_return-message.
ENDLOOP.
IF sy-batch IS INITIAL.
l_upd = 'X'.
Open the Job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_name
IMPORTING
jobcount = w_number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT ('ZTESTSSSSS') VIA JOB w_name NUMBER w_number
AND RETURN
WITH p_recnnr = p_recnnr.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_number
jobname = w_name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. "User_command
Thanks,
Kumar -
I changed my email address, which in turn, changed my Apple ID. I changed the settings of my iPad and things were fine for me, but my husband shares a few apps with me and isn't able to update or use any of those apps now. The change doesn't work for him.
Now, I got a new iPad mini and I'm having the same problem. I have purchased many apps which I can't use now. I have a lot of work documents saved to them too.
Is there anyway that both husband and I can change the setting so we can access the apps we have already purchased?You have to be signed into the correct Apple ID in order to download those purchases again for free.
Settings>iTunes & App Store. Tap the old ID and sign out, then sign in with the new/changed ID. -
Add fields to maintenance view and update then using events
Hi experts:
I've created a table with 4 fields, one of them is userid. Also, there is a maintenance view to add new entries.
I want to display user name when typing userid using events (1 or 21). I know how to do it if username is one of the fields of the table, but there is a requirement to not store username in the table, just userid.
My question is: is possible to add a field into the maintenance view and update it using events but not store the value in DB?.
Thanks in advance for your help.
Regards,
Carlos.In the save event just clear the entries of the field(user name) in the internal table.
-
How to add a new record in updatable report using apex_item
Hi,
i am using an updatable report using the following select
select
aPEX_ITEM.POPUP_FROM_QUERY(2,emp_code,
' SELECT emp_surname, emp_code FROM hrm_employee ' ,null,null,null,null,null,'onchange="f_set_multi_items_tabular(this.value ''#ROWNUM#'''
|| ')"',null,null,null) PF_No,
apex_item.text (32,
NULL,
80,
100,
'style="width:190px" ',
'f11_' || '#ROWNUM#'
) Name,
" REST_DATE",
"REMARKS",
from "roster"
when i click on the button add row , only the column rest_date and the remarks are enable.
why is the apex_item.text and apex_item_popup_from_query is disable ? and how i can make it enable.
thanks
regards
jerryI could see that you are using the addRow() function to generate new blank row.
I guess, this function(used by the builtin tabular form s) , identifies editable columns when they are marked so at the report column attributes.
When you use apex_item API, it expects the columns to be standard report column and hence render the new rows as such.
Some one from the development team might be able to give a better answer on that.
As for avoiding this issue
<li>One method , would be to define the columns editable(and display types) in report column attributes.
<li> You can duplicate the last row using jQuery( *$('tr.highlight-row:last).after( $('tr.highlight-row:last).clone() )* ) and removing the field values, but events(for example datepicker) would remain attached to the original row , so it isn't very straightforward either.
<li>If you want to use apex_item you would have to use a pseudo union to DUAL for generating a blank row and re-render the report either by a page load or a Dynamic Action. Sounds like a nice idea for a plugin.
Now , if you want to add rows multiple times without saving them, then you would need to store the values in a collection at load and update the collection before adding the row. -
Error in updating pricing using BAPI_QUOTATION_CREATEFROMDATA2
Hi,
I am using the BAPI function module BAPI_QUOTATION_CREATEFROMDATA2. I am calling BAPI_TRANSACTION_COMMIT subsequently
I need to change an existing pricing condition ZMLT which is
automatically determined by the config while creating a sales quotation
Also I need to add ZFR1 and ZFR2 which are 2 freight condition types
(Condition Class = 'F')
Case 1
If I set the LOGIC-SWITCH-COND_HANDL = 'X', then I can correctly update
ZMLT using CONDITIONS_IN parameter, but I can't update ZFR1 and ZFR2
since they are freight condition types (as per Note 593246)
Case 2
If I set LOGIC-SWITCH-COND_HANDL = ' ', then I can correctly update
ZFR1 and ZFR2 freight condition types using the parameters
CONDITIONS_IN and CONDITIONS_INX. But when I try to update ZMLT, it
deactivates the existing line in the pricing and adds a new line with
same condition type ZMLT. Why does it do this...?
Here are the parameters that I am using as per Note 593246, Point 4
CONDITIONS_IN-ITM_NUMBER = '000010'
CONDITIONS_IN-COND_COUNT = '01'
CONDITIONS_IN-COND_TYPE = 'ZMLT'
CONDITIONS_IN-COND_VALUE = 12.00
CONDITIONS_IN-CURRENCY = ' ' (This is a percentage)
CONDITIONS_INX-ITM_NUMBER = '000010'
CONDITIONS_INX-COND_COUNT = '01'
CONDITIONS_INX-COND_TYPE = 'ZMLT'
CONDITIONS_INX-UPDATEFLAG = 'U'
CONDITIONS_INX-COND_VALUE = 'X'
CONDITIONS_INX-CURRENCY = 'X'
Please advise on this. Although the Total Value in the pricing is
correctly updated, why does it deactivate one line and insert a new one
for the same condition type.
Please note that my requirement is to add condition types ZFR1, ZFR2
and update ZMLT
Thanks and Regards,
Aditya PalekarHi!
You have very well prepared this example!
...and you analyzed it completely, this behavior is just the restriction you have to live with.
Old style condition handling couldn't change values, so workaround with adding new line and inactive existing line was done. New condition handling has restrictions, too - so no freights.
Why does it do this... it's a buggy feature or whatever you would like to call it. At least it was done by purpose, what internal reasons lead to this, I can't say.
One workaround would be possible for you: create quotation with cond_handl = A, change afterwards with cond_handl = B.
If you start with A = X and B = space or A = space and B = X should be the same in the end.
Regards,
Christian -
Error while updating data using session and call transaction method
Hi all,
i have to update data using MM01 transaction from flat file to database.i have used both session method and call transaction method to do that.in both the methods data has been transferred from internal tables to screens but while updating the data that is by clicking the ok-code at the end of the transaction iam getting a dialogue box stating
SAP EXPRESS DOCUMENT "UPDATE WAS TERMINATED" RECEIVED FROM AUTHOR "SAP".
please tell whether the problem lies and solution for that.
thanks and regards.hi,
check your recording.check whether u saved your material no in recording or not.
once again record the transacton mm01.
MATNR LIKE RMMG1-MATNR,
MBRSH LIKE RMMG1-MBRSH,
MTART LIKE RMMG1-MTART,
MAKTX LIKE MAKT-MAKTX,
MEINS LIKE MARA-MEINS,
MATKL LIKE MARA-MATKL,
BISMT LIKE MARA-BISMT,
EXTWG LIKE MARA-EXTWG,
these are the fields which u have to take in internal table.
this is the record which i took in my flatfile.use filetype as asc and hasfieldseperator as 'X'.
SUDHU-6 R ROH MATSUDHU " 001 7890 AA
i did the same.but i didn't get any error. -
Write an UPdate statement using the logic used in PL/SQL block (oracle 10g)
Hi All,
I have written the following PL/SQL block. I want to write an UPDATE statement using the logic used in the following PL/SQL block. can any one please help me out in this regards.
DECLARE
v_hoov_fag gor_gold_post.hoov_flg%TYPE;
v_b49n gor_gold_post.b49n%TYPE;
CURSOR c
IS
SELECT bs_id, loyalty_date, loyalty_period, contract_date
FROM gor_gold_post
WHERE tariff_code IN (169, 135, 136);
BEGIN
FOR rec IN c
LOOP
IF (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE) < 304
OR ( TRUNC ( ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE
) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
THEN
v_hoov_flg := 1;
ELSE
v_hoover_flag := 99;
END IF;
IF (TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE) < 121.6
OR ( TRUNC ( ADD_MONTHS (rec.loyalty_date, rec.loyalty_period)
- SYSDATE
) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2
THEN
v_b49n := 1;
ELSE
v_b49n := 99;
END IF;
UPDATE gor_gold_post
SET hoov_flg = v_hoov_flg,
b49n = v_b49n
WHERE bs_id = rec.bs_id AND tariff_code IN (169, 135, 136);
COMMIT;
END LOOP;
END;Thank you,Using case statement.
UPDATE gor_gold_post
SET hoov_flag = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 304
OR
(TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
THEN 1
ELSE 99
END,
b49n = CASE WHEN TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) < 121.6
OR
(TRUNC (ADD_MONTHS (rec.loyalty_date, rec.loyalty_period) - SYSDATE) IS NULL
AND (SYSDATE - TO_DATE (rec.contract_date, 'YYYYMMDD')) > 91.2)
THEN 1
ELSE 99
END
WHERE tariff_code IN (169, 135, 136);Note: Code not tested. -
After using SAVE_TEXT in VA01 getting problem
Hi Friends ,
As per below link i have used SAVE_TEXT with vbeln "XXXXXXXXXX"
'SAVE_TEXT' or 'CREATE_TEXT' unable to use
But text is copied default to other orders also in VA01 ..
I tried using CALL FUNCTION 'FREE_TEXT_MEMORY' but it did not worked .
Please help .
Regards ,
Kumar.hi...
where u getting the user input text and which field......
where u done the coding for this.....can u tell me user exit name....
if u use the user exit no need to use save_text . just modify that field which u get input text...
just send ur coding... -
Using SAVE_TEXT in VF01 for item texts
Hi guys,
A colleague wants to save an item text in the billing process (VF01 transaction). As you should know, there is no billing document number yet when we are creating the invoice using that transaction. He is programming at RV60AFZZ include, FORM userexit_save_document_prepare. This is his try:
LOOP AT xvbrp.
CONCATENATE xvbrp-vbeln xvbrp-posnr INTO lw_thead-tdname.
* CONCATENATE c_objectname xvbrp-posnr INTO lw_thead-tdname.
lw_thead-tdid = 'ZZZZ'.
lw_thead-tdobject = 'VBBP'.
lw_thead-tdspras = 'E'.
lw_thead-tdfuser = sy-uname.
lw_thead-tdfdate = sy-datum.
lw_thead-tdftime = sy-uzeit.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = lw_thead
savemode_direct = 'X'
TABLES
lines = t_tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc = 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = lw_thead-tdobject
NAME = lw_thead-tdname
ID = lw_thead-tdid
LANGUAGE = lw_thead-tdspras
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0.
ENDIF.
CLEAR: lw_thead-tdname.
ENDIF.
ENDLOOP.
But he is not saving the text, we dont know why. Constant c_objectname has been defined so:
c_objectname TYPE vbeln_vf VALUE 'XXXXXXXXXX'.
But without success... We saw XXXXXXXXXX000010 as tdname in debugger... Do you know if the issue is the TDNAME field? What should be a correct value for LW_THEAD-TDNAME? We know the item position but not the billing document number yet, where can we get correct tdname?... or did he fail in some other point?
Thank you!Hi guys,
one of my workmates got the answer. I share that: there is a user exit call '001' in the include LV60AB07 (FORM XVBRK_KIDNO_FILL). The FM for that user exit is EXIT_SAPLV60A_001 (Billing User Exit. Processing KIDNO (Payment Reference Number)). My friend put code logic inside the include of that FM (ZXVVFU09). We used that because there the structure XVBRK already has value for the field VBELN (the number of the billing document) and we can use SAVE_TEXT and COMMIT_TEXT there without problem, concatenating billing number and item in the header. I am not sure if the billing document already was created at this point, but worked fine for us. Thanks anyway! -
HI Friends,
i have downloaded material code, material type and po text in one text file by using read_text function.
now i want to upload it into new system how can i do that?
i am using save_text function to save it into new SAP system[ECC6.0].
but i am not getting that which parameters i can pass to function.
my code is given below please given me modified code for my code or sample code for saving text.
this is me code . but it is showing error message that text object is not available
*& Report ZUPLOADPO
REPORT ZUPLOADPO.
tables : tline , mara.
data : begin of itpo occurs 0,
matnr like mara-matnr,
mtart like mara-mtart,
tdline like tline-tdline,
end of itpo.
DATA : LINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA : ITAB_HEAD LIKE THEAD OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'c:\purtxt.txt'
TABLES
DATA_TAB = itpo
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at itpo.
itab_head-tdobject = 'MATERIAL'.
itab_head-tdname = itpo-matnr.
itab_head-tdid = 'BEST'.
itab_head-tdspras = 'EN'.
lines-tdline = itpo-tdline.
append itab_head.
append lines.
delete itab_head where tdname = ''.
clear itab_head.
clear lines.
endloop.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = itab_head
INSERT = ' '
SAVEMODE_DIRECT = ' '
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = lines
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.
Message was edited by:
vinod parhadHi,
Refer Following codes, which are exclusivly used for data upload:
*& Form upload_file
form upload_file using p_p_file
p_p_file1.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
* CODEPAGE = ' '
FILENAME = P_P_FILE
FILETYPE = 'DAT'
* HEADLEN = ' '
* LINE_EXIT = ' '
* TRUNCLEN = ' '
* USER_FORM = ' '
* USER_PROG = ' '
* DAT_D_FORMAT = ' '
* IMPORTING
* FILELENGTH =
TABLES
data_tab = IT_VENDOR
* EXCEPTIONS
* CONVERSION_ERROR = 1
* FILE_OPEN_ERROR = 2
* FILE_READ_ERROR = 3
* INVALID_TYPE = 4
* NO_BATCH = 5
* UNKNOWN_ERROR = 6
* INVALID_TABLE_WIDTH = 7
* GUI_REFUSE_FILETRANSFER = 8
* CUSTOMER_ERROR = 9
* NO_AUTHORITY = 10
* OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
STOP.
ENDIF.
Jogdand M B -
Read from database (Access) and update fields using MS ADODB
Hello,
I am trying to get records from database using MS ADODB._connection & ADODB._Recordset objects (from LabVIEW 6)
I can:
1. open connection (with ADODB._connection)
2. write into tables (with ADODB._command)
I can not: gets records and update fields using ADODB._connection & ADODB._Recordset.
I do not know:
1. how to connect between the connection that was opened and the recordset object
2. where I can write the SQL text as input to the recordset
Attached is DataBase.llb with DB_read.vi that display my steps.
Thanks.
Attachments:
DataBase.llb 40 KBTry this one, after updating the names for database and the table you want.
Let me know if it's working.
p.s.: if you have problems, it could be a different adodb version ... but the sequence of methods is the same
Attachments:
EditdatabaseMe.vi 57 KB -
How to update and use the values of variables of another class
I can we update or use the values of the variables of another class. For example, if we have class A
public class A //(situated in package view)
public s0,s1;
public void runFunction()
...some coding and proceedings
s0="Hi";s1"Hello";
......some coding
RequestDispatcher dispatcher = request.getRequestDispatcher("/MainUser.jsp?alert=F");
dispatcher.forward(request, response);
ARunner.jsp
<jsp:useBean id="a" class="view.A" scope="session"/>
<%
a.runFunction();
%>
MainUser.jsp
<jsp:useBean id="a" class="view.A" scope="session"/>
<%
System.out.println("S0:"+a.s0+" S1:"+a.s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
%>
A.class has some procedures and String variables which can be updated and later can be used in JSP pages. The project starts with ARunner.jsp which uses the A.class and updates the values of string variables s0 and s1of A to hi and hello respectively.And then redirects the page to MainUser.jsp.
Now what I want is ,when I call those string variables(s0 & s1 of A.class) in any another jsp likeMainUser.jsp it should give me the value of hi and hello respectively not null as it is giving right now. Could you refine the coding for this one?public class A //(situated in package view)
public String s0,s1;
public void runFunction()
...some coding and proceedings
s0="Hi";s1"Hello";
......some coding
RequestDispatcher dispatcher = request.getRequestDispatcher("/MainUser.jsp");
dispatcher.forward(request, response);
ARunner.jsp
<jsp:useBean id="a" class="view.A" scope="session"/>
<%
a.runFunction();
%>
MainUser.jsp
<jsp:useBean id="a" class="view.A" scope="session"/>
<%
System.out.println("S0:"+a.s0+" S1:"+a.s1); //should print S0:Hi S1:Hello, but printing S0:null S1:null
%>
giving code again to remove the typing errors. Please guide. -
'Missing select' error for update statement using WITH clause
Hi,
I am getting the below error for update statement using WITH clause
SQL Error: ORA-00928: missing SELECT keyword
UPDATE A
set A.col1 = 'val1'
where
A.col2 IN (
WITH D AS
SELECT col2 FROM
(SELECT col2, MIN(datecol) col3 FROM DS
WHERE <conditions>
GROUP BY PATIENT) D2
WHERE
<conditions on A.col4 and D2.col3>Hi,
The format of a query using WITH is:
WITH d AS
SELECT ... -- sub_query
SELECT ... -- main query
You don't have a main query. The keyword FROM has to come immediately after the right ')' that ends the last WITH clause sub-query.
That explains the problem based on what you posted. I can't tell if the real problem is in the conditions that you didn't post.
I hope this answers your question.
If not, post a complete test script that people can run to re-create the problem and test their ideas. Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002
Maybe you are looking for
-
Disk is full on macbook air, 32GB of "other", how do I clear this?
operating slowly, message that the startup disk is full when I check memory, the "other"/yellow category is full I have no idea what my "other" may be or how to clear it thanks
-
How to populate " UnRestricted Stock" key figure from 0IC_C03
Hello All, There is requirement for us to show a field known as "unrestricted stock" from the info cube 0IC_C03. but there is no such key figure in that info cube. I searched all the forums and learnt that it must be calculated on fly while the repor
-
i'm new to iphoto and made the mistake of not unchecking the "make duplicate" preference when i imported my photos from folders on my hard drive. that means i now have a lot of duplicates to clean up, with photos taking up twice as much HD space as t
-
Only one CPU core high sys usage when create database instance via dbca
when using dbca to create database instance JUST ONLY ONE CPU core high sys usage how to troubleshoot it see this: top - 09:28:19 up 55 days, 20:38, 10 users, load average: 1.00, 1.08, 1.31 Tasks: 1231 total, 2 running, 1228 sleeping, 0 stopped,
-
Regarding XSLT Transformations
This is reagrding the question I posted earlier about XPATH evaluation. I have tried the same XPATH in different engines and they have evaluated correctly but the oraxsl does not recognize it somehow. Is there a list or documentation only on oraxsl.