How to create procedure for header table and item table
Hi,
Can anyone help me to understand how to write SQLscript procedure for looping item table inside header table?
I fetch records from sales header table ( order number ) and using that order number to loop sales item table,thereafter I need to perform business logic.
Any example similar above requirement would be helpful
thanks
Sourav
Hi Folks,
This is my use case
1) Select fact records from tables (say A,B,C,D ) with suitable Joins and certain Where conditions
SELECT ordid FROM TABLES A,B,C,D on join condition where ....
2) Using above header records , I have to select each and every item level data from different tables ( say X,Y,Z ) and perform calculation to derive new columns to update a new table ( Zreport )
UPDATE TABLE ZREPORT
SET col1 = ( Select qty FROM TABLE X WHERE ordid = A.ordid
UPDATE TABLE ZREPORT
SET col2 = ( Select price FROM TABLE y WHERE ordid = B.ordid.
and so on for other columns..
3) Zreport table will be used for reporting.
I would like to know the best way to achieve this to gain performance.
Appreciate the help!
Thanks
Sourav
Similar Messages
-
How to create documentation for report programs and how to use it
how to create documentation for report programs and how to use it in the selection screen by placing an icon in the Applicatin Tool bar. If i click this icon the help documentation has to display.
Note: Exaple <b>RSTXSCRP</b> programs selection screenHi
1 goto SE38 transaction, give the program name
2 Click on documentation radiobutton & then press change
3 Write your PURPOSE, PREREQUISITES etc details
4 Save the same & Activae it.
The icon will come automatically on selection screen
Thanks
Sandeep
Reward if useful -
How we will display the header data and item data seperately in lists
how we will display the header data and item data seperately in lists
REPORT z_alv_list_block.
TYPE-POOLS: slis. " ALV Global types
SELECTION-SCREEN :
SKIP,
BEGIN OF LINE,
COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '02' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA:
1st Table
BEGIN OF gt_kna1 OCCURS 0, " Data displayed
kunnr LIKE kna1-kunnr, " Customer number
ernam LIKE kna1-ernam, " Name of Person who Created
erdat LIKE kna1-erdat, " Creation date
name1 LIKE kna1-name1, " Name 1
END OF gt_kna1,
2nd Table
BEGIN OF gt_mara OCCURS 0,
ernam LIKE mara-ernam, " Name of Person who Created
matnr LIKE mara-matnr, " Material number
ersda LIKE mara-e rsda, " Creation date
brgew LIKE mara-brgew, " Gross weight
END OF gt_mara,
3rd Table
BEGIN OF gt_vbak OCCURS 0,
vkorg LIKE vbak-vkorg, " Sales organization
kunnr LIKE vbak-kunnr, " Sold-to party
vbeln LIKE vbak-vbeln, " Sales document
netwr LIKE vbak-netwr, " Net Value of the Sales Order
waerk LIKE vbak-waerk, " SD document currency
END OF gt_vbak.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
Read data
SELECT * FROM kna1
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_kna1.
SELECT * FROM mara
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_mara.
SELECT * FROM vbak
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'.
PERFORM list_append TABLES gt_kna1
USING '1'
'GT_KNA1'.
PERFORM list_append TABLES gt_mara
USING '2'
'GT_MARA'.
PERFORM list_append TABLES gt_vbak
USING '3'
'GT_VBAK'.
PERFORM f_list_display.
FORM USER_COMMAND *
FORM user_command USING i_ucomm LIKE sy-ucomm
is_selfield TYPE slis_selfield. "#EC CALLED
CASE i_ucomm.
WHEN '&IC1'. " Pick
CASE is_selfield-tabname.
WHEN 'GT_MARA'.
WHEN 'GT_KNA1'.
WHEN 'GT_VBAK'.
READ TABLE gt_vbak INDEX is_selfield-tabindex.
IF sy-subrc EQ 0.
Sales order number
SET PARAMETER ID 'AUN' FIELD gt_vbak-vbeln.
Display Sales Order
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDCASE.
ENDFORM. " USER_COMMAND
----< /div>
Form list_append
FORM list_append TABLES ut_table
USING u_no TYPE char1
u_tabname TYPE slis_tabname.
Macro definition
DEFINE m_fieldcat.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
ls_sort-fieldname = &1.
ls_sort-up = 'X'.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA :
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
ls_sort TYPE slis_sortinfo_alv,
lt_sort TYPE slis_t_sortinfo_alv. " Sort table
DATA:
lt_events TYPE slis_t_event,
ls_event TYPE slis_alv_event,
ls_layout TYPE slis_layout_alv.
ls_layout-group_change_edit = 'X'.
ls_layout-colwidth_optimize = 'X'.
ls_layout-zebra = 'X'.
ls_layout-detail_popup = 'X'.
ls_layout-get_selinfos = 'X'.
ls_layout-max_linesize = '200'.
CASE u_no.
WHEN '1'.
Build field catalog and sort table
m_fieldcat 'KUNNR' 'KNA1'.
m_fieldcat 'ERNAM' 'KNA1'.
m_fieldcat 'ERDAT' 'KNA1'.
m_fieldcat 'NAME1' 'KNA1'.
m_sort 'KUNNR'.
WHEN '2'.
m_fieldcat 'MATNR' 'MARA'.
m_fieldcat 'ERNAM' 'MARA'.
m_fieldcat 'ERSDA' 'MARA'.
m_fieldcat 'BRGEW' 'MARA'.
m_sort 'MATNR'.
WHEN '3'.
m_fieldcat 'VBELN' 'VBAK'.
m_fieldcat 'VKORG' 'VBAK'.
m_fieldcat 'KUNNR' 'VBAK'.
m_fieldcat 'NETWR' 'VBAK'.
m_fieldcat 'WAERK' 'VBAK'.
m_sort 'VBELN'.
ENDCASE.
IF u_no CA '13'.
MOVE 'TOP_OF_PAGE' TO ls_event-name.
CONCATENATE 'TOP_OF_PAGE' u_no INTO ls_event-form.
APPEND ls_event TO lt_events.
ELSE.
MOVE 'TOP_OF_LIST' TO ls_event-name.
CONCATENATE 'TOP_OF_LIST' u_no INTO ls_event-form.
APPEND ls_event TO lt_events.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = lt_fieldcat
is_layout = ls_layout
i_tabname = u_tabname
it_events = lt_events
it_sort = lt_sort
i_text =
TABLES
t_outtab = ut_table
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 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.
ENDFORM. " LIST_APPEND
Form f_list_display
FORM f_list_display.
DATA ls_print TYPE slis_print_alv.
ls_print-no_print_selinfos = 'X'. " Display no selection infos
ls_print-no_print_listinfos = 'X'. " Display no listinfos
ls_print-reserve_lines = 2. " Lines reserved for end of page
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
i_interface_check = ' '
is_print = ls_print
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " F_LIST_DISPLAY
FORM top_of_page1 *
FORM top_of_page1. "#EC CALLED
PERFORM top_of_page.
ENDFORM.
FORM top_of_page3 *
FORM top_of_page3. "#EC CALLED
PERFORM top_of_page.
ENDFORM.
FORM top_of_page *
FORM top_of_page.
ULINE.
WRITE : sy-uname, sy-title(56) CENTERED, sy-datum.
ULINE.
ENDFORM.
FORM top_of_list2 *
FORM top_of_list2. "#EC CALLED
WRITE 'TOP OF LIST2'.
ENDFORM.
END OF PROGRAM Z_ALV_LIST_BLOCK *********************** -
How to create schema for Header and Footer with pipe delimiter file BPEL11g
Hi all,
I have issule creating Schema for Header and Footer with body file .The file format is Pipe delimiter.The following format below like is...
Softeware Components:File Adapter(Read) 11g,
1|1211|000|577|5444
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|0000|57|6988|4554|sfdgh|5448|3333|ituu|44445|55546|544|788|7788
1|4544|000|yted
I hope get the sollution for this from this Forum..Please help me out..Thankyou.You mean how many rows or columns..?
If coloumns means 5 and rows only one(1). -
How to create BDC for Deletion of Records in Table Control in BDC for PFCG
I have transcation PFCG and have to go to roles of users there.We will upload the users who has to be deleted and it should delete it from the PFCG in one go .Howcan I create a program to delete from the table .If i delete directly from DB table it doesnt show in SAP log how or Who deleted it and the client wants this log which is needed for accountability.
Pls HELP.
GeorgeHi
You can only indicate the user and all profiles of the user will be deleted.
DATA: BEGIN OF T_DEL_USR OCCURS 0,
USERNAME LIKE BAPIBNAME-BAPIBNAME,
END OF T_DEL_USR.
DATA T_RESULT TYPE STANDARD TABLE OF BAPIRET2
WITH HEADER LINE.
After loading the users to be deleted:
LOOP AT T_DEL_USR.
CALL FUNCTION 'SUSR_BAPI_USER_PROFILES_DELETE'
EXPORTING
USERNAME = T_DEL_USR-USERNAME
TABLES
RETURN = T_RESULT.
ENDLOOP.
I'm not sure but perhaps u have to use bapi for commit too: BAPI_TRANSACTION_COMMIT
Max -
How to create template for multiple users and proper variables for DesktopDNA
Here's the scenario:
25 WXPSP2 laptops with only ZENworks Desktop Management agent installed.
Laptops have at least 4 user profiles each. All laptops have same
configuration. I want to create just one image for all laptops and am
using personality migration to handle the different user profiles on each
laptop.
We are using ZENworks 7 on a NetWare server.
Using the DNA Template Editor, I create a template by selecting All local
user profiles on source machine, selecting User Accounts Settings under
System, and name the template DNAusers.dtf.
I then create an application object, CollectDNA, to collect the
personality following the instructions in guide. I associate CollectDNA
with a workstation and select Force Run and App Launcher. This is the
parameter setting: (There is no VOL1 on this server)
/D \\Server1\SYS\ddna\data\%CN%\X-REMOTE1 /T \\Server1
\SYS\ddna\templates\DNAusers.dtf /X
I go to X-REMOTE1 laptop and login as an administrator but nothing
happens. I then click on Application Explorer and double-click on
CollectDNA object and get: could not launch CollectDNA. The network
path was not found. Checking My Network Places, I see no NetWare
Services listed. And, although the ZENworks Desktop Management Agent
policy says to display the ZENworks authentication dialog, the login
screen never appears.
Any suggestions?OK so I changed %CN% to "Admin" in the application object and restarted
laptop and logged in as Admin in the ZENworks Desktop Management
authentication screen. Nothing happened until I clicked on the
application windows and then it tried to launch CollectDNA but then I get
the Application Launcher status: the network path was not found.
I saw an earlier response you gave to someone else who had the same
message and did the same but still get this error message.
Do you see anything else that I'm doing incorrectly?
> On Mon, 17 Jul 2006 22:59:30 GMT, [email protected] wrote:
>
> > /D \\Server1\SYS\ddna\data\%CN%\X-REMOTE1
>
> if you do a force run with wks associatione (perhaps even selected)
secure
> system the %CN% can not be resolved..
> --
>
>
> Marcus Breiden
>
> If you are asked to email me information please change -- to - in my e-
mail
> address.
> The content of this mail is my private and personal opinion.
> http://www.edu-magic.net -
System's Form Table and Item Table
Hi guys,
Where in the DB can I find the table that holds all the properties for the System Forms in SBO?
Thankswhen you are looking for the
column preferences -> CPRF
user display categories -> CUDC
or are you looking for something else ?
regards
David -
How to assign ALV for parent node and child node that uses supply method.?
HI Dear friends,
I need to display header details ( VBAK ) and Item details ( VBAP ). I have created two node like HEADER_NODE inside this i have created ITEM_NODE for this item node i use supply function 'GET_ITEMS' any way it is working only when crete two separate table and binding but when i come to work with ALV i am totally confused .. i have created two 'View Controller UI Elements' when i try to map HEADER_NODE it mapped properly but for ITEM_NODE it shows mapping already defined. return status message as 'Action Cancelled' . In result both ViewContainer shows only HEADER_NODE data only.
How to achive ALV for Parent, child node that uses supply function ? ?
Thank youDelete Mapping is not enabled, that means there is no mapping done yet.
I just tried what you are saying and the application works and i am able to map the header table and item table and also again i could map the tables any number of times.. i didn't get any such message, sorry i couldn't recreate the scenario. might be there is something wrong in the context.
i just did it like this.
Please also move this to Web DynPro Discussion, Hope that would be helpful.
Message was edited by: Syed Ghulam Ali -
Header and Item table - Form Design Question
Hi All,
I have a header table and Item table. For every record in the header table I have multiple records in the item table. I want to have a adobe form in the following way
1. A new page starts for every record in the header table and Items in the item table for this header record can span multiple pages with the same header information.
2. When all the items are displayed for that particular header record, a new page should start for the next header record.
I created one internal table in the following way
Header_field1 Header_field2 Item_table(with all the items for this header record)
Header_field1 Header_field2 Item_table(with all the items for this header record)
I am not sure how to use a table for this scenario (Should It be a nested table?).
Please provide me some ideas.
Thanks,
Ganesh.Hi Balasubramani,
I made some changes and have the following now. Can you please let me know how I can achieve page break for every BP_NUMBER.
I have a nested table like the one below.
Main table u2013 Has header and Items information. Every header record has some header information like BP number, name and all line items for that BP in a nested table .
IT_HEADER:
BP_NUMBER BP_NAME IT_ITEMS(Items table)
BP_NUMBER BP_NAME IT_ITEMS
BP_NUMBER BP_NAME IT_ITEMS
To display this information I created the following
Subform1 u2013 overflow u2013bound to $record.IT_HEADER.DATA[*] u2013 (Repeat sub form for
| each data item)
|->Header sub form u2013 Positioned
| |
| |-> Text Field u2013 bound to BP_NUMBER
|
|
|->Item sub form -
|
|->Item Table u2013 bound to IT_ITEMS
|
|->Data u2013 bound to IT_ITEMS.DATA[*] u2013(Repeat row for each data item)
In the output BP number in the first record of IT_HEADER gets displayed and then all the Item records in IT_ITEMS for that BP get displayed. This is repeated all the records in IT_HEADER which is perfectly fine.
Please provide me some suggestions to solve the following issues I am having
1. I need a page break between records of IT_HEADER. I want the new subform1 for the next header record to start in a new page. I tried conditional break option, on the only field BP number in header sub form. I have two master pages and two body pages. All the above information is in master page 2 and body page 2. I am also not sure what to select in the TO section of the conditional break screen.
2. When there is an overflow in IT_ITEMS I need the Header sub form to be shown in the next page too.
Thanks,
Ganesh. -
How to creat shortcut for ethernet on desktop in win 8
how to create shortcut for Ethernet enable and disable
because i have internet connected with LAN
and it is has no internet disconnection optionHi,
Here is the command you can write to the batch:
To disable the interface, you'd then run:
netsh interface set interface name="Local Area Connection” admin=DISABLED
To enable the interface, you'd then run:
netsh interface set interface name=“Local Area Connection” admin=ENABLED
Note to find your network interface, you can run
netsh interface show interface command.
Thanks!
Andy Altmann
TechNet Community Support -
What is authorization object and how to create it for a table
Hi All,
What is authorization object and how to create it for a table?
ThanksHi
Authorization
For authorization checks, there are many ways of linking authorization objects with user actions in an SAP system. The following discusses three possibilities in the context of ABAP programming.
Authorization Check for Transactions
You can directly link authorization objects with transaction codes. You can enter values for the fields of an authorization object in the transaction maintenance. Before the transaction is executed, the system compares these values with the values in the user master record and only starts the transaction if the appropriate authorization exists.
Authorization Check for ABAP Programs
For ABAP programs, the two objects S_DEVELOP (program development and program execution) and S_PROGRAM (program maintenance) exist. They contains a field P_GROUP that is connected with the program attribute authorization group. Thus, you can assign users program-specific authorizations for individual ABAP programs.
Authorization Check in ABAP Programs
A more sophisticated, user-programmed authorization check is possible using the Authority-Check statement. It allows you to check the entries in the user master record for specific authorization objects against any other values. Therefore, if a transaction or program is not sufficiently protected or not every user that is authorized to use the program can also execute all the actions, this statement must be used.
AUTHORITY-CHECK OBJECT object
ID name1 FIELD f1
ID name2 FIELD f2
ID namen FIELD fn.
object is the name of an authorization object. With name1, name2 ... , and so on, you must list all fields of the authorization object object. With f1, f2 ... , and so on, you must specify the values that the system is to check against the entries in the relevant authorization of the user master record. The AUTHORITY-CHECK statement searches for the specified object in the user profile and checks the useru2019s authorizations for all values of f1, f2 ... . You can avoid checking a field name1, name2 ... by replacing FIELD f1 FIELD f2 with DUMMY.
After the FIELD addition, you can only specify an elementary field, not a selection table. However, there are function modules available that execute the AUTHORITY-CHECK statement for all values of selection tables. The AUTHORITY-CHECK statement is supported by a statement pattern.
Only if the user has all authorizations, is the return value sy-subrc of the AUTHORITY-CHECK statement set to 0. The most important return values are:
· 0: The user has an authorization for all specified values.
· 4: The user does not have the authorization.
· 8: The number of specified fields is incorrect.
· 12: The specified authorization object does not exist.
A list of all possible return values is available in the ABAP keyword documentation. The content of sy-subrc has to be closely examined to ascertain the result of the authorization check and react accordingly.
REPORT demo_authorithy_check.
PARAMETERS pa_carr LIKE sflight-carrid.
DATA wa_flights LIKE demo_focc.
AT SELECTION-SCREEN.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD pa_carr
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE e045(sabapdocu) WITH pa_carr.
ELSEIF sy-subrc <> 0.
MESSAGE e184(sabapdocu) WITH text-010.
ENDIF.
START-OF-SELECTION.
SELECT carrid connid fldate seatsmax seatsocc
FROM sflight
INTO CORRESPONDING FIELDS OF wa_flights
WHERE carrid = pa_carr.
WRITE: / wa_flights-carrid,
wa_flights-connid,
wa_flights-fldate,
wa_flights-seatsmax,
wa_flights-seatsocc.
ENDSELECT.
Regards
Hitesh -
How to create variant for table/view ?
Hi,
When I go through SM30, I find a radio button called variant. I don't know the effect.
Can anyone tell me how to create variant for table / view ?
I want to know when we need to create variant for table/view.
Best regards,
Chris Guhi ,
Whenever you start a program in which selection screens are defined, the system displays a set of input fields for database-specific and program-specific selections. To select a certain set of data, you enter an appropriate range of values.
For further information about selection screens, refer to Selection Screens in the ABAP User's Guide.
If you often run the same program with the same set of selections (for example, to create a monthly statistical report), you can save the values in a selection set called a variant
Procedure
To create a new variant:
1. On the ABAP Editor initial screen, enter the name of the program for which you want to create a variant, select Variants, and choose Change.
2. On the variant maintenance initial screen, enter the name of the variant to be created.
Note the naming convention for variants (see below).
3. Choose Create.
If the program has more than one selection screen, a dialog box for screen assignment appears. The dialog box does not appear if the program only has one selection screen. The selection screen appears in this case.
4. If there is more than one selection screen, select the screens for which you want to create the variant
5. Choose Continue.
The (first) selection screen for the report appears.
If your program has more than one selection screen, use the scroll buttons in the left-hand corner of the application toolbar to navigate between them and to fill the fields with values. If you keep scrolling forwards, the Continue button appears on the last selection screen.
6. Enter the desired selection values, including multiple selection and dynamic selection.
7. Choose Continue. -
How to create events for Z table ?
Hi Experts,
Can anybody tell me how to create an event for Z table. I have a Z table in that a Particular filed is there as BELNR.
This Table is being getting updated by various application & even with the User-Exits also. I want to sned an e-mail whenver this particular field is getting updated by any program.
how to do this? which event to be used for a particular field?
Pl. Help....
Regards,
UmeshUmesh,
I hope below method will help solving the requirement:
-Changes made to the keydocuments are recorded in the change document
Header table i.e. CDHDR and Item table CDPOS, Additional change
pointers are written in the BDCP and BDCPS tables. (BDCP and BDCPS in your case)
-A standard program RBDMIDOC is sechuled to run on periodic basis to
evaluate the change pointers for a message type and starts the ALE
process for distributing the Masterdata to the appropriate destination.
-'Object' is collection of fields of different database tables. T.code
for creating an object is SCDO.
Also:
1. BD61 Active change pointers generally
- Check the checkbox "Change pointers activated -generally"
- Save it
2. BD50 Active change pointers for Message Type
- Message Type Active
Thanks,
Preyansh -
How to create Header Text and Item view
HI Experts,
Please solve it out.
I need to create a assignment block which display Employee details as per there Role. There are 3 fixed role like Role1 Role2 and Role3. under beneath of each role different user assign.
My requirement is to display the like Header(Roles) and item(user) in Tree form.
The user are in custom database table .
Example
Role1
User_ID1 User_Name
User_ID2 User_Name
Role2
User_ID3 User_Name
User_ID4 User_Name
User_ID5 User_Name
Role3
User_ID6 User_Name
User_ID 7 User_Name
Please suggest how can i achieve this tast.
Thanks
ImranHi Faisal/ Christian,
Thanks a lot lot for you suggestion, its very helpful.
I understand very well, to create Tree view with Access Object and its dependent object.
But my doubth is that in my requirement there is no Access object and dependent object involve, Please follow below points.
In My Object, Predecessor are like Heading text, No data display in predecessor (Role1, Role 2, as shown above in example).
There will be only 3 predecessor in all time.
The Successor value for each Predecessor available in the custom Ztable. and there no BOL object created for this ztable.
Please suggest ,what i need to do to accomplished this object.
I really really appriciate for your advice.
Many Thanks,
Imran -
Can i use create function for MSSql scalar and table valude function.
Hi,
1) Can i use create function for MSSql scalar and table valued function?
2) How many type of user defined function are there in oracle 11g express?
3) And can i reture any "type" form user defined function?
yourse sincerely944768 wrote:
Q1)That means even if i return predefined types like integer, varchar2 then also PGA is used ?The data type does not determine where the variable is stored. A string (called a varchar2 in Oracle) can be stored in stack space, heap space, on disk, in a memory mapped file, in a shared memory, in an atom table, etc.
It is the who and what is defining and using that string, that determines where and how it is stored.
The Oracle sever supports 2 languages in PL/SQL. The PL (Programming Logic) language is a procedural/declarative language. It is NOT SQL. SQL is integrated with it. The PL/SQL engine uses private process memory (PGA). So PL/SQL variables exist in the PGA (but there are exceptions such as LOBs).
Q2) So please suggest me solution in oracle.Sounds to me you are looking at how to implement a T-SQL style function as an Oracle function, and once implemented, do joins on the function.
Do not use PL/SQL in SQL in place of a SQL select. It is not T-SQL.
One cannot use PL/SQL to create functions along the style of T-SQL, where the function executes a SQL using some conditional logic, and then return as if the function was a native SQL select.
T-SQL is an extension to the SQL language - making it a hybrid and very impure language implementation. PL is based on ADA - part of the Pascal family of languages. The E-SQL (embedded SQL) approach used in languages like C/C++, Cobol and Ada, has been transparently done in PL/SQL. You can write and mix PL code and variables with SQL code. And the PL/SQL engine figures out how to make the call from the PL/SQL engine to the SQL engine.
But PL/SQL is not "part" of the SQL language and does not "extend" the SQL language in a T-SQL fashion.
So you need to check your SQL-Server preconcepts in at the door, as they are not only irrelevant in Oracle, they are WRONG in Oracle.
The correct way in Oracle, in a nutshell - Use the SQL language to do data processing. Use PL/SQL to manage conditional process flow and the handling of errors.
Maybe you are looking for
-
All the CD's I have imported will not play. The only music that will play is cd's I have purchased from itunes. How can I get all my albums to play, please??
-
I opened an attachment and can't get rid of it or return to my other messages. No back button or buttons of any kind. Any suggestions?
-
I want to know the impact of COMPATIBLE parameter on the database. I have 2 database of versions on different machines. COMPATIBLE parameter = 9.2.0.1 in one database and COMPATIBLE=10.2..0.3.0 in another. Are both database enviornments different? Ho
-
"the firefox application is not allowed to access the graphics hardware"
I would like to ask for help the following phenomenon: "the firefox application is not allowed to access the graphics hardware" This error message appears, at times, and then restart the browser once in a while it's all good.Do not use any accessory.
-
Crashes on SetDataSource Method
We have a SharePoint Application to export RPT file to PDF file, it crashed on SetDataSource method if the trust level is WSS_Minimal, but when i change it to Full, it work correctly. is there any solution to fix it? because we cannot change the trus