Animating a div with 2 buttons
There is a div and 2 buttons in my page. The button 1 is to fade in and fade out the div. First click, the div fades in, second click, the div fades out. And button 2 is to fade out the div ONLY. The script for button 1 works perfectly, but after I added the script for button 2, there is a problem with the div. After I clicked on the button 2 and the div faded out, and if I click on button 1 again, I have to click it twice to fade in the div again. How to solve it?
<script>
$(function() {
var expanded = false;
$('#needhelp').click(function(){
if (!expanded) {
$('#guidepopup').animate({'top' : '141px'}, {duration : 500});
expanded = true;
else {
$('#guidepopup').animate({'top' : '-190px'}, {duration: 500});
expanded = false;
</script>
<script>
$(function () {
$("#button2").click(function () {
$("#div").animate({'top' : '-190px'}, {duration: 500});
</script>
Add the code marked in red:
<script>
$(function() {
var expanded = false;
$('#needhelp').click(function(){
$('#needhelp').hide();
if (!expanded) {
$('#guidepopup').animate({'top' : '141px'}, {duration : 500});
expanded = true;
else {
$('#guidepopup').animate({'top' : '50px'}, {duration: 500});
expanded = false;
$("#button2").click(function () {
if (expanded == true) {
$("#guidepopup").animate({'top' : '50px'}, {duration: 500});
expanded = false;
$('#needhelp').show();
</script>
Similar Messages
-
I need help with a button animation!
Hi,
I hope someone can help with a simple-looking problem which
nonetheless has me stumped!
I have a feeling that I've missed something obvious.
I've created a movie clip to act as a button (I've called it
"abs_button") and placed it on the stage.
My main movie has one frame.
Within the "abs_button" movie clip there are 5 layers.
Labels, actions, default button state, rollover state and rollout
state.
Technically, default button state, rollover state and rollout
state could be on the same layer as they don't overlap, but I've
given each animation its own layer for clarity.
FRAME 01.
Default button state is one frame with a graphic of the
button. Just a label at the start ("abs_up") and a "stop();" action
at the end.
FRAME 02 to 31.
Rollover state is a 30 frame animation. Label at start
("abs_over"), "stop()"; action at the end.
FRAME 32 to 62.
Rollout state is a 30 frame animation. Label at start
("abs_out"), "stop()"; action at the end.
All animations were achieved with tweens.
My initial "abs_button" code:
on (release) {
getURL("targetPage.htm", "_self");
on (rollOver) {
gotoAndPlay("abs_button", "abs_over");
on (rollOut) {
gotoAndPlay("abs_button", "abs_out");
As it stands, the animation jumps to frame 1 of "abs_out" on
rollout.
I need the "abs_over" animation to always play through to the
end, as the "abs_out" is "abs_over" in reverse (i.e. image grows
large on rollover and shrinks again on rollout.
I've tried for 2 days to solve this, but I clearly need help.
My experiments with variables simply didn't work.
I would be grateful if someone could tell me where I'm going
wrong!
Thanks,
Andyuse this:
on (rollOver) {
gotoAndPlay("abs_over");
Since the code is attached directly to the movieclip, you
don't have to
identify the clip. A gotoAndPlay() function takes a frame
number or a
frame label name as its argument, never the name of the clip
that
contains the frame number or name.
Rob
Rob Dillon
Adobe Community Expert
http://www.ddg-designs.com
412.243.9119 -
Animation couldnt control with Play pause toggle button..
I have multiple movie clip with bg sound.I have used the code AS3 for toggling the animation ( Play & Pause ).Automatically the animation starts and button also togggled on click but couldnt control the animation .
I need some solutions like when the intial stage the animation wont start etither the button click to play.After that the flow as it is in action ( ON Click ). Kindly anyone guide me to solve it. i'm very new to flash. this is my first project and ihave to finish it soon..
btns.visible = false;
btns.addEventListener(MouseEvent.CLICK,onEl);
dfr.addEventListener(MouseEvent.MOUSE_OVER,onEls);
dfr.addEventListener(MouseEvent.MOUSE_OUT,onEld);
btns.addEventListener(MouseEvent.MOUSE_OVER,onEls);
btns.addEventListener(MouseEvent.MOUSE_OUT,onEld);
var _vrSts:int = 0;
function onEl(eve:Event):void {
if(_vrSts) {
trace('status:'+_vrSts);
_vrSts = 0;
btns.gotoAndPlay(1);
}else {
trace('status:'+_vrSts);
_vrSts = 1;
btns.gotoAndStop(2);
function onEls(eve:Event):void {
btns.visible = true;
function onEld(eve:Event):void {
btns.visible = false;Hi Ned!
i done it. here is the solution.One issuse is" End of the animation it goes to 1st frame with pause button, but intially there has play button."
stop();
btns.visible = true;
btns.addEventListener(MouseEvent.CLICK,onEl);
dfr.addEventListener(MouseEvent.MOUSE_OVER,onEls);
dfr.addEventListener(MouseEvent.MOUSE_OUT,onEld);
btns.addEventListener(MouseEvent.MOUSE_OVER,onEls);
btns.addEventListener(MouseEvent.MOUSE_OUT,onEld);
var _vrSts:int = 0;
function onEl(eve:Event):void {
if(_vrSts) {
//trace('status:'+_vrSts);
_vrSts = 0;
//btns.label = "Play";
btns.gotoAndPlay(1);
btns.visible = false;
//if(currentFrame == 445)
//gotoAndPlay(1);
if(currentFrame == 445) {
gotoAndPlay(1);
btns.gotoAndStop(1);
else
stop();
//btns.gotoAndStop(1);
}else {
//trace('status:'+_vrSts);
//stop();
_vrSts = 1;
btns.gotoAndStop(2);
//btns.label = "Pause";
play();
function onEls(eve:Event):void {
btns.visible = true;
function onEld(eve:Event):void {
if(_vrSts)
btns.visible = false; -
Animated background with command buttons
Is it possible to make an animated background in Muse and transition the animation through buttons?
Here's a guess...
I would say that the only way you can make an animated background is with a .gif image. But then you can't use buttons.
==> But a work around would be that you can make a master with your animation with buttons. Then by using that as the master, when you add the rest of your content to your pages (that use that master), it won't be shifted or moved while your setting up the pages.
==> You can also put your animation with buttons on a page as the back most item then after you have them where you want them - lock them.
I would suggest you do one of these options anyway because until browsers change their mode of dialing up, background images for some silly reason are always the last to dial up. So by doing one of these methods your animation would start appearing quicker.
Hope this helps, all I can think of. -
Issues with rollover buttons in Indesign CS6
Hi, I was wondering if anyone can shed some light on a issue i'm currently having.
I've produced a interactive map in Indesign, with rollover buttons which triggers an animation - all the buttons and animations seem to be set up correctly and once I export as a SWF they seem to work fine initially, but after a couple of rollovers some of the buttons just stop working. If I refresh the page or reopen the swf file it then starts working again for a period, but again after a few successful rollovers some stop working again. I'm wondering if this is a bug of some sort? Ive also tested the .swf on a different machine and I experience the same issue.
Any help with this would be be much appreciated.We might be able to help you but you'll have to drop the attitude. We're not Adobe here, but users like you.
You'll need to tell us exactly what you're doing and what's not working for you. By "rollovers," you could mean the change of appearance of a button. You could also be meaning what are sometimes called Show/Hide buttons where clicking a button causes another button to appear. Which is it?
And what kind of output are you attempting? Interactive PDF? SWF (Flash)? DPS? -
hello everyone, i´m really a newie in flash, and now
i´m traying to learn a couple of things at least just for fun.
The problem it is that I want to build a button with an animation
effect,but I want when the mousse go out the button,this make a
animation too, so what I did was:
create a figure,and convert it to button(f8), them in over
section create a keyframe,and convert it to movie clip,inside I
create the animation with motion tween(this one plays when the
cursor is over the button), so now I can´t find a way to make
the animation for the part when the cursor go out of the button
area.
I´ll be very grateful if someone can help me.byeYou can't really do that with a button. A button only has 3
frames that
you get to see. The Up frame and the Over frame can have a
movieClip
inserted into those frames so that you see some sort of
animation when
the cursor is off the button or over the button.
When the cursor leaves a button, the button immediately shows
the Up
frame. If you have an animation at this frame, it will play.
But this is
the same animation that you see before the button is used, so
it's not
unique the rollOut event.
If you want to create a button that shows more activity than
a button
allows for, you can do that, but you have to create a
movieClip that
acts as a button.
If you do a search through this forum, you'll find a lot of
information
on this subject with a bunch of pointers to examples.
Rob
Rob Dillon
Adobe Community Expert
http://www.ddg-designs.com
412-243-9119
http://www.adobe.com/downloads -
Problem with Flash Buttons Help me
Sir
i design some Flash buttons but it is save as .swf extension
if i save as jpg or gif then animation not working as well as
effects.
sir
how can i call the flash buttons in java plz guide me
JButton mybutton=new JButton(how can i pass swf extension button);kglad
what I did was place the code with the trace evt into the action script under the label on the timeline I have for album1. With AS3 I guess that's the new way of doing it.
I then saved the file and output it for preview in flash as well as html, and I got no response on pressing the button apart from the normal animation and sound I have associated with my buttons. I also looked in the output window and no information came up, which in response to Ned's help, means my buttons are not connecting.
Damn, I have tried everything and retraced my steps from scratch, but I am missing something.
Nonetheless I also opened up dreamweaver cs4, and made a test HTML like you mentioned yesterday, and I inserted my flash file(banner) onto the webpage. Went to preview it, through dreamweaver cs4, but everything else but my buttons work. I have graphics, sound and animation but no damn links work.
Thanks for your help
Regards
Charlie -
How to raise pop up window along with radio buttons in module pool program
how to raise pop up window along with radio buttons in module pool program
FUNCTION zscheme_determination.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_KUNNR) TYPE KUNNR
*" EXPORTING
*" REFERENCE(E_VALUE) TYPE NETWR_AK
*" TABLES
*" G_ITEM_DATA_ITAB STRUCTURE ZITEM_DATA
* TYPES: BEGIN OF ty_sord,
* include type ZSD_SCHEME_DTL,
* END OF ty_sord.
* data : gt_sord type standard table of ZSD_SCHEME_DTL,
* wa_sord type ZSD_SCHEME_DTL.
* select * from ZSD_SCHEME_DTL into table
* gt_sord
* where matnr = i_matnr.
* T_ITEM_DATA
*********Data Declarations
DATA:
salesdocumentin LIKE bapivbeln-vbeln,
orderheaderin LIKE bapisdhd1,
orderheaderinx LIKE bapisdhd1x,
sender LIKE bapi_sender,
binaryrelationshiptype LIKE bapireltype-reltype,
intnumberassignment LIKE bapiflag-bapiflag,
behavewhenerror LIKE bapiflag-bapiflag,
logicswitch LIKE bapisdls,
testrun LIKE bapiflag-bapiflag,
convert LIKE bapiflag-bapiflag,
return LIKE bapiret2 OCCURS 0,
orderitemsin LIKE bapisditm OCCURS 0,
orderitemsinx LIKE bapisditmx OCCURS 0,
orderpartners LIKE bapiparnr OCCURS 0,
orderschedulesin LIKE bapischdl OCCURS 0,
orderschedulesinx LIKE bapischdlx OCCURS 0,
orderconditionsin LIKE bapicond OCCURS 0,
orderconditionsinx LIKE bapicondx OCCURS 0,
ordercfgsref LIKE bapicucfg OCCURS 0,
ordercfgsinst LIKE bapicuins OCCURS 0,
ordercfgspartof LIKE bapicuprt OCCURS 0,
ordercfgsvalue LIKE bapicuval OCCURS 0,
ordercfgsblob LIKE bapicublb OCCURS 0,
ordercfgsvk LIKE bapicuvk OCCURS 0,
ordercfgsrefinst LIKE bapicuref OCCURS 0,
orderccard LIKE bapiccard OCCURS 0,
ordertext LIKE bapisdtext OCCURS 0,
orderkeys LIKE bapisdkey OCCURS 0,
extensionin LIKE bapiparex OCCURS 0,
partneraddresses LIKE bapiaddr1 OCCURS 0.
DATA : wa_orderpartners LIKE bapiparnr,
wa_orderitemsin LIKE bapisditm,
wa_orderitemsinx LIKE bapisditmx,
wa_orderschedulesin LIKE bapischdl,
wa_orderschedulesinx LIKE bapischdlx,
wa_orderconditionsin LIKE bapicond,
wa_orderconditionsinx LIKE bapicondx,
wa_return LIKE bapiret2,
lv_value TYPE netwr_ak.
DATA : lv_dtyp TYPE char45,
lv_sorg TYPE vkorg,
lv_sdch TYPE vtweg,
lv_sdiv TYPE spart.
TYPES : BEGIN OF ty_sord,
zsdscheme TYPE comt_scheme_id,
posnr TYPE posnr_va,
matnr TYPE matnr,
disc_type TYPE rebate_disc_type,
calc_type TYPE catyp,
qty_from TYPE kwmeng,
qty_to TYPE kwmeng,
spart TYPE spart,
custcondgrp TYPE kdkg1,
werks TYPE werks_d,
matmn TYPE matnr,
END OF ty_sord.
DATA : gt_sord TYPE STANDARD TABLE OF ty_sord,
gt_sordd TYPE STANDARD TABLE OF ty_sord,
wa_sord TYPE ty_sord,
wa_knvv TYPE knvv,
lv_cal_foc TYPE p DECIMALS 3,
lv_cal_dis TYPE p DECIMALS 3,
lv_new_qty TYPE kwmeng,
lv_posmat TYPE posnr_va,
lv_posfoc TYPE posnr_va.
DATA:lv_diff TYPE kwmeng.
******Schemes Selection Logic
* Get Valid Schemes
* Validate Scheme for validity Period, Material, Customer Type and Plant
TYPES : BEGIN OF ty_rtab,
sign TYPE c LENGTH 1,
option TYPE c LENGTH 2,
low LIKE mara-matnr,
high LIKE mara-matnr,
END OF ty_rtab.
* TYPES : ty_matnr TYPE RANGE OF ty_rtab.
DATA : it_matnr TYPE TABLE OF ty_rtab,
wa_matnr TYPE ty_rtab,
wa_it TYPE zitem_data,
wa_tab TYPE zitem_data.
*order table declaration
TYPES:
BEGIN OF ty_order,
zsdscheme TYPE comt_scheme_id,
matnr TYPE matnr,
kwmeng TYPE kwmeng,
END OF ty_order,
BEGIN OF ty_scheme,
zsdscheme TYPE comt_scheme_id,
* matnr TYPE matnr,
kwmeng TYPE kwmeng,
END OF ty_scheme.
DATA:
gt_order TYPE TABLE OF ty_order,
gt_scheme TYPE TABLE OF ty_scheme,
wa_scheme TYPE ty_scheme,
wa_order TYPE ty_order.
DATA:i_kwmeng TYPE kwmeng.
* Transfer all the material received from order to internal table
LOOP AT g_item_data_itab INTO wa_it.
MOVE : wa_it-matnr TO wa_matnr-low,
'I' TO wa_matnr-sign,
'EQ' TO wa_matnr-option.
APPEND wa_matnr TO it_matnr.
CLEAR wa_it.
ENDLOOP.
* Get the Valid Schemes based on given criteria
SELECT
zsd_scheme_dtl~zsdscheme
zsd_scheme_dtl~posnr
zsd_scheme_dtl~matnr
zsd_scheme_dtl~disc_type
zsd_scheme_dtl~calc_type
zsd_scheme_dtl~qty_from
zsd_scheme_dtl~qty_to
zsd_scheme~spart
zsd_scheme_hdr~custcondgrp
zsd_scheme_hdr~werks
zsd_scheme_hdr~matnr
FROM zsd_scheme_hdr
INNER JOIN zsd_scheme ON zsd_scheme~zsdscheme = zsd_scheme_hdr~zsdscheme
INNER JOIN zsd_scheme_dtl ON zsd_scheme_dtl~zsdscheme = zsd_scheme_hdr~zsdscheme
INTO TABLE gt_sord
WHERE zsd_scheme_dtl~matnr IN it_matnr
* zsd_scheme_hdr~matnr IN it_matnr
* AND zsd_scheme_hdr~werks = '1509'
AND zsd_scheme_hdr~werks = '1529'
AND zsd_scheme_hdr~custcondgrp = '01'
AND zsd_scheme~datuv LE sy-datum
AND zsd_scheme~datub GE sy-datum.
SORT gt_sord BY zsdscheme ASCENDING.
* LOOP AT gt_sord INTO wa_sord.
* READ TABLE g_item_data_itab INTO wa_it WITH KEY matnr = wa_sord-matnr.
* wa_order-zsdscheme = wa_sord-zsdscheme.
* wa_order-matnr = wa_it-matnr.
* wa_order-kwmeng = wa_it-kwmeng.
* COLLECT wa_order INTO gt_order.
* CLEAR wa_order.
* ENDLOOP.
LOOP AT g_item_data_itab INTO wa_it.
READ TABLE gt_sord INTO wa_sord WITH KEY matnr = wa_it-matnr.
wa_order-zsdscheme = wa_sord-zsdscheme.
wa_order-matnr = wa_it-matnr.
wa_order-kwmeng = wa_it-kwmeng.
COLLECT wa_order INTO gt_order.
MOVE : wa_sord-zsdscheme TO wa_scheme-zsdscheme,
wa_it-kwmeng TO wa_scheme-kwmeng.
COLLECT wa_scheme INTO gt_scheme.
CLEAR : wa_order, wa_scheme.
ENDLOOP.
CLEAR wa_scheme.
DATA w_line TYPE sy-tabix.
* Updating table based on Schemes
LOOP AT gt_scheme INTO wa_scheme.
CLEAR w_line.
gt_sordd[] = gt_sord[].
* DELETE gt_sordd WHERE zsdscheme NE wa_scheme-zsdscheme and disc_type NE 'FOC'.
DELETE gt_sordd WHERE zsdscheme NE wa_scheme-zsdscheme AND disc_type NE 'F'.
DELETE ADJACENT DUPLICATES FROM gt_sordd COMPARING zsdscheme matnr.
DESCRIBE TABLE gt_sordd LINES w_line.
IF w_line GT 1.
* popup message to select one foc type.
ELSE.
CLEAR wa_sord.
READ TABLE gt_sordd INTO wa_sord INDEX 1.
IF sy-subrc EQ 0.
i_kwmeng = wa_scheme-kwmeng.
lv_cal_foc = i_kwmeng DIV wa_sord-qty_from.
lv_cal_dis = i_kwmeng MOD wa_sord-qty_from.
MOVE : lv_cal_foc TO wa_it-kwmeng,
wa_sord-matnr TO wa_it-matnr.
APPEND wa_it TO g_item_data_itab.
SORT gt_order BY kwmeng DESCENDING.
LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme.
IF lv_cal_dis GT 0.
* LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme
* AND lv_cal_dis GT 0.
* LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme.
* LOOP AT g_item_data INTO wa_item_data WHERE matnr EQ wa_order-matnr.
LOOP AT g_item_data_itab INTO wa_tab WHERE matnr EQ wa_order-matnr.
wa_orderconditionsin-itm_number = wa_tab-posnr.
* wa_orderconditionsin-itm_number = wa_item_data-posnr.
wa_orderconditionsin-cond_st_no = '001'.
* IF gt_sordd-calc EQ ‘post AND disc_type EQ ‘percentage’.
IF wa_sord-calc_type EQ 'O' AND wa_sord-disc_type EQ 'P'.
wa_orderconditionsin-cond_type = 'ZTPB'. "'ZREG'.
* ELSEIF gt_sordd-calc EQ ‘pre’ AND disc_type EQ ‘percentage’
ELSEIF wa_sord-calc_type EQ 'E' AND wa_sord-disc_type EQ 'P'.
wa_orderconditionsin-cond_type = 'ZTPP'. "'ZREG'.
ENDIF.
wa_orderconditionsin-currency = 'INR'.
wa_orderconditionsin-conpricdat = sy-datum.
APPEND wa_orderconditionsin TO orderconditionsin.
CLEAR wa_orderconditionsin.
*Update Discount Conditon
ENDLOOP.
* ENDLOOP.
*Modify balance of Item
CLEAR wa_tab.
READ TABLE g_item_data_itab INTO wa_tab WITH KEY matnr = wa_order-matnr.
IF sy-subrc EQ 0.
lv_diff = wa_tab-kwmeng - lv_cal_dis.
IF lv_diff GT 0.
wa_tab-kwmeng = wa_tab-kwmeng - lv_cal_dis.
* MODIFY g_item_data TRANSPORTING kwmeng index sy-tabix.
MODIFY g_item_data_itab INDEX sy-tabix FROM wa_tab TRANSPORTING kwmeng .
ELSE.
wa_tab-kwmeng = lv_cal_dis.
lv_cal_dis = lv_diff.
MODIFY g_item_data_itab INDEX sy-tabix FROM wa_tab TRANSPORTING kwmeng .
* MODIFY G_ITEM_DATA_ITAB TRANSPORTING kwmeng index sy-tabix.
ENDIF.
gt_sordd[] = gt_sord[].
DELETE gt_sordd WHERE zsdscheme NE wa_scheme-zsdscheme AND disc_type EQ 'F'.
DESCRIBE TABLE gt_sordd LINES w_line.
IF w_line GT 1.
SORT gt_sordd BY zsdscheme DESCENDING.
* SORT gt_sordd BY quantity DESCENDING.
CLEAR wa_sord.
* LOOP AT gt_sordd WHERE quantity_from LT wa_shceme-kwmeng AND quantity_to GT wa_shceme-kwmeng.
LOOP AT gt_sordd INTO wa_sord WHERE qty_from LT wa_scheme-kwmeng AND qty_to GT wa_scheme-kwmeng.
* LOOP AT gt_order INTO wa_order WHERE scheme = wa_scheme-scheme.
LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme.
* LOOP AT g_item_data INTO wa_item_data WHERE matnr EQ wa_order-matnr.
LOOP AT g_item_data_itab INTO wa_tab WHERE matnr EQ wa_order-matnr.
wa_orderconditionsin-itm_number = wa_tab-posnr.
* wa_orderconditionsin-itm_number = wa_item_data-posnr.
wa_orderconditionsin-cond_st_no = '001'.
* IF gt_sordd-calc EQ ‘post AND disc_type EQ ‘percentage’.
IF wa_sord-calc_type EQ 'O' AND wa_sord-disc_type EQ 'P'.
wa_orderconditionsin-cond_type = 'ZDPD'. "'ZREG'.
* ELSEIF gt_sordd-calc EQ ‘pre’ AND disc_type EQ ‘percentage’
ELSEIF wa_sord-calc_type EQ 'E' AND wa_sord-disc_type EQ 'P'.
wa_orderconditionsin-cond_type = 'ZDPD'. "'ZREG'.
ENDIF.
wa_orderconditionsin-currency = 'INR'.
wa_orderconditionsin-conpricdat = sy-datum.
APPEND wa_orderconditionsin TO orderconditionsin.
CLEAR wa_orderconditionsin.
*Update Discount Conditon
ENDLOOP.
ENDLOOP.
ENDLOOP.
ELSE.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
* select
* ZSD_SCHEME_DTL~ZSDSCHEME
* ZSD_SCHEME_DTL~POSNR
* ZSD_SCHEME_DTL~matnr
* ZSD_SCHEME_DTL~DISC_TYPE
* ZSD_SCHEME_DTL~CALC_TYPE
* ZSD_SCHEME_DTL~QTY_FROM
* ZSD_SCHEME_DTL~QTY_TO
* ZSD_SCHEME~SPART
* ZSD_SCHEME_HDR~CUSTCONDGRP
* ZSD_SCHEME_HDR~WERKS
* ZSD_SCHEME_HDR~MATNR
* from ZSD_SCHEME_DTL
* inner join ZSD_SCHEME on ZSD_SCHEME~ZSDSCHEME = ZSD_SCHEME_DTL~ZSDSCHEME
* inner join ZSD_SCHEME_HDR on ZSD_SCHEME_HDR~ZSDSCHEME = ZSD_SCHEME_DTL~ZSDSCHEME
* into table
* gt_sord
* where ZSD_SCHEME_DTL~matnr = i_matnr and
* ZSD_SCHEME~DATUV LE sy-datum and
* ZSD_SCHEME~DATUB GE sy-datum.
* break-point.
* Process Common Logic for Schemes Processcing
CLEAR wa_sord.
* Convert FOC Quantity and Materials
* LOOP AT gt_sord INTO wa_sord.
** lv_cal = i_kwmeng / wa_sord-QTY_FROM.
* lv_cal_foc = i_kwmeng DIV wa_sord-qty_from.
* lv_cal_dis = i_kwmeng MOD wa_sord-qty_from.
* ENDLOOP.
*lv_new_qty = i_kwmeng - lv_cal_dis.
* Get the Sales Document Type
SELECT SINGLE low
FROM tvarvc
INTO lv_dtyp WHERE
name = 'SD_DOC_TYPE'.
SELECT SINGLE * FROM knvv INTO wa_knvv WHERE kunnr = i_kunnr.
IF sy-subrc = 0.
lv_sorg = wa_knvv-vkorg.
lv_sdch = wa_knvv-vtweg.
lv_sdiv = wa_knvv-spart.
ENDIF.
* Give the Popup for schemes with multiple FOC
* Schemes Specific Processing
* Schemes Specific Processing
orderheaderin-doc_type = lv_dtyp.
orderheaderin-sales_org = lv_sorg.
orderheaderin-distr_chan = lv_sdch.
orderheaderin-division = lv_sdiv.
wa_orderpartners-partn_role = 'AG'.
wa_orderpartners-partn_numb = i_kunnr.
APPEND wa_orderpartners TO orderpartners.
* wa_ORDERPARTNERS-PARTN_ROLE = 'WE'.
* wa_ORDERPARTNERS-PARTN_NUMB = p_ship.
* append wa_ORDERPARTNERS to ORDERPARTNERS.
* Item number begin
CLEAR : lv_posmat.
lv_posmat = lv_posmat + 10.
wa_orderitemsin-itm_number = lv_posmat.
wa_orderitemsin-material = wa_sord-matmn. "i_matnr.
wa_orderitemsin-target_qty = lv_new_qty.
* wa_ORDERITEMSIN-TARGET_QU = i_VRKME.
APPEND wa_orderitemsin TO orderitemsin.
wa_orderitemsinx-itm_number = lv_posmat.
wa_orderitemsinx-material = 'X'.
wa_orderitemsinx-target_qty = 'X'.
wa_orderitemsinx-target_qu = 'X'.
APPEND wa_orderitemsinx TO orderitemsinx.
wa_orderschedulesin-itm_number = lv_posmat.
wa_orderschedulesin-sched_line = lv_posmat.
wa_orderschedulesin-req_qty = lv_new_qty.
APPEND wa_orderschedulesin TO orderschedulesin.
wa_orderschedulesinx-itm_number = lv_posmat.
wa_orderschedulesinx-sched_line = lv_posmat.
wa_orderschedulesinx-req_qty = 'X'.
wa_orderschedulesinx-updateflag = 'X'.
APPEND wa_orderschedulesinx TO orderschedulesinx.
wa_orderconditionsin-itm_number = lv_posmat.
wa_orderconditionsin-cond_st_no = '001'.
wa_orderconditionsin-cond_type = 'ZDPD'. "'ZREG'.
wa_orderconditionsin-currency = 'INR'.
wa_orderconditionsin-conpricdat = sy-datum.
APPEND wa_orderconditionsin TO orderconditionsin.
wa_orderconditionsinx-itm_number = lv_posmat.
wa_orderconditionsinx-cond_st_no = '001'.
wa_orderconditionsinx-cond_type = 'ZDPD'. "'ZREG'.
wa_orderconditionsinx-updateflag = 'X'.
wa_orderconditionsinx-cond_value ='X'.
wa_orderconditionsinx-currency = 'X'.
APPEND wa_orderconditionsinx TO orderconditionsinx.
****18/06Beg
* if not lv_cal_dis is initial.
* lv_posmat = lv_posmat + 10.
* wa_ORDERITEMSIN-ITM_NUMBER = lv_posmat.
* wa_ORDERITEMSIN-MATERIAL = WA_SORD-MATMN. "i_matnr.
* wa_ORDERITEMSIN-TARGET_QTY = lv_cal_dis.
** wa_ORDERITEMSIN-TARGET_QU = i_VRKME.
* append wa_ORDERITEMSIN to ORDERITEMSIN.
* wa_ORDERITEMSINX-ITM_NUMBER = lv_posmat.
* wa_ORDERITEMSINX-MATERIAL = 'X'.
* wa_ORDERITEMSINX-TARGET_QTY = 'X'.
* wa_ORDERITEMSINX-TARGET_QU = 'X'.
* append wa_ORDERITEMSINX to ORDERITEMSINX.
* wa_ORDERSCHEDULESIN-ITM_NUMBER = lv_posmat.
* wa_ORDERSCHEDULESIN-SCHED_LINE = lv_posmat.
* wa_ORDERSCHEDULESIN-REQ_QTY = lv_cal_dis.
* append wa_ORDERSCHEDULESIN to ORDERSCHEDULESIN.
* wa_ORDERSCHEDULESINX-itm_number = lv_posmat.
* wa_ORDERSCHEDULESINX-sched_line = lv_posmat.
* wa_ORDERSCHEDULESINX-req_qty = 'X'.
* wa_ORDERSCHEDULESINX-updateflag = 'X'.
* append wa_ORDERSCHEDULESINX to ORDERSCHEDULESINX.
* endif.
* lv_posmat = lv_posmat + 10.
* wa_ORDERITEMSIN-ITM_NUMBER = lv_posmat.
* wa_ORDERITEMSIN-MATERIAL = i_matnr. "WA_SORD-MATMN.
* wa_ORDERITEMSIN-TARGET_QTY = LV_CAL_FOC.
* wa_ORDERITEMSIN-ITEM_CATEG = 'ZDGN'.
** wa_ORDERITEMSIN-TARGET_QU = i_VRKME.
* append wa_ORDERITEMSIN to ORDERITEMSIN.
* wa_ORDERITEMSINX-ITM_NUMBER = lv_posmat.
* wa_ORDERITEMSINX-MATERIAL = 'X'.
* wa_ORDERITEMSINX-TARGET_QTY = 'X'.
* wa_ORDERITEMSINX-TARGET_QU = 'X'.
* wa_ORDERITEMSINX-ITEM_CATEG = 'X'.
* append wa_ORDERITEMSINX to ORDERITEMSINX.
* wa_ORDERSCHEDULESIN-ITM_NUMBER = lv_posmat.
* wa_ORDERSCHEDULESIN-SCHED_LINE = lv_posmat.
* wa_ORDERSCHEDULESIN-REQ_QTY = LV_CAL_FOC.
* append wa_ORDERSCHEDULESIN to ORDERSCHEDULESIN.
* wa_ORDERSCHEDULESINX-itm_number = lv_posmat.
* wa_ORDERSCHEDULESINX-sched_line = lv_posmat.
* wa_ORDERSCHEDULESINX-req_qty = 'X'.
* wa_ORDERSCHEDULESINX-updateflag = 'X'.
* append wa_ORDERSCHEDULESINX to ORDERSCHEDULESINX.
****18/06End
* Item number end
* Switch off dialog (BAPIs always run without)
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
order_header_in = orderheaderin
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
* IMPORTING
* SALESDOCUMENT =
TABLES
return = return
order_items_in = orderitemsin
order_items_inx = orderitemsinx
order_partners = orderpartners
order_schedules_in = orderschedulesin
order_schedules_inx = orderschedulesinx
order_conditions_in = orderconditionsin
order_conditions_inx = orderconditionsinx
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
* commit work.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
LOOP AT return INTO wa_return.
WRITE:/ wa_return-message.
ENDLOOP.
ENDFUNCTION.
*& Include ZSD_SO_CHANGES2_TOP Module Pool ZSD_SO_CHANGES2
PROGRAM ZSD_SO_CHANGES2.
***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'ITEM_DATA'
*&SPWIZARD: DEFINITION OF DDIC-TABLE
TABLES: VBAP,kna1.
*&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'ITEM_DATA'
TYPES: BEGIN OF T_ITEM_DATA,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
KWMENG LIKE VBAP-KWMENG,
VRKME LIKE VBAP-VRKME,
END OF T_ITEM_DATA.
*&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'ITEM_DATA'
DATA: G_ITEM_DATA_ITAB TYPE T_ITEM_DATA OCCURS 0,
G_ITEM_DATA_WA TYPE T_ITEM_DATA. "work area
DATA: G_ITEM_DATA_COPIED. "copy flag
*&SPWIZARD: DECLARATION OF TABLECONTROL 'ITEM_DATA' ITSELF
CONTROLS: ITEM_DATA TYPE TABLEVIEW USING SCREEN 4000.
DATA:GV_NUM TYPE I VALUE 1,
GV_NUM2 TYPE I.
DATA: G_T_YREC_TAB_LINES LIKE SY-LOOPC.***********top*************
*& Include ZSD_SO_CHANGES2_TOP Module Pool ZSD_SO_CHANGES2
PROGRAM ZSD_SO_CHANGES2.
***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'ITEM_DATA'
*&SPWIZARD: DEFINITION OF DDIC-TABLE
TABLES: VBAP,kna1.
*&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'ITEM_DATA'
TYPES: BEGIN OF T_ITEM_DATA,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
KWMENG LIKE VBAP-KWMENG,
VRKME LIKE VBAP-VRKME,
END OF T_ITEM_DATA.
*&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'ITEM_DATA'
DATA: G_ITEM_DATA_ITAB TYPE T_ITEM_DATA OCCURS 0,
G_ITEM_DATA_WA TYPE T_ITEM_DATA. "work area
DATA: G_ITEM_DATA_COPIED. "copy flag
*&SPWIZARD: DECLARATION OF TABLECONTROL 'ITEM_DATA' ITSELF
CONTROLS: ITEM_DATA TYPE TABLEVIEW USING SCREEN 4000.
DATA:GV_NUM TYPE I VALUE 1,
GV_NUM2 TYPE I.
DATA: G_T_YREC_TAB_LINES LIKE SY-LOOPC.
************************pbo*******************
*& Include ZSD_SO_CHANGES2_PBO
*&SPWIZARD: OUTPUT MODULE FOR TC 'ITEM_DATA'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: COPY DDIC-TABLE TO ITAB
MODULE ITEM_DATA_INIT OUTPUT.
IF G_ITEM_DATA_COPIED IS INITIAL.
*&SPWIZARD: COPY DDIC-TABLE 'VBAP'
*&SPWIZARD: INTO INTERNAL TABLE 'g_ITEM_DATA_itab'
* SELECT * FROM VBAP
* INTO CORRESPONDING FIELDS
* OF TABLE G_ITEM_DATA_ITAB.
* G_ITEM_DATA_COPIED = 'X'.
REFRESH CONTROL 'ITEM_DATA' FROM SCREEN '4000'.
ENDIF.
ITEM_DATA-LINES = G_T_YREC_TAB_LINES + 15.
ENDMODULE.
*&SPWIZARD: OUTPUT MODULE FOR TC 'ITEM_DATA'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: MOVE ITAB TO DYNPRO
MODULE ITEM_DATA_MOVE OUTPUT.
MOVE-CORRESPONDING G_ITEM_DATA_WA TO VBAP.
ENDMODULE.
*& Module STATUS_4000 OUTPUT
* text
MODULE STATUS_4000 OUTPUT.
SET PF-STATUS 'APAR'.
* REFRESH G_ITEM_DATA_ITAB.
GV_NUM = 1.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_4000 OUTPUT -
I am having problem's with my button's showing up when I published the site.
Before I published the website you could see the button's images in the preview's, but soon as I published the website the button's where there, but the image weren't
this is my codeing
Please help it would be much appreciate
</style>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body,td,th {
color: #FFF;
#apDiv1 {
position:absolute;
width:526px;
height:431px;
z-index:1;
left: 930px;
top: 325px;
</style>
</head>
<body>
<div id="wrapper">
<div id="logo"><a href="index.html"><img src="wettrades logo1 .jpg" width="922" height="200" alt="wettrades logo" /></a><a href="open trade acccount.html"><img src="openaccount.jpg" width="395" height="201" alt="open account" /></a></div>
<div id="navigation"><img src="images /home button.jpg" width="266" height="117" alt="home button" /><img src="images /render 1 button.jpg" width="259" height="117" alt="render button" /><img src="images /adhesives & waterproofing.jpg" width="277" height="117" alt="adhesives & waterproofing " /><img src="images /tools button 1.jpg" width="263" height="116" alt="tool's button" /><img src="images /loaction button 1.jpg" width="255" height="116" alt="location button" /></div>I
All The Very Best
Entwisle1992Firstly, I do not understand why you are using an absolutely positioned div for your button.
And if you gave us an actual link to the website, we could see how the AP div actually does interact with your website.
But I do have a hunch:
Looks like you have positioned the button off the screen. If one has one's browser open to something like 900 pixels wide, your button will be 30 more pixels to the right of where the viewer's browser is. It will also be 325 pixels down from the top, which means it will be just below many headers.
With AP divs, often browsers won't show you scroll bars if you have positioned something off the page. -
How can i redirect to with one button to different pages!
Hi All,
For any application, for the first time,if a new table exists then there will no data in that table.
based on this scenerio,in my application,i am handling apex validation staying that "you have no data. Please click here to go Reset symbol page.
when it redirects to Reset symbol i am providing a text box and with a button. Once there enter a symbol and click on button it will inert in that table and again redirects to Home page for say-39.
simillarly what are the functionality available in home page i had implemented same thing but only it differs page no for say-115.
In both the scenerio's i will be redircting reset Symbol page where there can insert a symbol explained in above scenerio case.
My problem is when i am throwing the error msg from page-39 i am redirecting to Reset symbol and when there enter symbol and click on button again i will be redirection t page -39 because the error had came from page-39.
If the same error comes from page-115 then also i will redirecting to same Reset Symbol where there will be entering symbol and click on button, in this case it should redirect to page-115 instead of page-39 because i have got error from page-115 but not from page-39.
How to handle the above scenerio, please help me out.
Thanks in advance,
Anoo.Hi Andy,
Thanks for your suggestion, it is working fine..But i am facing one problem in page 115, i have two regions and both regiosn have same name but only difference is items names.. when i had tried to rediect to page-115 the umwanted one regions is showing instead of expected region. It is getting failed here bec it is rediecting to differnet region.
Any suggestion on this!
Thanks,
Anoo.. -
Problems with home button on iPhone 4
problems with home button on iphone 4
If its due to sensitivity issues, these self help guides might help.
http://www.youtube.com/watch?v=zNwr_mxgs9Q
http://www.youtube.com/watch?v=lSqPC1V0PPg&feature=related
By the way, alcohol based hand sanitisers work too.
Don't overapply it in one go though. You'll have to allow the alcohol to evaporate.
One final tip, after its dried, I'd recommend you to leave your iPhone's home button facing a laptop's vent just to bake it a little drier. -
Edge Animation having troubles with iOS devices within Muse Site
Hi All! I've been creating a mobile version of my website www.rinkdesigns.com and have it all complete. I created an animation/navigation bar within Adobe Edge Animate and imported it into Muse. It functions AMAZINGLY on my Nexus 4 (Android) in Chrome but on a buddies iPhone 5 Chrome only loads about 3/4 of the animation/nav bar, in Safari the animation does not load at all and half of the page background does not load either. Please check out the preview site here http://rinkdesignsmobile.businesscatalyst.com/phone
Has anyone else been having animation/mobile troubles with iOS devices? Any hints as to how you fixed your errors would be extremely helpful! I also posted this question in the Muse forum and haven't gotten a response...
Thanks,
JohnOr, how about this:
Does anyone know how to have Edge Animate objects that utilize "_top" in an open url trigger make the Muse site that they are a part of open a new window/tab with that action (as opposed to having it open the url in the current page, or using "_blank" in the trigger)? -
How can I switch to a different Nib file with a button
Hi there Im working on a Xcode application for IOS and I must admit im kinda new to Objective C. This specific application requires me to switch between different nib files. I am having quite a difficult time trying to figure this out on my own so some help would be appreciated. I have got the button linked with an
- (IBAction) but i can't quite get the coding to get the buttton to open the next application or nib file.
Thanks ~Cal~What i want is that it opens an application menu with several buttons, and then you press one and it opens a new window full of buttons
and i want it to be a mac osx app:) -
1 My questions are about viewing and managing photos from a folder.
a. How do i view photos in macbook pro - i know the space bar thingy but does not help my purpose?
b. While viewing how can i delete the unwanted photos with delete button?
c. How can i increase the size of the photos that i am seeing in the form of icons?double clicking in iPhoto will open the photo.
The left and right arrow key will move between photos, as well as swiping on a trackpad or Apple mouse.
See >System Preference>Trackpad or mouse for options and tut
While selected or in the smaller icon view hitting the Delete key will delete the pic.
Command Z will undo the last action taken.
Periodically you have to empty the iPhoto trash. iPhoto drop down menu>empty trash
Same applies for viewing pics in a Folder NOT in iphoto, Use the up and down arrows does not work in Preview, but as you know in QuickLook (spacebar) the up and down arrows will navigate. -
How do I move a table with radio buttons to another page?
I created a document in Word, converted to PDF, added a page (which was created in Adobe Forms Central, only way to get a table with radio buttons - see below for example).
The issue I have is whilst using the Trial of Adobe XI Pro I was able to move this table up a page and place it under the header. Now that the trial has run out I cannot complete this task with other documents.
I started to edit using LiveCycle but it won't let me move the table.
We have Acrobat X Pro but when I go to edit, it directs me to edit in LiveCycle. I have tried moving the table using all of these programs. Can anyone help/guide please?Thank you for your reply. I am new to editing a pdf and using these programs. I have subscribed to Acrobat XI Pro. When I try to edit the document it directs me to LiveCycle. I cannot move the table in LiveCycle. It won't let me, and I cannot make changes in XI Pro as I did in the trial as it directs me to edit in LiveCycle. Am going in circles.
Maybe you are looking for
-
How to export internal table and pass the internal table to another screen?
Hi, I have a sql SELECT statement that select data from table into internal table. I would like to export out the internal table and pass to another screen and display the data in ALV list. How to export it out? I try but the error given was " The ty
-
File to idoc scenario (split message)
hello everybody i have a file (xml) -> XI -> Idoc scenario sometimes idoc message is so much big and i have problem to process it. so i would like split message in more idoc but i need decide a cut-point example in file i have 200 row and i don't wan
-
Java SP Stack compatability across multiple component systems
I was wondering if there was a 'best practice' or 'guide' or 'other information' on how to insure the compatibility of Java stacks running varying components that either interact with each other and with backend SAP systems. What we have are multiple
-
Help with Help. Launches Wrong Browser
When I search Illustrator's help, it launches my Opera browser. I've only installed Opera for testing web designs. I don't like it. It's not my default browser. How can I make Illustrator launch my default browser, or how can I specify a browser
-
I just want to know how to get rid of a toolbar that doesn't seen to have a disable function.