C++ sample code using XPATH
Need to navigate an XML and extract xml nodes using XPATH expressions in C++ Application.
Please send us a C++ code sample using Oracle 9.2.0.3 XPATH API functions to extract an XML using XPATH expression.
Thanks
Shiva
Hi,
Where i can find this path "$XDK_HOME\xdk\demo\c\xslt"
thanks in advance
shashi.
Similar Messages
-
Looking for sample code using "first_tab" and "next_tab"
Looking for sample code using "first_tab" and "next_tab". How is it used with ItemID within a dialog box? I've read the reference books - don't understand it.
Hi Ray,
There are several ways to do this, and in the example I created, I actually did not end up using shift registers. I've attached some example code that basically multiplies the period by the duty cycle percentage to achieve the number of milliseconds to be high and low.
You would just need to insert your DIO code in each frame of the sequence structure.
Hope that helps. Kind regards,
-Sam F, DAQ Marketing Manager
Learn about measuring temperature
Learn how to take voltage measurements
Learn how to measure current
Attachments:
70_PWM_Example.vi 23 KB -
Has Apple released Sample Code using In-App Purchase?
The title says it all...
Does anyone know if Apple has released Sample Code using In-App Purchase?
I've read through (skimming mostly) the In App Purchase section of the iPhone OS Reference Library
Thanks to K T I have:
http://developer.apple.com/iphone/program/sdk/inapppurchase.html
and
https://itunesconnect.apple.com/docs/iTunesConnect_DeveloperGuide.pdf
Check pages 52~71 in the 115 page updated iTunes Connect Developer Guide for all the ugly details...
This will be part of my weekend project
-CarlI guess I will mark this solved, for the time being.
I was just hoping that maybe Apple had released some example code in a working program, rather than just the snippets used to explain the process. I haven't had the presence of mind to read and follow the document all the way through and wanted to compare working code if possible.
Thanks Ray. If all goes well, maybe I'll figure it out by the end of the weekend.
-Carl -
Need sample code using windows BitBlt() function to display image in CVI
Hello all,
I need a sample code which uses windows BitBlt() function to display image in CVI
Thank you.
Bob.Hello Bob -
I'm curious why you'd like to use BitBlt. What functionality does it offer that you've not seen in the CVI canvas control?
It's hard to say without knowing what transitions you're looking for, but the canvas is very capable of animating/transitioning. The place it can fall a little short is if you require access to the alpha channel for transparency.
I put together a short demo for you - maybe it will address some of what you're looking for. The important functions are CanvasStartBatchDraw, CanvasEndBatchDraw, and CanvasDrawBitmap. The animation/transition is driven by a simple UI timer.
Let me know if you have any questions -
NickB
National Instruments
Attachments:
CanvasAnimation.zip 10 KB -
How to run the sample code using the sdk?
Hi,
I want to run the jsp code from the enterprize sdk available in the sdn community. Can any one tell me how to execute these jsp sample codes and what is the pre-requisite regarding the set up.
I already have the deployment ready.
thanks
AMarHi Amar,
To execute samples code, it is same what is required for normal J2EE application.
Make sure add all the jars to your web application.
These jars can be found on your BO server installation if windows.
For BOE XI 3.x
C:\Program Files\Business Objects\common\4.0\java\lib
C:\Program Files\Business Objects\common\4.0\java\lib\external
For BOE XI R2
C:\Program Files\Business Objects\common\3.5\java\lib
C:\Program Files\Business Objects\common\3.5\java\lib\external
Thanks,
Praveen. -
can any one provide me the example of using ITEMLISTBOX UI element in web dynpro,..
Regards,
Venki.Hi,
Context Structure
Categories 0..n
Text String
DescText String
Create a context node lets say "Categories" with cardinality o..n
Bind this to the data source of Item list
Bind descriptiveText Property to DescText
Bind text Property to Text
Populate the context using the following code.
ICategoriesElement categoryElement;
for (int i = 0; i < 10; i++) {
categoryElement = wdContext.createCategoriesElement();
categoryElement.setText("C" + i);
categoryElement.setDescText("C" + i);
wdContext.nodeCategories().addElement(categoryElement);
Regards
Ayyapparaj -
Materials about badi Pt_abs_req and a sample code of using it.
hi,
i need to use the Pt_abs_req. i tryed a lot but i didnt get any hit what it processsing . so try to give a sample code using this. please any one help me.Well in the same thread, there are many notes, did you apply all the notes? Please ensure all the notes are implemented first. 1850185 1839544 1833463 1822392 1743398 1721247 You can take a trace using ST12 as well In a test system you can try the modification and see too if the above notes doesn't help. Also, Ensure you have less request in SENT, APPROVED status, and error status, Typically we recommend to close out or delete older requests of leave request as they put load in validation.
-
Hi Gurus;
Can some one send me the abap codes used mainly for reporting OR can some one give me some sample code used in reporting. my mail id "[email protected]".smod > rsr0001 > EXIT_SAPLRRS0_001 > ZXRSRU01 >
CASE I_VNAM.
WHEN 'ZE_FPPT'.
CALL FUNCTION 'Z_VAR_FP4'
EXPORTING
I_VNAM = i_vnam
I_STEP = i_step
I_T_VAR_RANGE = I_T_VAR_RANGE
IMPORTING
E_T_RANGE = E_T_RANGE.
FUNCTION Z_VAR_FP4.
""Local Interface:
*" IMPORTING
*" REFERENCE(I_VNAM) LIKE RSZGLOBV-VNAM
*" REFERENCE(I_STEP) TYPE I DEFAULT 0
*" REFERENCE(I_T_VAR_RANGE) TYPE RRS0_T_VAR_RANGE
*" EXPORTING
*" VALUE(E_T_RANGE) TYPE RSR_T_RANGESID
data: l_s_range type rsr_s_rangesid.
data: LOC_VAR_RANGE LIKE RRRANGEEXIT.
data: year(4).
data: mth(2).
IF I_STEP = 2 .
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE
( VNAM = '0I_FPER' ).
year = LOC_VAR_RANGE-HIGH+0(5).
mth = LOC_VAR_RANGE-HIGH+5(2).
if mth < 10.
concatenate '0' mth into mth.
endif.
concatenate year '0' mth into L_S_RANGE-HIGH.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP.
ENDIF.
ENDFUNCTION.
Regards,
BWer
Assign points if helpful.
Message was edited by: BWer -
J2EE Tutorial sample codes question
Hi there,
I just started to catchup some tutorials' sample codes using J2EE tutorial, what happened when i tried to compile the first example called "Converter" EJB, using the command:
ant converteri get all the files compiled except the ConverterClient.java which leads to some errors:
ConverterClient.java:15: '.' expected
import Converter;
^
ConverterClient.java:16: '.' expected
import ConverterHome;
^
ConverterClient.java:26: cannot resolve symbol
symbol : class ConverterHome
location: class ConverterClient
ConverterHome home =
^
ConverterClient.java:27: cannot resolve symbol
symbol : class ConverterHome
location: class ConverterClient
(ConverterHome)PortableRemoteObject.narrow(objref,
^
ConverterClient.java:28: cannot resolve symbol
symbol : class ConverterHome
location: class ConverterClient
ConverterHome.class);
^
ConverterClient.java:30: cannot resolve symbol
symbol : class Converter
location: class ConverterClient
Converter currencyConverter = home.create();
^
6 errors
whats wrong actually? I also tried to put the ConverterClient.java into another directory, after compiled the rest, then i copied the file into the build folder and compile it manually, yet still getting this error. Please help!
Thanks
NeoI think you didn't read my question properly, i had said that i manually copied the ConverterClient to the other class together as it needs;
This is the code for ConverterClient:
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.math.BigDecimal;
import Converter;
import ConverterHome;
public class ConverterClient {
public static void main(String[] args) {
try {
Context initial = new InitialContext();
Context myEnv = (Context)initial.lookup("java:comp/env");
Object objref = myEnv.lookup("ejb/SimpleConverter");
ConverterHome home =
(ConverterHome)PortableRemoteObject.narrow(objref,
ConverterHome.class);
Converter currencyConverter = home.create();
BigDecimal param = new BigDecimal ("100.00");
BigDecimal amount = currencyConverter.dollarToYen(param);
System.out.println(amount);
amount = currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
} also please try the tutorial before answering...TQ :D -
Where Can the Sample Code for That Balloon Game Demoed on WWDC for Swift Be Downloaded
Hi. I can't find the balloon game sample code used in the WWDC in the Sample Code for iOS or OS X (assuming it's available for download). If it is available for download by Apple, where can it be downloaded?
Thank you in advance.
God bless, Cor. 13The assets are in the .playground file's file package. Select the .playground file in the Finder, right-click, and choose Show Package Contents to browse the file package. The graphics files are in the Resources folder inside the file package.
-
Sample code for Org Management
Hi,
I am new to Org Management coding in HR ABAP.
Can anybody post some simple sample code for Org. Management so that I can understand the flow of coding..
Thanks and Regards,
RamHi
see the sample code using Orgn management infotypes like HRP1000 etc
report zporgr0040
line-size 108
line-count 60(1)
no standard page heading
message-id zndc.
Database Tables
tables: hrp1001, " HR Master Record (Orgn. Assignment)
pa0002, " Personal Data
t528t, " Position Texts
t527x, " Org Unit Text
t528b, " Positions
csks, " Cost Center
cskt. " Cost Center Texts
Declaration of Internal Tables
Internal Table for Orgn Object Data HRP1000
data: begin of obj_tab occurs 0,
otype like hrp1000-otype, " Object Type
objid like hrp1000-objid, " Object ID
plvar like hrp1000-plvar, " Plan Version
istat like hrp1000-istat, " Planning Status
begda like hrp1000-begda, " Begin date
endda like hrp1000-endda, " End date
end of obj_tab.
Internal Table for Active Employees data PA0000
data: begin of stat_tab occurs 0,
pernr like pa0000-pernr, " Object Type
begda like pa0000-begda, " Begin date
endda like pa0000-endda, " End date
stat2 like pa0000-stat2, " Employment Status
end of stat_tab.
Internal Table for Actual Orgn Assignment Data PA0001
data: begin of act_tab occurs 0,
pernr like pa0001-pernr, " Object Type
begda like pa0001-begda, " Begin date
endda like pa0001-endda, " End date
kostl like pa0001-kostl, " Cost Center
orgeh like pa0001-orgeh, " Org Unit
plans like pa0001-plans, " Position
natio like pa0002-natio, " Nationality
end of act_tab.
Internal Table for Orgn Data HRP1001
data: begin of org_tab occurs 0,
otype like hrp1001-otype, " Object Type
objid like hrp1001-objid, " Object ID
plvar like hrp1001-plvar, " Plan Version
istat like hrp1001-istat, " Planning Status
begda like hrp1001-begda, " Begin date
endda like hrp1001-endda, " End date
subty like hrp1001-subty, " Sub Type
sclas like hrp1001-sclas, " Type of Related Object
sobid like hrp1001-sobid, " Id of Related Object
kostl like pa0001-kostl, " Cost Center
plstx like t528t-plstx, " Position Text
orgtx like t527x-orgtx, " Org Unit Text
end of org_tab.
Internal Table for Position Calculations
data: begin of org1_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
objid like hrp1001-objid, " Object ID
end of org1_tab.
Internal Table for Position Calculations
data: begin of org2_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count type i, " No of Positions
end of org2_tab.
Internal Table for Actual Manpower Calculations
data: begin of act1_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
plans like pa0001-plans, " Position
end of act1_tab.
Internal Table for Actual Manpower Calculations(UAE)
data: begin of act2_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
end of act2_tab.
Internal Table for Actual Manpower Calculations(Others)
data: begin of act3_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
end of act3_tab.
Internal Table for Actual Manpower Calculations(UAE)
data: begin of act4_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count1 type i, " No of Positions(UAE)
end of act4_tab.
Internal Table for Actual Manpower Calculations(OTHERS)
data: begin of act5_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count2 type i, " No of Positions(Others)
end of act5_tab.
Internal Table for Vaccancies Data
data: begin of vac_tab occurs 0,
plvar like hrp1007-plvar, " Plan Version
otype like hrp1007-otype, " Object Type
objid like hrp1007-objid, " Object ID
istat like hrp1007-istat, " Planning Status
begda like hrp1007-begda, " Begin date
endda like hrp1007-endda, " End date
vacan like hrp1007-vacan, " Vacancy Indicator
status like hrp1007-status, " Status of Vacancy
end of vac_tab.
Internal Table to store the Report Output data
data : begin of rep_tab occurs 0 ,
kostl(10) type n, " Cost Cente
plans like pa0001-plans, " Position
vacan like hrp1007-vacan, " Vacancy Indicator
status like hrp1007-status, " Status of Vacancy
plstx like t528t-plstx, " Position Text
orgtx like t527x-orgtx, " Org Unit Text
end of rep_tab.
Internal Table to store the Report Output data
data : begin of rep1_tab occurs 0 ,
kostl(10) type n, " Cost Cente
cnt type i, " No of Vacancies
end of rep1_tab.
Internal Table to store the Report Output data
data : begin of rep2_tab occurs 0 ,
kostl(10) type n, " Cost Cente
app_no type i, " Approved
nat_no type i, " National
exp_no type i, " Expatriate
tot_no type i, " Total
vac_no type i, " Vacancies
end of rep2_tab.
Declaration of Variables
data: v_sobid like hrp1001-sobid, " Object Id
v_sobid1 like hrp1001-sobid, " Object Id
v_sobid2 like hrp1001-sobid, " Object Id
v_sclas like hrp1001-sclas, " Related Obj Type
v_subty like hrp1001-subty, " Related Object Id
v_otype like hrp1007-otype, " Object Type
v_str(9) type c, " Text
v_str1(10) type c, " Text
v_cnt like sy-tabix. " Table Index
Declaration of Constants
constants : c_x type c value 'X', " Flag
c_stat1 like pa0000-stat2 value '3', " Emp Status
c_plan like hrp1001-plvar value '01', " Plan Version
c_name like hrp1000-uname value 'SAP', " Uname
c_uae like pa0002-natio value 'AE', " Country
c_type like hrp1007-otype value 'O', " Object Type
c_otype like hrp1007-otype value 'S', " Object Type
c_stat like hrp1007-status value '0', " Status
c_pstat like hrp1007-istat value '1', " Plang Status
c_sclas like hrp1001-sclas value 'K', " Rel. Obj Type
c_subty like hrp1001-subty value 'A002', " Related ObjId
c_subty2 like hrp1001-subty value 'A003', " Related ObjId
c_sclas1 like hrp1001-sclas value 'O', " Rel.Obj Type
c_subty1 like hrp1001-subty value 'A011', " Rel.Object Id
c_kokrs like coej-kokrs value '1000'. " Controlling Area
Selection Screen
selection-screen begin of block b1 with frame title text-001.
parameters :
p_date like pa0001-begda obligatory default sy-datum. " Date
select-options :
s_kostl for csks-kostl, " Cost Center
s_plans for t528b-plans. " Position ID
selection-screen end of block b1.
At selection-screen
at selection-screen.
Validate the Selection Screen fields
perform validate_screen.
Start-of-Selection
start-of-selection.
Get the Orgn data from database Table HRP1001
perform get_org_data.
Get the Actual Manpower from PA0001
perform get_act_data.
Get the Vaccancies data from database Table HRP1007
perform get_vac_data.
Append the data into final Internal Table
perform append_data.
Top-of-page
top-of-page.
Write the Report and Column Headings
perform top_of_page.
End-of-Page
end-of-page.
write /1(108) sy-uline.
End-of-Selection
end-of-selection.
Display the Output Report.
perform display_report.
Form-Routines
*& Form validate_screen
Validation of selection Screen fields
form validate_screen.
Validation of Position ID
clear t528b.
if not s_plans[] is initial.
select single plans
into t528b-plans
from t528b
where plans in s_plans.
if sy-subrc <> 0.
message e999 with 'Invalid Position ID'(009).
endif.
endif.
Validation of Cost Center
clear csks.
if not s_kostl[] is initial.
select single kostl
into csks-kostl
from csks
where kostl in s_kostl.
if sy-subrc <> 0.
message e999 with 'Invalid Cost Center'(008).
endif.
endif.
endform. "validate_screen
*& Form get_org_data
Get the Orgn Data from Database Table HRP1001
form get_org_data.
v_str = 'Developee'(002).
v_str1 = 'Deployment'(003).
Select All the Positions from HRP1000
select otype " Object Type
objid " Object ID
plvar " Plan Version
istat " Planning Status
begda " Begin date
endda " End date
into table obj_tab
from hrp1000
where otype = c_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
objid in s_plans and
uname ne c_name.
sort obj_tab by otype objid.
Get the Orgn and Cost Center for all the above Positions
if not obj_tab[] is initial.
select otype " Object Type
objid " Object ID
plvar " Plan Version
istat " Planning Status
begda " Begin date
endda " End date
subty " Sub Type
sclas " Type of Related Object
sobid " Id of Related Object
into table org_tab
from hrp1001
for all entries in obj_tab
where otype = c_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
sclas eq c_sclas1 and
subty eq c_subty2 and
objid eq obj_tab-objid.
endif.
sort org_tab by otype objid.
Get the Cost Center
loop at org_tab.
v_otype = c_otype. " S
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
org_tab-kostl = hrp1001-sobid+0(10).
else.
v_otype = c_otype. " S
v_sclas = c_sclas1. " O
v_subty = c_subty2. " A003
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid1 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid1.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid2 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid2.
perform get_org using v_otype v_sclas v_subty
v_sobid.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
else.
v_otype = c_otype. " S
v_sclas = c_otype. " S
v_subty = c_subty. " A002
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_otype. " S
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid1 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_otype. " S
v_sclas = c_sclas1. " O
v_subty = c_subty2. " A003
v_sobid = v_sobid1.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid2 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid2.
perform get_org using v_otype v_sclas v_subty
v_sobid.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
endif.
endif.
Get the Position Text
clear t528t.
select single plstx from t528t into t528t-plstx
where sprsl = sy-langu and
otype = c_otype and
plans = org_tab-objid.
org_tab-plstx = t528t-plstx.
Get the Org Unit Text
clear t527x.
select single orgtx from t527x into t527x-orgtx
where sprsl = sy-langu and
orgeh = org_tab-sobid+0(8).
org_tab-orgtx = t527x-orgtx.
modify org_tab index sy-tabix.
clear v_sobid.
endloop.
sort org_tab by otype objid.
Calculate the Approved No of Positions
loop at org_tab.
if org_tab-kostl in s_kostl.
move-corresponding org_tab to org1_tab.
append org1_tab.
clear org1_tab.
endif.
endloop.
sort org1_tab by kostl objid.
clear v_cnt.
loop at org1_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
org2_tab-kostl = org1_tab-kostl.
org2_tab-count = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append org2_tab.
clear:org2_tab.
endat.
endloop.
sort org2_tab by kostl.
endform. "get_org_data
*& Form get_act_data
Get the Actual Manpower Data from Database Table PA0001
form get_act_data.
clear : stat_tab, act_tab.
refresh: stat_tab, act_tab.
Get all the Active Employees
select pernr " Object Type
begda " Begin date
endda " End date
stat2 " Emp Status
into table stat_tab
from pa0000
where stat2 eq c_stat1 and
begda le p_date and
endda ge p_date.
sort act_tab by pernr.
if not stat_tab[] is initial.
select pernr " Object Type
begda " Begin date
endda " End date
kostl " Cost Center
orgeh " Org Unit
plans " Position
into table act_tab
from pa0001
for all entries in stat_tab
where pernr eq stat_tab-pernr and
kostl in s_kostl and
plans in s_plans and
persg eq '1' and
begda le p_date and
endda ge p_date.
endif.
sort act_tab by pernr.
loop at act_tab.
move-corresponding act_tab to act1_tab.
clear pa0002-natio.
select single natio into pa0002-natio from pa0002
where pernr = act_tab-pernr.
if sy-subrc = 0.
act1_tab-natio = pa0002-natio.
endif.
append act1_tab.
clear act1_tab.
endloop.
sort act1_tab by kostl natio.
Calculate the Local and Expatriate Manpower
loop at act1_tab.
if act1_tab-natio = c_uae.
act2_tab-kostl = act1_tab-kostl.
act2_tab-natio = act1_tab-natio.
else.
act3_tab-kostl = act1_tab-kostl.
act3_tab-natio = act1_tab-natio.
endif.
append: act2_tab, act3_tab.
clear : act2_tab,act3_tab.
endloop.
sort act2_tab by kostl.
sort act3_tab by kostl.
Actual UAE Manpower
clear v_cnt.
loop at act2_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
act4_tab-kostl = act2_tab-kostl.
act4_tab-count1 = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append act4_tab.
clear:act4_tab.
endat.
endloop.
sort act4_tab by kostl.
Other Countries
clear v_cnt.
loop at act3_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
act5_tab-kostl = act3_tab-kostl.
act5_tab-count2 = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append act5_tab.
clear:act5_tab.
endat.
endloop.
sort act5_tab by kostl.
endform. "get_act_data
*& Form get_org
Get the Cost Center from Parent Org Id
form get_org using p_v_otype p_v_sclas p_v_subty p_v_sobid.
clear hrp1001.
select single * from hrp1001
where otype = p_v_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
sclas eq p_v_sclas and
subty eq p_v_subty and
objid eq p_v_sobid.
v_sobid = hrp1001-sobid+0(8).
endform. " get_org
*& Form get_vac_data
Get the Vaccancies Data from Database Table HRP1007
form get_vac_data.
if not org_tab[] is initial.
select plvar " Plan Version
otype " Object Type
objid " Object ID
istat " Planning Status
begda " Begin date
endda " End date
vacan " Vacancy Indicator
status " Status of Vacancy
into table vac_tab
from hrp1007
for all entries in org_tab
where plvar = c_plan and
otype = c_otype and
istat eq c_pstat and
objid = org_tab-objid and
begda le p_date and
endda ge p_date and
vacan eq c_x and
status eq c_stat.
endif.
sort vac_tab by plvar otype objid.
Get the HR data into the rep_tab Internal Table
loop at vac_tab.
rep_tab-plans = vac_tab-objid.
rep_tab-vacan = vac_tab-vacan.
rep_tab-status = vac_tab-status.
read table org_tab with key objid = vac_tab-objid.
if sy-subrc = 0.
rep_tab-kostl = org_tab-kostl.
rep_tab-plstx = org_tab-plstx.
rep_tab-orgtx = org_tab-orgtx.
endif.
append rep_tab.
clear rep_tab.
endloop.
loop at rep_tab.
if not rep_tab-kostl in s_kostl.
delete rep_tab index sy-tabix.
endif.
endloop.
sort rep_tab by kostl plans.
delete rep_tab where plstx cs v_str.
delete rep_tab where orgtx cs v_str1.
Calculate the Count of Vacancies in each Division
clear v_cnt.
loop at rep_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
rep1_tab-kostl = rep_tab-kostl.
rep1_tab-cnt = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append rep1_tab.
clear:rep1_tab.
endat.
endloop.
sort rep1_tab by kostl.
endform. "get_vac_data
*& Form append_data
Append the data into final Internal Table
form append_data.
loop at org2_tab.
rep2_tab-kostl = org2_tab-kostl.
rep2_tab-app_no = org2_tab-count.
read table act4_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-nat_no = act4_tab-count1.
endif.
read table act5_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-exp_no = act5_tab-count2.
endif.
read table rep1_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-vac_no = rep1_tab-cnt.
endif.
rep2_tab-tot_no = rep2_tab-nat_no + rep2_tab-exp_no.
append rep2_tab.
clear rep2_tab.
endloop.
sort rep2_tab by kostl.
endform. "append_data
*& Form top_of_page
Write the Report and Column Headings
form top_of_page.
skip.
format color col_heading on.
write: /1(108) 'NATIONAL DRILLING COMPANY'(010) centered,
/1(108) 'Summary of Manning Level Report'(011) centered.
format color off.
skip.
write: /2 'Key Date :'(013), p_date,
75 'Report Run Date:'(041), sy-datum.
if not s_kostl[] is initial.
if s_kostl-high is initial.
write: /2 'Cost Center :'(023), s_kostl-low,
75 'Time :'(042), sy-uzeit.
else.
write: /2 'Cost Center From:'(024), s_kostl-low+7(3),
'To'(022), s_kostl-high,
75 'Time :'(042), sy-uzeit.
endif.
else.
write: /75 'Time :'(042), sy-uzeit.
endif.
if not s_plans[] is initial.
if s_plans-high is initial.
write: /2 'Position Id :'(019), s_plans-low,
75 'User :'(043), sy-uname.
else.
write: /2 'Position Id From:'(021), s_plans-low,
'To'(022), s_plans-high,
75 'User :'(043), sy-uname.
endif.
else.
write: /75 'User :'(043), sy-uname.
endif.
write: /75 'Page No :'(044), sy-pagno.
skip.
write /1(108) sy-uline.
format color col_heading.
write:/1 sy-vline,
12 sy-vline, 53 sy-vline,
64 sy-vline, 65(32) 'Actual'(018) centered,
97 sy-vline,108 sy-vline.
write:/1 sy-vline, 2(10) 'CostCenter'(014),
12 sy-vline, 13(40) 'Description'(026) centered,
53 sy-vline, 54(10) 'Approved'(025) centered,
64 sy-vline, 65(32) sy-uline,
97 sy-vline, 98(10) 'Vacancies'(017),
108 sy-vline.
write:/1 sy-vline,
12 sy-vline, 53 sy-vline,
64 sy-vline, 65(10) 'National'(015) centered,
75 sy-vline, 76(10) 'Expatriate'(020) centered,
86 sy-vline, 87(10) 'Total'(016) centered,
97 sy-vline,108 sy-vline.
format color off.
write /1(108) sy-uline.
endform. "top_of_page
*& Form Display_report
Write the Report Output
form display_report.
if rep2_tab[] is initial.
message i999 with
'No Data found for the entered Selection'(035).
else.
loop at rep2_tab.
Authorization Check for the Orgn and Cost Centers
perform auth_check_org.
if sy-subrc = 0.
clear cskt.
select single ltext into cskt-ltext from cskt
where spras = sy-langu and
kokrs = c_kokrs and
kostl = rep2_tab-kostl.
format color col_normal.
write: /1 sy-vline, 2(10) rep2_tab-kostl+7(3),
12 sy-vline, 13(40) cskt-ltext,
53 sy-vline, 54(10) rep2_tab-app_no,
64 sy-vline, 65(10) rep2_tab-nat_no,
75 sy-vline, 76(10) rep2_tab-exp_no,
86 sy-vline, 87(10) rep2_tab-tot_no,
97 sy-vline, 98(10) rep2_tab-vac_no,
108 sy-vline.
format color off.
at last.
sum.
format color 3.
write /1(108) sy-uline.
write: /1 sy-vline, 2(10) 'Total'(027),
12 sy-vline,
53 sy-vline, 54(10) rep2_tab-app_no,
64 sy-vline, 65(10) rep2_tab-nat_no,
75 sy-vline, 76(10) rep2_tab-exp_no,
86 sy-vline, 87(10) rep2_tab-tot_no,
97 sy-vline, 98(10) rep2_tab-vac_no,
108 sy-vline.
format color off.
endat.
endif.
endloop.
endif.
write /1(108) sy-uline.
endform. " Display_report
*& Form auth_check_org
Authorization Check for the Orgn and Cost Center
form auth_check_org.
authority-check object 'ZNDCHROM'
id 'PLVAR' dummy
id 'OTYPE' dummy
id 'KOSTL' field rep2_tab-kostl.
endform. "auth_check_org
<b>Reward points for useful Answers</b>
Regards
Anji -
Sampl code for service beans in OA framework
hi,
I am new to OA framework .if any one could pass me with sample code or link for sample code using Service beans it would be of great help .
thanks.Ashwin,
First clarify that ur working on OAF or ADF?If this is related to OAF, ur requirement seems to be a simple serilizable class in java which has getter/setter methods for emp data and u can make use of http session for the same.
--Mukul -
Hi ,
Does Oracle 9.2.0 has XPATH API's?
I need to use XPATH to extract data from an XML document.
I searched over the net but I am not able to find usage of Oracle XPATH API's in c/c++ .
Can anybody please provide me a code sample to use Oracle 9.2.0 XPAPTH API's.
Thanks
MRAIn 10g, the sample code is included at:
$XDK_HOME\xdk\demo\c\xslt -
Need sample code with RV_INVOICE_CREATE used
Hi everybody!
I need sample code with RV_INVOICE_CREATE or similar FMs used.
The thing is that I do not know how to populate parametres of this and other invoicing FMs....
For example, there are some tables to be passed to RV_INVOICE_CREATE
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS
How to populate them? I mean how to fill them with needed values?
Useful answers will be awarded.
Kind regards, M.RV_INVOICE_CREATE is the function module to create invoice based on delivery .
when you pass delivery number ,it will create invoice ,see the invoice number in vf02,vf03 transaction. and also see the data vbrk,vbrp tables
I have done this development and i have cancelled invoice,reverse goods issue,updated the delivery and again i am createing invoice..see the below progrm to get better understanding.
REPORT ZWM_OVERWEIGHT_FIX no standard page heading
message-id zwm.
======================================================================
Program Name : ZWM_OVERWEIGHT_FIX *
Description : Tool to fix Overweight in delivery line item, *
Used All Function module to cancel invoice , *
Reverse the goods issue ,Update Delivery qty,Create *
invoice *
Author : Seshu *
Date : 05/08/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
05/08/07| Seshu | DEVK921979 | Initial *
D A T A - D E C L A R A T I O N *******************
Tables
Tables : vbak,
vbap,
vbfa,
likp,
lips,
vbrk,
vbrp.
Internal Tables
data : i_lips like lips occurs 0 with header line,
i_vbap like vbap occurs 0 with header line.
Variables
data : v_deliv like vbfa-vbelv,
v_invoic like vbfa-vbelv.
Data Declaration Part for Post Goods Issue
DATA: l_vbeln LIKE likp-vbeln,
l_vbkok LIKE vbkok,
i_prot LIKE prott OCCURS 0 WITH HEADER LINE,
ef_error_any_0 TYPE c,
ef_error_in_item_deletion_0 TYPE c,
ef_error_in_pod_update_0 TYPE c,
ef_error_in_interface_0 TYPE c,
ef_error_in_goods_issue_0 TYPE c,
ef_error_in_final_check_0 TYPE c,
d_return LIKE bapireturn1.
Internal tables for BAPI Function Module
data : i_cret like BAPIRETURN1 occurs 0 with header line,
i_csucess like BAPIVBRKSUCcESS occurs 0 with header line,
i_ret2 like bapiret2 ,
flag type c,
i_mesg like mesg occurs 0 with header line.
Data Declaration for Invoice Creation
DATA: VBSK_I LIKE VBSK.
data: d_success type c.
DATA: XKOMFK LIKE KOMFK OCCURS 0 WITH HEADER LINE,
XKOMV LIKE KOMV OCCURS 0 WITH HEADER LINE,
XTHEAD LIKE THEADVB OCCURS 0 WITH HEADER LINE,
XVBFS LIKE VBFS OCCURS 0 WITH HEADER LINE,
XVBPA LIKE VBPAVB OCCURS 0 WITH HEADER LINE,
XVBRK LIKE VBRKVB OCCURS 0 WITH HEADER LINE,
XVBRP LIKE VBRPVB OCCURS 0 WITH HEADER LINE,
XVBSS LIKE VBSS OCCURS 0 WITH HEADER LINE,
XKOMFKGN LIKE KOMFKGN OCCURS 0 WITH HEADER LINE.
S E L E C T I O N - S C R E E N ******************
Selection-screen
Selection-screen : begin of block blk with frame title text-001.
parameters : p_vbeln like vbak-vbeln obligatory.
selection-screen : end of block blk.
A T - S E L E C T I O N - S C R E E N ***************
Validation on Sales order
at selection-screen on p_vbeln.
Check the data on VBAK Table
select single vbeln from vbak into vbak-vbeln
where vbeln = p_vbeln.
if sy-subrc ne 0.
message e006 with p_vbeln.
endif.
S T A R T - O F - S E L E C T I O N *******************
Start-of-selection.
break sreddy.
Get the Invoice Number corresponding Sales Order Number
perform get_invoice.
Step 1.
Cancel the Invoice - Transaction VF11
perform cancel_invoice.
Reverse the goods issue
perform reverse_goodsissue.
Get the Order and Delivery Items
perform get_sales_deliv.
Delivery Change
perform Delivery_change.
Create Invoice document
perform invoice_create.
E N D - O F - S E L E C T I O N *******************
end-of-selection.
if flag = 'X'.
message i012 with p_vbeln.
endif.
*& Form get_invoice
Get Invoice Number
FORM get_invoice.
Clear Variables
clear : v_deliv,
v_invoic,
flag.
Get the Delivery Number First
select single vbeln from vbfa into v_deliv
where vbelv = p_vbeln
and vbtyp_n = 'J'.
if sy-subrc ne 0.
message i004 with p_vbeln.
stop.
endif.
Get the Invoice Number
select single vbeln from vbfa into v_invoic
where vbelv = p_vbeln
and vbtyp_n = 'M'.
if sy-subrc ne 0.
message i003 with p_vbeln.
stop.
endif.
ENDFORM. " get_invoice
*& Form cancel_invoice
Cancel the Invoice
FORM cancel_invoice.
clear : i_ret2,
i_cret,
i_csucess.
refresh : i_cret,
i_csucess.
CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
EXPORTING
BILLINGDOCUMENT = v_invoic
TESTRUN =
NO_COMMIT =
BILLINGDATE =
TABLES
RETURN = i_cret
SUCCESS = i_csucess
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = space
IMPORTING
RETURN = i_ret2.
read table i_cret with key type = 'E'.
if sy-subrc ne 0.
message i005 with v_invoic.
stop.
endif.
ENDFORM. " cancel_invoice
*& Form reverse_goodsissue
Reverse the goods Issue
FORM reverse_goodsissue.
Local Variable
data : lv_vbtyp like likp-vbtyp.
clear : i_mesg,
lv_vbtyp.
refresh : i_mesg.
select single vbtyp from likp into lv_vbtyp
where vbeln = v_deliv.
CALL FUNCTION 'WS_REVERSE_GOODS_ISSUE'
EXPORTING
I_VBELN = v_deliv
I_BUDAT = sy-datum
I_COUNT =
I_MBLNR =
I_TCODE =
I_VBTYP = lv_vbtyp
TABLES
T_MESG = i_mesg
EXCEPTIONS
ERROR_REVERSE_GOODS_ISSUE = 1
OTHERS = 2
if sy-subrc ne 0.
message i007 with v_deliv.
endif.
ENDFORM. " reverse_goodsissue
*& Form get_sales_deliv
Get the Sales order and Deliv Items
FORM get_sales_deliv.
Local Variables
data : lv_kwmeng like vbap-kwmeng.
clear : i_lips,
i_vbap.
refresh : i_lips,
i_vbap.
Select the data from LIPS
select * from lips into table i_lips
where vbeln = v_deliv.
if sy-subrc ne 0.
message i008 with v_deliv.
stop.
endif.
sort i_lips by vbeln posnr.
Get the Sales order Item Data.
select * from vbap into table i_vbap
where vbeln = p_vbeln.
if sy-subrc ne 0.
message i006 with p_vbeln.
stop.
endif.
sort i_vbap by vbeln posnr.
Compare delivery Item and Order Items
loop at i_lips.
clear lv_kwmeng.
read table i_vbap with key posnr = i_lips-posnr.
if sy-subrc eq 0.
lv_kwmeng = i_vbap-kwmeng * 2.
if lv_kwmeng >= i_lips-lfimg.
i_lips-lfimg = i_vbap-kwmeng.
modify i_lips.
endif.
endif.
endloop.
ENDFORM. " get_sales_deliv
*& Form Delivery_change
Delivery Update
FORM Delivery_change.
Clear : i_prot.
refresh : i_prot.
Delivery Update
CALL FUNCTION 'LE_MOB_DELIVERY_UPDATE'
EXPORTING
do_commit = 'X'
TABLES
t_delivery_items = i_lips
prot = i_prot
EXCEPTIONS
conversion_overflow = 1
essential_data_missing = 2
error = 3
nothing_to_update = 4
lock_after_update_failed = 5
error_in_delivery_update = 6
OTHERS = 7.
COMMIT WORK.
IF sy-subrc <> 0.
MESSAGE i009 with v_deliv.
endif.
Post Goods Issue
CLEAR: d_return,
i_prot,
l_vbeln,
l_vbkok.
REFRESH i_prot.
CLEAR: ef_error_in_item_deletion_0 ,
ef_error_in_pod_update_0 ,
ef_error_in_interface_0 ,
ef_error_in_goods_issue_0 ,
ef_error_in_final_check_0 .
carry out goods issue
l_vbeln = v_deliv.
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
carry out goods issue
l_vbeln = v_deliv.
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
SET UPDATE TASK LOCAL.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = l_vbkok
synchron = 'X'
no_messages_update = ' '
update_picking = 'X'
commit = 'X'
delivery = l_vbeln
nicht_sperren = 'X'
if_error_messages_send_0 = space
IMPORTING
ef_error_any_0 = ef_error_any_0
ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
ef_error_in_pod_update_0 = ef_error_in_pod_update_0
ef_error_in_interface_0 = ef_error_in_interface_0
ef_error_in_goods_issue_0 = ef_error_in_goods_issue_0
ef_error_in_final_check_0 = ef_error_in_final_check_0
TABLES
prot = i_prot
EXCEPTIONS
error_message = 1
OTHERS = 2.
if sy-subrc ne 0.
message i010 with v_deliv.
else.
COMMIT WORK .
endif.
ENDFORM. " Delivery_change
*& Form invoice_create
Invoice Creation
FORM invoice_create.
refresh: XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS.
clear : XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS,
VBSK_I.
VBSK_I-SMART = 'F'.
XKOMFK-VBELN = v_deliv.
XKOMFK-VBTYP = 'J'.
APPEND XKOMFK.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
VBSK_I = VBSK_I
WITH_POSTING = 'C'
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS.
if sy-subrc eq 0.
COMMIT WORK.
flag = 'X'.
else.
message i011 with p_vbeln.
endif.
ENDFORM. " invoice_create
Reward Points if it is helpful
Thanks
Seshu -
Sample code to connect LDAP server using jndi
Hi,
can any one help me with sample code to connect LDAP server using jndi,
like i want to make use of Ldap server for serching Active directoty.
Thanks in advance,
Regards
MuthuYou can set ldap_auth=none for anonymous user.
User/password is mandatory otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH
Thansk,
Maybe you are looking for
-
Quicktime Player 10 verses Quicktime Pro 7
I have Quicktime Player 10 which I have used for viewing online TV shows and TV movies on my iMac. Problem is the video screen in QT Player only has two sizes, very small (4" x 2-1/4") and medium (about 4-1/2" x 8"). I was wondering if Quicktime Pro
-
Distortion of speed changed action in final product - help!
Hello everyone, I'm a newbie to the Mac world and am now playing with my FCE HD program. I took a short fight seq. on my Sony CyberShot 5.0 mega pixels (yes, old camera!) and downloaded as a QT movie. I then imported this into FCE. I increased the sc
-
Where is the download for version 7
Did apple take the download off the website due to problems. When i click on the download button I get the download page but not way to actually download the thing???
-
Image stays pinned but it's not pinned? How does this happen?
I recently bought a template form Musegain and one of the images is a fill in a rectangle at 100% width. The image stays stationary when scrolling the page in a browser yet it is not pinned. Any ideas why and how this can be done would greatly appr
-
How can I get my phone to print again? I recently changed to Comcast Internet from AT&T. Now my HP d110 is not recognized. AirPrint can no longer recognize my printer.