A library program for negative exponents.
Ok im looking to create a program that can take a number and take that number to a negative exponent. such as this
2^(-2) = .25 this is what i would like to accomplish. heres what i have.
public static double power(double base, double expo)
//return 0 if either is negative
double result=1.0;
if (expo<0.0)
expo*=-1.0;
for(double x=expo;x>0.0;x--)
result=result*base;
result=1.0/result;
System.out.println(result);
//compute the power function
if(base<0.0)
{ for(double x=expo;x>0.0;x--)
{ result=(result)*(base);
System.out.println(result);
else
for(double x=expo;x>0.0;x--)
result=result*base;
System.out.println(result);
//return -1 if it gets too big
double almostToBig = 2147483647.0/base;
if(result > almostToBig)
return -1.0;
return result;
ive fooled around with the neg expo part a ton. That wasnt my best code but ive tried every combination i can think of to get it to work. Please let me know what i need to do.
Ummm, are you going to call this program ReinventTheWheel? Because there's already a java.lang.Math.pow(double, double) method built-in.
Similar Messages
-
How to make a new library visible for programs
I have made dietlibc package at the Arch section of Linux Vserver wiki Now the new version of util-vserver is out and I got problems - util-vserver can't find dietlibc anymore.
How could I make that library visible for util-vserver? util-vserver's configure only has option --disable-dietlibc and there is no possibility to give the location. This far I have tried to add the path to $PATH at .bashrc - but still configure does not find the library.No problem anymore with vserver, I managed to guess what must be the location for dietlibc that works. Perhaps this problem was because util-vserver assumed /usr/lib/diet to be the location and also /usr/lib/diet/bin to be at $PATH.
-
Sample program for Time Sheet: Print Times report ( template RCATSP01)
Hi Guys,
I have to create a program to print the timesheets in CATS. I will appreciate if somebody can share the program for this report.
Template RCATSP01 is not very clear.
Thanks for you help.
mini
Moderator message - Please ask a specific question, but don't just post your requirements and ask the forum to do your work for you - post locked
Edited by: Rob Burbank on Jan 20, 2010 9:54 AMHi,
May be this link this be helpful...
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/how%20to%20troubleshoot%20the%20render%20exception.pdf
Regards,
<i><b>Raja Sekhar</b></i> -
when i open my i3tunes on my computer i get an error message telling me that iTunes has stopped working..the message is as follows...Microsoft Visual C runtime library Program C:\program files (86) iTunes\iTunes.exe R6025 -Pure virtual function call.. How do i fix this
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
tt2 -
Hello everyone, Very recently itunes on my windows computer does not let me access any items in my Library except for "Apps" and "Ringtones". When I click on any other items it flashes the redcircle meaning forbidden".
When I connect my iPhone or iPad I can see every items on them but not on the iTunes Library.
They sync fine with iTunes.
I browse all the menus in iTunes but cannot find any clues to what I have done for it to happen. It worked fine previously.
Thanks for any suggestion.You should really read the manual.
"How do you restore from backup? "
Restore. When given the choice, choose to use backup.
"And how can I check to see if the pics and videos are on my computer somewhere first??"
They would only be where you put them. What program did you use to import them? Pics/vids taken with ipod are not part of the sync process at all. You should be importing them just as you would with any digital camera.
If you did not import them, then they are not on your computer. -
Lost iphoto library/program
When I tried to activate my iphoto app today I got a msg box asking what photo library I wanted to use. I can't seem to move from that and the Iphoto menu bar is pretty much greyed out. No matter what I do I can't find my library/program which always opened automatically when I clicked on the icon. I put in a camera memory chip to try seeing if I could activate that way. Same result. I use the program almost daily and have about 7K photos stored. Hope someone can help me...please.
Option 1
Back Up and try rebuild the library: hold down the apple and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Option 2
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
Regards
TD -
Best Drum program for logic???
HI need help..which is the better drum program.for a non drummer..Idrum..ezdrummer..or bfd?...what i intend on using it for is for making my own beats..i need to know if these r loop sampled software or can i make my own beats...thank u..any and all information on these items is great apprecated!!!
Ok, there;s two factors here. Drum sounds, and programming environment.
In my view, you already have Logic, which offers a superb drum programming environment from the start. I have a screenset with the hyper editor, event editor, event float and various other bits on there, and I can do very sophisticated drum programming/editing there.
Now, if you want a simpler approach to programming drums, more "drum machiney", then you want to use a grid-type approach. Here, you can either use Logic's matrix or hyper editors, or you can use the step sequencer within Ultrabeat, using acoustic drum sounds. You can do as sophisticated feel-type stuff here (you won't be convincing anyone you're using a real drummer!) but it's easier to work with patterns - you can always drag them to the arrange and work on them some more using Logic's more sophisticated tools.
So - drum sounds. There are quite a lot of freebie good acoustic drum multisamples on the net - look out for NS Kit, the GSCW kit and the Bulldawg kits in particular.
So, you can do all you want, without spending money at all.
If you absolutely do want to get a new toy, then you mostly have a choice between drum "instruments", that have great sounds, but expect you to be playing/programming them with your host, and so don't really offer programming facilties (DKFHS, BFD, Stylus type things), or the more "virtual drum machine" type things like iDrum, Guru, Battery etc.
Without knowing your working preferences, or exactly what you want, it's difficult to make a recommendation, but I would say you should start of with the tools you already have in Logic Pro, because you might find they suit you pefectly.
Sometimes buying a new toy does make life easier, but often it's just an excuse (if I buy this, I'll be able to finally make the super-dope beats I have difficult doing now).
Buying new stuff doesn't bypass the need to develop your musical skills (I wish that it did!
As a coda, I'll just mention that Stylus RMX rocks hard, with the acoustic expanders and new Orleans benefit library.
The EXS24 and a few drum sample libraries, and freebie net samples and a bit of work will give you much of what DKFHS & BFD give you, albeit in not as convenient a package. I loved the first DKFH, haven't heard the new ones, but I liked the character of their samples.
I heard the first version of BFD and I thought it was fairly bland in character, it didn't immediately appeal to me, although they have a ton of addons for it now, so I'm sure there's stuff in there I'd think were superb - it certainly has a good reputation.
But none of those, despite sounding potentially great, will give you drummer like beats if you don't know how to play/program drummer like beats (or you take the existing patterns/loops that some of those instrument contain and use/edit those), so I'd hate for you to be dissapointed.
Did I say that Stylus RMX rocks hard? Good. -
Paymont form via fpl9 for negative amount
Hi,
our customer wants to generate a payment form also when the account balance of the customer is negative.
however, I'm getting an error message that:
Creation of payment form not possible, amount is negative
Message no. >6397
Thanks,
VeredHi Vered,
If I'm not mistaken (and I don't think I am ), that message comes from Function module FKK_SAMPLE_0756 - "FI-CA Correspondence - Sample Module for Payment Form Request".
To override this bit of SAP standard logic, to the very least you'd have to program and assign in FQEVENTS own function module (without the check on negative Amount) to FI-CA Event 0756. We don't have payment forms for negative amounts in our system, but I believe it's doable - the rest of standard logic should function OK with negative payment amount.
cheers,
Janis -
Make lightroom default program for raw files
I purchased Lightroom 5 after a trial version expired. (I believe the version was 5.2, not sure.) I got the actual DVD with the activation code on the box.
Current OS is Windows 7.
At first I ran the updates from the internet (had a bit of trouble with the DVD opening) and it loaded version 5.5, and I used the activation code. Everything went well, but when I try to open a raw file (Sony/.arw extension), it doesn't give me the option to use Lightroom as the default program for this action. It doesn't show the program at all, and when I go into browse and select it, it still won't come up.
So, I uninstalled everything, rebooted etc, then loaded up the DVD and got the DVD to work this time. Again, I think the version came up 5.2. Went to assign .arw files to Lightroom, and - no problem whatsoever. Lightroom showed up as a program, like it hadn't before. I then ran the update again to 5.5, and I'm running into the exact same thing, where I can't set LR as the default program. Possibly the registry is not right? It's just no longer seeing Lightroom as a program in the "Open With" option (when I reinstalled, it wiped out the 'open with LR' I had attached to the files.) I can open up Lightroom itself just fine, but I can't just click on a raw file and have it open.
Any ideas on how to fix this, and why the earlier version was okay, but the update wiped out the 'open with' option?
Thanks,
CarmenIt is common misconception that LR should open images.
What happens is that LR opens LR catalogs, not images. Images are imported after LR has started up. You can double-click on a LR Catalog, an .lrcat, file, or you can drag-and-drop a LR catalog file onto the LR icon, and either will cause LR to open, but that is all. If you ever opened an image with LR it would hang and be difficult to fix.
I think maybe LR 1.x would automatically import images if you dragged them to it, but that was shut down several versions ago.
LR can also be set to open when you insert a memory card, via a checkbox in preferences.
You can also open LR via a shortcut, and then drag-and-drop a folder onto the main image area in Library mode and that'll initiate an import. This is actually what I do for every import. -
Today I tried to use my Photoshop Elements 10 editor, the main screen launched but the following error message appeared and the application stopped functioning:
"Microsoft Visual C Runtime Library Program C:\Program Files (x... This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
Should I reinstall my software?
Where can I consult the step by step re-install process?
I have Windows 7 64 bits operating system.
The organizer is working fine.
This is the Application Error information taken from the Windows 7 administrative tools
Nombre de la aplicación con errores: PhotoshopElementsEditor.exe, versión: 10.0.0.0, marca de tiempo: 0x4e70c16d
Nombre del módulo con errores: AXEDOMCore.dll, versión: 3.3.402.1, marca de tiempo: 0x45f081f6
Código de excepción: 0x40000015
Desplazamiento de errores: 0x0005d9b1
Id. del proceso con errores: 0xa70
Hora de inicio de la aplicación con errores: 0x01d029aba00bc6c5
Ruta de acceso de la aplicación con errores: C:\Program Files (x86)\Adobe\Photoshop Elements 10\PhotoshopElementsEditor.exe
Ruta de acceso del módulo con errores: C:\Program Files (x86)\Adobe\Photoshop Elements 10\AXEDOMCore.dll
Id. del informe: eb0bfb92-959e-11e4-8e37-14feb5b08bab
Message was edited by: VICTORIA BATRES
Message was edited by: VICTORIA BATRESRe-installation was required to be done according to Technical Service chat.
-
DIFF. BETN . ME97 & WRITE OFF PROGRAM FOR PR
WHAT IS THE DIFF BETN THE ME97 & WRITE OFF PROGRAM FOR PR RM06BW47
Hi Dieu,
I must admit that is a great achievement of SAP that ABAP has such a great upward compatibility.
But we all are still not too old to make some personal progress.
Try using new concepts as they are
- much easier to handle
- safe for future changes like i.e. web intergration
- the best way to create better software that may be maintained by someone except yourself
If you have some time to spare, have a look at
[e-learning|https://www.sdn.sap.com/irj/scn/abap-elearning]
especially this fantastic contribution about the current way of sending mail.
[BCS business communication|https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/c093d4e1-8264-2c10-c1bb-8b9535a2c99e]
Just give it a try to give your colleagues the impression you won't stay behind.
Regards,
Clemens -
Color for negative Values in ALV Report
I want to change the color for negative values displayed in ALV list diplay report. Eg. -5 in Quantity should be changed to orange. Kindly help me
ThanksCheck the below program and bold one are important ( which is similar to MD05 Traffic lights )
REPORT ZWM_BIN_STOCK_REQ no standard page heading
message-id zwave.
D A T A D E C L A R A T I O N ****************************
Tables
tables :zpwvbap,
mara,
marc,
makt,
vbap,
zshift,
marm,
lqua.
TYPE-POOLS: SLIS.
Internal Table for Sales order
data : begin of i_vbap occurs 0,
matnr like zpwvbap-matnr," Material #
ZZCUTOFF like zpwvbak-ZZCUTOFF," Cutoff Time
vlpla like zpwvbap-vlpla,
kwmeng like zpwvbap-kwmeng," Quantity
vrkme like zpwvbap-vrkme, " Sales Unit
meins like zpwvbap-meins, " Unit of measure
end of i_vbap.
Internal Table for final Processing
data : begin of i_final occurs 0,
date(8) type c,
matnr like zpwvbap-matnr," Material #
zzshift like zshift-zzshift, " Wave Drop
maktx like makt-maktx," Desc
lgpla like lagp-lgpla, " Pick Bin
pverme like lqua-verme," Stock at Pick Bin
prverme like lqua-verme," Stock at Prod Bin
kwmeng like zpwvbap-kwmeng," Requiremnet from Wave Drop
vrkme like zpwvbap-vrkme, " Sales Unit
meins like zpwvbap-meins," Unit of measure
end of i_final.
Internal Table for Output
data : begin of i_output occurs 0,
<b> field type c, " Traffic Lights</b>
zzshift like zshift-zzshift, " Wave Drop
matnr like zpwvbap-matnr," Material #
maktx like makt-maktx," Desc
lgpla like lagp-lgpla, " Pick Bin
pverme like lqua-verme," Stock at Pick Bin
prverme like lqua-verme," Stock at Prod Bin
kwmeng like zpwvbap-kwmeng," Requiremnet from Wave Drop
vrkme like zpwvbap-vrkme," Sales Unit
meins like zpwvbap-meins," Unit of measure
diff like zpwvbap-kwmeng, " Diffrence
end of i_output.
Work Area for Final Internal Table
data wa_final like i_final.
data : w_zzcutoff(12) TYPE c,
v_date type sy-datum,
v_time(4) type c,
v_fldate(12) type c,
v_fhdate(12) type c,
v_pverme like lqua-verme,
v_prverme like lqua-verme,
v_diff like zpwvbap-kwmeng.
Variables for new check box
data : v_nverme like lqua-verme.
Internal Table for Pick Bin
data : begin of i_verme occurs 0,
verme like lqua-verme,
end of i_verme.
Internal table for Prod Bin
data : begin of i_pverme occurs 0,
verme like lqua-verme,
end of i_pverme.
Variables for ALV
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_LN LIKE LINE OF FIELDCAT,
SORTCAT TYPE SLIS_T_SORTINFO_ALV,
SORTCAT_LN LIKE LINE OF SORTCAT,
EVENTCAT TYPE SLIS_T_EVENT,
EVENTCAT_LN LIKE LINE OF EVENTCAT,
LAYOUT TYPE SLIS_LAYOUT_ALV,
C_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: COL_POS TYPE I,
P_LIGNAM TYPE SLIS_FIELDNAME VALUE 'FIELD'.
DATA : V_REPID LIKE SY-REPID,
flag type c.
S E L E C T I O N - S C R E E N *************************
selection-screen : begin of block blk with frame title text-001.
parameter : p_plant like marc-werks obligatory default '1000'.
select-options : s_date for sy-datum obligatory ,
s_shift for zshift-zzshift,
s_matnr for mara-matnr,
s_dept for zpwvbap-zzdept,
s_pdept for marc-ZZPRODDEPT.
selection-screen: end of block blk.
parameters : p_check as checkbox ."default 'X'.
ranges r_cutoff for w_zzcutoff.
I N I T I A L I Z A T I O N ****************************
initialization.
V_REPID = SY-REPID.
s_date-low = sy-datum + 1.
append s_date.
S T A R T - O F - S E L E C T I O N ***********************
start-of-selection.
Get the Shift Data.
PERFORM GET_SHIFT_DETAILS.
Get the data from ZPWVBAP Table
PERFORM GET_DATA_VBAP.
E N D - O F - S E L E C T I O N **********************
end-of-selection.
if not i_output[] is initial.
sort i_output by field zzshift matnr.
Reset the all Fiedcatlog.
PERFORM RESETVALUES.
Traffic Lights
PERFORM BUILD_LAYOUT.
Fill the fieldcatlog values
PERFORM FILL_FIELDCATLOG.
Call the List Function module
PERFORM CALL_lIST.
endif.
*& Form GET_SHIFT_DETAILS
Get the Cutoff Time.
FORM GET_SHIFT_DETAILS.
clear : v_fldate,
v_fhdate.
if not s_shift-low is initial.
clear: v_time,
v_date.
if s_shift-low = '1'.
v_time = '2000'.
elseif s_shift-low = '2'.
v_time = '2300'.
endif.
v_date = s_date-low - 1.
concatenate v_date v_time into v_fldate.
endif.
if not s_shift-high is initial.
clear : v_date,
v_time.
if s_shift-high = '1'.
v_time = '2000'.
elseif s_shift-high = '2'.
v_time = '2300'.
endif.
if not s_date-high is initial.
v_date = s_date-high - 1.
else.
v_date = s_date-low - 1.
endif.
concatenate v_date v_time into v_fhdate.
endif.
if not v_fhdate is initial.
r_cutoff-low = v_fldate.
r_cutoff-high = v_fhdate.
r_cutoff-sign = 'I'.
r_cutoff-option = 'BT'.
append r_cutoff.
endif.
ENDFORM. " GET_SHIFT_DETAILS
*& Form GET_DATA_VBAP
Get the data from ZPWVBAP Table
FORM GET_DATA_VBAP.
Get the data from ZPWVBAP and ZPWVBAK Table
if not v_fhdate is initial.
select matnr ZZCUTOFF vlpla sum( kwmeng ) vrkme meins
into table i_vbap
from zpwvbap as a inner join zpwvbak as b on
a~vbeln = b~vbeln
where a~werks = p_plant
and a~matnr in s_matnr
and b~vdatu in s_date
and a~zzdept in s_dept
and b~zzcutoff in r_cutoff
group by matnr zzcutoff vlpla vrkme meins.
elseif not v_fldate is initial.
select matnr ZZCUTOFF vlpla sum( kwmeng ) vrkme meins
into table i_vbap
from zpwvbap as a inner join zpwvbak as b on
a~vbeln = b~vbeln
where a~werks = p_plant
and a~matnr in s_matnr
and b~vdatu in s_date
and a~zzdept in s_dept
and b~zzcutoff = v_fldate
group by matnr zzcutoff vlpla vrkme meins.
else.
select matnr ZZCUTOFF vlpla sum( kwmeng ) vrkme meins
into table i_vbap
from zpwvbap as a inner join zpwvbak as b on
a~vbeln = b~vbeln
where a~werks = p_plant
and a~matnr in s_matnr
and b~vdatu in s_date
and a~zzdept in s_dept
and b~zzcutoff in r_cutoff
group by matnr zzcutoff vlpla vrkme meins .
endif.
if sy-subrc ne 0.
message i000(zwave) with 'No data found for given selection'.
stop.
endif.
sort i_vbap by zzcutoff matnr.
loop at i_vbap.
clear : v_pverme,
v_prverme.
Compare the data with pick method
select single zzpick from marc into marc-zzpick
where matnr = i_vbap-matnr
and werks = p_plant
and zzpick = '01'.
if sy-subrc ne 0.
continue.
endif.
Compare the data from MARC Table with Production Department
select single zzPRODdept from marc into marc-zzPRODdept
where matnr = i_vbap-matnr
and werks = p_plant
and zzPRODdept in s_pdept.
if sy-subrc ne 0.
continue.
endif.
Get the Material Description from MAKT Table
Select single maktx from makt into makt-maktx
where matnr = i_vbap-matnr
and spras = 'E'.
if sy-subrc eq 0.
i_final-maktx = makt-maktx.
endif.
Get the Pick Bin
i_final-lgpla = i_vbap-vlpla.
refresh i_verme.
clear i_verme.
Get the stock at Pick bin
select verme from lqua into table i_verme
where lgpla = i_vbap-vlpla
and matnr = i_vbap-matnr
and LGNUM = '100'.
if sy-subrc eq 0.
loop at i_verme.
v_pverme = v_pverme + i_verme-verme.
endloop.
if sy-subrc eq 0.
i_final-pverme = v_pverme.
endif.
endif.
refresh i_pverme.
clear i_pverme.
Get the stock at Production bin
select verme from lqua into table i_pverme
where matnr = i_vbap-matnr
and LGNUM = '100'
and ( lgpla = '9595959595' or
lgpla = '2222222222' or
lgpla = '5555555555' or
lgpla = '3232323232' or
lgpla = '8080808080' or
lgpla = '4040404040' or
lgpla = '9090909090' ).
if sy-subrc eq 0.
loop at i_pverme.
v_prverme = v_prverme + i_pverme-verme.
endloop.
if sy-subrc eq 0.
i_final-prverme = v_prverme.
endif.
endif.
Compare the unit of measure and sales unit
if i_vbap-vrkme ne i_vbap-meins.
Get the data from MARM Table ( Unit of measure )
select single * from marm into marm
where matnr = i_vbap-matnr
and meinh = i_vbap-vrkme.
if sy-subrc eq 0.
i_final-pverme = ( i_final-pverme * marm-umren ) / marm-umrez.
endif.
endif.
Material #
i_final-matnr = i_vbap-matnr.
Quantity from ZPWVBAP
i_final-kwmeng = i_vbap-kwmeng.
Unit of Measure
i_final-meins = i_vbap-meins.
Sales Unit
i_final-vrkme = i_vbap-vrkme.
Wave Drop
if i_vbap-ZZCUTOFF+8(4) = '2000' .
i_final-zzshift = '1'.
endif.
if i_vbap-zzcutoff+8(4) = '2300'.
i_final-zzshift = '2'.
endif.
i_final-date = i_vbap-zzcutoff+0(8).
append i_final.
clear : i_final,
i_vbap.
**Difference
i_output-diff = i_output-pverme - i_vbap-kwmeng.
Traffic Lights Depends on value
if i_output-pverme > i_output-kwmeng.
i_output-field = '3'.
elseif i_output-pverme < i_output-kwmeng.
i_output-field = '1'.
elseif i_output-pverme = i_output-kwmeng.
i_output-field = '2'.
endif.
append i_output.
clear : i_output,
i_vbap.
endloop.
refresh i_vbap.
sort i_final by date matnr zzshift.
Processing the internal table to get same material with pick quantity
deduction even it for 2nd shift
loop at i_final.
Move the data into work area in order remove #
move i_final to wa_final.
clear : flag.
at new matnr.
move : wa_final-matnr to i_output-matnr," Material #
wa_final-maktx to i_output-maktx," Desc
wa_final-lgpla to i_output-lgpla," Pick Bin
wa_final-kwmeng to i_output-kwmeng," Order qty
wa_final-zzshift to i_output-zzshift," Shift
wa_final-pverme to i_output-pverme, " Pick bin qty
wa_final-vrkme to i_output-vrkme," Sales Unit
wa_final-prverme to i_output-prverme. " Prod Bin Qty
Difference
i_output-diff = i_output-pverme - i_output-kwmeng.
New logic for Only HMR Department
<b> if p_check = 'X'.
if i_output-pverme < i_output-kwmeng.
v_nverme = i_output-pverme + i_output-prverme.
if v_nverme > i_output-kwmeng.
if i_output-pverme < i_output-kwmeng.
i_output-field = '2'.
else.
Traffic Lights Depends on value
i_output-field = '3'.
endif.
elseif v_nverme < i_output-kwmeng.
i_output-field = '1'.
elseif v_nverme = i_output-kwmeng.
i_output-field = '2'.
endif.
elseif i_output-pverme > i_output-kwmeng.
i_output-field = '3'.
elseif i_output-pverme = i_output-kwmeng.
i_output-field = '3'.
endif.
else.
Traffic Lights Depends on value
if i_output-pverme > i_output-kwmeng.
i_output-field = '3'.
elseif i_output-pverme < i_output-kwmeng.
i_output-field = '1'.
elseif i_output-pverme = i_output-kwmeng.
i_output-field = '2'.
endif.
endif.
move i_output-diff to v_diff.
flag = 'X'.
endat.</b>
if flag ne 'X'.
move : wa_final-matnr to i_output-matnr," Material #
wa_final-maktx to i_output-maktx," Desc
wa_final-lgpla to i_output-lgpla," Pick Bin
wa_final-kwmeng to i_output-kwmeng," Order qty
wa_final-zzshift to i_output-zzshift," Shift
wa_final-vrkme to i_output-vrkme," Sales Unit
wa_final-prverme to i_output-prverme. " Prod Bin Qty
Move Diffrence value
move v_diff to i_output-pverme.
clear: v_diff.
New logic for Only HMR Department
New logic for Only HMR Department
if p_check = 'X'.
if i_output-pverme < i_output-kwmeng.
v_nverme = i_output-pverme + i_output-prverme.
if v_nverme > i_output-kwmeng.
if i_output-pverme < i_output-kwmeng.
i_output-field = '2'.
else.
Traffic Lights Depends on value
i_output-field = '3'.
endif.
Traffic Lights Depends on value
i_output-field = '3'.
elseif v_nverme < i_output-kwmeng.
i_output-field = '1'.
elseif v_nverme = i_output-kwmeng.
i_output-field = '2'.
endif.
elseif i_output-pverme > i_output-kwmeng.
i_output-field = '3'.
elseif i_output-pverme = i_output-kwmeng.
i_output-field = '3'.
endif.
i_output-diff = i_output-pverme - i_output-kwmeng.
else.
Difference
i_output-diff = i_output-pverme - i_output-kwmeng.
Traffic Lights Depends on value
if i_output-pverme > i_output-kwmeng.
i_output-field = '3'.
elseif i_output-pverme < i_output-kwmeng.
i_output-field = '1'.
elseif i_output-pverme = i_output-kwmeng.
i_output-field = '2'.
endif.
endif.
endif.
append i_output.
clear : i_output,
wa_final,
i_final,
v_nverme.
endloop.
sort i_output by field zzshift matnr.
ENDFORM. " GET_DATA_VBAP
*& Form RESETVALUES
Reset the all fieldcatlogs
FORM RESETVALUES.
FIELDCAT_LN-KEY = SPACE.
FIELDCAT_LN-DO_SUM = SPACE.
FIELDCAT_LN-NO_OUT = SPACE.
FIELDCAT_LN-QFIELDNAME = SPACE.
FIELDCAT_LN-HOTSPOT = SPACE.
FIELDCAT_LN-OUTPUTLEN = '0'.
CLEAR: fieldcat_ln-seltext_l, fieldcat_ln-seltext_m,
fieldcat_ln-seltext_s, fieldcat_ln-reptext_ddic.
ENDFORM. " RESETVALUES
*& Form FILL_FIELDCATLOG
Fill the Fieldcatlog values
FORM FILL_FIELDCATLOG.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
Trafiic Light
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'FIELD'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 7.
LS_FIELDCAT-col_pos = '1'.
ls_fieldcat-seltext_L = 'Lights'.
ls_fieldcat-seltext_s = 'Lights'.
ls_fieldcat-seltext_m = 'Lights'.
APPEND LS_FIELDCAT TO FIELDCAT.
Wave Drop
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'ZZSHIFT'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 9.
LS_FIELDCAT-col_pos = '2'.
ls_fieldcat-seltext_L = 'Wave Drop'.
APPEND LS_FIELDCAT TO FIELDCAT.
Material
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-ref_fieldname = 'MATNR'.
LS_FIELDCAT-ref_tabname = 'MARA'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 18.
LS_FIELDCAT-col_pos = '3'.
ls_fieldcat-seltext_L = 'Material'.
APPEND LS_FIELDCAT TO FIELDCAT.
Description
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MAKTX'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 40.
LS_FIELDCAT-col_pos = '4'.
ls_fieldcat-seltext_L = 'Description'.
APPEND LS_FIELDCAT TO FIELDCAT.
Pick Bin
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'LGPLA'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 15.
LS_FIELDCAT-col_pos = '5'.
ls_fieldcat-seltext_L = 'Pick Bin'.
APPEND LS_FIELDCAT TO FIELDCAT.
Trafiic Light
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'PVERME'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 16.
LS_FIELDCAT-col_pos = '6'.
ls_fieldcat-seltext_L = 'Stock at Pick Bin'.
APPEND LS_FIELDCAT TO FIELDCAT.
Stock at Prod Bin
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'PRVERME'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 16.
LS_FIELDCAT-col_pos = '7'.
ls_fieldcat-seltext_L = 'Stock at Prod Bin'.
APPEND LS_FIELDCAT TO FIELDCAT.
Req from wave drop
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'KWMENG'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 23.
LS_FIELDCAT-col_pos = '8'.
ls_fieldcat-seltext_L = 'Requirement from Wave Drop'.
APPEND LS_FIELDCAT TO FIELDCAT.
Sales Unit
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'VRKME'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 12.
LS_FIELDCAT-col_pos = '9'.
ls_fieldcat-seltext_L = 'Sales Unit'.
APPEND LS_FIELDCAT TO FIELDCAT.
Unit of Measure
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MEINS'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 9.
LS_FIELDCAT-col_pos = '10'.
ls_fieldcat-seltext_L = 'UNIT'.
ls_fieldcat-no_out = 'X'.
APPEND LS_FIELDCAT TO FIELDCAT.
Diffference
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'DIFF'.
LS_FIELDCAT-TABNAME = 'I_OUTPUT'.
LS_FIELDCAT-OUTPUTLEN = 12.
LS_FIELDCAT-col_pos = '11'.
ls_fieldcat-seltext_L = 'Difference'.
APPEND LS_FIELDCAT TO FIELDCAT.
ENDFORM. " FILL_FIELDCATLOG
*& Form CALL_lIST
Use ALV Function module to display output
FORM CALL_lIST.
Top - of - Page
PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = g_user_command
I_CALLBACK_TOP_OF_PAGE = C_TOP_OF_PAGE
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = I_OUTPUT
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " CALL_lIST
*& Form BUILD_LAYOUT
text
FORM BUILD_LAYOUT.
LAYOUT-GET_SELINFOS = 'X'.
Now we want a traffic light to say if the Truck is deleted
the variable p_lignam contains the name in IREPO which stores the
value for the traffic light
LAYOUT-LIGHTS_FIELDNAME = P_LIGNAM.
layout-HEADER_TEXT = 'Lights'.
LAYOUT-LIGHTS_CONDENSE = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form COMMENT_BUILD
text
-->P_GT_LIST_TOP_OF_PAGE[] text
FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
SLIS_T_LISTHEADER.
data : v_day(2) type c,
v_mon(2) type c,
v_year(4) type c,
v_ldate(10) type c,
v_hdate(10) type c.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
data: d_date like sy-datum.
clear : v_ldate,
v_hdate.
Header Information.
LIST HEADING LINE: TYPE H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: NOT USED FOR THIS TYPE
LS_LINE-INFO = 'Bin Replenishment report for HMR'.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
STATUS LINE: TYPE S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-003.
LS_LINE-INFO = TEXT-003.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
STATUS LINE: TYPE S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-003.
LS_LINE-INFO = TEXT-003.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
Get the data ( s_date_low) into proper format.
v_year = s_date-low+0(4).
v_mon = s_date-low+4(2).
v_day = s_date-low+6(2).
concatenate v_mon '/' v_day '/' v_year into v_ldate.
clear : v_mon,
v_year,
v_day.
Get the data ( s_date_high) into proper format.
v_year = s_date-high+0(4).
v_mon = s_date-high+4(2).
v_day = s_date-high+6(2).
concatenate v_mon '/' v_day '/' v_year into v_hdate.
clear : v_mon,
v_year,
v_day.
Delivery date
if not s_date-low is initial .
if not s_date-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Delivery date From:'.
LS_LINE-INFO = v_ldate.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Delivery date To :'.
LS_LINE-INFO = v_hdate.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
if not s_date-low is initial.
if s_date-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Delivery date :'.
LS_LINE-INFO = v_ldate.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
Wave Drop
if not S_SHIFT-LOW is initial.
if not S_SHIFT-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Wave Drop From :'.
LS_LINE-INFO = s_shift-low.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Wave Drop to :'.
LS_LINE-INFO = s_shift-high.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
if not S_SHIFT-LOW is initial.
if S_SHIFT-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Wave Drop :'.
LS_LINE-INFO = s_shift-low.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Wave Drop to :'.
LS_LINE-INFO = s_shift-high.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
Department
if not s_dept-low is initial .
if not s_dept-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Department From :'.
LS_LINE-INFO = s_dept-low.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Department to :'.
LS_LINE-INFO = s_dept-high.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
if not s_dept-low is initial .
if s_dept-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Department :'.
LS_LINE-INFO = s_dept-low.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
Production Department
if not S_PDEPT-LOW is initial.
if not S_PDEPT-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Production Department From :'.
LS_LINE-INFO = S_PDEPT-LOW.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Production Department to :'.
LS_LINE-INFO = S_PDEPT-high.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
if not S_PDEPT-LOW is initial.
if S_PDEPT-high is initial.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Production Department :'.
LS_LINE-INFO = S_PDEPT-LOW.
APPEND LS_LINE TO LT_TOP_OF_PAGE.
endif.
endif.
ENDFORM. " COMMENT_BUILD
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM.
FORM USER_COMMAND *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
CASE R_UCOMM.
WHEN '&IC1'.
read table i_output index rs_selfield-tabindex.
SET PARAMETER ID 'MAT' FIELD i_output-matnr.
SET PARAMETER ID 'WRK' FIELD p_plant.
if not i_output-matnr is initial.
call transaction 'MD04' and skip first screen.
endif.
ENDCASE.
ENDFORM.
the above code i mentioned 1,2 ,3 values ,1 will have green color,2 will have yellow color,3 will have red color.
Thanks
Seshu -
Need a perfect example program for ALV GRID LIST
first hi to all,i am new to this community.i am still in learning process of SAP.one of my friend suggeted this community and i think this is the perfect place to learn and excel my skill in SAP.so my requirement is a perfect example program for ALV GRID LIST DISPLAY.while i am trying another program,the sysntax is ok but i am not getting any output and it is not showing any error also.hope i will get an answer asap.thank you.
Check [OO ALV Guide Simple|http://wiki.sdn.sap.com/wiki/display/ABAP/OBJECTORIENTEDALV+Guide] and [Easy Reference to ALV|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907]
-
I have compiled a program for a target after I added a new vi from NI_AALPro.lvlib. The addition worked fine on my development computer but gave me errors when run on the target.
The box displayed:
Missing subVI NI_AALBase.lvlib:1D Linear Evaluation.vi in VI NI_PtbyPt.lvlib:Linear Fit PtbyPt.vi
Missing subVI NI_AALPro.lvlib:MSE.vi in VI NIPtbtPt.lvlib:Linear Fit PtbyPt.vi
What do I need to do to bring the correct library into the transportable code?Hello,
I was unable to reproduce the behavior that you saw. I was able to deploy my application with the Linear Fit PtByPt without issues.
Could you attach the smallest piece of code that reproduces this behavior so that I can test it as well?
Justin Parker
National Instruments
Product Support Engineer -
I can't get my registered versions of CS6 Photoshop and Illustrator to run in full mode. I installed CS6 Design Standard online end of June (an upgrade from CS5.5), on my old MacBook Pro. I didn't run the programs then as I was waiting on arrival of new MacBook Pro. I migrated the programs from my old MacBook to the new, and today tried to run those programs for the first time. InDesign work OK (after an initial hiccup) but Illustrator and Photoshop will only run in trial mode, and won't let me save files. My CS6 Design Standard shows with it's registration in my Adobe Account. All seems in order, but Illustrator and Photoshop won't run in registered mode. Can you please help?
Demons1 in the future please only migrate your documents and settings.
Please use the uninstallers to remove your current installation. They are located in the Applications/Utilities/Adobe Installers folder. Once the uninstall is complete you will also want to run the CC Cleaner Tool. You can find more details at Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 - http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html.
If you need to download a fresh copy of the installation files for Creative Suite 6 you can do so at Download CS6 products.
Maybe you are looking for
-
Hello all, Is it possible to search all of the entries in a certain account by entry date? I need to find a specific entry that changed the monthly numbers although it was entered more than a few weeks after the books were closed. Your help is apprec
-
Rookie needs help! Can't find flash drive?
I am attempting to move music files from my old dell relic to my macbook air. I am not sure the macbook is seeing the flash drive? Or maybe the deal is I don't know how to find it? I pulled it out of the USB port and the error message came up that I
-
How to downgrade to XP on Satellite Pro L 300
I have read conflicting methods for downgrading to XP. This should have been put into the manual Apologies if this has already been covered elsewhere (I couldn't find it if it was) 1. Vista will automatically set up when you turn on the laptop 2. Use
-
I've created a report using an external data source, and set an active data retrieval interval. However, when i update a field, using sqlplus, it doesn't update the report. With an internal data source, it works fine. Can you help me with this?
-
I have a html field with some content with table. On opening by edit form , SharePoint adds tbody and many < > tags . How can I stop these unwanted tags that creates empty <>