How to get stock details as on date
Dear All
How to get opening stock and closing stock details as on date .
Tell me any function module is there to get as on date.
Moderator Message: FAQ. Please search in the forums before posting your question.
Edited by: Suhas Saha on Nov 4, 2011 3:13 PM
Hi
By using transaction MB5B-Stock on posting date,you can arrive stock statement as on given date for Itemwise,plant,receipts,issues and balance availabel with value.
Regards
M P D Kamath
Similar Messages
-
How to get the details of entry date in SQ00.
Hello,
Can anybody let me know the steps how to get the entry date in the report SQ00.Here when i am selecting entry date its coming as 00.00.00.(as zero).please let me know how to correct the steps with proper steps.Hi
Apply the SAP NOTE 562031. This will rectify the error. I too faced similar problem which was then corrected when this Note was applied.
Test it first an then let me know -
Function module for getting stock details for a given period or date range
Hi experts,
Any function module available for getting stock details batch, plant, storage location, and period wise. <<removed_by_moderator>>
Thanks in advance
M Prasanna
Edited by: Vijay Babu Dudla on Apr 28, 2009 7:23 AMHi,
Try with this FM:
BAPI_MATERIAL_AVAILABILITY .
Go through this link for more details:
ABAP Development
by
Prasad gvk. -
Stock details with old date.??
Hi experts,
How to know the stock details with old date (not period)
date 2 months back or 4 months back.
with material,wih material group or plant..?
how to know the total stock details
MB5L is for just last one period stock only we can get..??
how can i get with any old date?'
Regards,
Anthyodaya.
Edited by: anthyodaya Reddy Nagaram on Apr 5, 2010 12:52 PMCheck the report
S_P00_07000139
Change layout as per your requirement -
How to get the today's julian date in java?
how to get the today's julian date in java?
hi can any one tell me how to get the todays julian date using Calender class or GregorianCalender class....
Julian date for 2006.November.01 AD 05:54 PM : 2454041.0
i have tryied with
calJ.setGregorianChange(new Date(Long.MAX_VALUE));
System.out.println(sdf2.format(calJ.getGregorianChange()));
thanks
Tushar
Message was edited by:
lad_tusharthanks a lot....for intrest....
I have found some details about the Julian calendar as follows:
The Julian date for 2006: JAN: 01:12:01:59 is 2453737.00138
245 represent the year digits for year 2006
3737 represent the date fir 1 Jan
.00138 represents the time for 12:01:59
Julian date change as per every day 12 noon it increase one digit in it.
As per ref from
http://www.aavso.org/observing/aids/jdcalendar.shtml
Also chk this calendar where Julian date is 20. October 2006 for 02 November 2006
As per ref from
http://www.calendar.sk/julian_calendar-en.php
I have tried the pure �GregorianCalendar� class from jdk1.4 API and its setGregorianChange method but not getting as per the expected Julian date format. Using the �setGregorianChange()� i have setting the cutover date to Long.MAX_VALUE it means GregorianCalendar now have to act as per the Julian calendar ...so after setting the cutover date it return me changed date using �getGregorianChange()� but that was not the Julian date of the current date...as expected or as per above both scenario. Even though the last two digits are nowhere equal to the actual Julian date.
Program
GregorianCalendar cal = new GregorianCalendar();
cal.setGregorianChange(new Date(Long.MAX_VALUE)); // setting the calendar to act as a pure Julian calendar.
// cal.set(Calendar.DATE, new Date().getDate()); // seting the current date
// Date todayJD = cal.getGregorianChange(); // getting the changed date after the setGregorianChange
Date todayJD = cal.getTime(); // getting the calculated time of today�s Julian date
SimpleDateFormat sdfJulianDate = new SimpleDateFormat("yyDDD");
SimpleDateFormat sdfJuliandayOfYear = new SimpleDateFormat("DDD");
System.out.println("today Date = " + new Date());
System.out.println("Today as julian date = " + sdfJulianDate.format(todayJD));
System.out.println("Today as day of year = " + sdfJuliandayOfYear.format(todayJD));
OUTPUT:
USING : Date todayJD = cal.getGregorianChange();
Today Date = Thu Nov 02 15:17:05 IST 2006
Today as julian date = 94229
Today as day of year = 229
USING : cal.set(Calendar.DATE, new Date().getDate());
Today Date = Thu Nov 02 15:19:22 IST 2006
Today as julian date = 06319
Today as day of year = 319
USING : Date todayJD = cal.getTime();
Today Date = Thu Nov 02 15:17:59 IST 2006
Today as julian date = 06306
Today as day of year = 306
There is one another concept i found to get the Julian day of the year as per the Julian day chart mention on nasa site (http://angler.larc.nasa.gov/armsgp/JulianDayChart.html) and i m getting the moth of the year that is 306 for nov 02 2006 using getTime() method in above code then the out put is right for Julian day. But it was not as per the expected Julian date format. So in conclusion we can only able to retrieve the day of year for the Julian calendar. hope their will be a solution for this problem in java api ....else we allways have to depend upon the third party api that was not accepteble some times.....
Kindly chk chart on the site
http://angler.larc.nasa.gov/armsgp/JulianDayChart.html
http://weather.uwaterloo.ca/julian.html
http://www.fs.fed.us/raws/book/julian.shtml
Thanks,
Tushar Lad -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
I-photo: I used 2 cameras to take pictures on a trip --- i have put the pictures from both cameras into an album --- when i click on view and then sort by date, the pictures do not sort by date --- any ideas on how to get the pics sorted by date?
Select all the photos that you need to change, then click the "Photos" menu and choose "Adjust Date and Time".
If you add a year, it will adjust all the photos that you selected by adding a year (so if you accidentally select one of the photos that already has "2012", that will change to "2013"). -
How to get internal table from SAP Data Provider C#
Hello.
ABAP:
DATA: lt_t001 TYPE TABLE OF t001.
DATA: url(1000) TYPE c.
SELECT * INTO TABLE lt_t001 FROM t001.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'APPLICATION'
subtype = 'X-R3TABLE'
TABLES
data = lt_t001
CHANGING
url = url
EXCEPTIONS
OTHERS = 4.
C#:
using SAPDataProvider;
using SAPTableFactoryCtrl;
public void SetDataFromUrl(string url)
SAPDataProviderClass p = new SAPDataProviderClass();
p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
SAPTableFactoryClass tf = new SAPTableFactoryClass();
Table tb = (Table)tf.NewTable();
tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
How to get internal table from SAP Data Provider ?Hi Sergey,
I'm trying to do the same, have you found a solution to solved it?
thanks for your help.
Regards.
Jonathan -
How to get the difference of two dates in years,months and days
Hi friends,
how to get the difference of two dates in years,months and days
for ex 2 years 3 months 13 days
select (sysdate-date_Start) from per_periods_of_service
thanksSomething like this...
SQL> ed
Wrote file afiedt.buf
1 with t as (select to_date('17-nov-2006','dd-mon-yyyy') as c_start_date, to_date('21-jan-2008','dd-mon-yyyy') as c_end_date from dual union all
2 select to_date('21-nov-2006','dd-mon-yyyy'), to_date('17-feb-2008','dd-mon-yyyy') from dual union all
3 select to_date('21-jun-2006','dd-mon-yyyy'), to_date('17-jul-2008','dd-mon-yyyy') from dual
4 )
5 -- end of test data
6 select c_start_date, c_end_date
7 ,trunc(months_between(c_end_date, c_start_date) / 12) as yrs
8 ,trunc(mod(months_between(c_end_date, c_start_date), 12)) as mnths
9 ,trunc(c_end_date - add_months(c_start_date, trunc(months_between(c_end_date, c_start_date)))) as dys
10* from t
SQL> /
C_START_D C_END_DAT YRS MNTHS DYS
17-NOV-06 21-JAN-08 1 2 4
21-NOV-06 17-FEB-08 1 2 27
21-JUN-06 17-JUL-08 2 0 26
SQL>But, don't forget that different months have different numbers of days, and leap years can effect it too. -
How to get the name of a Data Element of a generic Table!
Hi guys!
In my function i have the following import paramenter
i_outtab type standard table
now i import a table and i want to get the dataelement of the fields.
is there a way to do this??Hello Thomas
Perhaps the following sample report may be useful for you.
*& Report ZUS_SDN_RTTI_STRUCT_COMPONENTS
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145711"></a>
*& Thread: How to get the name of a Data Element of a generic Table!
REPORT zus_sdn_rtti_struct_components.
TYPE-POOLS: abap.
TYPES: BEGIN OF ty_s_outtab.
TYPES: bukrs TYPE bukrs.
TYPES: kunnr TYPE kunnr.
TYPES: END OF ty_s_outtab.
DATA: gdo_data TYPE REF TO data.
DATA: gs_outtab TYPE ty_s_outtab.
DATA: go_typedescr TYPE REF TO cl_abap_typedescr,
go_structdescr TYPE REF TO cl_abap_structdescr,
go_datadescr type ref to cl_abap_datadescr.
DATA: gs_comp TYPE abap_compdescr,
gd_dtel type string,
gt_dfies type ddfields.
FIELD-SYMBOLS:
<gs_struct> TYPE ANY.
START-OF-SELECTION.
BREAK-POINT.
GET REFERENCE OF gs_outtab INTO gdo_data.
ASSIGN gdo_data->* TO <gs_struct>.
go_typedescr = cl_abap_typedescr=>describe_by_data( <gs_struct> ).
go_structdescr ?= go_typedescr.
BREAK-POINT.
LOOP AT go_structdescr->components INTO gs_comp.
go_datadescr = GO_STRUCTDESCR->GET_COMPONENT_TYPE( gs_comp-name ).
gd_dtel = go_datadescr->get_relative_name( ).
write: / syst-tabix, 'Data element =', gd_dtel.
ENDLOOP.
END-OF-SELECTION.
Regards
Uwe -
How to get a time part from Date datatype
Hi,
I would like to know how to extract the timestamp alone from DATE datatype? If my input is '27-SEP-2011 23:59:00' I need the output as 23:59:00. I am surprised to see that there are no in-built functions for this or may be I am wrong. Basically I need to remove the date part from DATE data type and get the time.Please assist.
-Thanks
Edited by: user9546145 on Sep 27, 2011 2:24 PM
Edited by: user9546145 on Sep 27, 2011 2:25 PMHi,
user9546145 wrote:
Hi,
I would like to know how to extract the timestamp alone from DATE datatype? Be careful! In Oracle, TIMESTAMP means a datatype, similar to but distinct from DATE. You'll avoid confusion if you don't use the word "timestamp" to mean anything else.
There is a built-in function, TO_CHAR:
TO_CHAR (dt_col, 'HH24:MI:SS')Depending on how you plan to use the time, TRUNC is another handy built-in function:
dt_col - TRUNC (dt_col)is a NUMBER (not less than 0, but less than 1) which is suitable for many tasks, such as finding the average time.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using. -
How to get pivot table by using dates
Hi,
How to get pivot table by using dates in column.
Below is the sample table and its value is given.
create table sample1
Order_DATE DATE,
order_CODE NUMBER,
Order_COUNT NUMBER
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,232);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,935);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,43);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,5713);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('30-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,11346);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),1,368);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),2,1380);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),3,133);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),4,7109);
Insert into sample1 (Order_DATE,order_CODE,Order_COUNT) values (to_timestamp('29-SEP-12','DD-MON-RR HH.MI.SSXFF AM'),5,14336);
select * from sample1;So how to get the data like below.
order_date
order_code 30-sep-12 29-sep-12
1 232 368
2 935 1380
3 43 133
4 5713 7109
5 11345 14336Using the extra data I inserted in my previous reply:select ORDER_CODE,
SUM(DECODE(extract (month from ORDER_DATE),1,ORDER_COUNT,0)) JAN,
SUM(DECODE(extract (month from ORDER_DATE),2,ORDER_COUNT,0)) FEB,
SUM(DECODE(extract (month from ORDER_DATE),3,ORDER_COUNT,0)) MAR,
SUM(DECODE(extract (month from ORDER_DATE),4,ORDER_COUNT,0)) APR,
SUM(DECODE(extract (month from ORDER_DATE),5,ORDER_COUNT,0)) MAY,
SUM(DECODE(extract (month from ORDER_DATE),6,ORDER_COUNT,0)) JUN,
SUM(DECODE(extract (month from ORDER_DATE),7,ORDER_COUNT,0)) JUL,
SUM(DECODE(extract (month from ORDER_DATE),8,ORDER_COUNT,0)) AUG,
SUM(DECODE(extract (month from ORDER_DATE),9,ORDER_COUNT,0)) SEP,
SUM(DECODE(extract (month from ORDER_DATE),10,ORDER_COUNT,0)) OCT,
SUM(DECODE(extract (month from ORDER_DATE),11,ORDER_COUNT,0)) NOV,
SUM(DECODE(extract (month from ORDER_DATE),12,ORDER_COUNT,0)) DEC
from SAMPLE1
where trunc(order_date, 'YY') = trunc(sysdate, 'YY')
group by order_code
order by order_code;
ORDER_CODE JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
1 0 0 0 0 0 0 0 0 600 600 0 0
2 0 0 0 0 0 0 0 0 2315 2315 0 0
3 0 0 0 0 0 0 0 0 176 176 0 0
4 0 0 0 0 0 0 0 0 12822 12822 0 0
5 0 0 0 0 0 0 0 0 25682 25682 0 0Now a bit of explanation.
1) Whenever you pivot rows to columns, no matter what version of Oracle and no matter what method you use, you have to decide in advance how many columns you are going to have and what the names of the columns are. This is a requirement of the SQL standard.
2) I use the WHERE clause to get just the data for this year
3) With EXTRACT, I get just the month without the year.
4) Using DECODE, I put every month's data into the correct column
5) Once I do all that, I can just GROUP BY order_code while SUMming all the data for each month. -
How to get more than 256 bytes data
hello.
I use Schlumberger 32K Card�iJava Card 2.1�j.
Please tell me how to get more than 256 bytes data from the applet in the card!!
According to JCRE specification, need to use Get Response Command.
What is Get Response command?
Do I have to write processing of Get Response command to an applet?
Or JCRE processes Get Response command?
If knows, please tell me about!!
Thanks.Thanks for your response!!
I understand that I have to write processing of Get Response command to an applet.
But case of Schlumberger 32K card, when host send Get Response command to an applet, card reply 6F-00!?
I'm investigating now, and it seems that response is returned before applet processes Get Response command(CLA = 00, INS = C0).
Do JCRE perform the process of Get Response command? -
How to get a string "yyyyMMdd" into date like MM/dd/yyyy?.
Hi
How to get a string "yyyyMMdd" into date like MM/dd/yyyy?. i have used
SimpleDateFormat.parse but it is giving long value. i want to disply the date
like MM/dd/yyyy
thank youDo you want the string rearranged or do you want to create an instance of some form of Date class?
If you want to rearrange the string you could just do it yourself provided you know the date string is going to be of the format yyyyMMdd.
something like this:
String newDate = origStr.charAt(4) + origStr.charAt(5) + "/" + origStr.charAt(6) + origStr.charAt(7) + "/" ...etc. -
How to get fiscal period based on date and Fiscal year?
Hi Guys,
Can anybody tell me how to get Fiscal period based on date and Fiscal Year or fiscal year variant?
Thanks,
Gopi.Hi,
Please refer the code below:
*: Report: ZFISCALYR :
*: Date : 2004 :
*: Description: Demonstrates how to return the corresponding fiscal :
*: year and posting period for a company code and posting :
*: date or posting date and fiscal year variant. :
REPORT zfiscalyr NO STANDARD PAGE HEADING.
TABLES: ekko.
PARAMETERS: p_bukrs TYPE ekko-bukrs,
p_bedat TYPE ekko-bedat.
DATA: gd_fiscalyr TYPE bapi0002_4-fiscal_year,
gd_fiscalp TYPE bapi0002_4-fiscal_period.
DATA: gd_fiscalyr2 TYPE T009B-BDATJ,
gd_fiscalp2 TYPE bapi0002_4-fiscal_period.
DATA: gd_periv TYPE t009-periv.
*START-OF-SELECTION.
START-OF-SELECTION.
* get fiscal year and period - (requires date and company code)
CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
EXPORTING
companycodeid = p_bukrs
posting_date = p_bedat
IMPORTING
fiscal_year = gd_fiscalyr
fiscal_period = gd_fiscalp.
* Alternative fiscal year function module
* - (requires date and fiscal year variant code from T009 table)
* gets first entry in fiscal year variant table (will need to choose
* correct one from table rather than just using first entry)
SELECT SINGLE periv
FROM t009
INTO gd_periv.
* get fiscal year and period
CALL FUNCTION 'DETERMINE_PERIOD'
EXPORTING
date = p_bedat
* PERIOD_IN = '000'
version = gd_periv
IMPORTING
period = gd_fiscalp2
year = gd_fiscalyr2
EXCEPTIONS
period_in_not_valid = 1
period_not_assigned = 2
version_undefined = 3
OTHERS = 4.
*END-OF-SELECTION.
END-OF-SELECTION.
WRITE:/ 'From function module: BAPI_COMPANYCODE_GET_PERIOD',
/ 'Fiscal year is:', gd_fiscalyr,
/ 'Fiscal period is:', gd_fiscalp.
SKIP.
WRITE:/ 'From function module: DETERMINE_PERIOD',
/ 'Fiscal year is:', gd_fiscalyr2,
/ 'Fiscal period is:', gd_fiscalp2.
Thanks,
Sriram Ponna.
Edited by: Sriram Ponna on Apr 17, 2008 8:59 PM
Maybe you are looking for
-
Http redirects not changing url in address bar
I'm going crazy trying to fix a major bug in our application. Http redirects are not changing the url in the address bar of the latest versions of internet explorer. But this only happens if the redirected page is an xml page with an xslt reference f
-
Hi guys, After a sudden crash of my tx2500 laptop, I cannot get the laptop turned on. The system doesn't boot at all,eEven cannot get into the bios screen. However, after one day, the system magically back to live. However, this time I got another pr
-
User exit for invoice cockpit (tcode /cockpit/1)
Hi everybady, Could you please hepl us on this issue. I need to add a check when updating invoice cocpit document (via tcode /cockpit/1), i used exit FM via tcode /cockpit/C1 but nothing hapened. Any replay will be appreciated. Thanks. Toubkal
-
Keeping a number without a physical line
I am moving into rented accommodation in the same exchange area, and would like to keep my present number. But the owners of the rented house want to keep their number too. Is it possible for me to retain my number temporarily and receive calls on
-
Hi, I need to find the common set between 2 ViewObjects based on the same entity. How can this be achieved...any ideas. TIA