Creating Work Area in OO
Hi,
I have a table type, which uses Line Type of a structure.
I want to declare a table for that and also a work area. I need to append entries in this table l_i_tab_ca_rbl_data.
I declared the table as follows :-
l_i_tab_ca_rbl_data TYPE standard TABLE OF cms_tab_am_cur_acc_rbl_data,
and I tried to declare the Work area in the following ways :-
ls_i_tab_ca_rbl_data like l_i_tab_ca_rbl_data,
ls_i_tab_ca_rbl_data type cms_tab_am_cur_acc_rbl_data,
ls_i_tab_ca_rbl_data type cms_str_am_cur_acc_rbl_data ("This is the line type used in the table type )
In the first case, it says "ls_i_tab_ca_rbl_data does not have a header line"
It gives the error "ls_i_tab_ca_rbl_data cannot be converted to line type of l_i_tab_ca_rbl_data".
Please suggest how I can declare a wrok area for this table type.
Also since the error says that l_i_tab_ca_rbl_data is a line type does that mean it can hold only one record.
Also is there any other way to append entries in that table l_i_tab_ca_rbl_data, apart from work areas.
Please help.
Note : I am working in a class-> method so am unable to declare tables with header line.
Thanks in advance,
Archana
It's actually simple if yyou use dynamic tables and field symbols.
In the program that calls methods / attributes in the class
define some field symbols
for example
FIELD-SYMBOLS :
<fs1> TYPE ANY,
<fs2> TYPE STANDARD TABLE,
<field_catalog> TYPE STANDARD TABLE,
<dyn_table> TYPE STANDARD TABLE,
<orig_table> TYPE STANDARD TABLE,
<dyn_field>,
<dyn_wa>.
in the class define data
DATA:
dy_table TYPE REF TO data,
dy_line TYPE REF TO data,
etc.
field symbols work both INSIDE and OUTSIDE classes and are extremely useful for passing / receiving data. You have to define the field symbols in your main program however.
METHOD create_dynamic_table.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat
IMPORTING
ep_table = dy_table.
ENDMETHOD.
CALL METHOD me->create_dynamic_table
EXPORTING
it_fldcat = it_fldcat
IMPORTING
dy_table = dy_table.
ASSIGN dy_table->* TO <dyn_table>.
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
ENDMETHOD.
Then in your program (or class) your data is in <dyn_table>.
Use dynamic tables and dynamic field cats as these give HUGE flexibility and you can re-use code over and over again for different structures.
The new RTTI gives you any table structure whatsoever so you can make the whole thing completely general.
That's one of the advantages of Classes and OO as opposed to older FMODS.
Cheers
jimbo
Similar Messages
-
Getting error message "Could not create work area" when I open Bridge CC.
I am getting an error message "Could not create work area" when I open Bridge CC.
I have reset my workspace. I have closed and opened Bridge CC. I have deleted the !!-$$$AdobeOutputModule.workspace file in /Library/Application Support/Adobe/Bridge CC/Workspaces folder.
I am not an expert computer user, so please explain in detailed steps like I am 5 years old. Thanks in advance for any help.I am experiencing the same problem!
My mac is OS X Yosemite (10.10.1), Photoshop CC 2014.2.1, Bridge CC 6.1.0.115 and Camera Raw 8.7.0.309 -
Hi,
While creating Work Area, I am getting following error;
"Internal program error; (SAPLCBIH_WA03 SAPLCBIH_WA00 ERROR_WA_CREATE 3)"
I have already defined the internal & external number ranges. What can be the cause for this error?
Regards,
MayankHi Mayank,
It seems to me that some of the classes that are used in EH&S system are missing in the current client. Try executing IMG activity "Adopt Standard Specification Database Structure". You must have you the authorization for the client copy. It should resolve the issue. Please let me know if it doesn't.
Thanks,
Akash -
Error Creating Work Area in JDeveloper for SCM
In the Repository Object Navigator for 9i SCM, my userID has been granted the the following permissions to a shared work area called pdshare by the owner/build manager:
Select
Administrate
Insert
Update
Delete
Version
Compile
Update Spec.
However, in JDeveloper 9.0.3.1 When I create a work area from this shared work area I keep getting this error:
"BHART has insufficient privledges to Manage WorkArea".
Does anyone have suggestions for how to resolve this so that I can access the shared work area?
Thanks,
-BrianIt's actually simple if yyou use dynamic tables and field symbols.
In the program that calls methods / attributes in the class
define some field symbols
for example
FIELD-SYMBOLS :
<fs1> TYPE ANY,
<fs2> TYPE STANDARD TABLE,
<field_catalog> TYPE STANDARD TABLE,
<dyn_table> TYPE STANDARD TABLE,
<orig_table> TYPE STANDARD TABLE,
<dyn_field>,
<dyn_wa>.
in the class define data
DATA:
dy_table TYPE REF TO data,
dy_line TYPE REF TO data,
etc.
field symbols work both INSIDE and OUTSIDE classes and are extremely useful for passing / receiving data. You have to define the field symbols in your main program however.
METHOD create_dynamic_table.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat
IMPORTING
ep_table = dy_table.
ENDMETHOD.
CALL METHOD me->create_dynamic_table
EXPORTING
it_fldcat = it_fldcat
IMPORTING
dy_table = dy_table.
ASSIGN dy_table->* TO <dyn_table>.
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
ENDMETHOD.
Then in your program (or class) your data is in <dyn_table>.
Use dynamic tables and dynamic field cats as these give HUGE flexibility and you can re-use code over and over again for different structures.
The new RTTI gives you any table structure whatsoever so you can make the whole thing completely general.
That's one of the advantages of Classes and OO as opposed to older FMODS.
Cheers
jimbo -
How to create an EHS Work Area on Company Code level?
Hi,
Is it possible to create work area on company level?
(In CBIH02 the EHS work area can only be created within a Plant)
I had a look at the following transactions related to link a work area to Organization Management, I'm really
confused and have no idea how to realize it.
Path: EHS > Industrial Hygiene and Safety > Work Area > Link to Organizational Mangement
PPSC - Create Structures
PPSM - Edit Structures
PPME - Edit Matrixes
Help is much appreciated.
Roy DerksHi Roy,
I doubt on Company Level. As work Area's standard hierarchy goes like that - Work Area -- Plant -- Location -- Production Process -- Activity -- Machine -- Task.
I would revert back if I could get something.
Regards,
Akash -
Suppose i have created one structure and that structure having the field of bkpf and bseg table. Now in my report i want to create work area for bkpf. And in next step I want to transfer the value of bseg into itab. And at last want to compare the wa_belnr with itab_belnr.
How I will do that. What would be the syntaxt for that.Hi,
step1- first declare the structure.
DATA : begin of t_struct,
end of t_struct.
step2- now declare the internal table .
DATA : itab type standard table of t_struct with header line.
step 3- now declare the work area.
DATA : wa type t_struct.
now append wa to itab.
*****do rewards if usefull
vijay -
guyz!
why do we hafta create WORK AREA ??? cant we make use of the header line.
what if we make use of int tabs wid header lines.???
dont say dat performance issue....plzz explain me dat..
Regards
zid.Hi
When you define an internal table the system arranges a part of memory area in two parts:
- The first one is to stores all records loaded in the table;
- The second one is to store the single record is elaborated,
So when you loop an internal table, the system picks up the record from the first area and puts it to the second one;
The part of memory to store all records is obligatory, so the system'll always create it when an internal table is defined.
The part of memory to store the single record is not necessary, you have to use it only if it needs to read the table: this one is called HEADER LINE or WORK AREA.
So you can decide to declare a table with or without an header line in according to what you need to do.
A) If you need to read the table you need to have a table with header line or work area:
- WITH HEADER LINE
DATA: BEGIN OF ITAB OCCURS 0,
FIELD1,
FIELD2,
FIELD3,
END OF ITAB.
LOOP AT ITAB.
WRITE ITAB.
ENDLOOP.
While looping the table the system automatically fills the header line;
- WITH WORK AREA:
DATA: BEGIN OF WA_ITAB,
FIELD1,
FIELD2,
FIELD3,
END OF WA_ITAB.
DATA: ITAB LIKE STANDARD TABLE OF WA_ITAB.
LOOP AT ITAB INTO WA_ITAB.
WRITE WA_ITAB.
ENDLOOP.
While looping the table the system automatically fills the work area.
So it can say the header line is a work area the system automatically creates by internal table defination.
It's the same to use the header line or work area, because you need them when you have to read the records of an internal table.
A) If you don't need to read the table, you can define a table without header line:
SELECT-OPTIONS: SO_ERDAT FOR SY-DATUM.
DATA: IT_MATERIAL LIKE MARA-MATNR OCCURS 0.
DATA: IT_MARC LIKE STANDARD TABLE OF MARC WITH HEADER LINE.
SELECT MATNR FROM MARA INTO TABLE IT_MATERIAL WHERE ERDAT IN SO_ERDAT.
IF SY-SUBRC = 0.
SELECT * FROM MARC
FOR ALL ENTRIES IN IT_MATERIAL WHERE MATNR = IT_MATERIAL.
ENDIF.
LOOP AT IT_MARC.
WRITE IT_MARC.
ENDLOOP.
In this example the internal table IT_MATERIAL is used only to select the data from MARC using the option FOR ALL ENTRIES. This options doesn't use the header line of the table, so it's useless to define a table with an heaader line.
Max -
Error when trying to copy a work area in Oracle designer
In oracle designer,I tried to copy a work area by selecting.
File-->>Change work area.
Then from the "Work area" pop up window,I selected the new option.
In the Create work area wizard i chose "Copy a work area" and gave the Name ,description and the work area to be copied.
When i click the finish button,I am getting the following error.
"CDR-01005: Workarea compilation failed: ORA-01422: exact fetch returns more than requested number of rows. "
Please let me know how to copy a work area in Oracle designer.
Thanks in advance.Note 277801.1
Views Return Records From The Wastebasket.
Possible Symptoms
~~~~~~~~~~~~~~~~~
1) executing a SELECT FROM CI_... views return more rows than expected.
2) SELECT ... INTO ... FROM CI_... views raises error
ORA-1422: exact fetch returns more than requested number of rows.
3) Deleting an object from the repository fails with the following errors:
RME-00020: Internal API error -
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "<repos_owner>.JR_NAME", line 3680
ORA-06512: at "<repos_owner>.JR_NAME", line 4138
ORA-06512: at "<repos_owner>.JR_ERROR", line 193
ORA-06512: at "<repos_owner>.SDD_TAB_D", line 961
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-04088: error during execution of trigger '<repos_owner>.SDD_TAB_D'
NB: the name of the trigger (SDD_TAB_D in the above example) will vary
depending on the object type you are deleting
4) Compilation of a Workarea fails with the following errors:
CDR-01005: Workarea compilation failed:
ORA-01422: exact fetch returns more than requested number of rows.
Workaround
~~~~~~~~~~
For symptoms 1 and 2, define the context of a workarea before selecting from
the CI_... views:
exec jr_context.set_workarea ('<Workarea Name>');
For the other symptoms, the errors are caused by RDBMS bugs that were fixed
in the last patch set releases of databases.
We recommend that you upgrade to a version of the database that is certified
with the release of Designer that you are using.
See Note 60705.1 for details -
Can I create a keyboard shortcut to go to start and/or end of work area?
Just as in the title....
Can I create a keyboard shortcut to take the CTI to the beginning or end of the work area in the Timeline panel?
Also, can I remap the keyboard shortcut (~) that maximises the current panel?
I can't find the answers to either of these questions in the help....
Cheers
MarkCan I create a keyboard shortcut to take the CTI to the beginning or end of the work area in the Timeline panel?
No.
Also, can I remap the keyboard shortcut (~) that maximises the current panel?
In CS5, it's under Application and called "Maximize or Restore Frame." In CS5.5 it's also under Application, but you have two choices: "Maximize or Restore Active Frame" and "Maximize or Restore Frame Under Cursor." The latter is how CS5 works; the former is a new addition, and will only maximize/restore whatever frame is currently outlined in yellow, e.g. active. -
How to create dynamic strcture and accepting runtime value in work area
Hi,
I am using RFC_READ_TABLE for joining more than table and written select query but into clause work area value is passed but it is short dump is displaying with too few many fields in into clause .work area WA need some casting type conversion which accepts the some run time value and should have some structure for it.how to create dynamic structure?hi
good
go through this and use in your report accordingly.
If you are trying to read some information from SAP and you can't find the right BAPI then RFC_READ_TABLE can do the job for you.
RFC_READ_TABLE is powerful RFC it gives you the access to all tables and views in SAP. I basically used RFC_READ_TABLE for Material Master Search application on the Intranet.
Now you may say there are lots of BAPI for this functionality. You are right but I had to work around the BAPI to get Prices (Moving Average Price) and it just did not work very well. Because of the nature of the application I had to use RFC_READ_TABLE because then I can use powerful SQL expression for searching. RFC_READ_TABLE give you the ability to code the where clause which is quite enough.
I have included part of the code use in asp page to read ENT1027 for Mgroup and M description & number but without object creation. The other part of the code reads MBEW for price & quantity.
Code
lt;%
'#######################Diming the Structures
Call BAPIRFC.DimAs("Rfc_Read_Table", "FIELDS", MaterialSelection_RS)
Call BAPIRFC.DimAs("Rfc_Read_Table", "OPTIONS", Selection_RS)
'########################Search Type########################
' C contanis
' S Start with
' E Ends with
if searchtype = "C" then
FormatedSearch_Keyword = "%" & Search_Keyword & "%"
elseif searchtype = "S" then
FormatedSearch_Keyword = Search_Keyword & "%"
else searchtype = "E" then
FormatedSearch_Keyword = "%" & Search_Keyword
end if
'################# Flaged for deletion Materials #####################
if showdeleted = "No" then
Selection_RS.AddNew Array("TEXT"),Array("LVORM <> 'X' AND")
end if
'############## users can search three material group ################
'############## GROUPS: OFFICESUP TECOMHARD TECOMSOFT ###############
'##USER STILL CAN NAROW THEIR SEARCH BY SELECTING ON OF THREE#########
if MGroup = "ALL" then
Selection_RS.AddNew Array("TEXT"),Array("MATKL IN ('OFFICESUP','TECOMHARD','TECOMSOFT')")
else
Selection_RS.AddNew Array("TEXT"),Array("MATKL = '"& MGroup &"' and ")
end if
'#######################ADDING SEARCH KEYWORD TO STRUCTURE##############
if not Search_Keyword = "" then
Selection_RS.AddNew Array("TEXT"),Array(" MAKTG LIKE '" & FormatedSearch_Keyword & "'")
end if
Selection_RS.Update
'#######################ADD RETURNED FIELDS#########################
MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MATNR","000000","000000" ,"","")
MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MATKL","000000","000000" ,"","")
MaterialSelection_RS.AddNew array("FIELDNAME","OFFSET","LENGTH","TYPE","FIELDTEXT"),array("MAKTG","000000","000000" ,"","")
MaterialSelection_RS.Update
call BAPIRFC.Rfc_Read_Table("ENT1027", Material_RS, MaterialSelection_RS, Selection_RS, "~", "", "0", "0")
If Err.Number > 0 then
Response.Write "Error:" & "<BR>"
Response.Write " Err.number...... " & Err.Number & "<BR>"
Response.Write " Err.Description. " & Err.Description & "<BR>"
end if
'###########LOOP THROUGH RECORDSET
if not Material_RS is nothing then
do while not Material_RS.eof
loop
end if
%>
thanks
mrutyun^ -
the right windows, to create pdf, proof shett etc, is disappearance. I tried with restore work areas, but nothing, I have update the program but not solution...what can I do?? I have photoshop CS6 permanent licence for win 7
I did try to uninstall and reinstall. It messed up my computer. I had to "RESTORE" from the prior days backup. This was not helpful at all. I'm used to losing all my stuff when I connect to iTunes, that's a whole other issue, but now I'm completely banned from any updates to my phone at all. Geeze.......
-
Create BSP link in WebClient Work Area ?
Dear All,
Could you kindly let me know as to how we can create hyper link (BSP page) in WebClient work area , is there some configuration (Nav.Bar Profile) that needs to be customized ??.
Regards,
NeethHi Shalaxy,
Triggering a URL to WDJ:
I suppose the URL of WDJ app. is also a portal URL. I assume that from a BSP application inside portal you need to trigger the WDJ url.
But the catch is that you cannot hotcode this URL, since it varies for a development, quality and production systems(diff. portal environments).
To solve this issue, ABAP provides a system variable named sy-sysid, which says want system your ABAP system is, normally a development R/3 system will be associated to development portal system and quality R/3 to quality portal ans so forth.
So you could have a internal table/db table/ variable for dev, quality or prod portal urls and from the bsp on button click based on the value in the sy-sysid you can trigger the url accordingly.
Creating a URL in WDJ
The above is about triggering a WDJ from BSP. But if you dynamically want to create a link in WDJ on a button click, then apparently you could not do that from BSP, since the applications are different. All you could do is to pass some URL parameters to WDJ application from BSP app. Then based on the URL parameters the WDJ application has to dynamically create a link and add it to its application.
Hope it helps.
Regards,
Maheswaran
Edited by: Maheswaran B on Mar 1, 2010 4:17 PM -
How to delete a shortcut favorite from the browser in the WORK Area
Hiho,
creating a shortcut favorite icon of a browser-website in the work area shows up a symbol to use this shortcut. In the private area I can delete this favorite-symbol by tapping longer on the icon an a trashcan shows up, so I can delete the icon (and the browser favorite from the private area). Not so in the work (buisiness) part of the BlackBerry, there is no possibility to delete this icon. I can't find a policy on the BES10 server or thomething on the Z10, any ideas how i can remove the icon?
Greetings... IfraniHi Ifrani!
I´ve the same problem on my Z10!
CommanderApollo -
Error while Appending a work-area in a table
Hi Experts,
Requirement :- I want to append a row in the the table but the work-area with which i am appendign the values is of different type than the target so i am getting error .
Code :- APPEND WA_SOURCE TO RESULT_PACKAGE
Error :- A line of RESULT_PACKAGE not mutually convertible in a Unicode program..........
Is there any way to append the one-by one values in the RESULT_PACKAGE fields.
As i cn't change the type of my source work-area.
Don't we have something like :-
Append Result_package
Result_package_field1 = wa-field1
Result_package_field2 = wa_field2.....
PLEASE HELP
Regards,
rg
Edited by: R G on Mar 26, 2009 10:34 AMHello,
I can't change the Work-area type....
Can't we appened a line in any table by providing direct values??????
You DONOT have to change the TYPE of your Work Area. You create a new work area.
You can try something like this:
DATA:
WA_RESULT_PACKAGE LIKE LINE OF RESULT_PACKAGE.
MOVE CORRESPONDING WA_SOURCE TO WA_RESULT_PACKAGE.
APPEND WA_RESULT_PACKAGE TO RESULT_PACKAGE.
CLEAR WA_RESULT_PACKAGE.
Or Else,
DATA:
WA_RESULT_PACKAGE LIKE LINE OF RESULT_PACKAGE.
MOVE WA_SOURCE-F1 TO WA_RESULT_PACKAGE-F1.
MOVE WA_SOURCE-F2 TO WA_RESULT_PACKAGE-F2.
MOVE WA_SOURCE-F3 TO WA_RESULT_PACKAGE-F3.
APPEND WA_RESULT_PACKAGE TO RESULT_PACKAGE.
CLEAR WA_RESULT_PACKAGE.
BR,
Suhas
Edited by: Suhas Saha on Mar 26, 2009 10:44 AM -
Error creating work order for new notification - Related SyncBO not present
Hi,
We are working with MAM3.0 standard application.
We age getting an error while creating work order for a NEW notification.
In this scenario both notification and corresponding work order are also not created.
Here is the error for MAM30001 Sync BO in MEREP_MONI:_
Reading inbox record (mobile ID=0000001444, seq, no.=29, rcd_cntr=1, data=TOP0001000000
External format successfully converted to internal format: ldata=TOP0001000000000000000
Related SyncBO MAM30_010 with Sync key 0000000028 is not present on the device.
Return code 1 (DOWNLOADER)
Here is the error for MAM30010 Sync BO in MEREP_MONI:_
Return code from RFC BAPI Wrapper call:Order NEW does not exist
Return code from RFC BAPI Wrapper call:The order/network type is not defined
Return code from RFC BAPI Wrapper call:Order NEW does not exist
Return code 0 (UPDATE MEREP_506-STATUS)
Can any body please tell me what is the sollutions for this error
your help in this regard is appreciable.
Regards,
MurthyHi Murthy,
II have no idea what patch level you are on. A while back we had similar issues with some clients. There are several patches around that area available. Perhaps you should have a look into patch 959732.
Hope that helps.
Regards,
Oliver
Maybe you are looking for
-
How do I add a field to my Online Store Checkout Form
None of the webforms for my site, to include one named Online Shop Purchase Form, actually match my currently live store checkout form. I've found the live content under: Site Manager->Module Templates->Online Shop Layouts->Registration - Buy I want
-
How do I prevent other Mac users from changing my Airport Extreme Network Name and Password within the Airport Utility? My company is using an Airport Extreme in our office now and I want to prevent other employees from messing with the network/sett
-
Using a tablet to input data and take photos on a form
I examine vehicles which involves taking photos. I want to be able to creat a form where I can fill in text boxes and drop down menus as well as click on a seperate box that allows me to take a photo of the relvant part of the vehicle and import tha
-
Viewing individual Mail Messages
From my inbox, I can preview up each message and view some of the content of each message, but when I select an individual message, I'm unable to read/see any text in the message. I've unloaded and reloaded MobileMe on my device, but it still doesn't
-
Why do we use can breakout box?
Hi, I am relatively new to the CAN networks and i am having some difficulties understanding some basic concepts and i would be grateful if someone can help me out. so my questions are as follows: what's the use of the CAN breakout box apart from prov