Catch text in sapscript into a variable
Hi ,
Present in sapscript printing text once this command trigger
INCLUDE &VBDPA-TDNAME& OBJECT VBBP ID 0001 NEW-PARAGRAPH ZI
but I want to catch this text in a variable further validation.
How should i catch this text?
Thanks,
Asha
HI,
Use the READ_TEXT function module and pass these values it wil return the text.
write a subroutine in a program and call that subroutine in the script..
Use perform statement.
Ex.
in script:
:/ perform <form> in program <prog>
:/ using &invar1&
:/ using &invar2&
:/ changing &outvar1&
:/ endperform
in se38:
Report <prog>
Form <form> Tables in_tab structure itcsy
out_tab structure itcsy.
Endform.
In this subroutine use the function module read_Text and return the text after this funtion module call to the script.
thead-tdid = 'ZA03'.
thead-tdspras = 'E'.
thead-tdname = vbdka-vbeln.
thead-tdobject = 'VBBK'.
call function 'READ_TEXT'
exporting
id = thead-tdid
language = thead-tdspras
name = thead-tdname
object = thead-tdobject
importing
header = thead
tables
lines = tlines
exceptions
id = 01
language = 03
name = 02
not_found = 05
object = 01
savemode = 04.
Thanks
mahesh
Similar Messages
-
Importing a text file into a variable
I have a text file that I would like to import as a variable in javascript. I would like to do some editing to the text in the script before I place it into the page. I have the script splitting text into an array and the different parts need to go to different places... I have everything working for me except for importing the text from a file into a variable (right now I'm defining the variable from within the script).
Any help would be appreciated!
-ShaneIn Javascript you could use this:
var f = File ('/d/books/mytextfile.txt');
if (f.exists)
f.open ('r', undefined, undefined);
var textfile_contents = f.read();
f.close ();
Peter -
Reg:Getting error text from a channel into a file or into a variable
Hi,
Can we get the error text such as u201Cjava.lang.NegativeArraySizeExceptionu201D from a communication channel into a variable or in the form of an xml message so that based on kind of error further processing can be done.
Regards,
RahulYou can decide further processing based on the data available in the mapping. If the value comes in the source field for a list element as you expected do UDF and return error as string and decide the mapping as per business need. I talk about something like enhanced interface determination. That's one way. Reading the error message from the communication channel and decide does not seem to be better option.
-
I need to convert a few QM custom sapscript into PDF.
I need to accomplish this and make the usability easier for the users
I know we can do these 2 things
1. I know we can use the standard sap program RSTXPDFT4 to convert the spool to PDF.
2. Change the Print Program "Open Form" FM to get the OTF and converting the OTF to PDF.
If I take the "changing the print program" route, i need to change all print programs. Which will be more effort.
So i want to build a custom program, which take the inspection lot and file location as input, the program needs to generate the output programatically, get the spool, and run the program RSTXPDFT4.
I need to figure out 1. how to issue the output from a program 2. how to get the spool number.
Any help appreciated.
Thanks,
Gopi.Hi Gopi,
Please go through this program,this is for smartform but you can use this in your script driver program.
*& Report YMSL_ORDER_ACCEPTANCE
REPORT YMSL_ORDER_ACCEPTANCE.
*********Variable Declarations *****************************
DATA: GV_FORM_NAME TYPE RS38L_FNAM, " Used to store the function module generated by Smartform
GV_BIN_FILESIZE TYPE I, " Store the file size
GV_POS TYPE I,
GV_LEN TYPE I,
GV_TAB_LINES TYPE I,
gv_desc_lines type i.
********Constants *******************************************
DATA : GC_TEXT(11) TYPE C VALUE 'Form Output',
GC_TST(3) TYPE C VALUE 'TST',
GC_TESTING(20) TYPE C VALUE 'Order Acceptance'.
*********Work Area Declarations *****************************
DATA: GS_DOCDATA TYPE SODOCCHGI1, " Data of an object which can be changed
GS_CTRLOP TYPE SSFCTRLOP, " Smart Forms: Control structure
GS_OUTOPT TYPE SSFCOMPOP, " SAP Smart Forms: Smart Composer (transfer) options
GS_OTFDATA TYPE SSFCRESCL, " Smart Forms: Return value at end of form printing
GS_RECLIST TYPE SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GS_PDF_TAB TYPE TLINE, " Workarea for SAP Script Text Lines
GS_OBJBIN TYPE SOLISTI1, " SAPoffice: Single List with Column Length 255
GS_OBJPACK TYPE SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : w_doc_chng typE sodocchgi1.
*********Internal tables Declarations *****************************
DATA : I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA: GT_RECLIST TYPE TABLE OF SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GT_PDF_TAB TYPE TABLE OF TLINE, " SAPscript: Text Lines
GT_OTF TYPE TABLE OF ITCOO, " OTF Structure
GT_OBJBIN TYPE TABLE OF SOLISTI1, " SAPoffice: Single List with Column Length 255
GT_OBJPACK TYPE TABLE OF SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : BEGIN OF IT_ADR6 OCCURS 0,
SMTP_ADDR TYPE ADR6-SMTP_ADDR,
END OF IT_ADR6.
DATA : W_FILE_NAME TYPE STRING,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
CLEAR : GV_FORM_NAME,
GS_CTRLOP,
GS_OUTOPT,
GS_OTFDATA,
GV_BIN_FILESIZE,
GV_POS,
GV_LEN,
GV_TAB_LINES.
SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS WINDOW TITLE scr_ttl .
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TXT_B1 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(15) TX_VBELN.
PARAMETER : P_VBELN TYPE VBAK-VBELN .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
*SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TXT_B2 .
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: R_OUT RADIOBUTTON GROUP R1 DEFAULT 'X' USER-COMMAND RAD11 .
SELECTION-SCREEN COMMENT 5(20) TXT_OUT. " roles by t-code
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_PDF RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(20) TXT_PDF.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_MAIL RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(15) TXT_MAIL.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(7) TXT_MAL1.
PARAMETER : P_MAIL TYPE ADR6-SMTP_ADDR MODIF ID M1.
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN: END OF SCREEN 1001 .
CALL SELECTION-SCREEN 1001 STARTING AT 20 5 ENDING AT 105 10.
*SET PF-STATUS 'STATUS'.
INITIALIZATION.
TX_VBELN = 'Order'.
TXT_B1 = 'Selection Criteria '.
TXT_B2 = 'Output Criteria '.
scr_ttl = 'Order Acceptance'.
TXT_OUT = 'Print Output'.
TXT_PDF = 'Save To PDF'.
TXT_MAIL = 'Mail the Output'.
TXT_MAL1 = 'E-mail'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R_MAIL <> 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0. " Disable for input.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MAIL.
PERFORM TABLE_HELP.
START-OF-SELECTION..
IF P_VBELN IS NOT INITIAL.
PERFORM GET_SF.
IF R_PDF = 'X' .
PERFORM CONVERT_OTF.
PERFORM SAVE_DIALOG.
PERFORM DOWNLOAD.
ELSEIF R_MAIL = 'X'.
IF P_MAIL IS NOT INITIAL.
PERFORM CONVERT_OTF.
PERFORM SEND_MAIL.
ELSE.
MESSAGE 'Please Enter Email Address' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ELSE.
MESSAGE 'Please Enter Order No' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
*ENDIF.
END-OF-SELECTION.
*& Form TABLE_HELP
FORM TABLE_HELP .
IF R_MAIL = 'X'.
SELECT SMTP_ADDR FROM ADR6 INTO TABLE IT_ADR6.
SORT IT_ADR6.
DELETE ADJACENT DUPLICATES FROM IT_ADR6 COMPARING ALL FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'IT_ADR6-SMTP_ADDR'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'EMAIL'
STEPL = 0
WINDOW_TITLE = 'SELECT MAIL ADDRESS'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_ADR6
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " TABLE_HELP
*& Form GET_SF
FORM GET_SF .
*u2022 Generate Function Module name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_CHK'
IMPORTING
FM_NAME = GV_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*u2022 Assigning values to Form Control Structure and Form Composer
IF R_OUT <> 'X'.
GS_CTRLOP-GETOTF = 'X'.
GS_CTRLOP-NO_DIALOG = 'X'.
GS_OUTOPT-TDNOPREV = 'X'.
ENDIF.
*/1BCDWB/SF00000368
CALL FUNCTION GV_FORM_NAME "'/1BCDWB/SF00000368'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GS_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = GS_OUTOPT
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
CALL FUNCTION GV_FORM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GS_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = GS_OUTOPT
USER_SETTINGS = 'X'
TEMP_VBELN = P_VBELN
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
ENDFORM. " GET_SF
*& Form CONVERT_OTF
FORM CONVERT_OTF .
*u2022 Assigning the OTFDATA to OTF Structure table
CLEAR GT_OTF.
GT_OTF[] = GS_OTFDATA-OTFDATA[].
*u2022 Convert the OTF DATA to SAP Script Text lines
CLEAR GT_PDF_TAB.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
BIN_FILE =
TABLES
OTF = GT_OTF
LINES = GT_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
*t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
*CALL FUNCTION 'CONVERT_OTF'
*EXPORTING
*FORMAT = 'PDF'
*MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
*IMPORTING
*BIN_FILESIZE = W_bin_filesize
BIN_FILE =
*TABLES
*otf = T_OTF
*lines = T_pdf_tab
*EXCEPTIONS
*ERR_MAX_LINEWIDTH = 1
*ERR_FORMAT = 2
*ERR_CONV_NOT_POSSIBLE = 3
*ERR_BAD_OTF = 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.
ENDFORM. " CONVERT_OTF
*& Form SAVE_DIALOG
FORM SAVE_DIALOG .
To display File SAVE dialog window
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Download to PDF '
DEFAULT_EXTENSION = '(*.PDF)'
DEFAULT_FILE_NAME = 'file.pdf'
FILE_FILTER = 'PDF Format(*.PDF)'
INITIAL_DIRECTORY = 'C:\Documents and Settings\Administrator\Desktop'
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4
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. " SAVE_DIALOG
*& Form DOWNLOAD
FORM DOWNLOAD .
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = GT_PDF_TAB
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
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. " DOWNLOAD
*& Form SEND_MAIL
FORM SEND_MAIL .
***changes by rajan
*DATA : v_first TYPE USER_ADDR-NAME_FIRST,
V_LAST TYPE USER_ADDR-NAME_LAST.
DATA : detail TYPE STRING.
*SELECT SINGLE NAME_FIRST NAME_LAST FROM
USER_ADDR INTO (V_FIRST,V_LAST)
WHERE BNAME = syst-UNAME.
CONCATENATE v_first V_LAST INTO detail SEPARATED BY space.
data : v_po_no TYPE vbkd-bstkd,
v_po_date TYPE vbkd-bstdk.
data : day TYPE STRING,
month type STRING,
year TYPE STRING.
data : date TYPE STRING.
SELECT SINGLE BSTKD BSTDK
FROM VBKD
INTO (v_po_no,v_po_date)
WHERE VBELN = P_VBELN.
day = v_po_date+6(2).
month = v_po_date+4(2).
year = v_po_date+0(4).
CONCATENATE day '/' month '/' year INTO date.
CONCATENATE 'Please Find attached Order Acceptance against your P.O.No.' v_po_no 'dated' date '.' INTO detail SEPARATED BY space.
**u2022 Assigning the Description of the object sent in the mail
CLEAR GS_DOCDATA.
GS_DOCDATA-OBJ_NAME = GC_TST.
GS_DOCDATA-OBJ_DESCR = GC_TESTING.
*u2022 Assigning the email id to Structure of the API Recipient List table
CLEAR : GT_RECLIST, GS_RECLIST.
GS_RECLIST-RECEIVER = P_MAIL. "
GS_RECLIST-REC_TYPE = 'U'."'G' ."'O'. "'B'. "'U'.
APPEND GS_RECLIST TO GT_RECLIST.
mail body rajan
I_OBJTXT = 'Dear Sir/Madam.'.
APPEND I_OBJTXT.
I_OBJTXT = detail.
APPEND I_OBJTXT.
I_OBJTXT = ''.
APPEND I_OBJTXT.
I_OBJTXT = 'Thanks.'.
APPEND I_OBJTXT.
I_OBJTXT = 'Best Regards,'.
APPEND I_OBJTXT.
I_OBJTXT = 'For Bilcare Ltd.'.
APPEND I_OBJTXT.
DESCRIBE TABLE i_objtxt LINES gv_desc_lines.
*DESCRIBE TABLE i_objtxt LINES v_lines_txt.
CLEAR I_OBJTXT.
READ TABLE I_OBJTXT INDEX gv_desc_lines.
if sy-subrc = 0.
Document information.
GS_DOCDATA-obj_name = 'ord_accept'.
GS_DOCDATA-expiry_dat = sy-datum + 10.
GS_DOCDATA-obj_descr = 'Order Acceptance'.
GS_DOCDATA-sensitivty = 'F'. "Functional object
GS_DOCDATA-doc_size = gv_desc_lines * 255.
CLEAR Gs_OBJPACK-transf_bin.
Start line of object header in transport packet
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-doc_size = gv_desc_lines * 255.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = gv_desc_lines.
GS_OBJPACK-DOC_TYPE = 'RAW'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'ORDER_ACCEPTANCE.PDF'.
APPEND GS_OBJPACK TO GT_OBJPACK.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-doc_type = 'RAW'.
*APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
*u2022 Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
CLEAR : GS_OBJBIN, GS_PDF_TAB.
LOOP AT GT_PDF_TAB INTO GS_PDF_TAB.
GV_POS = 255 - GV_LEN.
IF GV_POS > 134. "length of pdf_table
GV_POS = 134.
ENDIF.
GS_OBJBIN+GV_LEN = GS_PDF_TAB(GV_POS).
GV_LEN = GV_LEN + GV_POS.
IF GV_LEN = 255. "length of out (contents_bin)
APPEND GS_OBJBIN TO GT_OBJBIN.
CLEAR: GS_OBJBIN, GV_LEN.
IF GV_POS < 134.
GS_OBJBIN = GS_PDF_TAB+GV_POS.
GV_LEN = 134 - GV_POS.
ENDIF.
ENDIF.
ENDLOOP.
IF GV_LEN > 0.
APPEND GS_OBJBIN TO GT_OBJBIN.
ENDIF.
*u2022 Filling the details in SAPoffice: Description of Imported Object Components table
DESCRIBE TABLE GT_OBJBIN LINES GV_TAB_LINES.
CLEAR GS_OBJBIN.
READ TABLE GT_OBJBIN INTO GS_OBJBIN INDEX GV_TAB_LINES.
IF SY-SUBRC = 0.
GS_OBJPACK-DOC_SIZE = ( GV_TAB_LINES - 1 ) * 255 + STRLEN( GS_OBJBIN ).
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = GV_TAB_LINES.
GS_OBJPACK-DOC_TYPE = 'PDF'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'Order Acceptance'.
APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = GS_DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
PACKING_LIST = GT_OBJPACK
OBJECT_HEADER = I_OBJTXT
CONTENTS_BIN = GT_OBJBIN
CONTENTS_TXT = I_OBJTXT
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = GT_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE 'Sent Successfully'.
MESSAGE 'Sent Successfully' TYPE 'I'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
SUBMIT RSCONN01
WITH MODE EQ 'INT'
AND RETURN.
ENDFORM. " SEND_MAIL
Thanks
Ankur Sharma -
Error message into a Variable.
Dear users,
I have a rather usual (unusual from the weekend beers for me though!!) query which I can't figure out a proper way to implement.
My requirement is like this:
I have a message class in which I want to define a text 'Employee number & not found'.
I want to use this in the program, but not to raise this error. Instead, I want to move this error message with the Employee number into a Character(200) variable.
So instead of using MESSAGE e0xx(messageclass) USING employee number, I would like to move the error text into a variable which looks like:
lv_text = e0xx(messageclass) USING '1234' which stores the text 'Employee number 1234 not found' in lv_text.
How would I acheive it??
Thanks, V!Try tis way
message e999(00) with i_emp-empno into lv_text.
press f1 in message will provide you more details
a® -
Error when fetching into a variable of ROWTYPE
I came across with a vied error when creating the body of a method.
Problem:
I have a Type called Emp_typ and a corresponding table Emp_tab.
When I create the body of get method it gives the following error msg :
Compilation errors for PACKAGE BODY CHAMITH.EMP_API
Error: PLS-00386: type mismatch found at 'EMP_ROW' between FETCH cursor and INTO variables
Line: 9
Text: fetch get_emp_rec into emp_row;
Get Method body :
function get(id_ number) return emp_tab%rowtype IS
cursor get_emp_rec IS
select * from emp_tab;
emp_row emp_tab%rowtype;
begin
open get_emp_rec;
fetch get_emp_rec into emp_row;
close get_emp_rec;
return emp_row;
end;
However when I do the same without having a type upon the table emp_tab, it works fine.
Pls give me a solution for that.
Thanks,
ChamithHi,
Let me know the Oracle Database Version.
Regards,
Sailaja -
How I can transfer data from the database into a variable (or array)?
I made my application according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed one function to query the database - add the two parameters and get the value of the table in String format. A test operation shows that all is ok. If I want to display this value in the text area, I simply drag and drop service to this element in the design mode
(<s:TextArea x="153" y="435" id="nameText" text="{getDataMeanResult.lastResult[0].name}" width="296" height="89" />).
It also works fine, just a warning and encouraged to use ArrayCollection.getItemAt().
Now I want to send the value to a variable or array, but in both cases I get an error: TypeError: Error #1010: A term is undefined and has no properties..
How can I pass a value from the database into a variable? Thank you.
public var nameTemp:String;
getDataMeanResult.token = authors.getDataMean(arrayOfNumber[0], dir_id);
nameTemp = getDataMeanResult.lastResult[0].name;
public var nameArray:Array = new Array();
for (var i:uint=o; i<3; i++){
getDataMeanResult.token = authors.getDataMean(arrayOfNumber[i], dir_id);
nameArray[i] = getDataMeanResult.lastResult[0].name;
And how i can use syntax highlighting in this forum?Astraport2012 wrote:
I have to go back to the discussion. The above example works fine when i want to get a single value of the database. But i need to pass an array and get an array, because i want to get at once all the values for all pictures tooltips. I rewrote the proposed Matt PHP-script and it works. However, i can not display the resulting array.
yep, it won't work for Arrays, you'll have to do something slightly more intelligent for them.
easiest way would be to get your PHP to generate XML, then read that into something like an ArrayList on your HTTPService result event (depends what you're doing with it).
for example, you could have the PHP generate XML such as:
<pictures>
<location>test1.png</location>
<location>test2.png</location>
<location>test3.png</location>
<location>test4.png</location>
<location>test5.png</location>
<location>test6.png</location>
</pictures>
then you'll read that in as the ResultEvent, and perform something like this on it
private var tempAC:ArrayList = new ArrayList
protected function getStuff_resultHandler(event:ResultEvent):void
for each(var item:Object in event.result.pictures)
var temp:String = (item.@location).toString();
tempAC.addItem(temp);
in my example on cookies
http://www.mattlefevre.com/viewExample.php?tut=flash4PHP&proj=Using%20Cookies
you'll see an example of how to format an XML structure containing multiple values:
if($_COOKIE["firstName"])
print "<stored>true</stored>";
print "<userInfo>
<firstName>".$_COOKIE["firstName"]."</firstName>
<lastName>".$_COOKIE["lastName"]."</lastName>
<userAge>".$_COOKIE["userAge"]."</userAge>
<gender>".$_COOKIE["gender"]."</gender>
</userInfo>";
else
print "<stored>false</stored>";
which i handle like so
if(event.result.stored == true)
entryPanel.title = "Welcome back " + event.result.userInfo.firstName + " " + event.result.userInfo.lastName;
firstName.text = event.result.userInfo.firstName;
lastName.text = event.result.userInfo.lastName;
userAge.value = event.result.userInfo.userAge;
userGender.selectedIndex = event.result.userInfo.gender;
depends on what type of Array you're after
from the sounds of it (with the mention of picture tooltips) you're trying to create a gallery with an image, and a tooltip.
so i'd probably adopt something like
<picture>
<location>example1.png</location>
<tooltip>tooltip for picture #1</tooltip>
</picture>
<picture>
<location>example2.png</location>
<tooltip>tooltip for picture #2</tooltip>
</picture>
<picture>
<location>example3.png</location>
<tooltip>tooltip for picture #3</tooltip>
</picture>
etc...
or
<picture location="example1.png" tooltip="tooltip for picture #1"/>
<picture location="example2.png" tooltip="tooltip for picture #2"/>
<picture location="example3.png" tooltip="tooltip for picture #3"/>
etc... -
How to put date&time into a variable from a database?
In an Oracle table, myDateColumn is 2002-06-25 17:40:55. I can't put it into a variable.
java.text.SimpleDateFormat dF=new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
rs=stmt.executeQuery("select myDateColumn from myTable");
rs.next()
System.out.println(rs.getString(1)); // 2002-06-25 17:40:55 is output
java.util.Date myDate=rs.getDate(1);
out.println(dF.format(myDate)); // 25/06/2002 00:00:00 is output
java.util.Date myDate=rs.getTime(1);
out.println(dF.format(myDate)); // 01/01/1970 17:40:55 is output
My question is: How should I put this date (both date and time) into a variable, myDate?There are three JDBC types relating to time:
1] The JDBC DATE type represents a date consisting of day, month, and year. The corresponding SQL DATE type is defined in SQL-92, but it is implemented by only a subset of the major databases. Some databases offer alternative SQL types that support similar semantics.
2] The JDBC TIME type represents a time consisting of hours, minutes, and seconds. The corresponding SQL TIME type is defined in SQL-92, but it is implemented by only a subset of the major databases. As with DATE, some databases offer alternative SQL types that support similar semantics.
3] The JDBC TIMESTAMP type represents DATE plus TIME plus a nanosecond field. The corresponding SQL TIMESTAMP type is defined in SQL-92, but it is implemented by only a very small number of databases.
In ur case pls use:
java.sql.Timestamp
good luck !
...san :--) -
Problem to store a oracle sql result into a variable
Hello everyone,
I'm working on a little project that use c#, Oracle ODT and asp.net, so here is the thing, I need to save the result of a sequence (SECNUM.NEXTVAL ) into a variable, then call that value from many inserts and querys and for last make the commit. My problem is that I don't know how to convert the string result to a number and the call it from the statements. Always brings two errors, one is invalid number because Im sending a string and the another is that if I comment the line cmd.ExecuteNonQuery(); the script runs but no commit happens.
This is my code, is attached to a button:
C# Syntax (Toggle Plain Text)
string oradb = "Data Source=BBDD;User Id=DEMO;Password=DEMO;";
string cmd1 = "SELECT SECNUM.NEXTVAL FROM DUAL";
OracleConnection conn = new OracleConnection(oradb);
conn.Open();
OracleParameter parm = new OracleParameter();
parm.OracleDbType = OracleDbType.Decimal;
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.Parameters.Add(parm);
cmd.CommandText = "INSERT INTO DEMOINCI (CODINCI, CODCLI) VALUES (('" + cmd1 +"'), 'TEST')";
cmd.CommandText = "INSERT INTO DEMOINCILIN (CODINCI,CODLIN) VALUES (('" + cmd1 +"'),1)";
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
So my problem is that the column CODINCI is a column number of (9) and not a VARCHAR and can not be changed because is already have data, so when I use the code of the example, Oracle return an error saying Invalid number (of course).
With the help of a friend I tried to put with the cast like this cmd.CommandText = "INSERT INTO DEMOINCI (CODINCI, CODCLI) VALUES (" + "CAST(" + cmd1 + "AS NUMBER), 'TEST')"; and it works but only if I comment the line cmd.ExecuteNonQuery();, so the commit never happend and of course there is no insert in the database.
¿It is so difficult to store a result of an SQL into a variable and then call it back on a statement?, on Oracle Forms you create a cursor like cursor=CVAL SELECT SECNUM.NEXTVAL VAL FROM DUAL and that it you can then use the VAL result into all other queries of the same form an retrieving with the :VAL option.
Thanks for all the help.I just had to do something similar for my C# class, using SQL Server. The primary key for a "Customers" table was an auto-incrementing integer. After inserting a new customer I had to retrieve and display the primary key:
string selectStatement = "SELECT IDENT_CURRENT('Customers') from Customers";
SqlCommand selectCommand = new SqlCommand(selectStatement, connection);
int customerID = Convert.ToInt32(selectCommand,ExecuteScalar());
The ExecuteScalar() method of selectCommand returned the first column of the first row of the dataset, which in this case was the key of the new Customers record, as an object. Convert.ToInt32() converted the key to an integer.
Once you store SECNUM.NEXTVAL as an integer, you can use it to create a Parameter for the Command object.
HTH. -
I want to do the following
<%
response.setContentType("text.xsl");
String something = ""+<xsl:value-of select='@id' />+"";
%>
But seems like the xsl doesn't render
Can someone point me in he right directionsWhat is the name of this variable?
Record
XML_F52E2B61-18A1-11D1-B105-00805F49916B
1
<pie><slice title="Group1" pull_out="false">5</slice><slice title="Group2" pull_out="false">19</slice><slice title="Group3" pull_out="false">3</slice><slice title="Group4" pull_out="true">93</slice></pie>
What is the line of code the generated this error?
Complex cannot be converted into simple variable
Properly combine the variable with the function call and all should be good. -
Select LONG column into CLOB variable
Hi all,
I am trying retrieve the data present in a LONG column into a CLOB variable.
However I am getting an error, pls let me know how I can resolve it.
DECLARE
v_text CLOB;
BEGIN
SELECT TO_LOB(trigger_body)
INTO v_text
FROM
user_triggers
WHERE
ROWNUM <= 1;
END;
ERROR at line 8:
ORA-06550: line 8, column 20:
PL/SQL: ORA-00932: inconsistent datatypes: expected NUMBER got LONG
ORA-06550: line 8, column 5:
PL/SQL: SQL Statement ignored
Let me know if there is an alternate to this. I would like to get the data present in the LONG column into a variable.
The reason why I am not retrieving the LONG column into LONG variable is stated below (from Oracle Website):
You can insert any LONG value into a LONG database column because the maximum width of a LONG column is 2**31 bytes.
However, you cannot retrieve a value longer than 32760 bytes from a LONG column into a LONG variable.
Thanks and Regards,
SomuThere are couple of things I did (listed in order):
1) Create Global Temporary Table containing a CLOB column
2) Select LONG column and convert to CLOB by using TO_LOB and insert into Global Temporary Table containing a CLOB column
2) Select from this Global Temporary Table (which already contains data in CLOB) and assign it to a CLOB variable.
This is done because you can not directly use TO_LOB in a select statement to assign the value to a CLOB variable.
Stated below is an example:
-- Create Temporary Table
CREATE GLOBAL TEMPORARY TABLE glb_tmp_table_lob(
time TIMESTAMP WITH LOCAL TIME ZONE,
text CLOB
ON COMMIT DELETE ROWS;
-- PL/SQL Block to Execute
DECLARE
v_clob CLOB;
BEGIN
-- Insert into Temporary Table by converting LONG into CLOB
INSERT INTO glb_tmp_table_lob (
time ,
text
SELECT
sysdate ,
TO_LOB(dv.text)
FROM
dba_views dv
WHERE
ROWNUM <= 1
-- Select from the Temporary table into the variable
SELECT
gt.text
INTO
v_clob
FROM
glb_tmp_table_lob gt;
COMMIT;
-- Now you can use the CLOB variable as per your needs.
END;
/ -
Capturing oracle error codes into a variable
Hi
Can someone show me how it is possible to save an Oracle defined error code into a variable? What I am trying to do is when a stored procedure fails an Oracle error is raised, such as ORA-xxxx, then pass this code into variable to be saved into a log.
How do I achieve this?user633278 wrote:
How do I achieve this?Function SQLCODE in PL/SQL exception handler returns error code. SQLERRM returns message:
SQL> declare
2 x number;
3 begin
4 x := 1/0;
5 exception
6 when others
7 then
8 dbms_output.put_line('Error code: ' || SQLCODE);
9 dbms_output.put_line('Error message: ' || SQLERRM);
10 end;
11 /
Error code: -1476
Error message: ORA-01476: divisor is equal to zero
PL/SQL procedure successfully completed.
SQL> SY. -
How to take data from HTML Template into BSP Variable?
hi all,
can we take the data from the input field of HTML Template and collect into BSP variable? i have the shown the HTML Template into BSP page by passing the url in <IFRAME> tag now i have to take the data form the into field of HTML Template and save it back to the BSP table onclicking the Save button of BSP Page. please help me out thanks in advance.
Thanks & Regards,
AmolHi Amol,
This is very simple....
In the onInputProcessing event of the page use the following code to read data from the InputField into an ABAP variable...
Then you can use it at will..!
Code is :
data : event TYPE REF TO if_htmlb_data,
but_event TYPE REF TO cl_htmlb_event_button.
event = cl_htmlb_manager=>get_event( request ).
IF event->EVENT_NAME = 'button' and event->EVENT_TYPE = 'click'.
but_event ?= event.
CASE event->EVENT_ID.
when 'your_button_id'.
data : lw_inf type ref to cl_htmlb_inputfield.
lw_inf ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'inputField'
id = 'your_inputField_id' ).
if lw_inf->value is not initial.
lw_variable = lw_inf->value.
endif.
ENDCASE.
ENDIF. -
Fetches more values into one variable
Hi, inside a cursor loop I'd like to assign, each fetch, a value to a variable, in order, at the end to have a collection of all the values fetched into the same variable.
The code is the following:
CREATE OR REPLACE procedure APPS.AAA as
v_pino varchar2(64);
CURSOR tks_opened_range IS
SELECT incident_number AS YP_TKS_OPENED_WITHIN_RANGE FROM cs.cs_incidents_all_b a, cs_incident_statuses_b b, Cs_Incident_Statuses_Tl c
WHERE b.incident_status_id = c.incident_status_id
AND a.incident_status_id = b.incident_status_id
AND (b.attribute1 <> '3' OR b.attribute1 IS NULL)
AND c.language = 'EL'
AND ((sysdate - to_date(incident_attribute_6, 'dd-mm-yyyy hh24:mi'))*1440) BETWEEN 1 AND 11111111111
AND incident_attribute_2 IN ('ΓΕΝΙΚΗ ΔΙΕΥΘΥΝΣΗ ΤΕΧΝΟΛΟΓΙΑΣ')
ORDER BY incident_number;
rec_tks_opened_range tks_opened_range%ROWTYPE;
begin
FOR rec_tks_opened_range IN tks_opened_range
LOOP
v_pino := rec_tks_opened_range.YP_TKS_OPENED_WITHIN_RANGE;
DBMS_OUTPUT.PUT_LINE('v_pino: ' || v_pino);
end loop;
end AAA;
This works with the variable v_pino!....but at the end, the value of the variable v_pino is ONLY the last fetched by the cursor.
Is there a way to declare a variable (or better a collection) or a new type in order to have all the data fetched into this variable and the end of the fetching ?
I need to know this trick because, after, I have to assign this variable to a pipelined table function.
Thanks in advance
Alex
/Great Devang !! Thanks a lot ! It works ! Now I am able to retrieve all the values I need and store them into my variable gino
I searched on the note you mentioned in your mail in order to pass an array as a variable to a table function (PIPE ROW call), but I didn't find nothing about it.
Now I explain to you my situation.
I already implemented a table function that works perfectly. I have 2 cursors declared and 2 PIPE ROW calls.
FUNCTION statistic_report_2_1 (p_resolv_time_ll varchar2, p_resolv_time_ul varchar2, p_ypiresia varchar2)
RETURN xxi_statistic_rep_2_1_tab PIPELINED
IS
-- CURSORS FOR THE FIRST SHEET - Tickets opened per group and per duration
-- Cursor for tickets opened within 1 hour --
CURSOR tks_opened_1_h IS
SELECT incident_number AS YP_TKS_OPENED_WITHIN_1_HOUR
FROM cs.cs_incidents_all_b a, cs_incident_statuses_b b, Cs_Incident_Statuses_Tl c
WHERE b.incident_status_id = c.incident_status_id
AND a.incident_status_id = b.incident_status_id
AND (b.attribute1 <> '3' OR b.attribute1 IS NULL)
AND c.language = 'EL'
AND ((sysdate - to_date(incident_attribute_6, 'dd-mm-yyyy hh24:mi'))*1440) < 60
AND incident_attribute_2 IN (SELECT * FROM TABLE(CAST(xxi_szf_discoverer.ypiresia_values(p_ypiresia) AS xxi_ypiresia_list_tab)))
ORDER BY incident_number;
rec_tks_opened_1_h tks_opened_1_h%ROWTYPE;
-- Cursor for tickets opened between 1 hour and 3 hours --
CURSOR tks_opened_1_3_h IS
SELECT incident_number AS YP_TKS_OPENED_BE_1_3_HOURS FROM cs.cs_incidents_all_b a, cs_incident_statuses_b b, Cs_Incident_Statuses_Tl c
WHERE b.incident_status_id = c.incident_status_id
AND a.incident_status_id = b.incident_status_id
AND (b.attribute1 <> '3' OR b.attribute1 IS NULL)
AND c.language = 'EL'
AND ((sysdate - to_date(incident_attribute_6, 'dd-mm-yyyy hh24:mi'))*1440) BETWEEN 60 AND 179
AND incident_attribute_2 IN (SELECT * FROM TABLE(CAST(xxi_szf_discoverer.ypiresia_values(p_ypiresia) AS xxi_ypiresia_list_tab)))
ORDER BY incident_number;
rec_tks_opened_1_3_h tks_opened_1_3_h%ROWTYPE;
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
-- FIRST SHEET OPEN CURSORS --
TICKETS NUMBER OPENED WITHIN 1 HOUR
FOR rec_tks_opened_1_h IN tks_opened_1_h
LOOP
PIPE ROW(stat_rep_2_1_type(
rec_tks_opened_1_h.YP_TKS_OPENED_WITHIN_1_HOUR
END LOOP;
-- TICKETS NUMBER OPENED BETWEEN 1 HOUR AND 3 HOURS --
FOR rec_tks_opened_1_3_h IN tks_opened_1_3_h
LOOP
PIPE ROW(stat_rep_2_1_type(
,rec_tks_opened_1_3_h.YP_TKS_OPENED_BE_1_3_HOURS));
END LOOP;
RETURN;
END statistic_report_2_1;
But, in this way and with this syntax, I obtain for each PIPE ROW call only one field filled each time, because I can’t call 2 cursors in a nested loop together (data duplication);
For example:
1st PIPE ROW call : only the first field is filled and into the second I have to put ‘’
2nd PIPE ROW call : only the second field is filled and into the first I have to put ‘’
….and I cant’ call with a single PIPE ROW call two cursor variables…..
Into a Discoverer report this data layout is really bad (you can imagine with thousand
of records).
For this reason I thought to use an array variable (gino) to pass to a single PIPE ROW call outside the cursor loop……but it doesn’t work !!!
Can you suggest me how to resolve this problem….if it possible ?
Did I have to declare other TYPE or collection ?
Thanks you so much
Alex -
ORA-06502 trying to load a long raw into a variable.
Hi. In my table "banco_imagem" the bim_src column is a long raw type.
I´m using oracle forms 6 (not 6i), so I can´t use blob type to save my images.
Now I´m trying to load the long raw column into a variable in a package that runs on 10g.
I´m trying to execute de folowing code at sql plus:
declare
wbim long raw;
begin
select bim_src into wbim from banco_imagem where rownum=1;
end;
The column is not null. It has a value.
I got the folowing error:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 4
My goal is to load this column to convert it to blob so I can manipulate with my others (already running) functions.
Can anyone help me?
Thanks!Hi Mcardia,
not sure where you're going wrong, but perhaps if you compare what you've done up to now to the following code snippet, you may figure it out eventually!
SQL> drop table test_raw
2 /
Table dropped.
SQL>
SQL> create table test_raw (col_a long raw, col_b blob)
2 /
Table created.
SQL> set serveroutput on
SQL> declare
2
3 l1 long raw;
4 l2 long raw;
5
6 b1 blob;
7
8 begin
9
10 l1:= utl_raw.cast_to_raw('This is a test');
11
12 insert into test_raw (col_a) values (l1);
13
14
15 select col_a
16 into l2
17 from test_raw
18 where rownum < 2;
19
20 dbms_lob.createtemporary (b1, false);
21
22 dbms_output.put_line(utl_raw.cast_to_varchar2(l2));
23 b1 := l2;
24
25 update test_raw set col_b = b1;
26
27 commit;
28
29 dbms_output.put_line('Done ');
30
31 exception
32 when others then
33 dbms_output.put_line('Error ' || sqlerrm);
34 end;
35 /
This is a test
Done
PL/SQL procedure successfully completed.Bear in mind that I'm running on the following:
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
Maybe you are looking for
-
Higher volume for video playback?
Hello everyone! I am new to the boards and to the touchpad. I have a question about adjusting the volume in video playback. I woudl like to know while during the conversion process, are there any converters out there that can boost the volume? I h
-
Hi, I am having trouble updating my apps, I have tried one at time and all together but they just keep on whirring away and nothing happens! any ideas woud be appreciated.
-
This is from the JMS specification: A provider must be prepared to accept, from a client, a message whose implementation is not one of its own. A message with a �foreign� implementation may not be handled as efficiently as a provider�s own implementa
-
Is following procedure valid ?? If not then how and where I can use & in front of variable? PROCEDURE DYNPROC ( tbl IN varchar2, col1 IN varchar2, col2 IN varchar2) IS BEGIN select &col1,&col2 from &tbl; EXCEPTION WHEN others THEN raise ; END; -- Pro
-
Illustrator / photoshop / Creative Cloud app - all not launching
Waited 2 hours on chat and was told "specialist team" only work weekdays - even though it says 24hrs support?? Apps simply don't open, they launch, then that's it - they don't respond. Using a mac - first issue after about 2 months of everything runn