How to get the multidementional hierarchy level number ?
Dear all,
Could anyone tell me how to receive the hierarchy level number like the picture below:
[click here for the Screenshot|http://yaoxin.de/download/level.jpg]
as you can see, when i mouse hove on a level, it shows the level number.
but, I want to get the level number 2 (node number 2) in query designer, but i can't find anywhere to show that.
thank you for your kind help !
Edited by: Xin Yao on Aug 26, 2011 1:04 PM
hi Charlie Belt,
Thank you very much for your answer.
And yes, I do wish to perform a calculation based (aggregation) on the hierarchy level.
How can I continue working on that?
yao
wish you have a nice weekend!
Similar Messages
-
Urgent:::how to get the employee hierarchy
hi all.
let me know how to get the employee hierarchy in HR organizational management.
like when we give emp id it shows developer name---superior( team lead name)-superior(project lead name)---
points will be rewarded for valuable answer.Hi,
1) You can use the relation '002' in the table HRP1001, between the position of developer (objid) and get the position of team lead (sobid field). With the position of the team lead got in SOBID field... with the relation '008' get the person name.
2) You can use the transaction PPOM_OLD to view the reporting structure...
Regards,
Meera -
How to get the pricing hierarchy based on the delivery date for sales order
Hi,
How to get the pricing hierarchy based on the delivery date for sales order other than system date.
My requirement is to get the Pricing hierarchy based on the delivery date other than system date.
Waiting for kind response.
Best Regards,
BDPHI Sai,
please refer teh document already how to write FM based extration on generic extractors.
and here the logic to find the latest records values:-
-> get the data in an internal table
->Sort the internal table data based from date descending
-> Using READ statement , we can read the first record of the table which is nothign but your latest record.
Regards.
Sakthi -
How to get the Next Material Document Number
Hi,
Please let me know How to get the next Material Document Number using Functional Module,
Material Document number are in MSEG table.
Regards,
GaneshHi Ganesh,
if you want the next matrial number then first of all you have to define it as a number range in transaction snro.After creating the number range you have to define the interval.
now you can use your number range by calling the function module
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01' " here you have to give the number range number which you have defined in number range
object = 'ZPRODLOG' " Number Range
IMPORTING
number = wa_prod_error_log-seqnr " sequence number generated,in your case material number field
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
each and every time next number will get generated .
i hope this will help you.
Thanks,
Tanmaya -
How to get the initdefault run level in Solaris 10
Hi All,
In Solaris 9 and below
I will get the init run-level by checking the /etc/inittab entry
is:3:initdefault:
But in Solaris 10 we are using the smf functionality.
Here how I can get the init default run level.
Please help me in this problem.
Regards,
KalaiInit levels no longer form a 1:1 mapping with how SMF will run things.
The default milestone is 'all'. You can override this on the boot line. I'm not sure how you might change it within the filesystem.
Darren -
How to get the Minum Grade level from the view cluster table V_T710CL_B
Hi Guys,
I want to fetch the Minum Grade level from the view cluster table V_T710CL_B
kindly help me
Regards
Rusidar.HI Siggi,
Thank you for your reply..
I am also planning to do FM to get the data. But it is saying that the Cluster table ZES does not exist (ZES is the the standard table, in SE11 also).
How can I use the Fields from the that table.?
What can I do now, can you please explain me about this point.
Waiting for your reply.
Thanks and Regards
Rajesh
Message was edited by:
rajesh -
DSC Alarms: how to get the current alarm levels / setpoints
I have a VI that can get the alarm levels for shared variables as they are set in the project library.
But I have programmatically changed the values for the alarm levels, so the Distributed System Manager shows different levels as compared to what my VI displays. I want the updated or current alarm levels - the ones that are retrieved by Read Alarms (called setpoints).
I could use Read Alarms, but that only shows the shared variables that are in alarm. I want all the shared variables in a process that is currently deployed.
Any suggestions?
BTW, is Distributed System Manager the same tool as Shared Variable Monitor? I can't find the Shared Variable Monitor on my system.
GHi Gretchen,
To answer your second question first, Shared Variable Monitor was the old name for what became Distributed System Manager. There was also some added functionality beyond just shared variables with DSM, so the name got changed.
As for suggestions regarding your application, I could use a little bit of clarification. I understand you're programmatically changing the alarm values and you want to display the values of your shared variables and their respective alarm states, correct? Also, when you're running your VI DSM does not update with the new alarm values (what happens when you hit the refresh button?).
I found a couple examples that may be useful moving forward Example 1, Example 2. These cover using shared variables and DSC's alarming features.
Tim W.
Applications Engineering
National Instruments
http://www.ni.com/support -
How to get the zero of phone number eg. 0612345678
Dear Adobe Flex Builder Professionals,
I've got a problem with getting the zero of a phone number eg. 0612345678
If I enter the folowing phone number as input:
0612345678
I will get the phone number as output:
612345678
The application has been written in Adobe Flex Builder 3.
The code of the MXML file is:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()"
horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Metadata>
[Event(name="customerSaveEvent", type="events.CustomerEvent")]
[Event(name="customerCancelEvent", type="flash.events.Event")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import util.ComboBoxUtil;
import mx.controls.Alert;
import events.CustomerEvent;
import mx.collections.ArrayCollection;
import mx.core.Application;
import valueObject.Customer;
import mx.validators.Validator;
import mx.validators.PhoneNumberValidator;
private var phoneCheck:PhoneNumberValidator;
[Bindable]
public var selectedCustomer:Customer;
private function init():void{
//this.cretePhoneValidator();
if(this.selectedCustomer == null){
this.clearForm(null);
private function cretePhoneValidator():void{
phoneCheck = new PhoneNumberValidator();
phoneCheck.source = phoneNumber;
phoneCheck.property = "text";
private function validateForm():void {
//var validatorList:Array = new Array(emailCheck, phoneCheck);
//Validator.validateAll(validatorList);
private function cancelClickHandler():void{
var cancelManageCustomerObj:Event = new Event("customerCancelEvent");
dispatchEvent(cancelManageCustomerObj);
private function saveCustomer():void {
//validateForm();
var c:Customer = null;
var selCust:Customer = Application.application.selectedCustomer;
if(selCust != null){
c = selCust;
} else {
c = new Customer();
c.setLastName(lastName.text);
c.setFirstName(firstName.text);
c.setStreet(street.text);
c.setPostal(postal.text);
c.setCity(city.text);
c.setEmail(email.text);
c.setPhoneNumber(new Number(phoneNumber.text));
c.setMailing(mailing.selectedItem.data);
c.setComment(comment.text);
var modified: Customer = Application.application.customerService.createOrUpdate(c);
var customerEventObj:CustomerEvent = new CustomerEvent("customerSaveEvent", modified);
dispatchEvent(customerEventObj);
this.clearForm(selCust);
private function clearForm(selCust:Customer):void{
if(selCust == null){
this.lastName.text = "";
this.firstName.text = "";
this.street.text = "";
this.postal.text = "";
this.city.text = "";
this.phoneNumber.text = "";
this.email.text = "";
this.mailing.selectedIndex = 0;
this.comment.text = "";
focusManager.setFocus(lastName);
]]>
</mx:Script>
<!--mx:EmailValidator id="emailCheck" source="{email}" property="text"
trigger="{save}" triggerEvent="click"/-->
<mx:Form id="manageCustomerForm">
<mx:FormItem label="Achternaam:">
<mx:TextInput id="lastName" text="{selectedCustomer.getLastName()}"/>
</mx:FormItem>
<mx:FormItem label="Voorletters:">
<mx:TextInput id="firstName" text="{selectedCustomer.getFirstName()}"/>
</mx:FormItem>
<mx:FormItem label="Straat:">
<mx:TextInput id="street" text="{selectedCustomer.getStreet()}"/>
</mx:FormItem>
<mx:FormItem label="Postcode:">
<mx:TextInput id="postal" text="{selectedCustomer.getPostal()}"/>
</mx:FormItem>
<mx:FormItem label="Stad:">
<mx:TextInput id="city" text="{selectedCustomer.getCity()}"/>
</mx:FormItem>
<mx:FormItem label="Telefoonnummer:">
<mx:TextInput id="phoneNumber" text="{selectedCustomer.getPhoneNumber()}"/>
</mx:FormItem>
<mx:FormItem label="E-mail:">
<mx:TextInput id="email" text="{selectedCustomer.getEmail()}"/>
</mx:FormItem>
<mx:FormItem label="Opmerkingen:" >
<mx:TextArea id="comment" text="{selectedCustomer.getComment()}"
width="447" height="144"/>
</mx:FormItem>
<mx:FormItem label="Mailing:">
<mx:ComboBox id="mailing" dataProvider="{Application.application.comboBoxUtil.yesNo}"
selectedIndex="{ComboBoxUtil.getIndex(selectedCustomer.getMailing())}"/>
</mx:FormItem>
<mx:HBox id="manageButtonBox">
<mx:Button id="save" label="Opslaan" click="saveCustomer()" />
<mx:Button id="resetButton" label="Wis" click="clearForm(null)" />
<mx:Button id="cancelButton" label="Annuleer" click="cancelClickHandler()" />
</mx:HBox>
</mx:Form>
</mx:Canvas>
The code of the SQL file is:
create table customer (
id integer not null primary key autoincrement,
lastName VARCHAR(50),
firstName VARCHAR(50),
street VARCHAR(50),
city VARCHAR(50),
postal VARCHAR(10),
phoneNumber INT(10),
email VARCHAR(50),
mailing boolean default false,
comment VARCHAR(255)
create table treatment (
id integer not null primary key autoincrement,
date Date,
treatment varchar(255),
customerId integer not null,
constraint fk_customer foreign key(customerId) references customer(id)
create table user (
id integer not null primary key autoincrement,
loginName varchar(50) not null,
lastName varchar(50) not null,
firstName varchar(50) not null,
password varchar(50) not null,
active boolean not null default true,
accessright varchar(10) not null
create table agenda (
id integer not null primary key autoincrement,
userId integer not null,
date Date,
hour integer,
minute integer,
description varchar(50),
constraint fk_user foreign key(userId) references user(id)
create table license (
id integer not null primary key autoincrement,
key varchar(50),
val varchar(50)
I hope someone can help me with this problem.Customer List?
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml
initialize="init()">
<mx:Metadata>
[Event(name="selectCustomerEvent", type="events.CustomerEvent")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import mx.core.Application;
import service.CustomerService;
import events.CustomerEvent;
import valueObject.Customer;
import mx.events.ListEvent;
import mx.collections.ArrayCollection;
[Bindable]
public var customerData:ArrayCollection;
private var customerService:CustomerService;
private function init():void{
this.customerService = new CustomerService();
this.customerData = this.customerService.getCustomers();
if(this.customerData == null){
this.customerData = new ArrayCollection();
private function itemClickHandler(event:ListEvent):void {
if(event.columnIndex != 0){
var customerData:Customer;
customerData = event.itemRenderer.data as Customer;
var customerEventObj:CustomerEvent = new CustomerEvent("selectCustomerEvent", customerData);
dispatchEvent(customerEventObj);
public function deleteCustomer(id:int):void{
var cust:Customer = new Customer();
cust.setId(id);
this.customerService.deleteCustomer(cust);
this.customerData.removeItemAt(customerGrid.selectedIndex);
]]>
</mx:Script>
<mx:DataGrid id="customerGrid" dataProvider="{customerData}" height="100%"
itemClick="itemClickHandler(event)" width="340">
<mx:columns>
<mx:DataGridColumn deactivate="true" dataField="id" headerText=" " width="15">
<mx:itemRenderer>
<mx:Component>
<mx:Image source="images/delete.jpg" click="outerDocument.deleteCustomer(data.id)"
buttonMode="true" height="15" width="15"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="lastName" headerText="Achternaam" />
<mx:DataGridColumn dataField="firstName" headerText="Voorletters" />
</mx:columns>
</mx:DataGrid>
</mx:Canvas> -
I want to know how to get the Mobile IP or number
source code for getting the IP of your mobile
String localAddress = "127.0.0.1";
try {
SocketConnection con = (SocketConnection)
) Connector.open("socket://www.sun.com:80");
localAddress = con.getLocalAddress());
} catch (IOException e1) {
// e1.printStackTrace();
System.out.println(localAddress);if you are using this code on BlackBerry's you have to add the deviceside flag:
...Connector.open("socket://www.sun.com:80;deviceside=true");
...atlan -
How to get the ammendment sales order number and original sales order no?
Hello sir's,
Please tell me the table for ammendment(revised) sales order number and original sales order no.
Thanks in advance,
vikramSolved
-
Quick question: How to get the scrolled page number using af:table
Hi,
When using range paging on scrolled table, how to get the current scrolled page number(1,2,3...), for example when moving the table vertical scroll bar forward or backward, is there any method in ViewObjectImpl class that I can use to get such information? I have seen the method scrollToRangePage(int i), but when scrolled ("Fetching data..."), it doesn't not get into this method. So it is wrong usage for this method, right?
ThanksDidn't you just ask that question in this thread?: How to catch the page number when using scroll table in ADF 11g?
A bit of patience might be in order.
CM. -
HOw to Get the top level of Hierarchy and count on that basis
hi
i have following tables
desc hr_organizations_units_V
organization_id PRIMARY KEY
name
ORGANIZATION_type
per_org_structure_elements
organization_id_parent FK TO hr_organizations_units_V(ORGANIZATION_ID)
organization_id_child FK TO hr_organizations_units_V(ORGANIZATION_ID)
I HAVE THIS QUERY TO GET PARENT CHILD
SELECT ORGANIZATION_ID_PARENT PARENT,ORGANIZATION_ID_CHILD CHILD,ORGANIZATION_TYPE FROM PER_ORG_STRUCTURE_ELEMENTS OSE,HR_ALL_ORGANIZATION_UNITS AOU WHERE AOU.ORGANIZATION_ID = OSE.ORGANIZATION_ID_CHILD CONNECT BY PRIOR ORGANIZATION_ID_CHILD = ORGANIZATION_ID_PARENT
START WITH ORGANIZATION_ID_PARENT = 82 -- THE GRAND PARENT
ORDER BY ORGANIZATION_ID_PARENT
PARENT CHILD ORGANIZATION_TYPE
82 83 COMPANY
82 143 COMPANY
83 84 DIVISION
83 134 DEPARTMENT
83 135 DEPARTMENT
DESC per_all_assignments_f
ASSIGNMENT_NUMBER
ORGANIZATION_ID FORIGN KEY TO HR_ALL_ORGANIZATION_UNITS
THE ASSIGNMENTS ARE ASSIGNED ON DEPARTMENT LEVEL.
MY REQUIREMENT IS THAT I WANT TO GET THE
1)TOTAL NO OF ASSIGNMENTS ON THE DIVISION LEVEL
2)TOTAL NO OF ASSIGNMENTS ON THE COMPANY LEVEL
3)REPORTS LIKE PAY SLIP ETC I WANT TO GET THE ABOVE TWO LEVELS OF ORGANIZATION FOR EACH EMPLOYEE I.E DIVISION AND COMPANY OF
OF THE EMPLOYEE'S DEPARTMENT.
I WILL REALLY APPRECIATE ANY HELPING HAND.
REGARDSHere are a few ways to get what I think you are asking for now. If this is not what you want, then please provide a complete example of what you want, including sample data, and the complete query result, including numbers, based on that data, that you want, as I have done below.
scott@ORA92> -- test data:
scott@ORA92> SELECT * FROM hr_all_organization_units
2 /
ORGANIZATION_ID NAME ORGANIZATIO
82 GRANDPARENT GRANDPARENT
83 COMPANY 83 COMPANY
84 DIVISION 84 DIVISION
134 DEPARTMENT 134 DEPARTMENT
135 DEPARTMENT 135 DEPARTMENT
143 COMPANY 143 COMPANY
6 rows selected.
scott@ORA92> SELECT * FROM per_org_structure_elements
2 /
ORGANIZATION_ID_PARENT ORGANIZATION_ID_CHILD
82 83
82 143
83 84
84 134
84 135
scott@ORA92> SELECT * FROM per_all_assignments_f
2 /
ASSIGNMENT_NUMBER ORGANIZATION_ID
1 83
2 84
3 134
4 135
5 143
6 84
6 rows selected.
scott@ORA92> -- method 1:
scott@ORA92> COLUMN name FORMAT A35
scott@ORA92> SELECT RPAD ('.', 5 * (LEVEL - 1), '.') || aou.name AS name,
2 (SELECT SUM (the_count)
3 FROM (SELECT organization_id_parent,
4 organization_id_child,
5 COUNT (*) AS the_count
6 FROM per_org_structure_elements,
7 per_all_assignments_f
8 WHERE per_org_structure_elements.organization_id_child =
9 per_all_assignments_f.organization_id
10 GROUP BY organization_id_parent,
11 organization_id_child) t
12 START WITH t.organization_id_child =
13 ose.organization_id_child
14 CONNECT BY PRIOR t.organization_id_child =
15 t.organization_id_parent) AS assignments_count
16 FROM PER_ORG_STRUCTURE_ELEMENTS OSE,
17 HR_ALL_ORGANIZATION_UNITS AOU
18 WHERE AOU.ORGANIZATION_ID = OSE.ORGANIZATION_ID_CHILD
19 START WITH aou.name = '&company_name'
20 CONNECT BY PRIOR ose.ORGANIZATION_ID_CHILD = ose.ORGANIZATION_ID_PARENT
21 /
Enter value for company_name: COMPANY 83
old 19: START WITH aou.name = '&company_name'
new 19: START WITH aou.name = 'COMPANY 83'
NAME ASSIGNMENTS_COUNT
COMPANY 83 5
.....DIVISION 84 4
..........DEPARTMENT 134 1
..........DEPARTMENT 135 1
scott@ORA92> -- method 2:
scott@ORA92> COLUMN name FORMAT A35
scott@ORA92> WITH sub_query AS
2 (SELECT ose.organization_id_parent, ose.organization_id_child,
3 aou.name, COUNT (*) AS assignments
4 FROM per_org_structure_elements ose,
5 hr_all_organization_units aou,
6 per_all_assignments_f aaf
7 WHERE ose.organization_id_child = aou.organization_id
8 AND ose.organization_id_child = aaf.organization_id
9 AND aou.organization_id = aaf.organization_id
10 GROUP BY ose.organization_id_parent, ose.organization_id_child, aou.name)
11 SELECT RPAD ('.', 5 * (LEVEL - 1), '.') || name AS name,
12 (select SUM (assignments)
13 from sub_query
14 start with organization_id_child = t.organization_id_child
15 connect by prior organization_id_child = organization_id_parent)
16 AS assignments_count
17 FROM sub_query t
18 START WITH name = '&company_name'
19 CONNECT BY PRIOR ORGANIZATION_ID_CHILD = ORGANIZATION_ID_PARENT
20 /
Enter value for company_name: COMPANY 83
old 18: START WITH name = '&company_name'
new 18: START WITH name = 'COMPANY 83'
NAME ASSIGNMENTS_COUNT
COMPANY 83 5
.....DIVISION 84 4
..........DEPARTMENT 134 1
..........DEPARTMENT 135 1
scott@ORA92> -- method 3:
scott@ORA92> COLUMN name FORMAT A35
scott@ORA92> CREATE OR REPLACE VIEW sub_query AS
2 SELECT ose.organization_id_parent, ose.organization_id_child,
3 aou.name, COUNT (*) AS assignments
4 FROM per_org_structure_elements ose,
5 hr_all_organization_units aou,
6 per_all_assignments_f aaf
7 WHERE ose.organization_id_child = aou.organization_id
8 AND ose.organization_id_child = aaf.organization_id
9 AND aou.organization_id = aaf.organization_id
10 GROUP BY ose.organization_id_parent, ose.organization_id_child, aou.name
11 /
View created.
scott@ORA92> SELECT RPAD ('.', 5 * (LEVEL - 1), '.') || name AS name,
2 (select SUM (assignments)
3 from sub_query
4 start with organization_id_child = t.organization_id_child
5 connect by prior organization_id_child = organization_id_parent)
6 AS assignments_count
7 FROM sub_query t
8 START WITH name = '&company_name'
9 CONNECT BY PRIOR ORGANIZATION_ID_CHILD = ORGANIZATION_ID_PARENT
10 /
Enter value for company_name: COMPANY 83
old 8: START WITH name = '&company_name'
new 8: START WITH name = 'COMPANY 83'
NAME ASSIGNMENTS_COUNT
COMPANY 83 5
.....DIVISION 84 4
..........DEPARTMENT 134 1
..........DEPARTMENT 135 1 -
How to get the page number in the break section?
Hi expert,
The user wants the page number came right after the Break group name if the break section contains more than 1 page. E.g.
ABC Compnay
XXXXXXXXXXX XXXXXXXX
XXXXXXXXXX XXXXXXXXXXXX
BCD Company, p 1
XXXXXXXXXXX XXXXXXXX
XXXXXXXXXX XXXXXXXXXXXX
BCD Company, p 2
XXXXXXXXXXX XXXXXXXX
XXXXXXXXXX XXXXXXXXXXXX
CDE Company
XXXXXXXXXXX XXXXXXXX
XXXXXXXXXX XXXXXXXXXXXX
How to get the page number in section break level?Hi Wes
* Create a Field on the margin.
* Set its "Source" to "Page Number"/"Physical Page Number".
* Click "Page Numbering" button.
* In "Reset At" list box, choose the Repeating frame that surrounds your detail group in the layout.
This should cause Reports to increment the page number until the "Company" repeating frame resets.
Regards
Sripathy -
Bom explosion how to get the least level every stufe = 1
material number : 2t67363633
following is the bom of that materials
the below ouput is i got it from cs12
.1 010 6631030681
..2 010 INL025000650
..2 020 IN6631030681
.1 020 6650002622
..2 010 950002621GV
.1 030 6682500491
.1 040 712758079
but in cs13 the following output i got only the following for the same materials
.1 010 6631030681
..2 010 INL025000650 -
i got this
..2 020 IN6631030681 -
i got this
.1 020 6650002622
..2 010 950002621GV -
i got this
.1 030 6682500491 -
i got this
.1 040 712758079 -
i got this
requirement is take the least items in every level1 items
supouse if the level1 item doesnt have any subitems ,we ll take this one also
following is the detiails for the senario,using this to restrict and how to get the cs13 above output
level fld2 fld3 fld4 fld5 fld6 fld7 componentname
.1 0000001 00000097 001 00002 0001 010 6631030681 -
..2 0000001 00000093 002 00002 0001 010 inl025000650
..2 0000002 00000093 002 00004 0002 020 in6631030681-1560
.1 0000002 00000097 001 00004 0002 020 6650002622
..2 0000001 00000095 002 00002 0001 010 950002621gv
.1 0000003 00000097 001 00006 0003 030 6682500491
<b> .1 0000004 00000097 001 00008 0004 040 712758079</b>
i here attached my code for ur review
i got the output without the last leve i bold it. is there any logic to solve the problem
TABLES : MAST.
DATA: BEGIN OF ISTPO OCCURS 1000.
INCLUDE STRUCTURE STPOX.
DATA: END OF ISTPO.
DATA: W_TOPMAT LIKE CSTMAT.
SELECT-OPTIONS : P_MATNR FOR MAST-MATNR.
PARAMETERS : P_WERKS TYPE MAST-WERKS.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MAST-MATNR,
WERKS LIKE MAST-WERKS,
END OF ITAB.
DATA: IT_STB LIKE ISTPO OCCURS 0 WITH HEADER LINE.
data : istpofinal like istpo occurs 0 with header line.
data : istpotemp like istpo occurs 0 with header line.
START-OF-SELECTION.
CLEAR ISTPO. REFRESH ISTPO.
SELECT MATNR WERKS FROM MAST INTO TABLE ITAB
WHERE MATNR IN P_MATNR AND WERKS = P_WERKS.
LOOP AT ITAB.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
MEHRS = 'X'
MMAPS = ' '
MDMPS = ' '
BREMS = 'X'
DATUV = SY-DATUM
MTNRV = ITAB-MATNR
WERKS = P_WERKS
EMENG = '1'
STKKZ = ' '
FBSTP = ' '
FTREL = ' '
IMPORTING
TOPMAT = W_TOPMAT
TABLES
STB = ISTPO
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
OTHERS = 8.
IF SY-SUBRC = 0.
WRITE:/ 'MaterialNumber' ,21 'Description'.
SKIP 1.
endif.
WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
data : ttabix like sy-tabix,
tstufe like stpox-stufe.
data : len type i.
istpotemp[] = istpo[].
describe table istpotemp lines len.
LOOP AT ISTPO .
WRITE :/ ISTPO-STPOZ,
ISTPO-STLKN,
ISTPO-POSNR,
ISTPO-IDNRK,
ISTPO-OJTXP,
ISTPO-MENGE,
ISTPO-MEINS.
if sy-tabix = len.
move-corresponding istpo to istpofinal.
append istpofinal.
exit.
endif.
ttabix = sy-tabix - 1 .
if tstufe ge istpo-stufe.
read table istpotemp index ttabix.
move-corresponding istpotemp to istpofinal.
append istpofinal.
endif.
tstufe = istpo-stufe.
ENDLOOP.
*endif.
endloop.
skip 3.
loop at istpofinal.
WRITE :/ ISTPOFINAL-STPOZ,
ISTPOFINAL-STLKN,
ISTPOFINAL-POSNR,
ISTPOFINAL-IDNRK,
ISTPOFINAL-OJTXP,
ISTPOFINAL-MENGE,
ISTPOFINAL-MEINS.
endloop.Hi Shiba,
We got the required list,
But while using select-option to view multiple values the list of datas in the ISTPOFINAL gets displayed like the given below.
example
Material1
.........Component 1
.........Component 2
Material 2
.........Component 1......... From Material 1
.........Component 2......... From Material 1
.........Component 3
.........Component 4
Material 3
.........Component 1......... From Material 1
.........Component 2......... From Material 1
.........Component 3......... From Material 2
.........Component 4......... From Material 2
.........Component 5
.........Component 6
Like this it goes on for the entire list at the tie of displaying the ISTPOFINAL.
We tried evn by deleting the adjacent duplicate values still it gets displayed.
is there any problm with the loop or is it the problm with the ending of the loop.
Pls suggest us.
LOOP AT ITAB.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
MEHRS = 'X'
MMAPS = ' '
MDMPS = ' '
BREMS = 'X'
DATUV = SY-DATUM
MTNRV = ITAB-MATNR
WERKS = P_WERKS
EMENG = '1'
STKKZ = ' '
FBSTP = ' '
FTREL = ' '
IMPORTING
TOPMAT = W_TOPMAT
TABLES
STB = ISTPO
MATCAT = MATCAT
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
OTHERS = 8.
WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
data : ttabix like sy-tabix,
tstufe like stpox-stufe.
data : len type i.
istpotemp[] = istpo[].
describe table istpotemp lines len.
loop at istpo.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
MEHRS = 'X'
MMAPS = ' '
MDMPS = ' '
BREMS = 'X'
DATUV = SY-DATUM
MTNRV = ISTPO-IDNRK
WERKS = P_WERKS
EMENG = '1'
STKKZ = ' '
FBSTP = ' '
FTREL = ' '
IMPORTING
TOPMAT = W_TOPMAT
TABLES
STB = ISTPOTEMP
MATCAT = MATCAT
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
OTHERS = 8.
if sy-subrc ne 0.
move-corresponding istpo to istpofinal.
append istpofinal.
clear: istpo, istpofinal.
else.
continue.
clear: istpo, istpofinal.
endif.
*break-point.
delete adjacent duplicates from istpofinal.
endloop.
loop at istpofinal.
WRITE :/ ISTPOFINAL-STPOZ,
ISTPOFINAL-STLKN,
ISTPOFINAL-POSNR,
ISTPOFINAL-IDNRK,
ISTPOFINAL-OJTXP,
ISTPOFINAL-MENGE,
ISTPOFINAL-MEINS.
clear: istpofinal.
endloop.
endloop. -
How to get the page number according to MarkerID?
I want to get the page number according to the marker element in fdk. I can get the marktext and markid,How to get the page number according to MarkerID in fdk?
zhaopeng,
You need to first get the ID of the paragraph containing the marker (with FP_TextLoc), then get the top-level frame containing the FO_Pgf object (FP_InTextFrame), then get the page containing the FO_TextFrame object (FP_PageFramePage). Here is a function that you can send various objects to in order to get the page ID, including paragraphs (this courtesy of Rick Quatro, originally posted to the Yahoo Framedev list):
F_ObjHandleT GetPage(F_ObjHandleT oDoc, F_ObjHandleT oObj)
F_ObjHandleT oFrame = 0;
IntT iObjType;
F_ObjHandleT oRow, oCell;
while(oObj)
oFrame = oObj;
iObjType = F_ApiGetObjectType(oDoc, oObj);
switch(iObjType)
case FO_SubCol:
oObj = F_ApiGetId(oDoc, oObj, FP_ParentTextFrame);
break;
case FO_Tbl:
oRow = F_ApiGetId(oDoc, oObj, FP_FirstRowInTbl);
oCell = F_ApiGetId(oDoc, oRow, FP_FirstCellInRow);
oObj = oCell;
break;
case FO_Row:
oCell = F_ApiGetId(oDoc, oObj, FP_FirstCellInRow);
oObj = oCell;
break;
case FO_Cell:
case FO_Pgf:
case FO_AFrame:
oObj = F_ApiGetId(oDoc, oObj, FP_InTextFrame);
break;
case FO_TextLine:
case FO_TextFrame:
case FO_UnanchoredFrame:
case FO_Arc:
case FO_Ellipse:
case FO_Group:
case FO_Inset:
case FO_Line:
case FO_Math:
case FO_Polygon:
case FO_Polyline:
case FO_Rectangle:
case FO_RoundRect:
oObj = F_ApiGetId(oDoc, oObj, FP_FrameParent);
break;
//endless loop prevention, stops the process when the top-level frame is reached
default:
oObj = 0;
break;
//if we found the top-level frame, return its page ID, otherwise null
if(oFrame)
return (F_ApiGetId(oDoc, oFrame, FP_PageFramePage));
else return(0);
...so, you would do something like this if you have the marker ID:
F_TextLocT textLoc;
F_ObjHandleT pageId;
textLoc = F_ApiGetId(docId, markerId, FP_TextLoc);
pageId = GetPage(docId, pageId.objId);
Note: I'm not sure how this handles the case where a paragraph extends across two pages and the marker is located on the second page. My thought is that it might erroneously return the page where the paragraph begins. I don't know how to handle that.
Russ
Maybe you are looking for
-
How to use a regural expression to get all digit from a string.
Hi All, Do you know how to use regural expression to get all digits from the following string via ABAP program? "'Log Attributes 0 ( 0 ) ( 10 % Available )" Thanks, Andrew
-
Hi, I have multiple accounts in Skype and Microsoft since I use it from the very beginning and now I don't remember either the passwords or emails (I can search for the user accounts). I want to delete all of them until I only have 2. I'm trying to d
-
2011 13" Air average cycles on battery after 1 year?
Just bought a used 2011 "13 for a super deal and the battery cycles say 495. Does this sound a bit high? Health is 89%. I haven't done a recalibration after doing a fresh install and pram and SMC reset. What are yours saying after a year of use?
-
Can the trim size appear on the preflight report?
I would like to make a preflight report that includes the trim size of the pdf. This is included in the results portion of the preflight under Overview, however I'm not sure if I can get this on the pdf version. Is this possible?
-
Dear All CAn we cancle Landed Cost in SAP B1 2007 B