Need a logic
Hi,
who can help me to implement this requirement.
Given are two fields.
SELECT-OPTIONS s_evdate FOR ccihs_ialhiot-evdat.
PARAMETERS p_dayweek TYPE bkk_kdate_week.
This is a pseudo code:
User selects at s_evdate any date e.g. 20th May 2008.
Further more he chooses a weekday at p_dayweek
e.g.Wednesday.
Check if the entered s_evdate is Wednesday,
if so
take only all days with eventdays where are on
Wednesday
if not calculate the next possible Wednesday
according to 20th May 2008. And take only all days with
eventdays where are on Wednesday.
Hope somebody can support me in this matter.
Regards
sas erdem
Hi,
I didn't get the exact requirement, but have a look on the following pseudo code, you may get some idea.
data: day type c,
wkday type c value 1.
1.Use following function module to get the weekday number
DATE_COMPUTE_DAY
2.give the input date(10 characters) and store it in another variable with 1 char(ex day)
3.Use switch case and compare with above value
when 'monday'.
if wkday = day.
ABAP Statement
endif.
when 'tuesday'.
if wkday = day.
ABAP Statement
endif.
when 'wednesday'.
if wkday = day.
ABAP Statement
endif.
when 'sunday'.
if wkday = day.
ABAP Statement
endif.
Regards,
Chandu
Similar Messages
-
Hi Experts,
I have a table
SSN data balance paid_amount rank
111111111 1st week date 1000 100 1
111111111 2nd week date 1000 100 2
111111111 3rd week date 1000 100 3
111111122 1st week date 1000 100 1
111111122 2nd week date 1000 100 2
111111122 3rd week date 1000 100 3
I want the output as
SSN data balance New_balance
111111111 1st week date 1000 1000
111111111 2nd week date 1000 900
111111111 3rd week date 900 800
111111122 1st week date 1000 1000
111111122 2nd week date 1000 900
111111122 3rd week date 900 800
For first New_balance values will be same as balance
for second week balance = new_balance and new_balance = balance-paid_amount
for third week balance = new_balance and new_balance = balance-paid_amount
I am using data service version 4.1
Need a Logic to perform above
Thanks
MadhuHi Mohd,
It worked Perfect for the new balance field, thank you so much, Also the balance field should change
In the above result set the 3rd Week balance should be same as 2nd week new balance
In other words, 2nd Week Balance should be same as first week new balance as shown below
Input
SSN
DATE
BALANCE
PAID_AMOUNT
111111111
1ST Week
1000
100
111111111
2nd Week
1000
100
111111111
3rd Week
1000
100
111111112
1ST Week
1000
100
111111112
2nd Week
1000
100
111111112
3rd Week
1000
100
111111112
4TH Week
1000
100
output
SSN
DATE
BALANCE
NEW_BALANCE
111111111
1ST Week
1000
1000
111111111
2nd Week
1000
900
111111111
3rd Week
1000
800
111111112
1ST Week
1000
1000
111111112
2nd Week
1000
900
111111112
3rd Week
1000
800
111111112
4TH Week
1000
700
Thanks for your Effort -
Hi,
Can any one briefly explain what is the need of Logical database?
In which case , abapers r going for logical database?
regards,
PoojaHi Pooja,
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
GET will fetch the table data immediately
GET LATE
In the LDB when you define the table structure in hierarchy, first it will fetch the higher node data and then all the below node tables data and comes to a second record in the top node table. for this GET Late is used.
You can create any number of primary keys in a table
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Reward if useful.
Regards,
Hemant -
Why do you need a logical plant?
Hi Guys
Please explain me with an example, Why do I need a logical plant in SAP. If i decide to have one, can I have a logical plant without a valuation and then on moving the stock to the original plant it should get valuated. I raise this discussion my implentation is affected because of wrong valuation of stock. Please express your confident views regarding.
Regards
Pradeep/ICFHi,
Not sure why you need a logical plant. Normally dummy plants are made to facilitate material movements to cater complex scenarios. In OMS2 you can omit any Material type with regards to the plant as "Value updating" .
Regards
Binoy -
NEED THE LOGIC TO RETRIVE THE DATA FROM IT2001 SUBTY 0910 AND 0100
HI ALL,
ITS URGENT
NEED THE LOGIC TO RETRIEVE THE DATA FROM IT2001(P2001) SUBTY 0910 AND 0100.
BEST REGARDS
SUNILHi,
Please find the logic to retrieve the data from IT2001.
<b>Infotypes : 2001 mode n."Declare the infotype in the infotypes declaration.
Get pernr.
RP-READ-ALL-TIME-ITY PN-BEGDA PN-ENDDA."Retrieves all the records of absence
LOOP AT P2001 WHERE SUBTY = XYZ.
Write the logic.
ENDLOOP.</b>
Regards,
Pavan Kattamuri. -
I need to buy a logic board for
Apple MacBook Pro 15" A1286, but i couldn´t find online to buy it where can i get one and if it´s possible if i can have it delivered to my hotelThere are a lot of MacBook Pros with the model # A1286 - which year is your model (e.g., "15-inch Late 2011")?
The only place that I know that you might could score a specific logic board is www.ifixit.com. They may be able to ship to your hotel.
Clinton -
Help needed in Logical Database Programming
Hello Gurus,
I am working on a Report on ASSET ACTIVITY BY DATE RANGE .
The program is copied from std. program S_ALR_87011990.
The above std. program displays for the whole financial year. This is modified for a particalar period range in the new leveraged program.
My question is in the below code.
We are fetching data using LDB ADA. The statement "GET anlcv" works fine here, I mean Sy-subrc is 0 and anlcv structure has some data in it.
When it comes to statement "GET anepv" in the below code, we are not getting any data into that structure and sy-subrc NE 0. Then it is skipping all the get statements and directly going to statement " PERFORM abga_simulieren.".
My logic lies in between this Get statement and the perform statement. When i see it in debugging mode my statement is not executed at all.
What needs to be done. Please anyone help me.
GET anlcv.
CHECK select-options.
MOVE anlcv TO sav_anlcv.
GET anepv.
CHECK select-options.
Nur Bewegungen des Jahres des Berichtsdatums durchlassen.
CHECK anepv-bzdat GE sav_gjbeg.
CHECK anepv-bzdat IN so_bzdat. "Added for SIR-3132
Bewegungen in SAV_ANEPV sammeln.
MOVE anepv TO sav_anepv.
APPEND sav_anepv.
GET anlb LATE.
Check auf Bestandskonto bei Gruppensummen erst hier, wegen
fehlender Abgänge/Umbuchungen
IF NOT summb IS INITIAL.
IF NOT anlav-ktansw IN so_ktanw.
REJECT 'ANLAV'.
ENDIF.
ENDIF.
ANLCV aus Save-Area zurueckholen.
CHECK NOT sav_anlcv-anln1 IS INITIAL.
MOVE sav_anlcv TO anlcv.
Abg-Simu: Abgang simulieren.
PERFORM abga_simulieren.
Promise to reward points
Regards
Mac1) delete line CHECK anepv-bzdat ge sav_gjbeg.
2) test with an asset , which has movements (purchases) in your intervall so_bzdat.
otherwise post a movement (e.g. transaction type 100) with tcode abzon
A. -
Hi,
My imac G5 was revving up quite a bit and acted like I was downloading something all the time. I thought it might just need the fans to be cleaned but I took it into the genius bar and was told that they guy "thinks" that I need a new logic board but isn't positive and would I like to look at the new imacs. ( I love looking at the new imacs but it's not in my budget). He said it would cost close to $800.00 to repair my imac. I edit video on it and it's also become the family computer. Any suggestions? Do I put the money into replacing the logic board? Do I put money into expanding the memory on my macbook pro that only has 2 gb of memory?Has it been shutting down unexpectedly?
There was a repair extension program for some of these iMacs which suffered from defective capacitors on the Logic Board and the Power Supply. It's been closed since Dec. 08, but I've heard of people appealing to Apple Customer Service anyway and getting the repairs covered. First you should open the computer and determine if the capacitors on the Logic Board are swelling or leaking at all. If so, you might be able to convince Apple to do the repairs. 1-800-275-2273. If at first you get turned down, ask to speak to a higher level rep.
Tell them how unfair you think it is that those who had the problem before the program closed were covered, and it was just your bad luck that your computer lasted a bit longer. You can also say that had you opened it up earlier, you probably would have seen the bad capacitor issue developing before the program closed. They are numerous little cylinders about 3/4 inch tall. The tops should be perfectly flat. No brownish gunk. Inspect it very carefully.You won't be able to look inside the Power Supply easily, though. If your iMac is not an iSight, it's very easy to open up. Just three screws at the bottom. Have a look here for illustrated instructions for your model. If it is an iSight, probably best not to try; a bit too complicated. Or you might just call the repair service and ask exactly why they thought it needed a new Logic Board. Did they see bad capacitors?
http://www.ifixit.com/blog/?p=1892
These were the covered serial #'s
* iMac G5 Repair Extension Program for
Video and Power Issues - September 2005
Computer model: iMac G5, 17-inch and 20-inch
iMac Serial number range, first 5 digits:
W8435 - W8522 or
QP435 - QP522 or
CK435 - CK522 or
YD435 - YD522
Message was edited by: WZZZ -
Need a logic for Internal table processing
Hi,
I have a requirement...an internal table contains three fields material no, bin no, and Quantity
Mat. No | Bin No | Quantity
a | x1 | 10
a | x1 | 10
a | x2 | 20
b | x3 | 10
c | x3 | 20
c | x4 | 30
c | x4 | 40
In this I need to append the records to new internal table say itab1 where multiple entries exist for some material no like mat no 'a' and 'c' and
if the material no. exist only once in the table, it has to be moved to another new internal table say itab2.
Pls suggest some logic that does not have performance issues.
Thanks in advance
SaravanaHi there,
a solution in brief...
data: wa_itab1_a like itab1,
wa_itab2_b like itab1,
lv_tabix type sytabix.
sort itab1 by matnr.
loop at itab1.
wa_itab1_a = itab1.
at new matnr.
lv_tabix = sy-tabix + 1.
clear wa_itab2_b.
READ TABLE itab1 into wa_itab2_b
INDEX lv_tabix.
if wa_itab2_b-matnr ne wa_itab1_a-matnr.
append wa_itab1_a to itab2.
delete itab1 where matnr = wa_itab1_a-matnr.
endif.
endat.
endloop.
Regards
George Zervas
Edited by: gzervas on Oct 20, 2010 12:08 PM -
Is NI Komplete really needed with Logic 8?
With the current deals in place you can pick up NI Komplete for around $700, which is an amazingly good price considering what is included.
...but reading the feature list, there is a fair amount of redundancy for Logic users now that the Jam packs are all bundled. The 3 pianos from Komplete seem to be covered by Logic as would be much of the orchestral, band and rock stuff in the sampler.
Does anybody run both and what are your opinions?
Is there enough extra sampled content? Does Battery really nail Ultrabeat?
There is nothing like Absynth and Reaktor in Logic - maybe these are worth the admission price alone.
Thoughts?
Thanks.
Matt.
PS. My focus is film and television music with the occasional mix of a recorded song.Sampleconstruct wrote:
Well I use Reaktor 5, Kontakt 2/3 and Massive every day - I didn't buy the Komplete because there is redundant stuff in there I don't want and don't need. But those three Plug Ins (+maybe Absynth) are absolutely unique and nothing inside Logic comes near the capabilities, those apps have.
I agree with you but I would add GR3 to the list. It's a great general audio FX/destroyer.
However, after you cross some critical number of NI plugins (3, or 4?), it makes sense to get the Komplete. Upgrading 3, or 4 different plugins separately is similar to cost of upgrading from Komplete X to Komplete X+1. Also, Komplete + Kore is a really nice (Note: Kore has it's issues too).
I checked the Battery demo intensively and wasn't too thrilled about it. It's more versatile than UB but if you get Kontakt you don't need Battery, apart from the useful samples that come with it maybe.
Battery is a piece of ****. It is the quintessential example of NI's lackluster quality and design. On the surface it may seem like a cool tool, then you dig just a little bit deeper and you're annoyed by the application at every turn. -
There are four tables for me
Table_A TAble_B TAble_C TAble_D
Table_A
ID number
mn_nbr Varchar(8)
Table_B
ID number
sec_NBR varchar(3)
Table_C
MN_NBR VArchar(8)
SEC_NBR VArchar(3)
m_mn_nbr Varchar(11)
m_sec_nbr VArchar(3)
Table_D
m_mn_nbr VArchar(11)
m_sec_nbr VArchar(3)
extn varchar(4)
For every record from TAble_A and TAble_B
we have to find record in TAble_C and pickup m_mn_nbr,m_sec_nbr
If we find it is fine else we will expand mn_nbr to be like m_mn_nbr by appending 000
then with m_mn_nbr and m_sec_nbr we have to find a record from table_d
if it is not found then we have to check with m_mn_nbr and m_sec_nb = 'XXX'
else the value of EXTN will be '0000'.
Please can some one help me in gettin this logic.
ThanksLike currently I am dealing with the first three tables
And the rows I had inserted as follows
Table A
ID --- mn_nbr
1111 11112222
2222 22221111
3333 33332222
Table B
ID --- sec_nbr
1111 031
2222 041
3333 021
Table C
mn_nbr -- sec_nbr m_mn_nbr m__sec_nbr
11112222 031 10111112222 031
So with my query I am able to pick up the record from Table C
Query is as follows
select a.MN_NBR,a.SEC_NBR,a.m_mn_nbr ,a.m_sec_nbr
from table_C A,TABLE_A B,TABLE_B C
where B.Id = C.ID
and A.MN_NBR= B.MN_NBR
and A.SEC_NBR= C.SEC_NBR
But there are no records corresponding to 2nd and 3rd rows of Table A and Table B
As the data will not be found I need to expand myself and pick it up
when evver record is not found I want to get m_mn_clm_nbr as mn_nbr||'000'
This one I am not getting.
Now combinedly I need to pick up three records from TAble_C
One record is existing and the other two as expanded records
THanks -
Hi All,
I am trying to figure out a logic to load a table from 3 differnt tables... below are the tables
Contact
contact_id DS_ID
(Number) (Varchar2)
CR_TYpe
CR_Type_ID CR_Type
(Number) (Varchar2)
Source_CR_Type
S_CR_Type_ID CR_TYPE
(Varchar2) (Varchar2)Contact.DS_ID =Source_CR_Type.S_CR_Type_ID (the relation between contact and Source_CR_Type is 1:M)
Distinct Source_CR_Type.CR_TYPE = CR_TYpe.CR_Type
The table that needs to be loaded is MAP_CON_CR_TYPE
MAP_CON_CR_TYPE
MAP_ID COntact_id CR_Type_ID
(Number) (Number) (Number)
sequencecan any one help me with a logic to load this bridge table or suggest me how to approch.
Edited by: BluShadow on 15-Feb-2013 15:26
added {noformat}{noformat} tags for readability. Please see {message:id=9360002} to learn to do this yourself in future.How do I ask a question on the forums?
SQL and PL/SQL FAQ -
Need a logic to caluclate l Number of Stores (plant)
Hello
I am developing a query. In this query i need to show one KPI known as Total number of Stores (Plant).
I tried with replacement path using formula variable on char 0Plant but its not achieving.
Guys need a formula and logic how to caluclate number of stores (plant).
Please can someone tell me how can i do that.
Regards,
RK
Points 100% Assured.I think you need to calculate the occurrence of one characteristics with respect to other. If so you can do following:
Use number of records KF to calculate the the toal and average calculated key figures. For those two key figures use aggregation settings as 'Total' and 'Average' giving reference characteristics (which needs to be counted).
Now use a formula Total/Average ..It should give you number of occurrences of one char wrt to other. -
Need a logic to retreive valid to date
HI all
I am retrieving the from-currency,to-currency and valid from date from table TCURR and puting into an internal table.
Now my internal table contains
FROM-CURR TO-CURR VALID FROM
USD INR 01.01.2007
USD INR 01.02.2007
EUR INR 10.02.2006
EUR INR 20.03.2006
INR EUR 01.01.2006
Now I need to retrieve VALID -TO DATE.
FROM-CURR TO-CURR VALID FROM VALID TO
USD INR 01.01.2007 31.01.2007
USD INR 01.02.2007 31.12.9999
EUR INR 10.02.2006 19.03.2006
EUR INR 20.03.2006 31.12.9999
INR EUR 01.01.2006 31.12.9999
The logic is if there are 2 similar FROM-CURR ,
then then the first VALID-TO = the second VALID from - 1.
similarily second VALID TO = the third VALID from - 1.
if next entires is not there, then VALID TO = 31.12.9999 hardcode
Kindly explain and also if possible provide the code also
Thanks in advance
Points will be rewardedfirst take all the values to itab.
then itab1 like itab.
itab1[] = itab[].
loop at itab1.
ttabix = sy-tabix - 1.
ttabix1 = sy-tabix.
if ttabix gt 0.
read table itab index ttabix.
if sy-subrc = 0.
itab-valid_to = itab1-valid_from -1.
modify itab index ttabix.
else.
move-corresponding itab1 to itab.
itab-valid_to = '99991231'.
modify itab index ttabix1.
endif.
endloop.
now check itab.
regards
shiba dutta -
Need reporting logic for Previous months sales compared to current month
Dear Folks,
I need to design a report that should give cumulative sales for the month compared with cumulative sales for the same date for previous months e.g. Sales upto 21st May should be compared with sales from 1st to 21st April, from 1st March to 21st March and so on.
Can anyone provide me a logic or CMOD code how to develop this report.
Will be great helpful.
Thanks in Advance.
RakeshHi Rakesh,
To accomplish the required output, you need to create variables that are input enabled and of processing type user eixt in the columns of your report in the query designer. I am assuming that, you would have atleast one variable which is input enabled and of processing type manual entry.
The user would input a date ( for example may 21) in this variable. You need to capture this value in the user eixt in I-STEP 2. From this value you need to calculate the previous month and pass it to the user exit variable. Below is a sample code,
----variable ZPREVDATE:pass the to value from variable ZCURRDAT -
DATA : LV_CALDAY TYPE SY-DATUM,
LS_T_VAR_RANGE TYPE i_t_var_range,
LV_YR(4), LV_MN(2), LV_DY(2).
WHEN 'ZPREVDATE'.
IF i_step = 2.
READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
WITH KEY vnam = ZCURRDAT'.
LV_CALDAY = LS_T_VAR_RANGE-high.
LV_YR = LV_CALDAY+0(4).
LV_MN = LV_CALDAY+4(2).
LV_DY = LV_CALDAY+6(2).
LV_MN = LV_MN - 1.
CONCATENATE LV_YR LV_MN LV_DY INTO LV_CALDAY.
ls_range-low = LV_CALDAY.
ls_range-opt = 'EQ'.
ls_range-sign = 'I'.
APPEND ls_range TO e_t_range.
ENDIF.
The above code is a rough code that would help you to acheive your logic
Regards,
Prem -
Hi all
i have a table with columns
SUN MON TUE WED THU FRI SAT
Y................ ...Y..................
i need to selected the column SUN which is Sunday,
along with this i need to select the columns MON,TUE
THU is having value so i don't needed that
if i select WED then i needed THU, FRI, SAT also
can u pls help on this.
Edited by: 881121 on Apr 6, 2013 10:54 AMPl do not post duplicates - Logic needed in query
Maybe you are looking for
-
Why does the on-screen keyboard disappear once a Bluetooth device has been attached?
Once I've connected a bluetooth device to my ipad 2, the on-screen keyboard disappears and doesn't return until I re-start the ipad. I've tried this with both a bluetooth keyboard, as well as with a bluetooth pedal, which will do page up, page down,
-
Here is an image of a paintbrush stroke that shows the texture of the paint. I want to change the color to a specific pantone green in order to match a specific color pallet. Rather than just using hue saturation to "guess" at the color (no pantone
-
Understanding the DVI Dual output on the new 1900x1200 MacBook Pro
I am looking at increasing my desktop space by possibly purchasing one of the cheaper 28" VIEWSONIC VX2835wm 28" lcd monitors. Its a 1080P monitor, that claims "Digital HDMI input gives you the best possible connection to HD signals for movies, video
-
FINDING MEDIAN FOR AN ARRAY OF INTS WITH EVEN NUMBER OF VALUES
okie dokie fellas i know this has got to be easy but i hjave been sittin at my comp forever workin on projects that are due and my head isn't all there anymore...could someone please clue me in on how im supposed to write the logic to find the median
-
Opening the same file in by different users
As a newbie to InDesign I got a workflow question. Working with a team of 6 designers, we would like all to work in the same InDesign document. We need to create a big salebooks book, therefore it is necessary to open the same file in different copy