OO ABAP inerenal table and tables declarations?
Hi All,
1.I am new to OO ABAP, can any one give me clear idea how to declare Internal tables, work area and table declarations and how to use and read them?
2. I am having a problem,
I declare a table like this
IT_CRMD_ORDERADM_H TYPE TABLE OF CRMD_ORDERADM_H.
and in the perform statement
Pefrom using
IT_CRMD_ORDERADM_H[]
and in form ( i need to read and select a record from this table)
can any one give me solution how to do this?
thanks for ur time.
sandhya
Hai Sandhya
Go through the following Code
*& Report ZABAP_OBJ_01 *
report zabap_obj_01 .
parameters : p_vbeln like vbap-vbeln obligatory,
p_matnr like mara-matnr.
<b>types : begin of ty_vbap,
vbeln type vbap-vbeln,
matnr type vbap-matnr,
arktx type vbap-arktx,
end of ty_vbap.</b>
CLASS sales_order DEFINITION
class sales_order definition.
public section.
data : v_matnr type mara-matnr,
v_vbeln type vbap-vbeln.
events : no_data_found.
methods : constructor importing vbeln type vbap-vbeln
matnr type mara-matnr optional,
get_vbap_details,
disp_vbap_details,
Handle_no_data_found
for event no_data_found of sales_order.
<b> data : it_vbap type standard table of ty_vbap.</b>
endclass. "sales_order DEFINITION
CLASS sales_order IMPLEMENTATION
class sales_order implementation.
method get_vbap_details.
clear : it_vbap.
refresh : it_vbap.
select vbeln
matnr
arktx
from vbap
into table it_vbap
where vbeln = p_vbeln.
if sy-subrc <> 0.
raise event no_data_found.
endif.
endmethod. "get_vbap_details
method constructor.
clear : v_vbeln,
v_matnr.
v_vbeln = vbeln.
v_matnr = matnr.
endmethod. "constructor
method Handle_no_data_found.
write : / 'No Data Found for the given selection Criteria'.
endmethod.
method disp_vbap_details.
data : wx_vbap like line of it_vbap.
loop at it_vbap into wx_vbap.
write :/ wx_vbap-vbeln,
wx_vbap-matnr,
wx_vbap-arktx.
endloop.
clear : it_vbap.
endmethod. "disp_vbap_details
endclass. "sales_order IMPLEMENTATION
data : obj type ref to sales_order.
start-of-selection.
if not p_matnr is initial.
create object obj exporting vbeln = p_vbeln
matnr = p_matnr.
else.
create object obj exporting vbeln = p_vbeln.
endif.
set handler obj->Handle_no_data_found for obj.
call method obj->get_vbap_details.
call method obj->disp_vbap_details.
Thanks & regards
Sreenivasulu P
Similar Messages
-
How to design a smartform with below tables and table-fields??
How to design a smartform and driver program using this tables and table fields
FIELD DESCRIPTION TABLE-FIELD
Tax Invoice No: vbrk-vbeln
Code vbpa-kunnr where parvw = RG
Ship To vbpa-kunnr where parvw = WE
PAN No J_1IMOCUST-J_1IPANNO for WE
ECC ,,
Range ,,
Div ,,
Excise Reg No ,,
LST No ,,
CST No ,,
Invoice No: vbrk-vbeln
Do No: vbfa-vbelv where vbeln = inv no and vbtyp_v = C get the vbeln where vbak-auart = 'ZDO'
Sales Doc Num: vbfa-vbelv where vbeln = inv no and vbtyp_v = C get the vbeln where vbak-auart = 'ZSO'
PO: vbkd-bstkd where vbeln = sales doc no
Delivery No: select vbelv from vbfa where vbeln = inv no and vbtyp_v = J
Goods Removal Dt&Time: select vbeln from vbfa where vbelv = dlv no and vbtyp_v = R Put this vbeln in mkpf and get BUDAT and CPUTM
Selection screen parameter should be : vbrk-vbeln.Hi,
First design your form interface, this is the set of fields that you need to display in your form and create this as a structure in SE11. In your print program code the logic to extract the data into this structure, this is just regular ABAP, nothing special here.
When you have your data call function module SSF_FUNCTION_MODULE_NAME to determine the name of the generated smartform function module. Then call this function module, passing the data collected into your structure. If necessary you will need to find the print parameters required and pass these too.
In your smartform you will need to use the data structure you created in SE11 as the smartform interface and design the layout required to display these fields.
Regards,
Nick -
Difference between Table and Table Type
Hi
Can you please let me know the
Difference between Table and Table Type and
Difference between Structure and Table Type?
Regards,
Sreehi,
table is a data dictionary object in sap. table is of different types
1. transparent tables
2. pool tables
3. cluster tables
table type gives option for u to select different types of internal tables. they r
1. standard table
2. sorted table
3. hash table
Structures :
-Defined like a table and can then be addressed from ABAP programs.
-Structures contain data only during the runtime of a program.
-Just like user-defined data type.
- they are not present in database server and only on application server.
if helpful reward some points.
with regards,
Suresh Aluri. -
Transporting table and table maintainance generator
Hi,
Can i transport the table and table maintainace generator and function group of the table with in single request or not.
One more thing is when i transport the table maintainance generator,will the entries also be transport to another system or not.
Thanks in advance,
SureshHi Suresh,
Go to SE54-> Utilities-> Total Transport. The following things are transported.
The total transport transports the complete maintenance dialog:
authorization group
authorization group assignment
control entry
events
function groups
maintenance objects
variants
Content wont be transported it seems.
Thanks & Regards,
Nagaraj Kalbavi -
How to Find what are tables and "Table Name" in particular "Data File"
hi Team,
I have one database that database 300 gb size , this database having 6 ndf files ,
here How to Find what are the tables and "Table Name" in particular "Data File"[.ndf]Hi,
In addition to Prashanth’s suggestion, you can also use the following Transact-SQL statements to get more detailed information including all objects and indexes per Filegroup / Partition and allocated data size of databases.
The script can work with Microsoft SQL Server 2005 and higher version in all Editions. For more details, please review this article:
List all Objects and Indexes per Filegroup / Partition.
-- List all Objects and Indexes
-- per Filegroup / Partition and Allocation Type
-- including the allocated data size
SELECT DS.name AS DataSpaceName
,AU.type_desc AS AllocationDesc
,AU.total_pages / 128 AS TotalSizeMB
,AU.used_pages / 128 AS UsedSizeMB
,AU.data_pages / 128 AS DataSizeMB
,SCH.name AS SchemaName
,OBJ.type_desc AS ObjectType
,OBJ.name AS ObjectName
,IDX.type_desc AS IndexType
,IDX.name AS IndexName
FROM sys.data_spaces AS DS
INNER JOIN sys.allocation_units AS AU
ON DS.data_space_id = AU.data_space_id
INNER JOIN sys.partitions AS PA
ON (AU.type IN (1, 3)
AND AU.container_id = PA.hobt_id)
OR
(AU.type = 2
AND AU.container_id = PA.partition_id)
INNER JOIN sys.objects AS OBJ
ON PA.object_id = OBJ.object_id
INNER JOIN sys.schemas AS SCH
ON OBJ.schema_id = SCH.schema_id
LEFT JOIN sys.indexes AS IDX
ON PA.object_id = IDX.object_id
AND PA.index_id = IDX.index_id
WHERE OBJ.type_desc='USER_TABLE'-- add this WHERE clause to display the information of user tables
ORDER BY DS.name
,SCH.name
,OBJ.name
,IDX.name
Thanks,
Lydia Zhang -
Tables and Table Relations.
Hi ALL,
I am new to SAP and currently learning SAP CRM.
I would like to know about *Tables and Table Relationships,* its applications in real time and its functionality.
Please clarify!.
Appreciate your responses.
Thanks!
Zo.Thanks Garcia,
I appreciate your response.
The document definitely helped me.
With this I got an understanding that all the data related to functions of SAP CRM (i.e BP, Org Model, Product, Transactions etc..) are stored in various tables and logically linked for easy access, update and retrieval of data for the consultants whenever required.
Pls correct if my understanding is wrong.
Coming to the linking of these tables or relationships,
Whether does a consultant need to manually link the tables? or is it done automatically in the SAP system depending upon the type of function used?
Thanks!
Zo..
Edited by: zohebshadab on Jul 27, 2009 10:13 AM -
Transport table and table entries
Hi,
I need to create a table and table entries, here I need to transport table and its entries to another system,
what steps i need to follow for this?
Please help meEntries
Create entries by Se11-> utilities-> table content -> create entries
For Transport
Go to SE10.
Click on the 'Create' icon.
Select 'Workbench Request'(assuming your table is not customizing table).
Enter description and click 'Save'.
Put cursor on the task (lower number of the two) and in menu, 'Request/task>Change Type>Development/correction'.
With cursor on the task(lower number), click 'Object List' icon on the toolbar.
Once in, you need to toggle to 'Change' mode using the pencil icon.
Then click on 'New Entries'. Now add the R3TR, TABU, <ZTAB> in the first row.
Again in the menu, select 'Extras>Change object function>Key according to key list'.
Now go to the menu, 'Goto-->Key list'. In the subsequent screen, click on 'Insert line' icon(with a + sign).
Click on 'Key fields' button and it will now allow you to enter the values for each key field.
Regards
Shashi -
CRM table and tables relationships
Hi
I'm looking for table and table relationship in the CRM.
Sales tables especially (like VBAK, VBAP VBFA Etc' at SAP ECC)
Yaki Katz
SAP SD ConsultantHI,,
Sales related tables in CRM.
CRMD_ORDER_INDEX- Index table
CRMD_ORDERADM_H- Order header table
CRMD_ORDERADM_I- Order Item Table
CRMD_ORGMAN Organizational Unit Set
CRMD_PARTNER Partners
CRMD_PRICING Business Transaction Pricing Parameter Set
CRMD_PRICING_I Transaction Item Price
CRMD_PRODUCT_I Transaction Item - Product
CRMD_SALES Business Transaction - Sales Set
CRMD_ORDERADM_H-GUID = CRMD_ORDER_INDEX-HEADER
CRMD_ORDERADM_H-OBJECT_TYPE = CRMD_ORDER_INDEX-OBJECT TYPE
CRMD_ORDERADM_I-GUID = CRMD_ORDER_INDEX-ITEM
CRMD_ORDERADM_I-HEADER = CRMD_ORDER_INDEX-HEADER
Regards
Srinu -
Query on ABAP List Viewer and Table Control?
Hi all,
I was trying to solve the exercises in these areas....but was unable to do as some of the concepts were not clear to me as I'm new to this field.
So Can any one help me out in giving me the Notes or attachments on the ABAP List Viewer(A.L.V.) and Table Control.
My ID: [email protected]
Waiting for a reply...
A New Entrant in ABAP.
Message was edited by:
saikumar bHi saikumar,
I just start to work with Abap too. All links i Know:
http://www.erpgenie.com/abap/controls/alvgrid.htm
http://www.abapfans.hpg.ig.com.br/links.htm
http://abap4.tripod.com/index..html
http://paginas.terra.com.br/educacao/abap/
http://www.sdn.sap.com/
http://www.sap-img.com/
http://www.planetsap.com/Tips_and_Tricks.htm
http://www.abap4.com.br/
http://www.erpgenie.com/sap/abap/index.htm
Good lucky -
Table and table field for PICKING QUANTITY.
Hi friends,
I need to use PICKING QTY in script. but it is in structure LIPSD-PIKMG.
Please say Table and Field for Picking quantity.
I need a table and field.
THANKS in advance.
balaji.Hi Tarani, Rasmi,
Thank you for quick response.
LIPS-LFIMG is Delivery Qty . It is not Picking Qty.
please let me know for PICKING QTY to display in my Script.
Thank you. -
Conversion tables and table entries
I'm working on a conversion table to move our legacy products from unstructured FM to DITA. I understand the basic concepts but I'm having a problem with the table cells.
In my conversion table I have P:CellBody in the first row, mapped to entry with a qualifier of cellbody.
I also have TC mapped to entry.
The same holds true for P:CellHeading and TH.
Consequently, my text is wrapped in two entry elements. The Show Element Context tab shows:
entry
entry
row
tbody
tgroup
table
body
NoName
NoName
I'm pretty sure it should be the same as above with only one entry element (and of course with the NoNames fixed which I think I know how to do; I just haven't gotten there yet).
How do I avoid having my cells wrapped in two entry elements?
Thanks in advance,
MarshaMarsha,
I don't quite understand either what you are trying to do or what exactly is in your conversion table. Be aware, however, that FrameMaker will always create elements for the basic components that occur in your tables. The conversion table gives you limited control of how those elements will be tagged, but not whether the elements will exist.
If your conversion table contains rows such as:
P:CellBody
entry
cellbody
TC:
entry
You will indeed get nested entry elements. The outer one is the table cell itself and the inner one is the paragraph. FrameMaker does not permit a valid document to use the same element tag for both a cell and a container, so aside from the results not being what you wanted, they are not correct within FrameMaker.
If your table cells contain single paragraphs and you don't want elements for both the cells and the paragraphs, your conversion table doesn't even need to mention the CellBody and CellHeading paragraph tags. In fact, if your table formats use CellBody as the paragraph format for cells in the body of a table and CellHeading as the paragraph format for cells in the table heading, your EDD doesn't even have to apply the paragraph formats.
Another variation is to include a paragraph tag in a conversion table row for a table cell by combining TC: and P: to match table cells containing particular paragraphs. For example:
TC:P:CellBody
entry
creates cell elements named entry from table cells containing paragraphs tagged CellBody. The paragraph within such a cell is not wrapped in an additional element.
One final comment is that TH: in a conversion table refers to the entire table heading; its children are heading rows. The table body analog of TH: is TB:, not TC:.
--Lynne -
Hi,
I created a table and an advanced table. What is the difference between the table and advanced table.
Thanks in Advance,
JeganHi Jegan,
in case of Advance table u hve many features like Columm group (to group multiple columms of vo under one columm), insert empty row in the table (on the click of button), table actions but these features are not available in case of simple table.
thanxs
Pranav -
Programmatic table and table column control?
Is there an easy way in JSC to perform:
1) programmatic addition of columns to a data-aware Table on a single page, based upon values from a database table that defines how many columns should be in the Table?
2) programmatic creation of entire data-aware Tables on a single page based upon parameterized queries? (Say, between 1-10 Table components wil get displayed on a single page, based upon the # of uniques for a column in a database table, and each of those Table components will display the rows from that database table as grouped by the values in that keyed column)
I was thinking that I'd have to create a collection, but I'm unsure of which components to manipulate within the collection, and how best to hook up the event handlers when users are trying to edit the Table components' fields or add new rows, or add new columns, etc.Hi Winston,
sorry fo my english,
I'm not expert as you, but I think to have (maybe) a more dinamic solution (?).
The target is to add a dynamic number of columns to a table bind to a database table.
The application create an Object [ rowNbr ] [ colNbr ] array by processing the CachedRowSet.
int rows = getMyDataProvider().getRowCount ();
CachedRowSet crs1 = getTMyDataProvider().getCachedRowSet ();
crs1.beforeFirst ();
for ( int r = 0; r < rows; r++ ) {
// Load all rows
crs1.next ();
...Then this add a variable number of coloms, for example:
TableColumn tc = new TableColumn ();
tc.setAlign ( "right" );
tc.setHeaderText ( colTxt );
ValueBinding vb = app.createValueBinding ("#{MyPage.myDetailValues[MyPage.myCurrentRow.cursorRow.rowId][" + colNbr + "]}");
StaticText st = new StaticText ();
st.setValueBinding ( "text", vb);
tc.getChildren().add (st);
getMyTableRowGroup().getChildren().add ( tc );Just if some people interested.
Ciao, franco -
Relationship b/w tables and table fields
Dear Experts,
I have a requirement where I need to display...
userid, username, Broadcasting setting name, Workbook/Report name, Variable Inpur parameters, Broadcasting frequency, Recipients email-ids, status and scheduled date......
User input would be : job schedulers name.
I am not sure of the tables to fetch data and the relationship among them.
please suggest me if you have any idea regarding the same.
Regards
SathyaHi Sathya,
Check the table RSRD_SETTING, RSRD_SETT_NODE, RSRD_REGISTRATN.
You may check the broadcast settings scheduled by a user in RSRD_REGISTRATN.
Once you retrieve setting id, then you could use RSRD_SETTING for other information.
Hope this helps,
Best regards,
Sunmit. -
Page breaks in a table and table row spacing
Hello -
Anyone know how to add a page break to a long table which spans several pages ?
Also - there seems to be padding added to my text both before and after - how do I get rid of this ?
Any help much appreciated.
Andrewandrewpndavies wrote:
Anyone know how to add a page break to a long table which spans several pages ?
No such a feature in Pages but it is the standard behaviour in Numbers so it may be a good soluce to move your document from Pages to Numbers as I often wrote (and often do).
Yvan KOENIG (from FRANCE mercredi 22 avril 2009 14:10:17)
Maybe you are looking for
-
Question about the links that include parameters...
Hello, I use this: <a href="inserer_devis.jsp?firstparameter=<%= rs.getString(1)%>&secondparameter=<%= rs.getString(2)%>">to have a link that gives parameters to the other JSP. My question is: On the other JSP, when I use request.getParameter("firstp
-
IPod touch 4g- Updated, then tried to restore and it won't work.
I just updated my iPod touch 4g. I'm trying to restore it now, but it won't work and says 'Error 1611.' My ipod has the 'plug into iTunes' symbol up, but my iPod is plugged in and it doesn't make a difference. I've tried restoring it several times w
-
Help I can't get rid of the beach ball in system preferences!
Hi, I have an iMac OS X 10.8.3. Every time I go to system preferences to change my screen saver I immediatley get the beach ball and the enire thing freezes up. I can't do ANYTHING within system referneces and I can only get out by 'force quit'. We
-
Document for configuration of the spend management in SAP E-Sourcing
Hi All Is there any document for configuration of the spend management in SAP E-Sourcing 5.1 I have checked the RG section of the application and also all the documentation delivered as a part of the ESO software download Unable to locate this, reque
-
Oracle 10g installation on Windows 2008 VMware
Hi everybody, hope you can help me with that issue; I try to install a ECC 6.0 test-system with Oracle 10g on a Windows 2008 VMware instance. I am getting a strange error when executing sapserver.cmd when I try to install the Oracle software; the Ora