How to use " PERFORM ", STATEMENT WITH OFFSET
hI,
How we use Perform statement with offset, like
Example: " PERFORM READ_SEGRELEASE USING INT_EDIDC+11."
My requirement is to use Perform with Automatic length declaration.
Automatic length declaration in PERFORM statement
Kindly Explain and Provide some Example programm written in this situation.
Thanks,
P.N.Kumar
Hiere is an example of what you probably require:
DATA:
lv_offset TYPE syoffi,
lv_length TYPE flength,
lv_field TYPE string.
lv_field = 'This is my value: hello world'.
lv_length = 5.
lv_offset = 18.
PERFORM read_segrelease USING lv_field
lv_length
lv_offset.
*& Form READ_SEGRELEASE
* text
* -->P_LV_FIELD text
* -->P_LV_LENGTH text
* -->P_LV_OFFSET text
FORM read_segrelease USING p_lv_field TYPE string
p_lv_length TYPE flength
p_lv_offset TYPE syoffi.
DATA:
lv_result TYPE string.
lv_result = p_lv_field+p_lv_offset(p_lv_length).
WRITE: / lv_result.
ENDFORM. " READ_SEGRELEASE
Similar Messages
-
How to use perform statements in sap scripts
how to use perform statements in sap scripts . and pls send me one progam for this
thnaks
rajaHi Raja,
<b>PERFORM</b> key work is used to include subroutine in sapscript form...
But the processing is lttle bit different form the one we use in ABAP.
Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
Check out the example below to see how this is used..
<b>Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
<b>Coding of the calling ABAP program:</b>
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this is clear to understand...
Enjoy SAP.
Pankaj Singh. -
How to use union statement with declare & set function?
Hi Experts,
i have small query about how to use union statement with declare & set function?
Example as below :
DECLARE @name AS date
Declare @name2 AS date
/* SELECT FROM [2013].[dbo].[OINV] T0 */
/* WHERE */
SET @name = /* T0.DocDate */ '[%1]'
SET @name2 = /* T0.DocDate */ '[%2]'
select '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2013.dbo.orct t1
inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2013.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]
Union
/* SELECT FROM [2014].[dbo].[OINV] T0 */
/* WHERE */
SET @name = /* T0.DocDate */ '[%1]'
SET @name2 = /* T0.DocDate */ '[%2]'
select '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2014.dbo.orct t1
inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2014.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]You have to create stored procedure in SQL only .
Like u must have create for Crystal .
You can execute procedure in query manager but you have to enter parameter manually..
example
Exec @Test '20140101' '20140501'
Every time user has to enter it manually in yyyymmdd format in case of date parameters.
Example
Create Proc [@Test]
as begin
DECLARE @name AS date
Declare @name2 AS date
/* SELECT FROM [2013].[dbo].[OINV] T0 */
/* WHERE */
select '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2013.dbo.orct t1
inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2013.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between @Name and @Name2
Union
/* SELECT FROM [2014].[dbo].[OINV] T0 */
/* WHERE */
select '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2014.dbo.orct t1
inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2014.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between
between @Name and @Name2
end -
HOW TO USE PERFORM STATEMENT IN SMARTFORMS
Hi,
Can anyone tell me how to use call subroutine in smartform?
Thanks & Regards,
Gauarv.Hi,
Hope this helps you..
You can use the PERFORM command to call an ABAP subroutine
(form) from
any program, subject to the normal ABAP runtime
authorization
checking. You can use such calls to subroutines for
carrying out
calculations, for obtaining data from the database that is
needed at
display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed
when a
document is formatted for display or printing.
Communication between a
subroutine that you call and the document is by way of
symbols whose
values are set in the subroutine.
The system does not execute the PERFORM command within
SAPscript
replace modules, such as TEXT_SYMBOL_REPLACE or
TEXT_INCLUDE_REPLACE.
The replace modules can only replace symbol values or
resolve include
texts, but not interpret SAPscript control commands.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of
the four
SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must
therefore be
character strings.
The ABAP subroutine called via the command line stated
above must be
defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
The values of the SAPscript symbols passed with /: USING...
are now
stored in the internal table IN_TAB . Note that the system
passes the
values as character string to the subroutine, since the
field Feld
VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR
80). See the
example below on how to access the variables.
The internal table OUT_TAB contains names and values of the
CHANGING
parameters in the PERFORM statement. These parameters are
local text
symbols, that is, character fields. See the example below
on how to
return the variables within the subroutine.
From within a SAPscript form, a subroutine GET_BARCODE in
the ABAP
program QCJPERFO is called. Then the simple barcode
contained there
('First page', 'Next page', 'Last page') is printed as
local variable
symbol. -
How to use parameterized statements with labSQL?
Hi everybody,
I have a big problem with labSQL. Every statement or query I have to use in my program works correctly, but I have a performance problem when writing my data to the database. The problem is the handling of the SQL statements by the DB. The solution will be the use of parameterized statements with labSQL.
The manual for NI Labview Database Connectivity Toolkit provides such information, but there are large differences to labSQL, and I don't get the clue. Is anybody able and would be so kind to help me? If someone has an example for using parameterized SQL statements with labSQL or the ADO methods for such stuff, please be so kind to share it with me.
Thank you for reading all of this
Best regards,
MatthiasThank you very much for your help. I already had set up the correct SQL statement and created the parameters but got errors when executing the command object. After some tries I found that neither the SQL statement nor the parameters were the source of the error, as I had expected first.
The problem was that I was sending the wrong data type to the execute method of the command object. It expected some variant input for the parameters. I send an array of strings, which caused an error. I casted that array to variant with the same result. But a single string to variant worked well (with only one parameter in the SQL statement). The easy solution was to cast all strings to variants, and then build an array out of them. The execute method worked with that. Now the transaction is 4 times faster than before
Thanks again!
Edit:
If someone is interested in some example VI, please let me know. I should have some time next week to build one.
Message Edited by manicnobody on 02-26-2009 10:19 AM -
How to use prepared statements with a single id
Here is the code I am having trouble with:
String sqlb = "INSERT INTO books.book(title)" +
"VALUES(?)";
String sqla = "INSERT INTO books.author(name,date_of_birth)" +
"VALUES(?,?)";
PreparedStatement psb = c.prepareStatement(sqlb);
PreparedStatement psa = c.prepareStatement(sqla);
psb.setString(1,book.getTitle());
psa.setString(1,author.getName());
psa.setString(2,author.getDate());
m = psb.executeUpdate();
n = psa.executeUpdate();
After placing two book/Author objects into the database I get a table that looks something like this:
0 AGreatBook Joe Bloggs 08-10-83
1 BGreatBook Joe Bloggs 08-10-83
2 AGreatBook John Smith 12-12-65
3 BGreatBook JohnSmith 12-12-65
Clearly this is not correct I want this:
0 AGreatBook Joe Bloggs 08-10-83
1 BGreatBook John Smith 12-12-65
By the way I have placed a foreign key in book table
Anyone know how to do this? (I am using postgres)
regardshttp://forum.java.sun.com/thread.jspa?threadID=726820&tstart=0
http://forum.java.sun.com/thread.jspa?threadID=726823&tstart=0 -
How to Use Switch Statement with Exclusion Group (radio buttons)?
Wouldn't you know, just when I though I'd really be making progress, I've come across another problem I can't solve. In a homeowners insurance application I am building, there is an exclusion group that needs to set the value of several variables
I have setup in the form properties/variables. These variables take on different values depending on the users choice. For the exclusion group, in the object pallet, I have set the binding to normal, and have checked the "Specify Item Values" check box. Also the values for the choices have been assigned 1,2,3,4,5.
Here is my code for the change event fir the exclusion group (This is exactly what I have tried). For now, the values for the variables to take on in the different cases, are completely arbitrary.
switch (this.change.rawValue) // I have tried so many things here
case "1": // I have tried the caption, single quotes in all combinations
addLivingExp = "1";
damageOthersProperty = "2";
liabilityIncl = "3";
maxCoverage = "4";
minCoverage = "5";
persProperty = "6";
relatedPrivateStruct = "7";
break;
case "2":
addLivingExp = "10";
damageOthersProperty = "20";
liabilityIncl = "30";
maxCoverage = "40";
minCoverage = "50";
persProperty = "60"
relatedPrivateStruct = "70";
break;
case "3":
addLivingExp = "100";
damageOthersProperty = "200";
liabilityIncl = "300";
maxCoverage = "400";
minCoverage = "500";
persProperty = "600"
relatedPrivateStruct = "700";
break;
case "4":
addLivingExp = "1000";
damageOthersProperty = "2000";
liabilityIncl = "3000";
maxCoverage = "4000";
minCoverage = "5000";
persProperty = "6000"
relatedPrivateStruct = "7000";
break;
case "5":
addLivingExp = "10000";
damageOthersProperty = "20000";
liabilityIncl = "30000";
maxCoverage = "40000";
minCoverage = "50000";
persProperty = "60000"
relatedPrivateStruct = "70000";
break;
default:
minCoverage= 5;
break;
There must be something obvious I am missing? Eternally grateful for advice on this.
StephenThere are two issues in this script:
1. You are not using the accessor 'value' to set form variables
2. You are not correctly getting the value of the radio button list in the switch clause
Please see the working script below.
Ben Walsh
www.avoka.com
switch (this.rawValue)
case "1":
addLivingExp.value = "1";
damageOthersProperty.value = "2";
liabilityIncl.value = "3";
maxCoverage.value = "4";
minCoverage.value = "5";
persProperty.value = "6";
relatedPrivateStruct.value = "7";
break;
case "2":
addLivingExp.value = "10";
damageOthersProperty.value = "20";
liabilityIncl.value = "30";
maxCoverage.value = "40";
minCoverage.value = "50";
persProperty.value = "60"
relatedPrivateStruct.value = "70";
break;
case "3":
addLivingExp.value = "100";
damageOthersProperty.value = "200";
liabilityIncl.value = "300";
maxCoverage.value = "400";
minCoverage.value = "500";
persProperty.value = "600"
relatedPrivateStruct.value = "700";
break;
case "4":
addLivingExp.value = "1000";
damageOthersProperty.value = "2000";
liabilityIncl.value = "3000";
maxCoverage.value = "4000";
minCoverage.value = "5000";
persProperty.value = "6000"
relatedPrivateStruct.value = "7000";
break;
case "5":
addLivingExp.value = "10000";
damageOthersProperty.value = "20000";
liabilityIncl.value = "30000";
maxCoverage.value = "40000";
minCoverage.value = "50000";
persProperty.value = "60000"
relatedPrivateStruct.value = "70000";
break;
default:
minCoverage.value = 5;
break; -
How to avoid data repetation when using select statements with innerjoin
how to avoid data repetation when using select statements with innerjoin.
thanks in advance,
satheeshyou can use a query like this...
SELECT DISTINCT
frg~prc_group1 "Product Group 1
frg~prc_group2 "Product Group 2
frg~prc_group3 "Product Group 3
frg~prc_group4 "Product Group 4
frg~prc_group5 "Product Group 5
prc~product_id "Product ID
txt~short_text "Product Description
UP TO 10 ROWS
INTO TABLE l_i_data
FROM
Joining CRMM_PR_SALESG and
COMM_PR_FRG_ROD
crmm_pr_salesg AS frg
INNER JOIN comm_pr_frg_rod AS prd
ON frgfrg_guid = prdfragment_guid
Joining COMM_PRODUCT and
COMM_PR_FRG_ROD
INNER JOIN comm_product AS prc
ON prdproduct_guid = prcproduct_guid
Joining COMM_PRSHTEXT and
COMM_PR_FRG_ROD
INNER JOIN comm_prshtext AS txt
ON prdproduct_guid = txtproduct_guid
WHERE frg~prc_group1 IN r_zprc_group1
AND frg~prc_group2 IN r_zprc_group2
AND frg~prc_group3 IN r_zprc_group3
AND frg~prc_group4 IN r_zprc_group4
AND frg~prc_group5 IN r_zprc_group5.
reward it it helps
Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM -
How to use Oracle partitioning with JPA @OneToOne reference?
Hi!
A little bit late in the project we have realized that we need to use Oracle partitioning both for performance and admin of the data. (Partitioning by range (month) and after a year we will move the oldest month of data to an archive db)
We have an object model with an main/root entity "Trans" with @OneToMany and @OneToOne relationships.
How do we use Oracle partitioning on the @OneToOne relationships?
(We'd rather not change the model as we already have millions of rows in the db.)
On the main entity "Trans" we use: partition by range (month) on a date column.
And on all @OneToMany we use: partition by reference (as they have a primary-foreign key relationship).
But for the @OneToOne key for the referenced object, the key is placed in the main/source object as the example below:
@Entity
public class Employee {
@Id
@Column(name="EMP_ID")
private long id;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="ADDRESS_ID")
private Address address;
EMPLOYEE (table)
EMP_ID FIRSTNAME LASTNAME SALARY ADDRESS_ID
1 Bob Way 50000 6
2 Sarah Smith 60000 7
ADDRESS (table)
ADDRESS_ID STREET CITY PROVINCE COUNTRY P_CODE
6 17 Bank St Ottawa ON Canada K2H7Z5
7 22 Main St Toronto ON Canada L5H2D5
From the Oracle documentation: "Reference partitioning allows the partitioning of two tables related to one another by referential constraints. The partitioning key is resolved through an existing parent-child relationship, enforced by enabled and active primary key and foreign key constraints."
How can we use "partition by reference" on @OneToOne relationsships or are there other solutions?
Thanks for any advice.
/MatsCrospost! How to use Oracle partitioning with JPA @OneToOne reference?
-
How to use perform and endperform in scripts
Can anybody cleaerly explains me how to use perform and endperform in scripts with an example to add something extra dynamically to the standard script (like rvorder01).
thanks in advance.
regards
anil.Check this example:
In form
PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
USING &EKKO-EKORG&
USING &EKPO-WERKS&
USING &EKKO-EKGRP&
USING &EKKO-BSTYP&
CHANGING &COMPNAME&
CHANGING &SENDADR&
CHANGING &INVCADR&
CHANGING &COMPADR&
CHANGING &COVERLTR&
CHANGING &SHIPADR&
CHANGING &REMINDER&
CHANGING &REJECTION&
CHANGING &POSTADR&
CHANGING &LOGO&
ENDPERFORM
In program
FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA : L_EKORG TYPE EKORG,
L_WERKS TYPE WERKS_D,
L_BSTYP TYPE BSTYP,
L_EKGRP TYPE BKGRP.
READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
CHECK SY-SUBRC = 0.
L_EKORG = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
CHECK SY-SUBRC = 0.
L_WERKS = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
CHECK SY-SUBRC = 0.
L_EKGRP = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
CHECK SY-SUBRC = 0.
L_BSTYP = IN_PAR-VALUE.
CLEAR Z08M1_ORG_TEXTS.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = L_BSTYP.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
AND WERKS = L_WERKS
AND EKGRP = L_EKGRP
AND BSTYP = SPACE.
ENDIF.
READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SENDADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'INVCADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COMPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REMINDER'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'REJECTION'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'POSTADR'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
MODIFY OUT_PAR INDEX SY-TABIX.
READ TABLE OUT_PAR WITH KEY 'LOGO'.
OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Check and let me know if u face any problem.
Regards -
How to use NODIM func with out it's values being rounded
I created a new calculated key figure in Query Designer 3.x, and used the function NODIM() - Value with out dimensions. When I use this function, the values are rounding off to the nearest value.
For example, I have a value 0.000075 US$, when I use NODIM function the value is displayed as 0.000080. Value is getting rounded to nearest value.
I tried using absolute value it did not work.
Can any one tell me how to use NODIM function with out it's value being rounded to nearest value.
Thanks,Hi,
According to your description, you might want that "Notice" field has a default value when form is created and users can be able to change the value of that
field.
As a workaround, you can add an action rule in “Name” field via InfoPath to fill the default value in “Notice” field only when “Name” field is not blank and “Notice”
field is blank.
Settings of the rule are as below, you can modify it based on your need:
Here is a link about how to add an action rule in InfoPath form, you can use it as a reference:
https://support.office.microsoft.com/en-us/article/Add-rules-for-performing-other-actions-5322d726-b787-4e5f-8d37-ba6db68b451d?CorrelationId=8a64c12f-aa60-4d90-b1f9-a44fcc4e74b5&ui=en-US&rs=en-US&ad=US
Best regards
Patrick Liang
TechNet Community Support -
hi everybody,
how to use collect statement to get the total amount paid to different vendor payments
data : begin of wa occurs 0,
bukrs type bsak-bukrs,
lifnr type bsak-lifnr,
land1 type lfa1-land1,
name1 like lfa1-name1,
dmbtr like bsak-dmbtr,
count type i value 0,
tot_vend type i,
vend type i.
data :end of wa.
data : itab like table of wa.
select distinct bukrs lifnr waers from bsak into
corresponding fields of wa
where bukrs in s_bukrs
and lifnr in s_lifnr
and bschl in s_bschl.
i want the total amount paid according to vendor i am using this way but i am not getting
loop at itab into wa.
wa-dmbtr = bsak-dmbtr.
collect wa-dmbtr into itab.
modify itab from wa transporting dmbtr.
i am unalbe to get it
can anybody help me regarding this if possible with example.
thanks in advance,
regards,
venu.Hi Venu,
types: BEGIN OF ty,
NAME(20),
SALES TYPE I,
END OF ty.
data : itab type standard table of ty,
itab1 type standard table of ty,
wa type ty,
wa1 type ty.
wa-NAME = 'Duck'. wa-SALES = 10.
append wa to itab.
wa-NAME = 'Tiger'. wa-SALES = 20.
append wa to itab.
wa-NAME = 'Duck'. wa-SALES = 30.
append wa to itab.
loop at itab into wa.
wa1 = wa.
collect wa1 into itab1.
endloop.
loop at itab1 into wa1.
write : / wa1-name , wa1-sales.
endloop.
COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab .
If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.
<b>If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields.</b>
If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line.
In the program you mentioned yesterday,I am not able to get the logic since many lines are commented. -
Can we use Perform statement in start routine ,Form and endform.
Hi,
Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
Form ABC,
......<ABAP> code .....
Endform.Hi,
In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
But you can surely try both the approaches.
Reards,
Durgesh. -
How to use my itunes with a new pc
how to use my itunes with a new pc?
These are two possible approaches that will normally work to move an existing library to a new computer.
Method 1
Backup the library with this User Tip.
Deauthorize the old computer if you no longer want to access protected content on it.
Restore the backup to your new computer using the same tool used to back it up.
Keep your backup up-to-date in future.
Method 2
Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
I'd recommend method 1 since it establishes an ongoing backup for your library.
If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
tt2 -
How to use the namespace with a parser?
I want to use the namespace in my project. For this reason, I use a sample
from
http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
to test my understanding.
The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
two files, they all use the 'title' as the element names. To solve these
conflicts, The namespace is used to qualified the one in slideshow2.dtd.
But the parser still complain that the 'title' in slideshow2.dtd is declared
more than once.
I use apache's Xerces.
I want to know if Xereces realy support namespace spec. now, or how to use
the namespace with a parser. Can anyone kindly tell me where to find some
material that demo the use of namespace in Java program.
Thanks for any help!!!
#############FILE: slideshow2.dtd ###############
<?xml version='1.0' encoding='us-ascii'?>
<!ELEMENT slideshow (slide+)>
<!ELEMENT slide (title?, item*)>
<!ENTITY % xhtml SYSTEM "xhtml.dtd">
%xhtml;
<!ELEMENT title (#PCDATA)*>
<!ATTLIST title
xmlns CDATA #FIXED "http://www.example.com/slideshow"
>
<!ELEMENT item (#PCDATA)>
##############FILE: xhtml.dtd #########################
<?xml version='1.0' encoding='us-ascii'?>
<!ELEMENT html (head)>
<!ATTLIST html
xmlns CDATA #FIXED "http://www.example.com/xhtml"
>
<!ELEMENT head (title,style*)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT style (#PCDATA)>
#############FILE: slideshow.xml ####################
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
<slideshow>
<slide>
<title xmlns="http://www.example.com/slideshow">Wake up to
products!</title>
</slide>
</slideshow>I want to use the namespace in my project. For this reason, I use a sample
from
http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/7b_pe.html
http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom/5_ns.html
to test my understanding.
The slideshow2.dtd refer to the definition in 'xhtml.dtd'. Because in these
two files, they all use the 'title' as the element names. To solve these
conflicts, The namespace is used to qualified the one in slideshow2.dtd.
But the parser still complain that the 'title' in slideshow2.dtd is declared
more than once.
I use apache's Xerces.
I want to know if Xereces realy support namespace spec. now, or how to use
the namespace with a parser. Can anyone kindly tell me where to find some
material that demo the use of namespace in Java program.
Thanks for any help!!!
#############FILE: slideshow2.dtd ###############
<?xml version='1.0' encoding='us-ascii'?>
<!ELEMENT slideshow (slide+)>
<!ELEMENT slide (title?, item*)>
<!ENTITY % xhtml SYSTEM "xhtml.dtd">
%xhtml;
<!ELEMENT title (#PCDATA)*>
<!ATTLIST title
xmlns CDATA #FIXED "http://www.example.com/slideshow"
>
<!ELEMENT item (#PCDATA)>
##############FILE: xhtml.dtd #########################
<?xml version='1.0' encoding='us-ascii'?>
<!ELEMENT html (head)>
<!ATTLIST html
xmlns CDATA #FIXED "http://www.example.com/xhtml"
>
<!ELEMENT head (title,style*)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT style (#PCDATA)>
#############FILE: slideshow.xml ####################
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE slideshow SYSTEM "slideshow2.dtd">
<slideshow>
<slide>
<title xmlns="http://www.example.com/slideshow">Wake up to
products!</title>
</slide>
</slideshow>
Maybe you are looking for
-
MacBook (10.4.11) is unable to connect to wifi networks
After updating with 10.4.11 (and the associated 2008-01 Airport update) a few months ago, my Intel MacBook has been unable to connect to my WPA2 network. It will see my network name in the Airport drop-down menu, but fail to actually connect. The ico
-
A problem with a session Access
-
MAC osx SUPPORT for 6500 classic
i am a new owner for the 6500 classic and wondered why nokia dont list this phone under the mac support? does any one have any recommendations of software/plugins i can download for mac tiger 10.4 that will sync with ical etc etc but that will work w
-
Audio out of AirPlay port using apple Tv ad iPad
If I use AirPlay to play from my iPad to my Apple TV, via the Airport Express, can I get audio out of the port on the AirPlay?
-
What is the best way to update a dynamic vi?
I am loading charts and graphs dynamically and I want to be able to update them using the same loop in the main vi. (Using LV 6.1)