Regarding Between Dates
Hi Experts,
I am having this data.
PERNR ENDDA BEGDA
00000004 31.12.9999 01.02.2007
<b>00000004 31.01.2007 05.01.2007</b>
00000004 04.01.2007 13.11.2006
00000004 12.11.2006 14.01.1982
I want to fetch those records those will collapse in this month.
Regards,
Rajneesh Gupta
hi Rajneesh,
Just copy this demo code of mine ,it will serve ur purpose..u have to just fetch dat based on ur requirement from databsae and then use my logic as below..solution 2 is exactly same as tht of ur requirement.
reward if helpfull.
1)tables pa0006.
data:begin of itab occurs 0,
pernr like p0006-pernr,
begda like p0006-begda,
endda like p0006-endda,
end of itab.
data itab1 like table of itab with header line.
data d_beg like p0006-begda.
data d_end like p0006-begda.
select * from pa0006 up to 20 rows into corresponding fields of table itab.
loop at itab.
d_beg = itab-begda.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = d_beg
IMPORTING
LAST_DAY_OF_MONTH = d_end.
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2 .
if itab-endda ge d_beg and itab-endda le d_end.
move itab to itab1.
append itab1.
endif.
endloop.
loop at itab1.
write:/ itab1.
endloop.
2) tables pa0006.
data:begin of itab occurs 0,
pernr like p0006-pernr,
begda like p0006-begda,
endda like p0006-endda,
end of itab.
data itab1 like table of itab with header line.
data d_beg like p0006-begda.
data d_end like p0006-begda.
*select * from pa0006 up to 20 rows into corresponding fields of table itab.
Clear itab.
itab-pernr = '00000004'.
itab-begda = '20070105'.
itab-endda = '20070131'.
append itab.
itab-pernr = '00000004'.
itab-begda = '20070201'.
itab-endda = '99991231'.
append itab.
loop at itab.
d_beg = itab-begda.
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
day_in = d_beg
IMPORTING
LAST_DAY_OF_MONTH = d_end.
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2 .
if itab-endda ge d_beg and itab-endda le d_end.
move itab to itab1.
append itab1.
endif.
clear itab.
endloop.
loop at itab1.
write:/ itab1.
endloop.
Message was edited by:
Amit Tyagi
Similar Messages
-
Difference between date info object in characteristics and keyfigure
What is the difference between "date" data type in characteristic and keyfigure?
Thanks in advance.
RajHi Rajasekhar,
If date is characteristics,query can be analysed based on date and filters can also be set using this date.
If it is key figure query cannot be analysed based on date,
Based on requirements,we have to decide whether it should be chatracteristic or key figure
Regards
Prakash -
Connection between data services and BWA
Hi,
I want to make a connection between Data Services 3.2 and BWA. Since we use RFC connection in between in order to have them talk with eachother but i wonder if there is any documentation that describes the RFC connection and configuration required particularly in this scenario. I have gone through the documentation that explains RFC connection between Data Services and BW and what configuration we have to do, so i wonder if there are any functions we have to export to BWA from Data Services like we do in case of BW connection to Data Services or some specific configuration we have to do. If someone help who has done connection between Data Services and BWA can help or if somebody can provide documentaton on it.Hi,
You should ask this question over here: http://scn.sap.com/community/data-services
Regards,
H -
Diference between DATA: and TYPES: on internal tables
Hi people,
Can somebody help me. I wanna know whats the diference between DATA: and TYPES: on internal tables
and whitch has the best performance, here is a eg:
DATA: BEGIN OF ti_sbook occurs 0,
carrid LIKE sbook-carrid,
fldate LIKE sbook-fldate,
customid LIKE sbook-customid,
loccuram LIKE sbook-loccuram,
END OF ti_sbook.
AND
TYPES: BEGIN OF ti_sbook ,
carrid LIKE sbook-carrid,
fldate LIKE sbook-fldate,
customid LIKE sbook-customid,
loccuram LIKE sbook-loccuram,
END OF ti_sbook.
DATA: gw_sbook TYPE TABLE OF ti_sbook,
gs_sbook TYPE ti_sbook.
witch of both types is better?
thanks.Hi Marcelo,
For compatibility matters is better to create internal tables with a work area separately. So yes it's better to use types. When you work with Object Oriented coding you will need to use internal tables defined with types. Also when defining tables with types is the new way of coding, the another coding is getting obsolete defined by SAP. That's why when working in ABAP with OO (Object Oriented) code you'll have to define tables with types and not the other way.
Hope it helps.
Regards,
Gilberto Li -
hi guyz,
i have some doubts regarding generic data source for the following qeastion.
1).what is ALE pointer(ALE delta)?.in which senario we use this?.can u explain me with one realtime senario so that i can understand easily.
2).what is SLA? explain with one senario.
3).when we use these t-codes: RSMO,SM50 in process chain.1. ALE is Application Link Enabling (ALE)
It is the set of tools, programs, and data definitions that provides the mechanism for distributing SAP functionality and data across multiple systems. ALE enables the construction and operation of distributed applications.
Its purpose was to overcome the limitations of a single SAP system. A single SAP system that runs on top of one database often does not fulfill the needs of larger corporations, either from a business or a technical perspective.ALE allows the implementation of loosely coupled SAP systems; each of the SAP systems has its own database and is essentially independent from the other systems. ALE allows us to distribute data between different systems and different business processes.
ALE enables you to transfer data(master/transactional data) from an SAP system to SAP/Non-SAP system you can use ALE.This done using IDOCs.
ALE can be divided into
Output Process: Extracting data from database and putting it in the IDOC.
Communication Process: Which involves transferring the IDOC to the target system.
Inbound Process: Posting the IDOC data into the tables of the receiver system.
2. SLA is service level agreement, what you need on this ?? Its an agreement betn client and service provider regarding the service request and their resolution. Like P! issue should be solved in 1 hr , P2 issue 3 hr..something like that, varies from client to client
3. RSMO is used to monitor the data load in BW. You have several options to restrict your criteria to monitor load.
In SM37 if you goto the job and double click on that, it brings you to another screen with some details for the job. IN this screen if you hit the job details button in the resulting screen, it'll show you a PID number and an executing server number. With this combination, you can check the job in SM50.
Assign Points if helpfull.
Thanks
Tripple k -
Relationship between Date Mangement & Status Mangement in transactions
Hello experts,
Can anyone helps me with the relationship between dates & statuses in transaction.
I want to link my own date type to status "In Process".
I could not find that anywhere in the date rules linked to date type.
Thanks,
Nanda KumarHi.
As Robert said this can only be done using some development.
Try to create a function module such as:
FUNCTION Z_DATE_BY_STATUS.
*"*"Interface local:
*" IMPORTING
*" REFERENCE(IV_HEADER_GUID) TYPE CRMT_OBJECT_GUID OPTIONAL
*" REFERENCE(IV_OBJECT_GUID) TYPE CRMT_OBJECT_GUID OPTIONAL
*" REFERENCE(IV_OBJECT_NAME) TYPE CRMT_OBJECT_NAME
*" REFERENCE(IV_EVENT_EXETIME) TYPE CRMT_EVENT_EXETIME
*" REFERENCE(IV_EVENT) TYPE CRMT_EVENT
*" REFERENCE(IV_ATTRIBUT) TYPE CRMT_EVENT OPTIONAL
*" REFERENCE(IV_STRVAL_OLD) TYPE ANY OPTIONAL
*" REFERENCE(IV_STRVAL_NEW) TYPE ANY OPTIONAL
*" REFERENCE(IV_RCODE_STATUS) TYPE SY-SUBRC OPTIONAL
DATA: LS_DATE_WRK TYPE CRMT_DATE_WRK,
LT_STATUS_WRK TYPE CRMT_STATUS_WRKT WITH HEADER LINE,
V_LOGKEY TYPE CRMT_DATE_LOGICAL_DATE_KEY,
V_SETGUID TYPE CRMT_OBJECT_GUID.
TABLES: CRMD_ORDERADM_H.
CHECK NOT IV_HEADER_GUID IS INITIAL.
CLEAR: LS_DATE_WRK, LT_STATUS_WRK, LT_STATUS_WRK[].
CALL FUNCTION 'CRM_DATES_SETGUID_GET_OW'
EXPORTING
IV_REF_GUID = IV_HEADER_GUID
IV_REF_KIND = 'A'
IMPORTING
EV_SETGUID = V_SETGUID
EXCEPTIONS
PARAMETER_ERROR = 1
ENTRY_DOES_NOT_EXIST = 2
OTHERS = 3.
CHECK NOT V_SETGUID IS INITIAL.
CALL FUNCTION 'CRM_STATUS_READ_OW'
EXPORTING
IV_GUID = IV_HEADER_GUID
IV_ONLY_ACTIVE = ' '
IMPORTING
ET_STATUS_WRK = LT_STATUS_WRK[]
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
DELETE LT_STATUS_WRK WHERE USER_STAT_PROC IS INITIAL.
CHECK NOT LT_STATUS_WRK[] IS INITIAL.
LOOP AT LT_STATUS_WRK.
CHECK LT_STATUS_WRK-ACTIVE IS NOT INITIAL.
CLEAR: V_LOGKEY, LS_DATE_WRK.
CASE LT_STATUS_WRK-TXT04.
WHEN '2LVL'. >>>>>>>>>>>>>>>> Here you must insert the code of user status that must set the following date type.
V_LOGKEY-APPT_TYPE = 'ZTRF2LVL'.
WHEN 'COMP'. >>>>>>>>>>>>>>>> Here you must insert the code of user status that must set the following date type.
V_LOGKEY-APPT_TYPE = 'CONTCOMPL'.
WHEN OTHERS.
CONTINUE.
ENDCASE.
CALL FUNCTION 'CRM_DATES_READ_SINGLE_OB'
EXPORTING
IV_DATESET_GUID = V_SETGUID
IS_LOGICAL_DATE_KEY = V_LOGKEY
IMPORTING
ES_DATE_WRK = LS_DATE_WRK
EXCEPTIONS
PARAMETER_ERROR = 1
ENTRY_DOES_NOT_EXIST = 2
AT_LEAST_ONE_RECORD_NOT_FOUND = 3
ENTRY_IS_DELETED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
CALL FUNCTION 'CRM_APPOINTMENT_CREATE_OW'
EXPORTING
IV_REF_GUID = IV_HEADER_GUID
IV_REF_KIND = 'A'
IS_LOGICAL_DATE_KEY = V_LOGKEY
IMPORTING
EV_INSTGUID = LS_DATE_WRK-APPT_GUID
EV_SETGUID = LS_DATE_WRK-GUID
EXCEPTIONS
ERROR_OCCURRED = 1
OTHERS = 2.
LS_DATE_WRK-CLIENT = SY-MANDT.
LS_DATE_WRK-APPT_TYPE = V_LOGKEY-APPT_TYPE.
LS_DATE_WRK-IS_MILESTONE = 'X'.
LS_DATE_WRK-MODE = 'A'.
LS_DATE_WRK-SEOCLSNAME = 'CL_APPOINTMENT_SEG'.
ENDIF.
LS_DATE_WRK-TIMEZONE_FROM = SY-ZONLO.
LS_DATE_WRK-TIMEZONE_TO = SY-ZONLO.
LS_DATE_WRK-DATE_FROM = SY-DATUM.
LS_DATE_WRK-DATE_TO = SY-DATUM.
LS_DATE_WRK-TIME_FROM = SY-UZEIT.
LS_DATE_WRK-TIME_TO = SY-UZEIT.
CONVERT DATE LS_DATE_WRK-DATE_FROM TIME LS_DATE_WRK-TIME_FROM
INTO TIME STAMP LS_DATE_WRK-TIMESTAMP_FROM TIME ZONE LS_DATE_WRK-TIMEZONE_FROM.
CONVERT DATE LS_DATE_WRK-DATE_TO TIME LS_DATE_WRK-TIME_TO
INTO TIME STAMP LS_DATE_WRK-TIMESTAMP_TO TIME ZONE LS_DATE_WRK-TIMEZONE_TO.
CALL FUNCTION 'CRM_DATES_PUT_SINGLE_OB'
EXPORTING
IS_DATE_WRK = LS_DATE_WRK
EXCEPTIONS
ERROR_OCCURRED = 1
OTHERS = 2.
SELECT SINGLE * FROM CRMD_ORDERADM_H WHERE GUID = IV_HEADER_GUID.
IF SY-SUBRC = 0.
DATA: IT_HEADER_GUID TYPE CRMT_OBJECT_GUID_TAB.
APPEND IV_HEADER_GUID TO IT_HEADER_GUID.
CALL FUNCTION 'CRM_DATES_SAVE_EC'
EXPORTING
IT_HEADER_GUID = IT_HEADER_GUID
EXCEPTIONS
ABORT = 1
OTHERS = 2.
ENDIF.
ENDLOOP.
ENDFUNCTION.
Then assign this function module to view CRMV_FUNC_ASSIGN on SM30, assign it to CRM_SERVICE_OS.
And finally insert your function module on CRMV_EVENT transaction in order to the function module be executed under some circumstance, for instance, if you want the system to execute our function module as soon as we change the status of a complaint document, so you must insert an entry such as:
BUS2000120 | 1 | 11 | STATUS | AFTER_CHANGE | E | your function name | select execute for header
Kind regards,
Susana Messias
Edited by: Susana Messias on Apr 12, 2010 2:30 PM -
Hi,
I need to create a counter kf which should populate 1 and 0 to this counter field. Please let me know is there any difference between data type
NUMBER (DEC) and INTEGER (INT4).
Please suggest.
Thanks & Regards,
Pavan kumarHi Pavan,
The basic difference between Number(DEC) and INT4 is its internal storage in system.
For Number (DEC) - Value internally stored as packed number with 3 decimal places whereas INT 4 as 4 byte integer without decimal places.
For counter KF, you can go for INT 4.
Hope this helps.
Thanks -
Connection between data entered DSWP and SOLAR01
Hi,
we are currently slightly confused:
What is the connection between data entered in DSWP and SOLAR01?
I found out the data you are maintaining in SOLAR01 transaction do not show in DSWP but the data maintained in DSWP do show in SOLAR01.
Which transaction are we supposed to use and what makes it nescessary that the other transaction exists?
Probably a newby question and an answer would help a lot.
MarvinHi Marvin,
DSWP is one of the main t-codes for configurations whereas SOLAR01 is used to do blueprinting for "Implementation and Upgrade" scenarios.
DSWP includes Solution Monitoring, viewing of all service desk tickets, Change Request Management, maintenance optimizer (used for download of Support Packages from SAP OSS).
No configurations are done in SOLAR01. As mentioned above, SOLAR01 is used only to perform blueprinting.
I hope I have answered your doubts.
Regards,
Rinkal -
Passing variables between data tag and Java
Hello all,
I have a question about using variables between data tag and java.
Let me explain.
I would like to populate variable "Test" with
the information returned by jbo data tag library.
<code>
<% String Test = "%><jbo:ShowValue datasource="ds" dataitem="Cod" /><%";%>
or
<% String Test = "<jbo:ShowValue datasource="ds" dataitem="Cod" />";%>
</code>
This code did not work.
Some suggestions
Thanks
Humberto
nullHumberto,
I'm afraid I do not know the specific answer
to your question (perhaps Juan the Data Tag
Wizard will reply ;-). I vaguely recall
struggling with teh same issue when I was
playing with the tags for a demo. Here
is a hack-around lifted from my demo
that might help:
<jbo:Row id="privRow" action="CURRENT" datasource="privileges" />
<%
String privName = (String)privRow.getAttribute("Privilegename");
%>
In other words, I ended up using the Row
tag to get a local Java variable bound to the
row instance and then used its methods
to extract the value. I presume the class
of the row instance is oracle.jbo.Row
and you can lookup its supported methods
in the reference doc.
I'd be interested to hear if their is a more
elegant way - the one suggested above is
pretty tedious.
Regards,
Bill
---- -
Difference between data target & Infoprovider.
Hi all,
Difference between data target & Infoprovider.
why cube is best in performance wise other than ods,multiproviders.
Thanks,
cheta.A data target is an object into which data is loaded. Data targets are the physical objects relevant during data modeling and when loading the data.
Structure
Data targets are:
InfoCubes
ODS objects
InfoObjects (characteristics with attributes, texts or hierarchies).
There are differences between:
Pure data targets for which no queries can be created or executed. An InfoCube might only be used as a data source for another InfoCube. This is also possible for ODS objects and InfoObjects.
If you want a characteristic to appear in the InfoProvider tree, you have to assign an InfoArea to it. You can define update rules for the characteristic in the InfoProvider tree, and use them to load attributes and texts.
You can turn a characteristic into a data target only if the characteristic contains texts or attributes. It is not possible to use update rules to load hierarchies.
Data targets for which queries can be defined. These are called InfoProviders.
<Request for points removed>
Regards
Hemant
Message was edited by:
Moderator -
Difference Between data target and infoprovider
Hi Experts,
I am new to BW
What is the difference between data target and infoprovider
Thanks and Regards,
saveenHi Saveen,
InfoProvider is an object on which BEx queries are created. It provides information (data) to the queries when they are executed. InfoProviders may contain data (like cube) or may not contain data (like multiproivder and InfoSet).
Data Target is an object to which you will load the data, like cube, ODS or InfoObject. But it is not necessary that each data target is an InfoProvider...like you may have ODS objects that are not enabled for reporting, but you are loading data to them for staging purpose.
Hope this helps... -
Whats basic difference between data and types while declearing the itab
whats basic difference between data and types while declearing the internal tables...
DATA : BEGIN OF t_vbap OCCURS 0,
vbeln1 LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
netpr LIKE vbap-netpr,
netwr LIKE vbap-netwr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
arktx LIKE vbap-arktx,
END OF t_vbap.
vs
TYPES : BEGIN OF t_vbap,
vbeln1 LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
netpr LIKE vbap-netpr,
netwr LIKE vbap-netwr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
arktx LIKE vbap-arktx,
END OF t_vbap.
and vs
TYPES : BEGIN OF t_vbap,
vbeln1 LIKE vbeln,
posnr LIKE posnr,
kwmeng LIKE kwmeng,
netpr LIKE netpr,
netwr LIKE netwr,
werks LIKE werks,
matnr LIKE matnr,
arktx LIKE arktx,
END OF t_vbap.hi,
like -> used for refering existing data elements in data dictionary or in sap
type -> used for refering existing data types in sap.
types: used for creating used defined structure of tables which has fields from more tahn one table.
diff b/w types and type in creation of internal tables is that when u create a table with types then u can use same for work area creation also.
ex:
TYPES : BEGIN OF t_vbap,
vbeln1 LIKE vbeln,
posnr LIKE posnr,
kwmeng LIKE kwmeng,
netpr LIKE netpr,
netwr LIKE netwr,
werks LIKE werks,
matnr LIKE matnr,
arktx LIKE arktx,
END OF t_vbap.
data: itab1 type t_vbap
wa_itab1 type t_vbap.
when type is used then u have to create a defintion of work area for another time when internal table doesnt have headr line as
ex:
DATA : BEGIN OF t_vbap OCCURS 0,
vbeln1 LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
netpr LIKE vbap-netpr,
netwr LIKE vbap-netwr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
arktx LIKE vbap-arktx,
END OF t_vbap.
DATA : BEGIN OF wa_vbap,
vbeln1 LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
kwmeng LIKE vbap-kwmeng,
netpr LIKE vbap-netpr,
netwr LIKE vbap-netwr,
werks LIKE vbap-werks,
matnr LIKE vbap-matnr,
arktx LIKE vbap-arktx,
END OF wa_vbap.
if helpful reward soem points.
with regards,
suresh. -
What is the difference between data base objects and runtime objects
What is the difference between data base objects and runtime objects
Hi raja,
data base objects means u can have the presence of these objects in the database.So the tables,searchhelps,structures,lockobjects comes under these ones.
Runtime objects are created and destroyed after the program ends, any changes we make to them are temporary only.
regards,
nagaraj
Message was edited by: nagaraj kumar nishtala -
Hi Gurus,
Can anyone tell me the difference between "Data replication", "Data Cloning", "Data duplication" and "Data Migration". I have gone through Google but doesn't find any appropriate answer for that where I can find the difference.
It would be highly appreciated if you give me a link for all and give me some point out.
Thanks & Regards
Nimai KarmakarHere is how I see the terms used and understood by most folks
"Data replication"
This is the keeping the same data in sync in 2 different databases. Replication is the process of keeping data in sync between 2 environments/databases and not limited to Oracle to Oracle, it could be Oracle to MySQL to be kept in sync, MySQL to Oracle, Oracle to SQL Server, SQL Server to Oracle. The purpose of keeping data in sync can vary, but that is basic description of what it is.
"Data Cloning"
Make a copy of the data/database from one database environment to another, like for example taking production database and cloning the database to a pre-production database/environment for testing. Coning term is used more when copying a database not just data, but the whole database so typically you hear the reference "Database Cloning", but data cloning is basically the making a copy of the data from one place to another. Sometimes Cloning and Duplicating are used in the same way by folks as the basic end result is the same you are making a copy of the data to someplace else.
"Data duplication"
This is typically term when duplicating the data from one environment to another for a particular purpose, a lot of folks use "Data/Database Cloning" and "Data Duplication" in the same context, meaning they use them to mean the same thing, but I see more difference in the terms so when they are different Data Duplication is done when combining 2 databases to 1 therefore you can not clone the 2 databases into one so this term would be used more in those circumstances.
"Data Migration"
Moving data from one location/database to another location database, for example moving from MySQL to Oracle you would do a data migration from MySQL to Oracle as you are moving the data from MySQL to Oracle and going to leave it in Oracle. You could also be migrating to from Oracle 10g environment to a new Oracle 11g environment, therefore "Migration" is typically used when referring to moving the data from one environment to another and the source and target are different in location, database vendor, database version.
These are very simple ways of looking at the terms from my experience on how they are used. -
Difference between Data carrier type and Data carrier??
Hi experts,
Could you please explain me the difference between Data carrier type and Data carrier with an example??
Regards,
Kiran Thi Kiran,
Data carrier is to achive communication between server and user front end. We can define one data carrier type along with path as default for all or seperate data carriers type for specific users in define data carrier in SPRO. This defined data carriers again we assign to application in defining network for workstation application in SPRO.
By using data carrier we can upload to & download originals from server. We can change and print the documents from server.
Please award pts if its useful / need further information.
Pramod
Maybe you are looking for
-
Office App Devlopment: Unable to load one or more of the requested types.
I'm receiving the following error with the default C# Office App for Word, Excel, Powerpoint, Project Task Pane Error Code Description File Line Col Project 1 Unable to load one or more of the requested types. Retrieve the LoaderExceptions property
-
Battery Sucked Dry After 2.0 Update
I have a 1st gen. iphone. After 2.0 update, my battery life is less than half of what it used to be. Anybody else experiencing this problem? If so, any information on how to correct it?
-
I can't seem to figure out how to get my camera working with iMovie. It came with a USB cable, which I gather won't work. Is there a DV to firewire connector I need that didn't come with the camera?
-
I believe this may be a virus. At the top of the messege it says Adobe flash player settings. Under that it says Local Storage. Under, it says requested: up to 1MB, currently used 100KB. Then it has 2 boxes to check either Allow or Deny. This pops up
-
Reader install to Mac OS 10.9.1
I can't install Reader on my iMac OS 10.9.1. Any ideas?