How to control the step motor in this situation?
I have a PHI TRIFT3 ToF-SIMS instrument. The instrument comes with a default
software. However, the software don't offer fine step motor control. I want to control
the step motor using Labview.
I got some info from a Japanese engineer of the company.
The step motor controller is connect to a card in ISA slot. In the default software, I
can send command like D2000(distance 2000) and A100(acceleration 100) to "port 2"
to control the motor. I have a manual of the commands.
However, I don't know how to send command from Labview. Here is a joysticker
connected to COM1, COM2 is used for other vacuum control. The joysticker can also
control the motor..Here are some reply from the company about the control.
"We do not use special driver for control the step motor.
This is just sending the serial command via RS232C per command instruction I
sent you before. The only difference is, to simplify the hardware, we just talk to data acq
module(wave form card) via PAHOST card(installed in ISA bus slot of the PC)
to passthru the RS232C command to stepper motor control unit.
If you try to talk to step motor. just send the RS command from Labview
platform. (of course need to connect the step motor controller from PC,
default TRIFT PC does not have a spare COM channel, might be need to add
serial etension card or add the computer for Labview control)
"TRIFT PC passthru the RS232 command throught ISA bus to PHI data
acquisition box to stepper motor control.
Joystick handled by default software , convert to stage movement
command X and Y then send thru to ISA. "
I tried to use the Basic Serial Write and Read.vi to send command to COM1 but I always
get an error"1073807246 ocurred at property node(arg 1) in VISA configure Serial prot(Instr).vi->
Basic Serial Write and Read.vi Possible reason: VISA: the resource is valid, but VISA cannot access
it." I think this happens because the default software is also open and trying to control COM1.
What should I do to accomplish the step motor control? Thanks a lot
Just to start from scratch, have you verified that you can do basic communication with your serial port, ie successfully perform a loopback test? Please let me know, and we will go from there.
Logan S.
Similar Messages
-
How to make the servo motor to move in steps of set degrees and stop
how to make the servo motor to move in steps of set degrees and stop
Hi,
I think the following document would be a good starting place: NI Developer Zone Tutorial: Single Axis Moves It includes links to several example programs that you may find useful for your application. Keep in mind that there are many motion examples that ship with LabVIEW as well.
I strongly recommend that you check out the following documents as well:
NI Developer Zone Tutorial: Simple Point to Point Motion
NI Dev
eloper Zone Tutorial: Hands-On Motion
NI Developer Zone Tutorial: Axis Settings for Motion Controllers
These tutorials will help give you a good foundation for understanding motion control systems.
Best wishes!
Dawna P.
Applications Engineer
National Instruments -
How can I control my step motor
I am using a 6006-DB 3-mothor driver and a NEMA step motor model 405-SM, both from AMSI corp. I would like to control my step motor using LabVIEW. We use the LV. 5.1.1 version and we have a PCI-MIO-16E-40 as adquisition card.
The sistem I want to built is to control my step motor and while turning detect the intesity variation on a photodetector which is conected to my adquisition card.
I wonder if somebody has an idea how to do that.
Thank you in advance
Daniel HernandezOk I understood, I can use my PCI-MIO-16E card to control my steper motor driver, I will try to do that. But, if I use a DB-25 connector, how can I use my PCI card??
I was thinking to use the parallel port, directly, to conect my steper motor driver.
I attache some VI someone passed me. (It use a Setbit.vi and out port.vi)
Attachments:
MoteurGOTO6007-DB.vi 81 KB
MoteurGOTO.vi 87 KB
Commande_moteur.vi 10 KB -
How to load and display the external flv video files in dynamicly and the how to control the flv fil
How to load and display the external flv video files in dynamicly using AS 3.0
and How to control the flv file add the play paus button and add seekbar.
I have using to load the flv file following code
var flvPlaceHolder1:MovieClip = new MovieClip();
var vid1:Video = new Video(734, 408);
flvPlaceHolder1.addChild(vid1);
addChild(flvPlaceHolder1);
flvPlaceHolder1.x = 1059;
flvPlaceHolder1.y = 152;
var nc1:NetConnection = new NetConnection();
nc1.connect(null);
var ns1:NetStream = new NetStream(nc1);
vid1.attachNetStream(ns1);
var listener1:Object = new Object();
listener1.onMetaData = function(evt:Object):void {};
ns1.client = listener1;
ns1.play("GV-1600 TURNING.flv");
ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
function statusChanged1(ns1:NetStatusEvent):void
trace(ns1.info.code);
if (ns1.info.code == 'NetStream.Buffer.Empty')
trace('the video has ended');
removeChild(flvPlaceHolder1);
//trace('removeChild');
gotoAndPlay(1786);
then how to add the play,paus ,full screen button and seekbar,volumebar.I have to Create the flash presentation for our company product
In this presentation the left side the text animation are displayed then right side the our product video is displayed.
In this presentation i need the following option :
1, The first product video and animation is finished then the next product is played
2, then the video displayed (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
3, then the playing video i control it play, stop, paus button and volume bar, seek bar.
4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
I have finished first two steps 1 and 2
the following are the screen short and code:-
code :-
var count=0;
var flvPlaceHolder2:MovieClip = new MovieClip();
var vid2:Video = new Video(734, 408);
flvPlaceHolder2.addChild(vid2);
addChild(flvPlaceHolder2);
flvPlaceHolder2.x = 1059;
flvPlaceHolder2.y = 152;
var nc2:NetConnection = new NetConnection();
nc2.connect(null);
var ns2:NetStream = new NetStream(nc2);
vid2.attachNetStream(ns2);
var listener2:Object = new Object();
listener2.onMetaData = function(evt:Object):void {};
ns2.client = listener2;
ns2.play("GS-4000.flv");
this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
function BtnFadeIn2(event:Event):void
if (this.currentFrame == 387)
/*flvPlaceHolder2.x = 30;
flvPlaceHolder2.y = 140;
vid2.width=1800;
vid2.height=800;
trace('Screen size is changed');*/
if(count==0)
flvPlaceHolder2.x = 30;
flvPlaceHolder2.y = 140;
vid2.width=1800;
vid2.height=800;
count++;
ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
function statusChanged2(ns2:NetStatusEvent):void
trace(ns2.info.code);
if (ns2.info.code == 'NetStream.Buffer.Empty')
trace('the video has ended');
removeChild(flvPlaceHolder2);
//trace('removeChild');
gotoAndPlay(433);
flvPlaceHolder2.buttonMode=true;
flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
function home2(e:MouseEvent):void
if(vid2.width==734 && vid2.height==408)
flvPlaceHolder2.x = 30;
flvPlaceHolder2.y = 140;
vid2.width=1800;
vid2.height=800;
else
flvPlaceHolder2.x = 1059;
flvPlaceHolder2.y = 152;
vid2.width=734;
vid2.height=408; -
Any ideas on how to control the amount of sustain pedal data that Logic Pro 9 records? Every time I press the sustain pedal down, it records 4 sustains. Same thing when I release the pedal. Thanks!
This gets confusing, you have two Macs with different issues and two pedals with different issues? First let's sort out what's what. So, do the issues come from the pedals or from the Mac software? To find out, simply switch the pedals and note their behaviour. No change: it's the software, change: it's the pedals (imho the most likely scenario).
Second, what kind of pedals are they? Can you name the type of pedal too? The Yamaha what and the Mgear which?
Third, with the 4 fold data problem, are the doubled events simultaneous, or a few ticks apart, or more?
Also, you have no MIDI keyboard? Are the pedals both "standalone"?
I think you have to sort this problem at its' source, which are the pedals. You could, if push really comes to shove, perhaps create some sort of ingeneous/elaborate transformer setup in the environment to filter the extra messages, although with the 4/4 sustain events that may not even be possible. With the "stepped" events you could set up a filter to just block all events with values 20-110 or so.
But much better would be to configure the pedal(s) correctly. -
How to do the reverse po in this report
Hi,
i have a one problem in this report . i don,t know how to display the
reverse po in this report. reverse po should have a po history cat. 'N' (field is bewtp)
i connect type 'Q' and the type 'E' but not been able to connect the 'N'. when i connect it will give me the wrong amount and some field should not been displayed. i will provide u the following code.
please help me.
Thanks
dinesh
*& Report Z_MM_PURCHASE_REGISTER
REPORT Z_MM_PURCHASE_REGISTER.
Short Description: Purchase Register
TABLES *
TABLES : ekko, taxcom, ekpo, ekbe,ekkn,konv,komv,t007s, j_1imovend, bseg .
TYPE-POOLS: slis.
TYPES: Begin with TY_ *
TYPES : BEGIN OF ty_ekko,
BSART LIKE EKKO-BSART,
KNTTP LIKE EKPO-KNTTP,
ebeln LIKE ekko-ebeln,
knumv LIKE ekko-knumv,
lifnr LIKE ekko-lifnr,
waers LIKE ekko-waers,
kalsm LIKE ekko-kalsm,
lands LIKE ekko-lands,
ekorg LIKE ekko-ekorg,
wkurs LIKE ekko-wkurs,
bedat LIKE ekko-bedat,
ebelp LIKE ekpo-ebelp, "po line item
mwskz LIKE ekpo-mwskz, "tax code
bukrs LIKE ekpo-bukrs,
matkl LIKE ekpo-matkl,
mtart LIKE ekpo-mtart,
netpr LIKE ekpo-netpr, "Net price in purchasing document
meins LIKE ekpo-meins, "unit
menge LIKE ekpo-menge, "quantity
txz01 LIKE ekpo-txz01, "material description
txjcd LIKE ekpo-txjcd, "tax jurisdiction code
matnr LIKE ekpo-matnr,
llief LIKE ekko-llief,
meins LIKE ekpo-meins,
bprme LIKE ekpo-bprme,
netpr LIKE ekpo-netpr,
peinh LIKE ekpo-peinh,
lifnr like lfa1-lifnr,
name1 like lfa1-lifnr,
pstlz like lfa1-pstlz,
stras like lfa1-stras,
text1 like t007s-text1,
END OF ty_ekko.
TYPES : BEGIN OF ty_ekbe,
ebeln LIKE ekbe-ebeln, "po number
ebelp LIKE ekbe-ebelp, "po line item
buzei LIKE ekbe-buzei,
belnr LIKE ekbe-belnr, "Number of material document
budat LIKE ekbe-budat, "Posting date in the document
xblnr LIKE ekbe-xblnr, "Reference document number
werks LIKE ekbe-werks, "plant
matnr LIKE ekbe-matnr, "material
menge LIKE ekbe-menge, "quantity
peinh LIKE ekpo-peinh,
dmbtr LIKE ekbe-dmbtr, "Amount in local currency
kalsm LIKE ekko-kalsm, "Procedure (pricing)
waers LIKE ekbe-waers, "currency
wrbtr LIKE ekbe-wrbtr, "Amount in document currency
bwtar LIKE ekbe-bwtar, "Valuation type
shkzg LIKE ekbe-shkzg,
maktx LIKE makt-maktx,
mwskz LIKE ekbe-mwskz,
bldat LIKE ekbe-bldat,
srvpos LIKE ekbe-srvpos,
packno LIKE ekbe-packno,
introw LIKE ekbe-introw,
lfbnr LIKE ekbe-lfbnr,
bwart TYPE ekbe-bwart,
budat1 TYPE ekbe-budat,
belnr1 TYPE ekbe-belnr,
END OF ty_ekbe.
TYPES : BEGIN OF ty_display,
BSART LIKE EKKO-BSART,
KNTTP LIKE EKPO-KNTTP,
lifnr(10) TYPE C, " LIKE ekko-lifnr,
ebeln LIKE ekko-ebeln,
bedat LIKE ekko-bedat,
budat LIKE ekbe-budat,
matnr LIKE ekbe-matnr,
maktx LIKE makt-maktx,
belnr LIKE ekbe-belnr,
bldat LIKE ekbe-bldat,
menge LIKE ekpo-menge,
peinh LIKE ekpo-peinh,
dmbtr LIKE ekbe-dmbtr,
shkzg LIKE ekbe-shkzg,
custduty LIKE konv-kwert,
bed LIKE konv-kwert,
cvd LIKE konv-kwert,
sertax LIKE konv-kwert,
sereducess LIKE konv-kwert,
surcharge LIKE konv-kwert,
educess LIKE konv-kwert,
insure LIKE konv-kwert,
freight LIKE konv-kwert,
octroi LIKE konv-kwert,
kursf LIKE rbkp-kursf,
grossamt LIKE konv-kwert,
vat4 LIKE konv-kwert,
vat8 LIKE konv-kwert,
vat125 LIKE konv-kwert,
INC LIKE KONV-KWERT, "
PF LIKE KONV-KWERT,
CF LIKE KONV-KWERT,
INS LIKE KONV-KWERT,
cst LIKE konv-kwert,
subdeb LIKE ekbe-dmbtr,
netamt LIKE ekbe-dmbtr,
cenvatcreditbed LIKE konv-kwert,
cenvatcreditecc LIKE konv-kwert,
vatcredit LIKE konv-kwert,
bgcharges LIKE konv-kwert,
srvpos LIKE ekbe-srvpos,
ktext1 LIKE esll-ktext1,
sertaxcredit LIKE konv-kwert,
sereducesscredit LIKE konv-kwert,
totaltaxbenefit LIKE konv-kwert,
inventoryvalue LIKE konv-kwert,
bwart TYPE ekbe-bwart,
belnr1 TYPE ekbe-belnr,
budat1 TYPE ekbe-budat,
lfbnr TYPE ekbe-lfbnr,
bprme LIKE ekpo-bprme,
meins LIKE ekpo-meins,
name1 like lfa1-name1,
pstlz like lfa1-pstlz,
stras like lfa1-stras,
mwskz like ekpo-mwskz,
text1 like t007s-text1,
kalsm like t007s-kalsm,
j_1icstno like j_1imovend-j_1icstno,
hkont(10) TYPE C, " like bseg-hkont,
saknr like ska1-saknr,
sakan like ska1-sakan,
ktoks like ska1-ktoks,
mcod1 like ska1-mcod1,
WAERS LIKE EKKO-WAERS,
bukrs like ekpo-bukrs,
total LIKE ekbe-dmbtr,
END OF ty_display.
TYPES : BEGIN OF ty_services,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
lfbnr LIKE ekbe-lfbnr,
packno LIKE esll-packno,
sub_packno LIKE esll-sub_packno,
srvpos LIKE esll-srvpos,
ktext1 LIKE esll-ktext1,
netwr LIKE esll-netwr,
act_wert LIKE esll-act_wert,
menge LIKE esll-menge,
bldat LIKE ekbe-bldat,
END OF ty_services.
TYPES : BEGIN OF ty_konv,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
knumv LIKE konv-knumv,
kposn LIKE konv-kposn,
kschl LIKE konv-kschl,
kwert LIKE konv-kwert,
kbetr LIKE konv-kbetr,
END OF ty_konv.
TYPES : BEGIN OF ty_lfbnr,
belnr TYPE ekbe-belnr,
lfbnr TYPE ekbe-lfbnr,
END OF ty_lfbnr.
TYPES : BEGIN OF ty_miro,
belnr1 TYPE ekbe-belnr,
belnr TYPE ekbe-belnr,
budat TYPE ekbe-budat,
END OF ty_miro.
types: begin of ty_lfa1,
lifnr like lfa1-lifnr,
name1 like lfa1-lifnr,
pstlz like lfa1-pstlz,
stras like lfa1-stras,
end of ty_lfa1.
types: begin of ty_t007s,
mwskz like t007s-mwskz,
text1 like t007s-text1,
spras like t007s-spras,
kalsm like t007s-kalsm,
end of ty_t007s.
types: begin of ty_j_1imovend,
lifnr like j_1imovend-lifnr,
j_1icstno like j_1imovend-j_1icstno,
end of ty_j_1imovend.
types: begin of ty_bseg,
lifnr like bseg-lifnr,
dmbtr like bseg-dmbtr,
shkzg like bseg-shkzg,
hkont like bseg-hkont,
BELNR LIKE BSEG-BELNR,
end of ty_bseg.
types: begin of ty_ska1,
saknr like ska1-saknr,
sakan like ska1-sakan,
ktoks like ska1-ktoks,
mcod1 like ska1-mcod1,
end of ty_ska1.
DATA : it_lfbnr TYPE STANDARD TABLE OF ty_lfbnr,
wa_lfbnr TYPE ty_lfbnr,
it_lfa1 type standard table of ty_lfa1,
wa_lfa1 TYPE ty_lfa1,
it_t007s type standard table of ty_t007s,
wa_t007s TYPE ty_t007s,
it_j_1imovend type standard table of ty_j_1imovend,
wa_j_1imovend TYPE ty_j_1imovend,
it_bseg type standard table of ty_bseg,
wa_bseg TYPE ty_bseg,
it_ska1 type standard table of ty_ska1,
wa_ska1 TYPE ty_ska1,
it_miro TYPE STANDARD TABLE OF ty_miro,
wa_miro TYPE ty_miro,
w_belnr TYPE ekbe-belnr,
w_lfbnr TYPE ekbe-lfbnr,
w_belnr1 TYPE ekbe-belnr,
w_budat TYPE ekbe-budat.
CONSTANTS: Begin with C_ *
DATA: Begin with W_ *
DATA : w_flag TYPE c.
INTERNAL TABLES: Begin with IT_ *
DATA : it_ekko TYPE STANDARD TABLE OF ty_ekko WITH NON-UNIQUE KEY ebeln
ebelp,
it_ekpo type standard table of ty_ekpo,
it_ekbe TYPE STANDARD TABLE OF ty_ekbe,
it_ekbe1 TYPE STANDARD TABLE OF ty_ekbe WITH NON-UNIQUE KEY ebeln
ebelp,
it_display TYPE STANDARD TABLE OF ty_display,
it_subdebit TYPE STANDARD TABLE OF ty_ekbe,
it_services TYPE STANDARD TABLE OF ty_services,
it_packno TYPE STANDARD TABLE OF ty_services,
it_konv TYPE STANDARD TABLE OF ty_konv.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
it_layout TYPE slis_layout_alv,
it_komv TYPE STANDARD TABLE OF komv WITH NON-UNIQUE KEY knumv
kschl.
WORKAREAS: Begin with WA_ *
DATA : wa_ekbe TYPE ty_ekbe,
wa_ekbe1 TYPE ty_ekbe,
wa_ekko TYPE ty_ekko,
wa_komv TYPE komv,
wa_display TYPE ty_display,
WA_LFA1 TYPE TY_LFA1,
W_GROSS_AMT type KOMV-KWERT,
wa_subdebit TYPE ty_ekbe,
wa_packno TYPE ty_services,
wa_services TYPE ty_services,
wa_konv TYPE ty_konv,
wa_taxcom TYPE taxcom,
wa_ls_fieldcat TYPE slis_fieldcat_alv.
FIELD-SYMBOLS: Begin with FS_ *
FIELD-GROUPS: Begin with FG_ *
CONTROLS: *
SELECT-OPTIONS: Begin with SO_ *
SELECT-OPTIONS : so_lifnr FOR ekko-lifnr ,
so_mtart FOR ekpo-mtart,
so_ebeln FOR ekbe-ebeln,
so_matnr FOR ekbe-matnr,
so_date FOR sy-datum no-display,
do_date for ekko-bedat,
tax_code for ekpo-mwskz,
mr_date for ekbe-budat,
mat_gr for ekpo-matkl,
mat_tp for ekpo-mtart,
pr_plant for ekbe-werks,
pr_ekorg for ekko-ekorg.
PARAMETERS: Begin with PR_ *
*PARAMETER : pr_plant LIKE ekpo-werks . "OBLIGATORY.
pr_ekorg LIKE ekko-ekorg . "OBLIGATORY.
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
PARAMETER : pr_preg TYPE c radiobutton group g1 default 'X',
pr_ror TYPE c RADIOBUTTON GROUP g1 .
SELECTION-SCREEN : END OF BLOCK b1.
START-OF-SELECTION *
START-OF-SELECTION .
*--- Get the data reguired--
PERFORM f001-get_data.
*-------Calculate the tax required -
PERFORM f002-cal_taxes.
PERFORM miro_get_data.
END-OF-SELECTION *
END-OF-SELECTION.
*---Display the report--
PERFORM f003-display_register.
*& Form F001-GET_DATA
text
--> p1 text
<-- p2 text
FORM f001-get_data .
Clear and Refresh all internal table and work area.
REFRESH : it_ekko,
it_ekbe,
it_services,
it_packno,
it_konv,
it_lfa1,
it_komv.
CLEAR : wa_ekko,
wa_ekbe,
wa_services,
wa_packno,
wa_konv,
wa_lfa1,
wa_komv.
Get the history records for all the selected PO. from table EKBE of
type GR.
IF pr_preg = 'X'.
*Get Purchasing Document Number, Number of the document condition,
*Vendor's accountNumber, Currency Key, Procedure , Country for Tax
*ReturnPurchasing OrganizationExchange rate In an internal table it_ekko
*break-point.
SELECT pBSART qknttp pebeln pknumv plifnr pwaers pkalsm plands pekorg pwkurs
wkurs pbedat qebelp qbukrs qmatkl qmtart pllief qmeins qbprme
qtxjcd qmwskz pwkurs qnetpr qmenge QPEINH
INTO CORRESPONDING FIELDS OF TABLE it_ekko
FROM ekko AS p INNER JOIN ekpo AS q
ON pebeln = qebeln
WHERE p~ekorg in pr_ekorg
AND p~lifnr IN so_lifnr
AND q~mtart IN so_mtart
AND p~ebeln IN so_ebeln
and p~bedat in do_date
and q~mwskz in tax_code
and q~matkl in mat_gr
and q~mtart in mat_tp
and kalsm = 'SIL000'
AND EKORG = 'SDOP'.
GET ALL THE PO FOR WHICH MIRO HAS BEEN DONE
SELECT ebeln ebelp budat bldat werks
INTO CORRESPONDING FIELDS OF TABLE it_ekbe1
FROM ekbe
FOR ALL ENTRIES IN it_ekko
WHERE ebeln = it_ekko-ebeln
AND ebelp = it_ekko-ebelp
AND bewtp = 'Q'
AND werks in pr_plant
AND budat IN so_date
AND ( bwart = '101' OR bwart = '102' ) "OR bwart = '105' OR bwart = '106' OR bwart ='')
AND ebeln IN so_ebeln
and budat in mr_date
AND matnr IN so_matnr.
AND ( BUDAT >= SO_DATE-low and BUDAT <= SO_DATE-high ).
Check whether any records is present
IF sy-subrc = 0.
IF NOT it_ekbe1 IS INITIAL.
SELECT ebeln ebelp buzei belnr budat xblnr werks matnr menge
dmbtr waers wrbtr bwtar shkzg dmbtr bldat srvpos
packno introw lfbnr bwart
INTO CORRESPONDING FIELDS OF TABLE it_ekbe
FROM ekbe
FOR ALL ENTRIES IN it_ekbe1
WHERE ebeln = it_ekbe1-ebeln
AND ebelp = it_ekbe1-ebelp
and budat in mr_date
AND budat IN so_date
and ( BUDAT >= SO_DATE-low and BUDAT <= SO_DATE-high )
AND bewtp = 'Q'.
AND ( bwart = '101' OR bwart = '102' OR bwart = '103' OR bwart = '105' ). "OR bwart = '105' OR bwart = '106' OR bwart ='').
AND bwart = '103'.
and WERKS = PR_PLANT.
IF sy-subrc = 0.
ENDIF.
ELSE.
SELECT ebeln ebelp buzei belnr budat xblnr werks matnr menge
dmbtr waers wrbtr bwtar shkzg dmbtr bldat srvpos
packno introw lfbnr bwart
INTO CORRESPONDING FIELDS OF TABLE it_ekbe
FROM ekbe
FOR ALL ENTRIES IN it_ekbe1
WHERE ebeln = it_ekbe1-ebeln
AND ebelp = it_ekbe1-ebelp
and budat in mr_date
AND budat IN so_date
and ( BUDAT >= SO_DATE-low and BUDAT <= SO_DATE-high )
AND bewtp = 'Q'.
AND ( bwart = '101' OR bwart = '102' OR bwart = '103' OR bwart = '105' ) . "OR bwart = '105' OR bwart = '106' OR bwart ='').
AND bwart = '102'.
and WERKS = PR_PLANT.
IF sy-subrc = 0.
ENDIF.
ENDIF.
ENDIF.
new code added
*get the venor address
select alifnr bname1 bpstlz bstras b~lifnr
into corresponding fields of table it_LFA1
from ekko as a inner join lfa1 as b
on alifnr = blifnr
for all entries in it_EKKO
where B~lifnr = it_EKKO-lifnr.
***tax code description added*******************
select mwskz text1 spras kalsm
from t007s
into corresponding fields of table it_t007s for all entries in it_ekko
where mwskz = it_ekko-mwskz and spras = 'E' and kalsm = 'TAXSIL'.
*******vendor vat no. added*************
select lifnr j_1icstno
from j_1imovend
into corresponding fields of table it_j_1imovend for all entries in it_ekko
where lifnr = it_ekko-lifnr.
**********gl code added******************************************
*select lifnr shkzg dmbtr hkont
*from bseg
*into corresponding fields of table it_bseg for all entries in it_lfa1 " it_ekko
*where LIFNR = it_lfa1-LIFNR and shkzg = 'S'.
*************gl code description added*******************************************
*select saknr ktoks mcod1 sakan
*from ska1
*into corresponding fields of table it_ska1 for all entries in it_bseg
*where sakan = it_bseg-hkont and ktoks = 'MAT'.
Get the package number , service number , service text , net price ,
accual amount , qty. etc
IF NOT it_packno[] IS INITIAL.
SELECT ppackno psrvpos pktext1 pnetwr pact_wert pmenge
INTO CORRESPONDING FIELDS OF TABLE it_services
FROM esll AS p "inner join ESLL as Q
on PPLN_PACKNO = QPACKNO
and PINTROW = QINTROW
FOR ALL ENTRIES IN it_packno
WHERE p~packno = it_packno-sub_packno.
IF sy-subrc = 0.
ENDIF.
ENDIF.
Get Number of the document condition ,line item number, Condition
value for all selected PO.
IF NOT it_ekko[] IS INITIAL.
SELECT knumv kposn kschl kwert
INTO CORRESPONDING FIELDS OF TABLE it_konv
FROM konv
FOR ALL ENTRIES IN it_ekko
WHERE knumv = it_ekko-knumv.
IF sy-subrc = 0.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " F001-GET_DATA
*& Form F002-CAL_TAXES
text
--> p1 text
<-- p2 text
FORM f002-cal_taxes .
Calculate taxes for all the PO.
LOOP AT it_ekbe INTO wa_ekbe.
CLEAR : wa_display,
wa_ekko.
READ TABLE it_ekko WITH TABLE KEY ebeln = wa_ekbe-ebeln
ebelp = wa_ekbe-ebelp
INTO wa_ekko.
IF sy-subrc = 0.
ENDIF.
CLEAR wa_taxcom.
Get the text for the Material.
SELECT SINGLE maktx
INTO wa_display-maktx
FROM makt
WHERE matnr = wa_ekbe-matnr
AND spras = sy-langu.
wa_taxcom-bukrs = wa_ekko-bukrs.
wa_taxcom-budat = wa_ekbe-bldat.
wa_taxcom-budat = wa_ekko-bedat." change by dinesh
wa_taxcom-waers = wa_ekbe-waers.
wa_taxcom-kposn = wa_ekbe-ebelp.
wa_taxcom-mwskz = wa_ekko-mwskz.
wa_taxcom-txjcd = wa_ekko-txjcd.
taxcom-shkzg = 'H'.
wa_taxcom-xmwst = 'X'.
IF ekko-bstyp EQ bstyp-best.
wa_taxcom-wrbtr = wa_ekko-netpr * wa_ekbe-menge * wa_ekko-wkurs.
WA_TAXCOM-WRBTR = wa_ekbe-dmbtr.
ELSE.
taxcom-wrbtr = ekpo-zwert.
ENDIF.
wa_taxcom-lifnr = wa_ekko-lifnr.
wa_taxcom-land1 = wa_ekko-lands. "WIA
wa_taxcom-ekorg = wa_ekko-ekorg.
wa_taxcom-hwaer = 'INR'. "t001-waers.
wa_taxcom-llief = wa_ekko-llief.
wa_taxcom-bldat = wa_ekbe-bldat.
wa_taxcom-matnr = wa_ekbe-matnr. "HTN-Abwicklung
wa_taxcom-werks = wa_ekbe-werks. "pr_plant.
taxcom-bwtar = ekpo-bwtar.
wa_taxcom-matkl = wa_ekko-matkl.
wa_taxcom-meins = wa_ekko-meins.
wa_taxcom-ebeln = wa_ekbe-ebeln.
wa_taxcom-ebelp = wa_ekbe-ebelp.
wa_taxcom-mglme = wa_ekbe-menge.
wa_taxcom-mtart = wa_ekko-mtart.
*Call function module CALCULATE_TAX_ITEM--
CALL FUNCTION 'CALCULATE_TAX_ITEM'
EXPORTING
i_taxcom = wa_taxcom
display_only = 'X'
dialog = diakz
IMPORTING
e_taxcom = wa_taxcom
nav_anteil = hwert
TABLES
t_xkomv = it_komv
EXCEPTIONS
OTHERS = 01.
IF sy-subrc = 0.
ENDIF.
wa_display-bsart = wa_ekko-bsart.
wa_display-knttp = wa_ekko-knttp.
wa_display-bprme = wa_ekko-bprme.
wa_display-meins = wa_ekko-meins.
wa_display-lifnr = wa_ekko-lifnr.
wa_display-ebeln = wa_ekbe-ebeln.
wa_display-bedat = wa_ekko-bedat.
wa_display-bwart = wa_ekbe-bwart.
wa_display-budat = wa_ekbe-budat.
wa_display-matnr = wa_ekbe-matnr.
wa_display-belnr = wa_ekbe-belnr.
wa_display-menge = wa_ekbe-menge.
wa_display-PEINH = wa_ekko-PEINH.
wa_display-dmbtr = ( wa_ekko-netpr * wa_ekbe-menge * wa_ekko-wkurs ) / wa_ekko-PEINH.
WA_DISPLAY-DMBTR = WA_EKBE-DMBTR.
wa_display-srvpos = wa_ekbe-srvpos.
wa_display-mwskz = wa_EKKO-mwskz.
wa_display-WAERS = wa_EKKO-WAERS.
read table it_lfa1 into wa_lfa1 with key lifnr = wa_ekko-lifnr.
wa_display-name1 = wa_lfa1-name1.
wa_display-pstlz = wa_lfa1-pstlz.
wa_display-stras = wa_lfa1-stras.
read table it_t007s into wa_t007s with key mwskz = wa_ekko-mwskz.
wa_display-text1 = wa_t007s-text1.
read table it_j_1imovend into wa_j_1imovend with key lifnr = wa_ekko-lifnr.
wa_display-j_1icstno = wa_j_1imovend-j_1icstno.
read table it_bseg into wa_bseg with key LIFNR = wa_lfa1-lifnr. " wa_ekKO-LIFNR .
wa_display-HKONT = wa_bseg-HKONT.
*read table it_ska1 into wa_ska1 with key sakan = wa_bseg-hkont.
*wa_display-mcod1 = wa_ska1-mcod1.
READ TABLE it_komv WITH KEY kschl = 'JCDB'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0.
wa_display-custduty = wa_komv-kwert .
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'JCDB'.
IF wa_ekko-menge <> 0.
wa_display-custduty = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ENDIF.
Get the BED OR EXCISE DUTY
CLEAR : wa_komv , wa_konv.
READ TABLE it_komv WITH KEY kschl = 'JMOP'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0 .
wa_display-BED = wa_komv-kwert .
ELSE.
READ TABLE it_komv WITH KEY kschl = 'JMOQ'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0.
wa_display-BED = wa_komv-kwert .
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'JMOP'.
IF sy-subrc = 0.
IF wa_ekko-menge <> 0.
wa_display-BED = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY
knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'JMOQ'.
IF wa_ekko-menge <> 0.
wa_display-BED = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
******END OF EXCISE DUTY AND THE BED******************************************************
Get the EDUCATION CESS
CLEAR : wa_komv , wa_konv.
READ TABLE it_komv WITH KEY kschl = 'JEC1'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0 .
wa_display-educess = wa_komv-kwert .
ELSE.
READ TABLE it_komv WITH KEY kschl = 'JESQ'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0.
wa_display-educess = wa_komv-kwert .
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'JEC1'.
IF sy-subrc = 0.
IF wa_ekko-menge <> 0.
wa_display-educess = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY
knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'JESQ'.
IF wa_ekko-menge <> 0.
wa_display-educess = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
*END OF EDUCATION CESS
Get the SERVICE TAX
clear : WA_KOMV , WA_KONV.
read table IT_KOMV with key KSCHL = 'JSRT'
KPOSN = WA_EKKO-EBELP
into WA_KOMV.
if SY-SUBRC = 0.
WA_DISPLAY-SERTAX = WA_KOMV-KWERT .
else.
read table IT_KONV into WA_KONV with key KNUMV = WA_EKKO-KNUMV
KPOSN = WA_EKKO-EBELP
KSCHL = 'JSRT'.
WA_DISPLAY-SERTAX = WA_KONV-KWERT * wa_ekko-WKURS.
endif.
END OF SERVICE TAX****************************************
Get the EDUCATION CESS ON SERVICE TAX************************
clear : WA_KOMV , WA_KONV.
read table IT_KOMV with key KSCHL = 'JEC5'
KPOSN = WA_EKKO-EBELP
into WA_KOMV.
if SY-SUBRC = 0.
WA_DISPLAY-SEREDUCESS = WA_KOMV-KWERT .
else.
read table IT_KONV into WA_KONV with key KNUMV = WA_EKKO-KNUMV
KPOSN = WA_EKKO-EBELP
KSCHL = 'JEC5'.
WA_DISPLAY-SEREDUCESS = WA_KONV-KWERT * wa_ekko-WKURS.
endif.
******END OF SERVICE TAX ON EDUCATION CESS************************************************
Get the CVD
CLEAR : wa_komv , wa_konv.
READ TABLE it_komv WITH KEY kschl = 'JCV1'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0.
wa_display-cvd = wa_komv-kwert .
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'JCV1'.
IF wa_ekko-menge <> 0.
wa_display-cvd = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ENDIF.
Get the total INSURANCE
CLEAR : wa_komv , wa_konv.
READ TABLE it_komv WITH KEY kschl = 'ZIN1'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0 .
wa_display-insure = wa_komv-kwert .
ELSE.
READ TABLE it_komv WITH KEY kschl = 'ZIN2'
kposn = wa_ekko-ebelp
INTO wa_komv.
IF sy-subrc = 0.
wa_display-insure = wa_komv-kwert .
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY knumv = wa_ekko-knumv
kposn = wa_ekko-ebelp
kschl = 'ZIN1'.
IF sy-subrc = 0.
IF wa_ekko-menge <> 0.
wa_display-insure = ( wa_ekbe-menge / wa_ekko-menge
) * wa_konv-kwert * wa_ekko-wkurs.
ENDIF.
ELSE.
READ TABLE it_konv INTO wa_konv WITH KEY
Hi Ingo,
Thanks for the reply. But let me rephrase my question. In the Bex we get a extra row called overall result in the result set which gives the correct count/total/average based on exception aggregation. The question is how we show the overall result row in the crystal or rather how can we map it into crystal. So i thought as of now we should create a formula to compute the overall result and display it.
Hope I am clear this time in asking the right question.
Many many thanks in advance for your reply.
Kind regards,
Shiva. -
How to control the size of live data in Coherence?
How to control the size of live data in Coherence?
See the following statement:
Pause times increase as the amount of live data in the heap increases. We recommend not exceeding 70% live data in your heap. This includes primary data, backup data, indexes, and application data.
--Excerpted from http://coherence.oracle.com/display/COH35UG/Best+PracticesIn any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded. -
How could control the scroll events in ALV OO?
Hello experts!
I'm programing a report, inside there is a field that need time of processing. I'm using ALV OO.
I have thought that it could only calculate the field for the lines that visualize.
How could control the scroll events to calculate the field of the visualized lines?
I'm using CL_SALV_TABLE class and cl_salv_events_table to control the events, but there aren't any event to control the scroll.
best regards!Hi Sriram,
I did view the information that you was attaching, but this don't resolve my problem. With methods get_scroll_info_via_id and set_scroll_info_via_id, we can get and put information of selection and view rows in the screen but we don't control when the user click in the scroll for advance or to back down a page.
I would like to refresh the data in ALV when the user view news rows.
I want your genial ideas.
Best regards! -
How to control the size of SVG images in epub files?
There is unfortunately no support for SVG files in InDesign.
Most of my images in jpg convertes nicely, but the small ones do not.
Therefore I want to use SVG files which I have created in Illustrator.
But how do I set the size in the epub file? Right now, whatever I do, they come out too big and I don't know how to control the size.
Is there a program, like Sigil or other, that can place the image for me - I'm no html wizard you see....In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded. -
Workflow Questions - How to execute the steps in a workflow automatically?
I am using MDM 5.5 SP6.
My Question is how to execute the steps in the workflow automatically. That means NO user interaction.
I have a simple workflow, Start- Process -- Syndicate - Stop.
When a new record added /updated/inserted this workflow will start automatically. The workflow inbox, the workflow status is u2018Receivedu2019 Step is u2018Processu2019. Now I have to right click on the record then u2018Next Stepu2019 then click on u2018Syndicateu2019 then workflow completes automatically.
How to execute the Syndication step automatically?. I donu2019t want to have any user interaction to syndicate these records.
Is this possible?
The reason for this is I want to do some field validation and based on the field validation some assignments then then I want to syndicate these records without user interaction..Hi,
If you want to do some validations and then based on result assignments on some of the fields before syndicating, then you have to use workflow. Only syndication server will not fulfill this requirement.
you may try by making validation's automatic property as "Error". This way it will not allow to add any record not fulfilling validation. You can also try using calculated fields instead of assignment.
I am not sure if you can make your workflow fully automatic, because atleast one process step is must for any workflow, and process step means user action.
Regards,
Shiv -
How to control the looping time of the for loop in 10 microseconds in labview?
I need to create a +/- 9 volt square wave with period of 20us using a D/A card (Not NI card). I can write command to the card using outport provide by Labview. Right now, I can generate square wave with 4ms period which is limited by the resolution of the wait until next ms icon I used inside the for loop. Could anyone tell me how to control the execution time of the for loop to about 10 us? Your help would be much appreciated.
I'm not sure if this will hep, but this answer seems to answer this question
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000029410000&UCATEGORY_0=_30_%24_12_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=microsecond+resolution+1ms&USEARCHCONTEXT_QUESTION_S=0 -
How to control the opening form multiple times
Greetings to all,
I used Open_Form to open the form in my 'Menu.mmb'.
My Question is:
How we control the opening of a form from multiple times?
Ex:
In my menu.mmb I used OPEN_FORM.If we open the form,which was already opened ,I want to stop the form to open. How to do this?
Thanks,
Bhujendrapls try with
FIND_FORM('EMPDETAILS1');
OPEN_FORM('C:\INH\EMPDETAILS1');
jeneesh -
How to control the rounding rule at answer?
Hi grus,
I use the BIEE 11.1.1.6.5.
And I create the 2 answers(A and B) with a same column which setting is same column formula and data format(Treat Numbers As "number", Decimal places "2") on column properties.
Then I run the answer A that the value is 3.68( this column's SQL value is 3.675, so this means rounding up the value)
But I run the answer B with same criteria that the value is 3.67(this means truncating the value)
Why do these difference happen?
How to control the rounding rule?
Best Regards,
TakashiHi,
When add the Itemcode, default warehouse and costing codes (Profit Center) are automatically asign by SAP.
When change the warehouse for this Itemcode, the costing codes(Profit Center) are disappear. I don't want to disappear the costing codes, that's why I try to resign the default costing codes when the warehouse change.
At SAP 2005, easily access the screen matrix in the marketing document and add the required values in each costing codes columns. But SAP 2007, all costing codes are combined in 1 col and those have the other screen.
Do you have any idea to control the costing codes?
Thanks and regards,
Lei Nandar Myint -
How to control the line-in volume input via LabView?
Anyone know how to control the line-in volume and balance input via LabView?
I assume you are referring to audio line-in volume control and lerft-right balance...
If so, then check out this thread:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000D83A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Look at the info near the bottom from Paul S & Spectre. They talk about "winmm.dll"
-cheers-
JLV -
How to control the number of instances of an object ?
Hi all,
Can anybody answer, How to control the number of instances of an object being created?
suppose at any point of time, if i would like to have 5 instances at the maximum, how can i disable the further requests?
Thanks in advance
Pradiwrite a factory method that controls the number of instances for you:
import java.util.List;
import java.util.Arrays;
public class Bar
private static final int MAX_BARS = 5;
private static int numBars = 0;
private int id;
public static void main(String [] args)
try
int numBars = ((args.length > 0) ? Integer.parseInt(args[0]) : MAX_BARS+1);
Bar [] bars = new Bar[numBars];
for (int i = 0; i < bars.length; ++i)
bars[i] = Bar.create();
System.out.println(Arrays.asList(bars));
catch (Exception e)
e.printStackTrace();
private Bar() { this.id = numBars++; }
public String toString() { return "I am bar number " + this.id; }
public static Bar create()
Bar nextBar = null;
if (numBars < MAX_BARS)
nextBar = new Bar();
return nextBar;
}%
Maybe you are looking for
-
Cost component structure in CO-OM Reporting
Hi there, we want to run cost center reports, that show us the balance on a cost center per primary cost element, after we have allocated some of the costs from the cost center into production orders. I thought this can be achieved by having the tari
-
Can select, but cannot insert into oracle tables using php.
I am having trouble inserting data into a tables in oracle using PHP. I can insert into the tables using baninst1, but nothing else. I can't even insert using the tables' owner. Every time I try I get the ORA-00492 error of table or view does not exi
-
Hi All, I have file to idoc scenario where I need to use adapter module on the sender side. Can any one please s-e-n-d me links for the adapter module documents since I need to learn it from scratch. Thanks, Siva.
-
HT4906 why can i not turn on photo stream on my mac which has OS X 10.7.4?
Why does my Macbook Pro with OS X 10.7.4 not allowing me to check the photostream box in icloud, under the System Preferences tab? It just allows me to chose "learn more."
-
Problems with validation and flash (xhtml)
I don't understand... I've built the page using fireworks and dreamweaver cs3. I've inserted a flashmedia by using insert-media-flash and on some pages flashbuttons. It works fine in a browser (checked with IE7 and NS9). But when I use validate in dr