How to define an array in ABAP
Hi experts,
Can we define an array in ABAP. if yes then How. plz help.
Regards.
Vaibhav Tiwari.
Hi,
There are no array concept in abap, instead of array there are internal table and field strings in abap.
Ex.
data : begin of itab occurs 10,
matnr like mara-matnr
mbrsh like mara-mbrsh,
end of itab.
data : begin of itab,
matnr like mara-matnr
mbrsh like mara-mbrsh,
end of itab.
Regards,
Prashant
Similar Messages
-
How to define an array of fixed length
hello, i have a basic application in which i need to define an array of size 19; and add 19 elements to it.
Once 19 elements have been written to the array, i want to start writing to the array from index 0.
It's like in C language, where-in you define array_size in init, and once the array is full, you overwrite the 1st element and so on.
i hope my question makes sense...
any help is appreciated.
Now on LabVIEW 10.0 on Win7Hi Check out these VIs as per your discription. You can try your own method.
PBP (CLAD)
Labview 6.1 - 2014
KUDOS ARE WELCOMED.
If your problem get solved then mark as solution.
Attachments:
Your VI.vi 10 KB
Fill Array.vi 16 KB -
How to use OracleDbType.Array provided by ODP with User defined type ?
Can anyone help me how to use OracleDbType.Array provided by ODP.NET ?
I need to pass string array to a oracle stored procedure .
User defined array type defined in oracle is :
CREATE TYPE TYPE_NAME IS TABLE OF varchar2(20) ;
This type is defined outside of any package , and i have tested that if definition of type is modified to
CREATE TYPE TYPE_NAME IS TABLE OF varchar2(20) index by binary_integer , i am able to pass array as AssociativeArray to my Stored Procedure.
But how to pass array object if the Type's definition does not contain index by clause ?
Please help how to pass Array object to Oracle Stored Procedure ?The solution described in Passing Array of UDT or Collection as IN OUT using OracleDbType.InputOutput
is working for me.
Edited by: stzueger on Jan 2, 2012 10:32 AM -
How to define our own selection screen for logical database in abap-hr?
Hi Friends,
Can u please help me
How to define your own selection screens for logical database.
we use to do like(goto->attributes-HRReportcatagerious ).but How to desin using customer table like t599c, t599f and how to add to my logical database?
Thanks in advance
charancheck out this online help
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba65c35c111d1829f0000e829fbfe/frameset.htm
Regards
Raja -
Very Urgent: how to define field symbols in class using se24 Points assured
hi all
I am new to abap oo programming. I am using se24 to build a class
where some methods have code which involves working with field sybmols but i am not able to figure out way for how to define field symbols in the attributes section.
I tried defining like : fld_sym type ref to dbtab-fld
but in the method implementation if i try to use it like assign fld to <fld_sym> there it says fld_sym is not defined as a field symbol.
So can anyone please guide me how to define field symbols in se24.
Also what should be the general steps while creating a class using se24.
Points assured
thanksHi
Global classes are like Global fun modules in which the Methods and code is already written and is mainly used for Reusability purpose.
Goto SE24 tcode and see the std global classes like
CL_ABAP_CHAR_UTILITIES
see the links
chk out the links below:
General Tutorial for OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
Have a look at these links for OO ABAP.
http://www.sapgenie.com/abap/OO/
http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
http://www.allsaplinks.com/
http://www.sapgenie.com/abap/controls/index.htm
http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
SDN Series:
https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb [original link is broken]
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
Basic concepts of OOPS
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6cae890-0201-0010-ef8b-f970a9c41d47
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1591ec90-0201-0010-3ba8-cdcd500b17cf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
http://www.henrikfrank.dk/abapuk.html
http://www.erpgenie.com/abap/OO/
Reward oints if useful,
Aleem. -
How to write a log using abap mapping
Hi all.
in PI 7.1 environment I need to use abap mapping and I wish to write some XML data into a table that I created for logging the data.
I know that using the abap mapping I can parse an XML file. My question is how to write this table defining a specific method, if it is necessary.
Any help or suggestion is well appreciated.
Many thanks in advance for your kind cooperation.
Regards,
Giovannihi,
>> My question is how to write this table defining a specific method, if it is necessary.
just like to normal table (insert statement)
parse XML and get the data you need and just insert into the DB table
there are many tutorials showing how to parse xml file inside abap mapping
so just do a little search on sdn
Regards,
Michal Krawczyk -
How to create a array with variables dimensions?
I try to create a array like that:
Object[][] data;
data = new Object[] [];
But that's doesn't work!
Apparently I must specify the dimension of my array
So I have done like that :
Object[][] data;
data = new Object[3] [3];
And that work!
But the problem is when I need to add extra elements to my array.
If I write :
data[4][1] = "123";
I have the error message :
java.lang.ArrayIndexOutOfBoundsException
So, how can I defined a array with variables dimensions OR how can I add a dimension to a array?if you have:
Object[][] data;
data = new Object[3] [3];you end yo getting ArrayIndexOutOfBoundException if you try to point to some other Indexes. You can increase the size by doing new:
Object[][] data;
data = new Object[4] [3];and then copy the old Arrays to this one... this is heavy.
Other thing to consider then is using some other datastructure, such as Vector, which grows along you add elements to it.
P_trg -
How to define complex type with table per record?
Hi,
for one of my tasks I'm dealing with XML export. After short investigation of the postings in the forum I found an acceptable solution:
Re: Convert ABAP to XML and Vice versa
The issue is that I need an XML file like this:
<plant>
<material>
<purchases>data</purchases>
<purchases>data</purchases>
<purchases>data</purchases>
<sales>data</sales>
<sales>data</sales>
<sales>data</sales>
</material>
<next material>
</next material>
</plant>
So here are the questions:
1. Is it possible (and how) to define such deep structured type where for each record (means material) there is at least 1 internal table connected to that record? That would let me use a record-2-DOM conversion and a standard DOM-2-XML renderer.
2. Could anyone please provide a very simple and short example?
Of course, I could write my own XML renderer and achieve what I need (without using DOM, simply write to file all the desired XML tags while looping at my *nested* tables), but if there is a way to define such a structured type and further to fill it with data, it would help me learn a little bit more about abap opportunities and would save me a bit more time to create a renderer.
Many thanks in advance.
Regards,
Ivaylo MutafchievHi,
You can declare deep structure as below
TYPES : BEGIN OF ty_address,
house(10) TYPE c,
street(10) TYPE c,
END OF ty_address.
TYPES : BEGIN OF ty_itab,
name(10) TYPE c,
age TYPE i,
address TYPE ty_address OCCURS 0,
END OF ty_itab.
DATA : i_address TYPE STANDARD TABLE OF ty_address,
i_itab TYPE STANDARD TABLE OF ty_itab.
DATA : wa_address TYPE ty_address,
wa_itab TYPE ty_itab.
CLEAR : wa_address,
wa_itab.
wa_address-house = 'House1'.
wa_address-street = 'Street1'.
APPEND wa_address TO i_address.
wa_address-house = 'House2'.
wa_address-street = 'Street2'.
APPEND wa_address TO i_address.
wa_itab-name = 'Test'.
wa_itab-age = 10.
wa_itab-address[] = i_address[].
APPEND wa_itab TO i_itab.
Also check structure BSPL_GRID_FIELDCAT field CELL_COLOR -
How to define RADIO BUTTONS in MODULE POOL PROG.?
Hi Experts,
I need to keep the RADIO BUTTONS in 1000_screen of my_module_pool prog., like,
I hv 2 fields in this screen, as expected, the first shuld hv DEFAULT selection.
So, I just simply, dragged & dropped 2 radio buttons from left menu of the screen builder & given them the names as
R_SUMMARY
R_DETAIL
Then i executed the transaction, but, these above 2 fields are getting selected, as default??
I know that, if its a REPORT prog. we can define as w/ a GROUP, then the 1st one is hv the default selection.
so,
1 - How to define RADIO BUTTONS in this screen of a module pool prog.
2 - How to use these names in the prog.(PAI - i guess)?
thanq
Edited by: Srinivas on Jul 12, 2008 11:59 PMHi Srinivas,
Please check this link
Re: urgent:Regd radio buttons in module pool
http://saplab.blogspot.com/2007/10/sample-abap-program-for-module-pool_18.html
http://****************/Tutorials/ABAP/Checkbox/page1.htm
http://****************/Tutorials/ABAP/Checkbox/page2.htm
Best regards,
raam -
How to define an new New transaction type in SRM Environment?
Hi All,
There is a situation where in I have to add anew transaction type and link it to the existing process.
If I am going to
SPRO->SRM->SRM Server -> Cross appl.Basic Setting ->
Define transaction type
It gives me an un editable screen.
My question is how to define a new transaction type here
Kindly Let me know if there is any way to do it through ABAP .
Thanks And Regards,
RupeshWhen you have gone through the path you describe you end up with a screen with a line for "define transaction types". To the left of the line are two icons - one to execute the function (the execute icon) and one with documentation (the text icon). Click on the documentation icon.
Rob -
Hi All,
I need an advice...
If t.code FB60 is a t.code "enjoy", how to define the t.code F-02 ???Dear,
FB60 is vendor posting for enjoy , if you wan to post to a GL then you can use FB50. But F-02 doesnt have any enjoy related transaction code, if you require then you can customize the transaction code with ABAPer. -
How to define front-ground job
Hi
I know to use SM36 to define background job. but there is some formal problem if we run ABAP rerport in background. So, I want define a job in front-ground at night.
anybody can tell me that how to define a job in front-ground at night!
Thanks
HenryrIt sounds as if you need to change the print format settings so the report will fit on the page, or remove columns from the report.
You can change the print specifications in SM37 via the "Print specifications" push-button in the job step creation dialog. In the "Background print parameters" pop-up, select your printer and then the "Properties" push-button. That leads to a pop-up where you can change the print format i.e. the number of columns printed on the page.
best wishes
Ed -
How to define namespace with one XSD using in two different DB-Locations ?
I'm not clear,How to define namespace, targetnamespace, schemaLocation or NoNamespaceSchemaLocation
when using one common schema.xsd-definition
in two different database-locations for exchange xml-documents?
when insert xml-document I've got an error ORA-30937
do you have an good exsample ?
thanks
Norbert
schema :
<xs:schema
xmlns="http://sourcehost.com/namespace"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oraxdb="http://xmlns.oracle.com/xdb"
targetNamespace="http://sourcehost.com/namespace"
xml-document :
xmlns="http://Sourcehost.com/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:SchemaLocation="http://sourcehost.com/namespace http://desthost:8080/sys/schemas/PUBLIC/ADRESSEN.XSD">
SQL> insert into ADRESSEN values
(XMLType
(bfilename ( 'XMLIMPORT_DIR', 'adressen.xml')
, 0 )
--> error :
ORA-30937: No Schemadefinition for "SchemaLocation" (Namespace "http://www.w3.org/2001/XMLSchema-instance") in übergeordnetem Knoten "/ADRESSEN"Norbert
The schema location used to register the XML schema with XML DB does not need to be a valid URL for accessing the XML Schema
I can use the same URL , for instance
http://xmlns.example.scom/xsd/myXMLSchema.xsd
on machines dbserver1, and dbserver2. The only reason some people choose to use the hostname / portnumber convention is that this makes it possible to validate the XML Instance documents against the copy of the XML schema stored in the XML DB repository using an external tool like XMLSpy without have to add entries to XMLSpy's OASIS catalog files.
I am concerned about the message you are getting. That's not correct AFAICT but I'd need to see the complete XML Schema and Instance to be sure. -
How to define BPC architecture?
Hi All,
Iu2019m a BI and BPS consultant and Iu2019m doing a prototype for evaluating BPC for Sales Planning and I need some help.
Process flow as:
a. Extract sales from COPA (amount and quantities);
b. Copy Actual to Budget version;
c. Create new customers;
d. Delete old customers;
e. Calculate the seasonality of sales & and adjust budget;
f. Load & adjust prices
g. Load & adjust sales costs
h. Calculate Net Revenue
i. Calculate costs
My file format is as given below:
Account|Category|Time|RptCurrency|Entity|Customer|Product|Amount|Quantity
Questions:
1- There is a specific KF to load quantity or I should use another account? If so how do I load the unit measures?
2- I tried to load my file in u201CEuru201D but I received an error. The upload only finished OK when I changed the currency to u201CLCu201D. There is any trick?
3- In customer dimension, I add the sales org. attribute but it didnu2019t work out because a customer can have more than one sales org. There is any way to define a compound key for a dimension?
4- Where can I find relevant documentation about BPC?
Thanks for reading my post.
Regards, FredHi Shyam!
Thanks for your answer.
1. I followed your suggestion and load the data twice (one for amount and another for quantity) but I still have de unit measure problem (KG, TON, etc.). Any suggestion about how to handle this situation?
2. Yes is easy for me to convert LC in any other currency after the data load. But the problem is that I must load data in multiple currencies (EUR, USD)u2026
3. No it didnu2019t work out. Let me give you an example:
Customer Sales Org Distribution Channel
100001 AX01 1
100001 AX02 2
When I tried to process dimension I received the following message u201CMember ID must be uniqueu201D. Any other idea about how to define the compound key Customer and Sales Org?
Regards,
Frederico -
How to define Composite primary key for a Table
Hi ,
I am basically more into Java Programming , with little bit knowledge on Oracle as DataBase .so please excuse for my silly doubts .
Can anybody please tell me how to define a Composite Primary Key on a Table .
Thanks in advance .
Edited by: user672373773 on Sep 25, 2009 8:54 AMHere is an example right out of the Oracle documentation and the syntax for adding PK since you mention adding a composite PK.
Example creating composite index
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref594
Syntax for adding a PK (composite or not)
alter table oooooooo.tttttttt
add constraint tttttttt_PK
primary key (sample_column2,
sample_column1)
using index
tablespace IDXSPC
pctfree 05
initrans 04
maxtrans 08
storage (initial 16k
next 16k
maxextents 32
pctincrease 0);
-- dictionary management with restricted storage, change as desired.
HTH -- Mark D Powell --
Maybe you are looking for
-
SAP R/3 4.7 Fax Header settings.
SAP R/3 4.7 Fax Header settings. Sending fax from SAP Office, Workplace SBWP goes thru SCOT to faxserver and shows status in SOST in SAP which doesn't show this header page. When the fax gets sent it has a first page of an SAP fax header page that ju
-
RFC Webservice in Service Registry?
Hi, Is it possible to publish, a webservice generated out of an RFC in any of the R/3 system or a webservice from any third party application within our landscape, to the Service registry available for that landscape? If Yes, how and if No then Why?
-
Hi Can one tell me which layouts i can use for internal order planning and Internal order budgeting uploads in SAP. Thanks Lily
-
Hi , Can anyone tell me , how to debuge Adobeform?
-
Amazon app store not opening in my Z10 after OS updated to 10.3.1?
Recently updated my Balckberry z10 to 10.3.1 OS. Amazon appstore got installed as default. When i am trying to open it, it's asking permission to access data and files. And when i accept the same, the app crashes and closes. Please suggest way to res