Hi reg date
hi all
i want to give a date range to int table.
my higher value is sy-datum, lower value must be less than 2 yrs , how can i code for this.
any suggesstion
Check this code
DATA : l_date TYPE sy-datum.
DATA : l_y(4) TYPE c.
DATA : l_m(2) TYPE c.
DATA : l_d(2) TYPE c.
SELECT-OPTIONS : so_date FOR sy-datum.
INITIALIZATION.
so_date-high = sy-datum.
l_y = sy-datum+0(4).
l_y = l_y - 2.
l_m = sy-datum+4(2).
l_d = sy-datum+6(2).
CONCATENATE l_y l_m l_d INTO l_date.
so_date-low = l_date.
APPEND so_date.
Regards
Gopi
Similar Messages
-
Reg : data is not getting in the output
hi team,
data is not getting in the output, but it is getting in the debug mode
REPORT ZSAPP10 .
*tables : pernr.
TABLES : PA0001.
type-pools : slis.
types : begin of itab,
pernr type pernr,
orgeh type orgeh,
abkrs type abkrs,
end of itab,
begin of itab2,
pernr type pernr,
vorna type pad_vorna,
nachn type pad_nachn,
end of itab2.
parameter : p_pernr like pa0001-pernr.
*DATA: g_cprog tYPE SY-CPROG.
data : i_itab1 type table of itab initial size 0,
i_itab2 type table of itab2 initial size 0.
data : w_itab type itab,
w_itab2 type itab2.
data : t_fieldcat type slis_t_fieldcat_alv,
w_fieldcat type slis_fieldcat_alv.
data : t_event type slis_t_event,
w_event type slis_alv_event.
data : t_listheader type slis_t_listheader,
w_listheader type slis_listheader.
*get pernr.
w_event-form = 'TOP_OF_PAGE'.
w_event-form = 'sub1'.
append w_event to t_event.
w_listheader-typ = 'H'.
w_listheader-info = 'this is new top of page'.
append w_listheader to t_listheader.
select pernr
orgeh
abkrs from pa0001 into table i_itab1 where pernr = p_pernr.
w_fieldcat-col_pos = 1.
w_fieldcat-seltext_m = 'personnal no'.
w_fieldcat-fieldname = 'pernr'.
w_fieldcat-tabname = 'i_itab1'.
w_fieldcat-outputlen = '20'.
append w_fieldcat to t_fieldcat.
w_fieldcat-col_pos = 2.
w_fieldcat-seltext_m = 'org. unit'.
w_fieldcat-tabname = 'i_itab1'.
w_fieldcat-fieldname = 'orgeh'.
w_fieldcat-outputlen = '20'.
append w_fieldcat to t_fieldcat.
w_fieldcat-col_pos = 3.
w_fieldcat-seltext_m = 'payroll area'.
w_fieldcat-tabname = 'i_itab1'.
w_fieldcat-fieldname = 'abkrs'.
w_fieldcat-outputlen = '20'.
append w_fieldcat to t_fieldcat.
*g_cprog = SY-CPROG.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-CPROG
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_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 =
IT_FIELDCAT = T_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = T_EVENT
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_ITAB1[]
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.
FORM sub1 *
FORM sub1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = t_listheader
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM. " sub1write this way...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
is_layout = wa_layout
i_callback_user_command = 'USER_COMMAND_ACCT'
i_grid_title = 'Document Status Report'
it_fieldcat = it_fcat[]
IT_SORT = IT_SORT[]
it_events = it_events
TABLES
t_outtab = it_final_data[]
EXCEPTIONS
program_error = 1
OTHERS = 2. -
Hello SAP Guru's!!!!
I have some doubt on maximum number of data fields in DSO. I gone through so many threads on SCN, but could not clarify my doubt.
The max no of key fields in DSO is -- 16
Max no of data fields in DSO is --749.
But i read in some of the scn documents a table can have maximum 256 columns .
DSO is also like a two dimensional table which can also have the same properties of a two dimensional table.
if the above statement of mine is correct.. the number of columns in a DSO is 256 columns = 16(primary key)+240 (data fields--non key fields)
but how come 749 data fields (max) will be there ? if it is so ... the max no of fields will be 749+16 = 765.
I need some clarification on this ....
Awaiting for your responses!!!!
regards,
vamshiHi Rajavamshi,
For DSO:
1. See for Standard DSO we have Key fields & Data Fields will be there
2. Key Fields will store only Characterisitc Info Objects, maximum no.of characteristic info object we can add here was 16
3. But in Data fields we can add both Characterstics & Keyfigure infoobjects, Max of 749 data fields we can add here.
4. Atleast one field should be there in either Key fields & Data fields.
For InfoCube :
1. Info cube structure will be having the 16 Dimensions and the Key Fields.
2. In that 16 Dimensions 13 User defined and the 3 pre defined dimensions.
3. One user defined Dimension will maximum can hold 248 Characteristics Info Object, not the Keyfigure Info Object here.
4. But the Key Fields here will store maximum will hold 233 Key Figure Info Object.
Thanks..!!
Regards,
Harish. K -
RE : BI APO Question Reg Data feeding from cube to Planning area.
Hi BW Experts,
iam working in an Implementation project for SCM in BW prcisely working with APO Bw..
For that I have taken historical data as a flat file and loaded it in to the external BW Infocube and its fine...
Second step I have created generate export datasource on topr of BW infocube and replicated in to Bw and used this export datasource as datasource for APO BW Infocube which is inbulit BW System from External Bw..
also I have created tranformations and data is loaded in the BW cube in APO system.Also Included Version charecterstics..
When I try to fed the APO Cube data to planning area Iam gettinga the following warning itsnot an error:
1.Key figure copy: InfoCube - planning area (DP) 01.01.2010 to 31.12.2010-- Successful
*2.No data exists for the selection made (see long text*
Diagnosis:Data could not be loaded from the Cube for the selection you made. Check whether the Cube actually contains data that is relevant for your selection.
For the second point I have time charecterstics filled in the infocube which Iam feding to a Planning area like 0CALMONTH,0CALWEEK,FiscVarnt,0CALMONTH
3.Characteristic assignment: No data copied --- Message
Can you please help me with your thoughts so that i wll try to corner the issue I will be highly obligedHi,
As I understood, you have loaded data from external BW cube to APO BW cube and now loading planning area from APO BW cube.
I hope your settings in /SAPAPO/TSCUBE transaction code would be correct and you have selected the correct planning version with correct cube.
Check if Data in APO BW cube is available for reporting or not and data is avilable for given selction (if any but I guess you are not giving any).
Thanks,
S -
Hi ,
pls help me.
i am using static text view in that i am passing a variable which having date value.
my required output format is ' 2013-02-27 00:00:00 '
but i am getting ' 02/27/2013 12:00:00 AM '
can any one guide me....
Edited by: Bhargav K on Mar 1, 2013 2:47 PMHi,
Would you please explain a little bit more
in that variable you wanted to pass just the date with out timestamp or else?
If you wanted to achieve the following one(Date should be pass as Datetime format) u can try using Evaluate function in OBIEE and pass that variable
SELECT TO_CHAR(TO_TIMESTAMP(' 02/27/2013 12:00:00 AM ' ,'MM/DD/YYYY HH12:MI:SS AM'),'YYYY-MM-DD HH24:MI:SS' )FROM DUAL
Example to use Evaluate function
EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), EVALUATE('TO_DATE(%1,%2)' AS DATE ,EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ) ,"Time"."Date",'MM/DD/YYYY'),'MM/DD/YYYY'),'DD/MON/YYYY')
Let me know if you have any issues
Thanks
Edited by: DNK on Mar 1, 2013 10:33 PM -
Reg: Data getting repeated in the table and displayed in the Smartorm.
Hello Experts,
Requirement is to display header data from kna1table and item data from two tables faglflexa and bsid.
Layout is something like this.
Name and Address is capture from KNA1.
Item Details from faglflexa and BSID based on one condition, UMSKZ ne 'X' and 'Y' for the respective KUNNR from KNA1. First Item table.I have taken a separate internal table from print program
Item Details from BSID only based on one condition, UMSKZ eq 'X' and 'Y' for the respective KUNNR from KNA1. Second Item table. I have taken a separate internal table from print program
Calculation based on faglflexa and BSID table on one condition,UMSKZ ne 'X' and 'Y' for the respective KUNNR from KNA1. Third t Item table. Data from the first internal table
The complete thing should be displayed on Smartform for one Customer (kunnr). Then should go to the next customer.
I have a written a code like this, For Example.
loop at kna1 into w_kna1.
Used Table1 in smartform and give a loop to display the item details based on first internal table.
display itemdetails
Used Table2 in smartform and give a loop to display the item details based on second internal table.
display itemdetails.
Used Template to display the item details to display the item details based on first internal table.
endloop.
Now my problem is table 1 is coming fine. table 2 data is getting repeated for all the customers based on 1st customer data, how should i clear the workarea after every customer.
Similar pbm for the template which i'm using.
Please help me on this.
Thanks in advance.
Abdur RafiqueHi Vishnu,
Thanks for replying. I cant use one single table to display the output. There are several conditions in two tables.
I have corrected the error of repetition data. Logic i will mention it below.
loop at kna1 into wa_kna1.
for header data " this is main table
loop at item_1 into wa_item_1. " for first item table
Data displayed.
loop at item_2 into wa_item_2. " for 2nd item table
Data displayed.
endloop. " for 2nd item table
data calculation based on first item table.
endloop. " this is for first item table
endloop." this is for 2nd item table.
The data which is there in the 2nd item table should display data based on the kna1 loop. Data is displaying properly but not in 1 table, say for example.
kunnr- 1000010
there are 9 items.
All the 9 items should be in 1 table. But here it is displaying 1 item in 1 table till 9 items in 9 tables.
I need to club all the 9 items in 1 table.
One more doubt is 2 items have same belnr (document number) i need to club this and add the wmbtr field and then display as 1 record.
So final records in 2nd item table should be 8 not 9.
Can you please help me on this.
Thanks in advance.
Abdur Rafique -
Reg : date format conversion from dd.mm.yyyy to mmddyyyy
hi ALL,
is there any function module which can convert date format
from <b>dd.mm.yyyy to mmddyyyy</b>.
Thanks in advanceHi,
Please check the following
CONVERSION_EXIT_PDATE_INPUT Conversion Exit for Domain GBDAT: DD/MM/YYYY -> YYYYMMDD
CONVERSION_EXIT_PDATE_OUTPUT Conversion Exit for Domain GBDAT: YYYYMMDD -> DD/MM/YYYY
SCA1 Date: Conversion
CONVERSION_EXIT_IDATE_INPUT External date INPUT conversion exit (e.g. 01JAN1994)
CONVERSION_EXIT_IDATE_OUTPUT External date OUTPUT conversion exit (e.g. 01JAN1994)
CONVERSION_EXIT_LDATE_OUTPUT Internal date OUTPUT conversion exit (e.g. YYYYMMDD)
CONVERSION_EXIT_SDATE_INPUT External date (e.g. 01.JAN.1994) INPUT conversion exit
CONVERSION_EXIT_SDATE_OUTPUT Internal date OUTPUT conversion exit (e.g. YYYYMMDD)
TB01_ADDON
CONVERSION_EXIT_DATEX_INPUT
CONVERSION_EXIT_DATEX_OUTPUT
Hope this would surely help you out.
Thanks and regards,
Varun. -
Hi,
Can any one let me know how can i import the data for BP or Items.
I have tried to import for BP. Below are the steps I followed
Administration>Data Import/Export>Data Import-->Import from Excel
I have selected the bp code and bp name then Ok.
A pop up window was opened to open the file and I have selected one of the file(Is the file should be in Excel format the one which we are selecting to open the file)The DTW is an add-on shipped with SBO so you need to install it first if you haven't done so already. Once installed - Start>All Programs>Sap Business One>Data Migration>Data Transfer Workbench. That will open the DTW. Also by using the same path you will note that there is a 'templates folder' with preparation examples of how the data should look.
[REMOVED BY ADMIN DO NOT SEND COPYRIGHTED MATERIAL]
Regards
Daan
Edited by: Craig Cmehil on Sep 25, 2008 3:52 PM -
Reg Data in table in two languages
Hi,
Here i am having the reqt that i need to extract the data from SQL Table in to BI 7 system.In SQL, I am having the customer table, in that, Customer name and Customer phone numbers will be there in both English as well as arabic. so, we have to extract them as it is into BI . Is it possible to extract like that? if yes please let me know where we need to set the settings for that.
Regards
VenkatHi,
Generate the Table maintainance of That table with Maintenance type 2step .
give
Maint. Screen No. Overview screen 1
Single screen 2
Doble click on single screen 2
Then it will open the screen number 2 in flow logic where you will find number of
module
in process after input
write a new module like module inset_entry_table_abc and double click on this module it will create include for that module in that check the sy-ucomm and if it is save command the take value from screen field and insert into table ABC.
Thanks
Deepanker Dwivedi. -
Hi all
i have a requirement where i need to bring in data from SAP to NON SAP.....pls share with me which is the best method to employ
this is for bank project where pay roll accounts and other details...
kindly help me on this
can i use sap predefined tools or ALE IDOC.ALE,IDOC is a technique .Yes
But it may take some time for you to actually feel comfortable.I suggest try native sql commands
using EXEC key word ,logging on to database ,running native sql queries there and take data into internal table.
I remember one payroll application being implemented in such a way that used uploading of data on to gls every month. -
Reg: Date in Select-options
Hello All,
I have a date field in the SSCRN as select-options.
Now I want to give a default value to the date-low and date-high.
Those default values must be :
1. For s_date-low the value must be the START DATE of the current Week ( MONDAY )
2. For S_date_high the value must be the END DATE of the Week ( SUNDAY )
Eg: today is 07.11.2007 then my s_date-low must be 05.11.2007 (Monday) and my s_date-high must be 11.11.2007 (Sunday).
Can anyone know how to pass these as default values ?
Regards,
Deepu.KHi Deepu,
Try the following code.
SELECT-OPTIONS : s_date FOR sy-datum.
DATA : l_date LIKE sy-datum.
DATA : h_date LIKE sy-datum.
INITIALIZATION.
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
EXPORTING
DATE = SY-DATUM
IMPORTING
WEEK =
MONDAY = l_date
SUNDAY = h_date.
s_date-low = l_date.
s_date-high = h_date.
append s_date.
If it is usefull pls reward it.
Regards
Srimanta -
Reg: Data Level Security
Dear all,
Need to implement data level security on particular column.
for exmple: having one user called 'Bhargav' and he should able to see particular data like only one department called 'hyderbad'.
when bhargav logged in he should see only hyderabad data.
how can we implement this pls help meit would be help to you
http://www.rittmanmead.com/2012/03/obiee-11g-security-week-row-level-security/ -
how to convert yyyymmdd to dd/mm/yy only using function module only without using offset
Hi
DATA: e_date(10) type c VALUE '2/2/2006',
i_date(10).
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = e_date
IMPORTING
date_internal = i_date
EXCEPTIONS
date_external_is_invalid = 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.
WRITE : / 'CONVERT_DATE_TO_INTERNAL',
/ 'My Date:' , e_date ,
'Conv Date:', i_date.
skip 2.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = sy-datum
IMPORTING
DATE_EXTERNAL = e_date
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 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.
WRITE : / 'CONVERT_DATE_TO_EXTERNAL',
/ 'My Date:' , sy-datum,
'Conv Date:', e_date.
Hope this helps
Regds
Seema -
Hi all ,
In the table tadir where thers is field called obn_name its length is Char 40.
& im using for all entries with table modsap where the name length is Char 08.
when i try to use for all entires for the above 2 table 's
its giving error like this .
when using the addition 'for all entries in itab"the fields "NAME" & " ITAB-OBJ_NAME must have same length.
How to resolve this ???
Regs,
MurthyHi
It will work only if both the fields are having same value. You can do one thing you can supress the unwanted 0's from begining of field if any.
Regards
Aditya -
Reg data at different levels...
hi,
Is there any way to find which data is stored at which level...
For eg
Material grp is stored at client level in MMR..
Various indicators are stored at plant level....
From the screen itself how can i come to know??
Thanks & RegardsHi
From the screen you can interpret some of the data, as in the material master , Basic data can be maintained with out any organization levels, so this data is maintained at the Client level.
Similarly the Purcahse data is maintained at Plant level, Storage location data is maintained at Plant & Storage location level.
Hope this helps you
Thanks & Regards
Kishore
Maybe you are looking for
-
File could not be deleted because it could not be found
OS 9.2.2, Pismo, and a strange error. I have moved these files to the trash, but I can't delete them! When I try to delete them, the OS spits up this error: <filename> could not be deleted, because it could not be found. Yet, it's right there in the
-
How to read the html source code of a webpage.
How can I read the html source code of a webpage with a java application? Is there a good idea?
-
I have a view page that shows a list account in a dataTable. When the user clicks on the edit link, a showModal box opens which shows the edit view for the list of accounts. When the user clicks on one of the Add or cancel action buttons, the action
-
ERROR IN CONNECTING TO B1 DATABASE
Hello, I am trying to connect to SAP B1 database from an add on so to post a journal entry. I have not been able to and wondering what could be wrong on connecting to the database?
-
Defining variant for report for job with dynamic date Gui 6.40 patch 21
The system does not take over my choice for the dynamic date. I choose in the variant-attirubute-screen for a certain parameter: "type selection variable": D and then in the column "name of the variable" > I choose via F4: current date +/- days. OK a