How to access a table for changes
I'm iterating through the Pgf objects in a flow, and for each one I look for table anchors. I find the table anchor, then what do I do to access its Tbl object and do things with it? I'm just trying to find out if there are any changebars in the table. I don't think using Doc.FirstTblInDoc will help me because I'm starting with a TblAnchor text item.
I run this code on a doc that has only one paragraph with a table anchor in it:
function test() {
doc = app.ActiveDoc;
var pgf = doc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;
while ( pgf.ObjectValid() ) {
var textitems = pgf.GetText(Constants.FTI_TblAnchor);
var aa = textitems[0];
Console('what is this: '+aa);
pgf = pgf.NextPgfInFlow;
This prints "what is this: [object TextItem]".
Seems like I should be able to do something like this to get the Tbl object:
myTable = textitems[0].idata;
Am I warm? Once I get the Tbl object, I'm hoping it's a simple matter of using GetText to get changes, then finding a changebar.
Thanks,
Mark
Here's the working code I ended up using to search through a table and find out if it had any changebars.
Mark
// Find a changebar in tables. The context is iterating through the Pgfs in a doc.
function findChangebarInTable(pgf) {
var tableitems = pgf.GetText(Constants.FTI_TblAnchor);
// If no table anchors, return now.
if (tableitems.length == 0) { return; }
for (var i = 0; i < tableitems.length ; i += 1) {
// get table using table anchor.
var table = tableitems[i].obj;
cellChangebar = searchCells(table);
// If there's a changebar in any table, return.
if (cellChangebar) {
return true;
// Search the cells of the table for a changebar.
function searchCells(table) {
var tcell = table.FirstRowInTbl.FirstCellInRow;
while (tcell.ObjectValid()) {
// Get changed items in this cell.
var cellitems = tcell.GetText(Constants.FTI_CharPropsChange);
for (var i=0; i < cellitems.len ; i +=1) {
// Find out if the Cell has a changebar.
// The result of the bitwise AND (&) must be greater than 0 or no changebar.
var c = cellitems[i].idata & Constants.FTF_CHANGEBAR;
if (c > 0) {
return true;
tcell = tcell.NextCellInTbl;
Similar Messages
-
In VB Programming code -- How to access the formula for suppressing a field
In VB Programming code -- How to access the formula for suppressing a field
I am using Crystal Reports 2008 v1
Using VB code, I am attempting to modify a Crystal Report before exporting it into a PDF format and then displaying it on the Web.
My problem is that I am unable to access the formula used to dynamically suppress a field.
The following code is working:
mySections = rd.ReportDefinition.Sections
For Each mySection As CrystalDecisions.CrystalReports.Engine.Section In mySections
' myFieldToChange is a String set to the text of the field I need to adjust the Suppression
iloop = 0
For Each RecObj As CrystalDecisions.CrystalReports.Engine.ReportObject In mySection.ReportObjects
If mySection.ReportObjects.Item(iloop).Name.ToLower = myFieldToChange Then
myTextObject = CType(mySection.ReportObjects.Item(iloop), CrystalDecisions.CrystalReports.Engine.TextObject)
myTextObject.Text = "new field text goes here"
mySection.SectionFormat.EnableSuppress = True
' Here is where I want to change the formula for the Suppression
End if
iloop = iloop + 1
Next
Next
I can not find any reference to the actual suppression formula in the SDK help file.
Note, the EnableSuppress can be set to True for False, but if there is a formula for dynamic suppression, the True or False value is overwritten. The results of the formula determine the suppression.
Is there a way to reference this formula. I know that I can put on in using the Crystal Report Designer software, I need to modify this formula using VB code and the SDK.Hello, Mark;
If you are using the ReportDocument object you do not have access to the Conditional Suppression formula. You can get around it by using a formula field in the report for the supression and then using the FormulaField code to change it at runtime.
If you want to change the supression condition directly at runtime you need to use RAS and the ReportClientDocument.
Elaine -
How to access XI_AF_MSG table in Composite Application Framework Java Code
Hi Experts,
I've no knowledge about PI. In one of my projects, I need access the XI_AF_MSG table of PI through java code in a composite application.
How do I access this table? I've searched this forum for this query but the replies say that any SQL editor can be used to access XI_AF_MSG table. But my question is; How do I get the login details of the database? In the first place, how do I access the underlying database layer of PI? Is there any JAR file which can be used to make the connection?
It would be of great help if any expert on this can give me a detailed reply.
Thanks a lot in advance.
Best Regards,
NitinHi Nitin,
The AFW runs on the J2EE Engine, so this table is in the Java Schema of the database and thus not visible in the ABAP stack. I guess you can use any tool your database provider offers for looking at table contents (e.g. SQLPlus).
Regarding how to access the table please contact you basis administrator they will have access to the tables as they have j2ee_admin login ids and pwds.
Regards
joel -
How to access internal table data from webdynpro to Flex application.
Hi Connoisseur
The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
i tried to do pass internal table value to flex-datagrid.but its not work.
i would like to know
1.how to access internal table data from webdynpro to Flex application.
2.how to pass the internal table to flex-datagrid.
2.how to pass dynamically in ADOBE flex.
3. how to do Flex is receiving the wd context data?
4. how can we update WD context with FLEX data.
Ple give me sample example and step by step procedure.
Regards
laxmikanthHi Laxmikanth,
Please refer this...
Flash island: update complex type from flex
Cheers..
kris. -
How to create internal table for a structure in BSP
hi ,
I have created a Structure in BSP.I want to create an internal table for that Structure. But in my coding ie.
<% data: begin of itab_1 .
include type zuvendstr.
data:end of itab_1.
data wa_str like line of itab_1.
loop at itab_1 into wa_str. %>
<tr>
<td><%=wa_str-name%> </td>
<%endloop.%>
In this zuvendstr is Structure ,wa_str is workarea and itab_1 is an Internal table.But it is showinng an error that itab_1 is unknown.But we cannot define internal tables for an Structure in Page Attributes.So,please resolve how to create internal table for Structure in BSPSHi,
You can define itab_1 like this (assuming zuvendstr is a structure type):
DATA: itab_1 TYPE TABLE OF zuvendstr.
Regards,
Tanguy -
How to check with table for cursor..?
How to check with table for cursor..?
Here I have Table temp_final_plan
Here i want to update if already exit...below is the procedure....
CREATE OR REPLACE PROCEDURE spu_final_profit_plan
AS
-- Constant declarations
ln_errnum number := 0;
-- Variable declarations
ls_errmsg app_errors.err_msg%TYPE;
ls_appmsg app_errors.app_msg%TYPE;
ls_appid app_errors.app_id%TYPE;
-- Cursor declaration for final_update_el
CURSOR cur_final_update_el IS
select '910' ent,
'9127316' center,
post_acct,
sum(avg_mtd_01) sum_avg_mtd_01,
sum(avg_mtd_02) sum_avg_mtd_02,
sum(avg_ytd_01) sum_avg_ytd_01,
sum(avg_ytd_02) sum_avg_ytd_02
from mon_act_cypy
where rec_type = 'A'
and sum_flag = 'D'
and yr = '2008'
and substr(ctr_or_hier, 1, 2) = 'el'
and ent || sub_ent in
(select ent || sub_ent
from ent_ref
where roll_ent || roll_sub_ent = '999100')
group by post_acct
having sum(avg_mtd_01) <> 0
or sum(avg_mtd_02) <> 0
or sum(avg_ytd_01) <> 0
or sum(avg_ytd_02) <> 0;
-- Cursor declaration for final_update
CURSOR cur_final_update IS
select b.plan_ent b_plan_ent,
b.plan_ctr b_plan_ctr,
a.post_acct a_post_acct,
sum(a.avg_mtd_01) sum_avg_mtd_01,
sum(a.avg_mtd_02) sum_avg_mtd_02,
sum(a.avg_ytd_01) sum_ytd_mtd_01,
sum(a.avg_ytd_02) sum_ytd_mtd_02
from mon_act_cypy a,
plan_unit_tbl b
where a.ent || a.ctr_or_hier = b.ent || b.ctr_or_hier
and a.rec_type = 'A'
and a.sum_flag = 'D'
and a.yr = '2008'
and b.hier_tbl_num = '001'
and a.ent || a.sub_ent in
(select ent || sub_ent
from ent_ref
where roll_ent || roll_sub_ent = '999100')
group by b.plan_ent, b.plan_ctr, a.post_acct
having sum(a.avg_mtd_01) <> 0
or sum(a.avg_mtd_02) <> 0
or sum(a.avg_ytd_01) <> 0
or sum(a.avg_ytd_02) <> 0;
-- Begin the procedure body
BEGIN
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update_el IN cur_final_update_el
LOOP
EXIT WHEN rec_final_update_el%NOTFOUND;
IF rec_final_update_el. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,
WHERE ent = rec_final_update_el.ent
AND center = rec_final_update_el.center
AND post_acct = rec_final_update_el.post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
rec_final_update_el.center,
rec_final_update_el.post_acct,
rec_final_update_el.sum_avg_mtd_01,
rec_final_update_el.sum_avg_mtd_02,
rec_final_update_el.sum_avg_ytd_01,
rec_final_update_el.sum_avg_ytd_02);
END IF;
END LOOP;
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update IN cur_final_update
LOOP
EXIT WHEN rec_final_update%NOTFOUND;
IF rec_final_update. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update.sum_avg_ytd_02,
WHERE ent = rec_final_update.b_plan_ent
AND center = rec_final_update.b_plan_ctr
AND post_acct = rec_final_update.a_post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update.b_plan_ent,
rec_final_update.b_plan_ctr,
rec_final_update.a_post_acct,
rec_final_update.sum_avg_mtd_01,
rec_final_update.sum_avg_mtd_02,
rec_final_update.sum_avg_ytd_01,
rec_final_update.sum_avg_ytd_02);
END IF;
END LOOP;
-- EXCEPTION handling section
EXCEPTION
-- Fire OTHERS Exception case by default
WHEN OTHERS THEN
-- ROLL BACK Transaction, if any failure
ROLLBACK;
ln_errnum := SQLCODE;
ls_errmsg := SUBSTR(SQLERRM, 1, 100);
-- Log the ERRORS into APP_ERRORS table using SPU_LOG_ERRORS procedure
spu_log_errors(ln_errnum, ls_errmsg, ls_appid, ls_appmsg);
-- End of the stored procedure
END spu_final_profit_plan;
[\pre]I'm not sure what you mean by, 'How to check with table for cursor..?' but I'll offer a comment on your Code Snippet. I think you want to know how to check if a record exists so you know if you need to perform an INSERT or an UPDATE.
Here is a snippet of your code. I'll put my comments in "Comment" style in your code.
-- Insert / Update final profit plan for final_update query using cursor
FOR rec_final_update_el IN cur_final_update_el
LOOP
/* There is no need to test for %NOTFOUND since you are using Cursor FOR Loop!
** This construct automatically exits when the last record is processed. */
EXIT WHEN rec_final_update_el%NOTFOUND;
/* Is this where you would like to know how to Check if the record already exist??
** I asked this because, 'rec_final_update_el.' is not valid syntax. Are you looking for
** an Cursor Attribute or Method you can check here?
** I would suggest a Primary Key or Unique Index on ENT, CENTER, and POST_ACCT
** on the TEMP_FINAL_PLAN table. Then simply perform an INSERT and code an
** Exception to UPDATE when you get a DUP_VAL_ON_INDEX exception. Otherwise,
** you will need to simply run an Implicit or Explicit Cursor to test if the row exists and
** use this return value to determine if you should INSERT or UPDATE. */
IF rec_final_update_el. THEN
UPDATE temp_final_plan
SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,
sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,
sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,
WHERE ent = rec_final_update_el.ent
AND center = rec_final_update_el.center
AND post_acct = rec_final_update_el.post_acct;
ELSE
INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
rec_final_update_el.center,
rec_final_update_el.post_acct,
rec_final_update_el.sum_avg_mtd_01,
rec_final_update_el.sum_avg_mtd_02,
rec_final_update_el.sum_avg_ytd_01,
rec_final_update_el.sum_avg_ytd_02);
END IF;
END LOOP;I hope I've answered your question, but if I haven't please provide more details so we can better understand your request.
Craig... -
How to know the tables for a datasource like 2lis_17_order
Hi,
How to know the tables for a data source like 2lis_17_order, i have checked in Extract structure of that data source, only fields are visible but how will i know that these fields are getting extracted from so and so tables?
pls respond. thanks in advanceHi,
Go to RSO2 at source system, Enter data source and click on display.
if its table based then you can see table name there it self.
if its view based then notedown the view name and go to SE11, provide view and click on display. see joined table names there.
Thanks -
How's this partition table for my server?
How's this partition table for my server? Web/DNS/DHCP/Mail Server.
hdd1: ~8gb total
/boot - 100mb
swap - 1gb
/ - rest of drive
hdd2: ~155gb total
/var - whole drive
This is a Compaq ProLiant 5500 server with 10 drives. Will most things be installed inside /var or what?Zetsumei wrote:Web/DNS/DHCP/Mail Server.
Web = /srv
DNS = /var
DHCP = /var
Mail = Depends which package you use. I use postfix and told it to use /srv
I would half your swap, reduce /var and put the extra space into /srv
Also create a separate /tmp and /home to prevent accidental or deliberate DoS attacks by filling your / partition
Here's what I use on my Web / DNS / FTP server:
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 493M 176M 317M 36% /
/dev/xvdc 31M 674K 29M 3% /boot
/dev/lvmData-home 62M 26M 34M 44% /home
/dev/lvmData-usr 2.0G 848M 1.1G 45% /usr
/dev/lvmData-tmp 496M 20M 451M 5% /tmp
/dev/lvmData-srv 1.5G 769M 667M 54% /srv
/dev/lvmData-var 496M 231M 241M 49% /var
/dev/lvmData-pacman 384M 303M 82M 79% /var/cache/pacman
/dev/lvmData-backup 5.5G 4.6G 565M 90% /mnt/backup -
How do I revalue inventory for change in cost?
Hi,
How do I revalue inventory for change in cost? BOM exists for manufactured Portland cement, backflusing relieves inventory per this BOM, however, old cost still appears as valuation for this product. I did a cost estimate for this product (2000000004), marked, and released this product. Effective date of this BOM was 07/01/2009.
kindly help me
Thanks
SuvarnaDear Suvarna,
Once after taking a new released cost estimate for a product,it's stock gets automatically revaluated as per the new price or
say new value.
Can you please confirm whether in the accounting view of the material master you are able to see the last price change date is
same as your cost estimate date.Only then it means the new price was marked and stamped properly and based on the new
standard price the stock get's valuated automatically.
There is no other transaction required for this process.
Check and revert back with your further queries.
Regards
Mangalraj.S -
How to desighn a table for below logic
Hi all,
Could any body help me , how to design a table for below requirements
Ticketing Status
Departure Date/Time
Domestic Point of Sale
International Point of Sale
Yes
Outside of 24 hours
Immediate
Immediate
Yes
Inside of 24 hours
Immediate
Immediate
No
Outside of 24 hours
24 hours after Project review or 20 hours prior to departure, whichever is earlier
72 hours after Projectreview or 20 hours prior to departure, whichever is earlier
No
Inside of 24 hours
4 hours after Projectreview or 4 hours before departure, whichever is earlier; Immediate if within 4 hours
4 hours after Projectreview or 4 hours before departure, whichever is earlier; Immediate if within 4 hoursCREATE TABLE [dbo].[POS_Table](
[POSID] [int] IDENTITY(1,1) NOT NULL,
[Ticketing Status] [varchar](3) NULL,
[Departure Type] [varchar](7) NULL,
[Departure DateTime Hr] [int] NULL,
[POSType] [varchar](15) NULL,
[POSAfterProject Review Hr] [int] NULL,
[PriorToDeparture Hr] [int] NULL,
[Immediate Hr] [int] NULL,
CONSTRAINT [PK_POS_Table] PRIMARY KEY CLUSTERED
[POSID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
The rows will look like as below,
POSID
Ticketing Status
Departure Type
Departure DateTime Hr
POSType
POSAfterProject Review Hr
PriorToDeparture Hr
Immediate Hr
1
Yes
Outside
24
Domestic
0
0
0
2
Yes
Inside
24
Domestic
0
0
0
3
Yes
Outside
24
International
0
0
0
4
Yes
Inside
24
International
0
0
0
5
No
Outside
24
Domestic
24
20
0
6
No
Outside
24
International
72
20
0
7
No
Inside
24
Domestic
4
4
4
8
No
Inside
24
International
4
4
4
Regards, RSingh -
How to find an table for storing the employee salary
hi,
how to find an table for storing employee salary .. In which table those details are stored .. Please reply me.
regards,
kumarHi,
You can see the basic salary details from table -pa0008.If you can see the payroll data,then its not stored in transparent table.its in cluster.For viewing that,you can see through transaction code - pc_payresult.
Regards,
Manoj. -
How much does it cost for changing n81 8gb case
hi
how much does it cost for changing n81 8gb case
in my country (Iran) is 100 dollar and i think in other country is cheaper like UAE . can anybody answer me how much does it cost in other countery?Changing the case yourself will void the warranty. You are highly likely to cause damage unless you know exactly what you are doing.
Also avoid the 3rd party cases from ebay or places like that as most of them don't fit properly.
A nokia care point can fit original nokia covers for you without voiding the warranty.
Care points/service centres and repair info:
UK • Europe • Asia-Pacific • USA •
Canada • Middle East and Africa
Elsewhere: Click here, select your country, go to the support section, then select repair.
Message Edited by psychomania on 19-Aug-2008 06:32 PM -
How to find Related Tables for the Tcode given.
How to find Related Tables for the Tcode given. (master data)
Thanks in advance.Hi Sridhar,
Welcome to SDN.
The tables for a given transaction can be seen in the transaction SE80.
First goto SE93.
Give ur Tcode and find the program name.
Now goto SE80. select program in the first dropdown and give the program name in the second box. U can find the list of tables used.
One more way is : use ST05.
and One more is using FM 'get_tables'
Thanks,
Shailaja
Edited by: Shailaja on Jul 11, 2008 12:33 PM -
How to access a table of SAP standard SAP method from external program
Hi Friends,
I have to access a table and modified it defined in a standard SAP method (PROCESS_INPUT_FILTER) of class (CL_HANDLE_MM).
As we normaly do it in case of Standard program
for example: ('(SAPLMEPO)ett[]') here we are accessing internal table ett defined in SAPLMEPO.
so how we can do the same thing if some thing defined in standard SAP method.
Pl. help.Thanks for the info guys, it will come in handy.
I need to validate that a number is entered with zero or one decimal place, then make sure it is evenly
divisible by .5 in order to test for whole or half numbers only. If not, I use an alert to
display a message when the user leaves the field.
If there is a better way to achieve this, I am all ears!
Thank you for your time,
Gary -
How to access af:table rows in JavaScript
Hi,
I have a requirement to access af:table rows in java script.I tried the same using following code.
getRows returns the correct no of rows from the table, but table.getValue() returns null.
var table = AdfPage.PAGE.findComponentByAbsoluteId('t1');
if (table != null){
alert(table.getRows());
alert(table.getFirst());
alert(table.getValue());
Any pointers on how i can achieve this.We have a requirement where in,we have to check if the order number is already added to the cart(cart here is a table)
and this validation needs to be done as soon as you enter 10 digits in the input field for order number.
in short,order need to validated if its duplicate order against table at client side(sson as you enter 10 digits in order number)
initially I was trying to implemet this with ServerSide listner as below
Java script on page :
function addDuplicate(evt) {
var source = evt.getSource();
AdfCustomEvent.queue(source, "MyCustomServerEvent",
false);
event.cancel();
Bean method
public void callAddDuplicateSeverEvt(ClientEvent clientEvent) {
ADFContext.getCurrent().getPageFlowScope().put("dupOrderNumFlag", "N");
System.out.println("in handle Add duplicate::"+ ADFContext.getCurrent().getPageFlowScope().get("dupOrderNumFlag"));
input text on page
====
<af:inputText label="" id="it1" value="#{pageFlowScope.dspOrderNum}"
columns="14" autoComplete="off" styleClass="orderveritext"
maximumLength="10" >
<af:clientListener method="validateOrderNumChars" type="keyPress"/>
<af:clientListener method="enableAddButton" type="keyUp"/>
<af:clientListener method="addDuplicate" type=" keyPress "/>
<af:serverListener type="MyCustomServerEvent"
method="#{viewScope.HLKioskBean.callAddDuplicateSeverEvt}"/>
</af:inputText>
Problem with this solution is My application is KIOSK app(touch screen) on every key press in order num input field screen flickers,looks like its trying to do Full page rendering(though i do not have any PPR) in every call to serverListerner.
Please advise.
Maybe you are looking for
-
Implementing Email Functionality in Forum
Hello Everyone, We have created one collaboration room (Room1)using standard SAP Room Template. This room consists of the administrator and a room member. Once the administrator created the room the room member got a notification email to his LotusNo
-
Can I uninstall and just redownload? Will it recognize my machine and let me do this?
-
Trying to open solution manager and get the following error
SAPinst is getting started. Please be patient ... starting gui server process: sapinstport: 21200 guiport : 21212 guistart : true command : "C:\Program Files\Java\j2re1.4.2_12/bin\javaw.exe" -cp "D:/Profiles/MIKERA/LOCALS1/Temp/sapins
-
Hi All, Basically I m working in upgradation project . so This upgradation is in version 6. Frnds i m getting so may EP check errors and Unicode incompatibility. So frnds what is the solution for rectifying these errors. Is there any speci
-
How can I email a group list from my contacts/Mac address book?
I love the Apple address book for making media lists for my PR business because it enables me to add dates and actions. But when a client wants to see the list via email, I'm flummoxed. I've been rewriting as a Word document, but that eliminates the