Regarding the date condition
Hi all,
I am writing program for Training and event management in that advanced concept LSO(learning Solutions). here i am using One include program RHXMACRO. So that i will get the
various date fields like today, current month, current year etc... Now i am writing one select statement to fetch the records.
now my problem is, my seletc statement is not
working if i use macro RHXMACRO. but the same select statement is working if i dont use the
above macro. what is the solution for this.
thanking u,
regards,
giri.
> now my problem is, my seletc statement is not
> working if i use macro RHXMACRO. but the same select statement is working if i dont use the
> above macro. what is the solution for this.
>
Stop using RHXMACRO, obviously...
Similar Messages
-
How can I select a radio button in a table regarding the data in the cells?
Hi everyone
This is the issue: I need to select the RadioButton which is in a table with data related to transfers in the cells next to it, so I need to select the correct radio regarding the data next to it.
This is the whole process: First I go to the Add Recurring Transfer section and select the parameters of the transfer (Accounts, date, amount, months etc), then with VB code I capture those parameters from the page and store them into Global variables for further usage on my E-tester script.
Right after that I need to select the radiobutton regarding the data of the transfer that I already created in order to delete it or modify it (Please see Attachment selectradio1.jpg)
So How can I move along the table and compare each cell with the variables that I created with the transfer information, so when I finish comparing a row cell by cell and if all the comparison match well in that row, I could select the radiobutton of the row.
Note: Second Attachment selectradio2.jpg shows the source code of the table...If you need more info please let me know
Could you please help me with this problem?? I'm Kind of frustrated with this issue jejejeHere is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
Private Sub RSWVBAPage_afterPlay()
Dim tbl As HTMLTable
Dim tblRow As HTMLTableRow
Dim tblCell As HTMLTableCell
Dim strValue As String
Dim rButton As HTMLInputElement
' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
' Strip out the ; for inner text comparison
strValue = Replace(strValue, ";", "")
' This will get the table but can be modifoed to be more specific
Set tbl = RSWApp.om.FindElement(, "TABLE")
' This loops through all the rows in the table until a match to the strValue is found
' then clicks the radio button. Findelements allows you to specify a root element
' once the correct root row is found, FindElemets can get the correct radio button
For Each tblRow In tbl.rows
If tblRow.innerText = strValue Then
Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
rButton.click
End If
Next
End Sub
I also uploaded the script I created. You should be able to run it and see how it works.
This should get you going. -
Query regarding the data type for fetcing records from multiple ODS tables
hey guys;
i have a query regarding the data type for fetcing records from multiple ODS tables.
if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
can any one help with some suggestion.Hi Mudit,
One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
AS is used to rename the column name when data is being selected from your DB.
So, the query Select ename as empname from emptable will return the data with column name as empname.
Regards,
Bhavesh -
How to cummulate the quantity based on the date condition?
hi,
In my query,i need to cummulate the open quantity based on the two date condition.
If my Schedule line date > system date, i need to cummulate the open quantity.
But in my query level i am getting 0 or 1 based on the above condition.
i am struggling to cummulate the open qty based on the above condition.
can any body throws an idea to resolve my issue.
Regards,
ravi.Thanks for suggestion,Almost i narrow down my issue to get the proper result.
But i have one doubt.
Is it possible to user Formula variable (Processing by replacement path-Reference char as Scheduline date) in my Calculated Key Fig calculation.?? But here i am created Scheduline date as Characher infoobject.
Actually i am created Scheduline date as Character InfoObject,If i am using the following condition like
(Schedule line date > system date) its throwing "X" value.
For the above issue,if i am changing the Scheduline date as Key figure InfoObject means i will get the proper output for the condition(Schedule line date > system date) either 0 or 1.
Is it correct????
Regards,
Ravi. -
Regarding the Discount condition type in sales order
Hi All
I have 3 key combinations in my Discount Condition Type. I have maintained records at all the 3 key combinations and all the records are relevant for a sales. In my sales order all the relevant records (all 3 records) getting displayed, but for calculation all the three discounts are considered. I do not want use exclusive concept in access sequence.
But when i use the same access sequence for Base Price, it is behaving deferrently, where whatever record is found at the last is getting considered for calculation.
Please give your valuable comments.
Your inputs are appreciated.
Thanks and Regards
PrasadDear Friend,
If you have specified the various Discounts under the three access Sequence .
There your pricing system condition type will have three records.
To achieve the best result you might use the requremnets routine in the access sequence determination.
But if you consider this......
Take Three discount Condition types for that matter....
Now to find out the best conditions out of conditions you can use the functionally of Condition exclusions
which you will find in the Basic Functions --> Condition Exclusions.
This methord you will not be required to maintain any routine.
regards,
SAP SD -
Regarding the date of last change in sales order...
Hi,
Can anyone help me in the scenario...
I have to pick the date of last change in sales order...whether it is done on Configuration items ,additional data B or on the ordered quantity...
the problem is that it has some customized fields that are included in VBAK....
So i need help regarding this...shud i have to writ a user exit for this....or i hv to do a change in USEREXIT_SAVE_DOCUMENT .
Plz help me..
Edited by: Amit Gupta on May 1, 2008 3:02 PMVBAK-AEDAT will be updated, evenIf you have your custom fields in Sales Order.
Regards,
Naimesh Patel -
Regarding the dates to retrieve the required records.
Hi,
In the selection screen, i have radiobuttons for reporting period like ALL, PAST, FUTURE, TODAY,OTHERKEYDATE ,e.tc.
My report should run for the date which i have selected on the selection screen.
For today, we can write the condition as
Begda < = sy-datum and enda > = sy-datum.
But i have to write in general for everydate which i selected.
I am writing report for OM. i am not using PCH LDB.
if i use LDB , i can write Begda < = pnp-enda and endda >= pnp-enda.
But iam not using the LDB PCH.
how to write query to retreive the required date.hi,
let us say your radio buttons have the name as follows:
P_ALL -> for all
P_TODAY -. for only today
P_PAST -. for all dates in past from today.(not including today)
P_FUTURE -> for all dates in FUTURE from today( not including today)
P_OTHERKEYDATE -> for any other date that user enters.
*Logic:
if P_ALL = 'X'.
code is as such the program runs for all records irrespective of dates.
elseif P_TODAY = 'X'.
p_date = sy-datum. " this p_date is a variable used to hold today's date.
now code it so that it runs only for the records having date = p_date.
elseif P_PAST = 'X'.
*write code to pick all the dates which are in past , I don't know what you have as begin and end dates and what they for, use the begin and end dates to calculate past dates and run the code only for those past dates.
elseif P_FUTURE = 'X'.
*do as done in past,for future dates.
else p_date = otherkeydate "hope this is entered by user somewhere on the screen.
*run the code for only that p_date.
endif.
<REMOVED BY MODERATOR>
deepti.
Edited by: Alvaro Tejada Galindo on Feb 5, 2008 4:54 PM -
Hi,
My requirement is:
We have to generate a batch number in such a way that
the first character should be the last digit of the current date
the second character should be the month identifier(1-9 from Jan to sept and for the rest Oct-A Nov-B and Dec-C)
the third character should be the day identifier(for dates 1-9,its 1,2..9 and for the rest consecutive dates starting frm a,b,...v)
Please help me how to achive this.Hi
U can do this by using Character String Operations on DATE and based on value use IFELSE control statement.
like ur DATE is 20081202 then
if date+6(2) = 01.
c3 = 1.
elseif date+6(2) = 02.
endif.
but this is simple way , u can find some more optamize way.
Regards
Sachin -
HI All,
I created two user defined fileds, I.e., Date And test Date. As my problem is, I entered first filed I.e, Date.. When i came to second one, press shift+F2 or automaticaly, Show 15th day of what i entered in first field..
I.e, If i entered in first field as, 02-10-2008. When i go to the next filed, it will show like this. I.e., 16-10-2008.
If any body know this type of query, Plz tell me..
Regards,
krishna.vHi Krishna
You need to reference the run time value of the first date field and add 15 if I understand you correctly. Try the following (assuming first field's name is U_DATE):
SELECT ${$U_DATE.0.DATE} + 15 or SELECT ${OINV.U_DATE.DATE} + 15
Replace Squiggle brackets with square brackets.
Kind regards
Peter Juby -
Question regarding the date in MARC for a daily movement report
Hi,
I have a requirement, where i need to create a report, based on the selection screen parameters for <u>purchasing group</u> and <u>date</u> (the default is 1 minus the current date.)
The report is used to view the daily movement, relating to the selected purchasing group and date.
Where and how do i find entries for that specific date? What tables and field or fields do i use?
Points will be rewarded and all help will be greatly appreciated.
Thank You,
JohnSee the below example code :
REPORT ZQA_MOVEMENT_ANALYSIS no standard page heading.
*>>> ELEMENTS COPIED FROM REPORT BALVHT01 .
ALV
TYPE-POOLS: SLIS.
Includes
INCLUDE .
tables: mkpf, mseg, marc, mara, makt, mard.
DATA =============================================================== *
DATA: G_BOXNAM TYPE SLIS_FIELDNAME VALUE 'BOX',
G_EXPANDNAME TYPE SLIS_FIELDNAME VALUE 'EXPAND',
P_F2CODE LIKE SY-UCOMM VALUE '&ETA',
P_LIGNAM TYPE SLIS_FIELDNAME VALUE 'LIGHTS',
G_SAVE(1) TYPE C,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME,
g_default(1) type c,
G_EXIT(1) TYPE C,
GX_VARIANT LIKE DISVARIANT,
G_VARIANT LIKE DISVARIANT.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
GC_FORMNAME_ITEM_EXPAND TYPE SLIS_FORMNAME VALUE 'ITEM_EXPAND',
GC_FORMNAME_user_command type slis_formname value slis_ev_user_command.
DATA: GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
GT_EVENTS TYPE SLIS_T_EVENT.
DATA: G_REPID LIKE SY-REPID.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
data: begin of i_movement occurs 0,
matnr like mseg-matnr,
bwart like mseg-bwart,
budat like mkpf-budat,
mblnr like mseg-mblnr,
gjahr like mseg-gjahr,
shkzg like mseg-shkzg,
menge like mseg-menge,
meins like mseg-meins,
end of i_movement.
data: begin of i_mat occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
labst like mard-labst,
meins like mara-meins,
end of i_mat.
data: begin of i_output occurs 0.
include structure ZFD_MOVEMENT_ANALYSIS.
data: end of i_output.
data i_popuptext like popuptext occurs 2 with header line.
data: v_matnr like mara-matnr.
data: x_movement like i_movement.
SELECTION-SCREEN --------------------------------------------------- *
SELECTION-SCREEN BEGIN OF BLOCK period WITH FRAME TITLE text-001.
select-options: so_budat for mkpf-budat obligatory no-extension.
SELECTION-SCREEN END OF BLOCK period.
SELECTION-SCREEN BEGIN OF BLOCK org WITH FRAME TITLE text-002.
parameters: p_werks like marc-werks obligatory default '1000',
p_lgort like mard-lgort obligatory default '1000'.
select-options: so_matnr for mseg-matnr,
so_dept for marc-zzdept,
so_kostl for mseg-kostl,
so_ekgrp for marc-ekgrp.
SELECTION-SCREEN END OF BLOCK org.
SELECTION-SCREEN SKIP 1.
Variant
SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE TEXT-P01.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT.
SELECTION-SCREEN END OF BLOCK 0.
INITITALIZATION ==================================================== *
INITIALIZATION.
G_REPID = SY-REPID.
G_TABNAME_ITEM = 'I_OUTPUT'.
define keyinfo
CLEAR GS_KEYINFO.
GS_KEYINFO-ITEM01 = 'MATNR'.
PERFORM E01_FIELDCAT_INIT USING GT_FIELDCAT[].
PERFORM E03_EVENTTAB_BUILD USING GT_EVENTS[].
PERFORM E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
PERFORM E06_T_SORT_BUILD USING GT_SORT[].
PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
Set Options: save variants userspecific or general
G_SAVE = 'A'.
PERFORM VARIANT_INIT.
Get default variant
GX_VARIANT = G_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 0.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
AT SELECTION-SCREEN ================================================ *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
PERFORM F4_FOR_VARIANT.
PAI
AT SELECTION-SCREEN.
PERFORM PAI_OF_SELECTION_SCREEN.
START-OF-SELECTION ================================================= *
start-of-selection.
perform check_background_processing.
PERFORM E05_LAYOUT_BUILD USING GS_LAYOUT. "wg. Parameters
perform get_data.
perform build_report.
perform write_report.
AT LINE SELECTION ================================================== *
at line-selection.
if sy-lsind = 1.
format intensified off.
if not i_output-matnr is initial.
v_matnr = i_output-matnr.
loop at i_movement where matnr = i_output-matnr.
write: / i_movement-mblnr hotspot on,
i_movement-bwart,
i_movement-budat,
i_movement-shkzg.
if i_movement-shkzg = 'H'.
format color col_negative.
else.
format color col_positive.
endif.
write: i_movement-menge,
i_movement-meins.
format color off.
hide: i_movement-mblnr, i_movement-gjahr.
endloop.
clear i_movement.
endif.
elseif sy-lsind = 2.
set parameter id 'MBN' field i_movement-mblnr.
set parameter id 'MJA' field i_movement-gjahr.
call transaction 'MB03' and skip first screen.
endif.
==================================================================== *
top-of-page.
perform top_of_page.
top-of-page during line-selection.
read table i_mat with key matnr = i_output-matnr.
write: i_output-matnr,
i_mat-maktx,
so_budat-low, ' to ', so_budat-high.
uline.
clear: i_mat, i_output.
*& Form write_report
text
--> p1 text
<-- p2 text
FORM write_report.
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = g_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = gs_layout
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = gt_sp_group[]
IT_SORT = gt_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = g_save
IS_VARIANT = g_variant
IT_EVENTS = gt_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
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. " write_report
*& Form get_data
text
--> p1 text
<-- p2 text
FORM get_data.
if so_dept[] is initial and
so_matnr[] is initial and
so_kostl[] is initial and
so_ekgrp[] is initial.
i_popuptext-text = 'Please choose a department, material number,'.
append i_popuptext.
i_popuptext-text = 'cost center or purchasing group'.
append i_popuptext.
CALL FUNCTION 'DD_POPUP_WITH_INFOTEXT'
EXPORTING
TITEL = 'Please Note'
START_COLUMN = 1
START_ROW = 1
END_COLUMN = 5
END_ROW = 3
INFOFLAG = ' '
IMPORTING
ANSWER =
TABLES
LINES = i_popuptext.
Stop execution until user enters a purch group or dept.
stop.
endif.
get all materials matching selection criteria - exclude finished
materials
select kmatnr kmaktx labst meins
from ( ( ( marc as c inner join makt as k
on cmatnr = kmatnr ) INNER JOIN mard as d
on cmatnr = dmatnr ) INNER JOIN mara as a
on cmatnr = amatnr )
into table i_mat
where c~matnr in so_matnr and
c~ekgrp in so_ekgrp and
c~zzdept in so_dept and
c~werks = p_werks and
d~werks = p_werks and
k~spras = 'E' and
d~lgort = p_lgort
order by k~matnr.
if sy-subrc = 0.
read table so_budat index 1.
loop at i_mat.
get all material movements for all materials identified since
start date on date interval selected by user
select matnr bwart budat bmblnr bgjahr shkzg menge meins
appending table i_movement
from ( mseg as b INNER JOIN mkpf as a
ON bmblnr = amblnr AND
bmjahr = amjahr )
where b~matnr = i_mat-matnr and
a~budat >= so_budat-low.
endloop.
endif.
ENDFORM. " get_data
*& Form build_report
text
--> p1 text
<-- p2 text
FORM build_report.
data: x_movement like i_movement,
v_processed_inv like mseg-menge.
sort i_movement by matnr ascending
budat descending.
loop at i_movement.
if movement after end of period specified, use movement to work
backwards to inventory at end of selected period end date
if i_movement-budat > so_budat-high.
if i_movement-shkzg = 'H'.
add i_movement-menge to i_output-ending_inv.
else.
subtract i_movement-menge from i_output-ending_inv.
endif.
endif.
compute inventory at beginning of period
if i_movement-shkzg = 'H'.
add i_movement-menge to i_output-begin_inv.
else.
subtract i_movement-menge from i_output-begin_inv.
endif.
if movement in the time period specified, summarize movements by
type
if i_movement-budat >= so_budat-low and
i_movement-budat <= so_budat-high.
if i_movement-bwart+0(1) = '1'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-purchased_inv.
else.
subtract i_movement-menge from i_output-purchased_inv.
endif.
elseif i_movement-bwart+0(1) = '2'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-transferred_inv.
else.
subtract i_movement-menge from i_output-transferred_inv.
endif.
elseif i_movement-bwart+0(1) = '4'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-transferred_inv.
else.
subtract i_movement-menge from i_output-transferred_inv.
endif.
elseif i_movement-bwart+0(2) = '55'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-scrapped_inv.
else.
subtract i_movement-menge from i_output-scrapped_inv.
endif.
elseif i_movement-bwart+0(1) = '6'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-sold_inv.
else.
subtract i_movement-menge from i_output-sold_inv.
endif.
elseif i_movement-bwart+0(1) = '7'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-cycled_inv.
else.
subtract i_movement-menge from i_output-cycled_inv.
endif.
elseif i_movement-bwart+0(2) = '96'.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-recovered_inv.
else.
subtract i_movement-menge from i_output-recovered_inv.
endif.
else.
if i_movement-shkzg = 'S'.
add i_movement-menge to i_output-other.
else.
subtract i_movement-menge from i_output-other.
endif.
endif.
endif.
Summarize data for material number and add to output list
x_movement = i_movement.
at end of matnr.
clear i_mat.
read table i_mat with key matnr = i_movement-matnr.
i_output-maktx = i_mat-maktx.
inventory at end of period = current inventory + changes since end
of period
add i_mat-labst to i_output-ending_inv.
inventory at begin of period = ending inventory + changes in
interval
add i_mat-labst to i_output-begin_inv.
build percentages for types of movements in period - the only
reason this data needs to be stored rather than computed on the
fly is for sorting of data
v_processed_inv = ( i_output-begin_inv - i_output-ending_inv )
+ i_output-purchased_inv.
if v_processed_inv <> 0.
i_output-percent_sold =
( i_output-sold_inv / v_processed_inv ) * 100 * -1.
i_output-percent_scrapped =
( i_output-scrapped_inv / v_processed_inv ) * 100 * -1.
i_output-percent_transferred =
( i_output-transferred_inv / v_processed_inv ) * 100 * -1.
i_output-percent_cycled =
( i_output-cycled_inv / v_processed_inv ) * 100 * -1.
i_output-percent_recov =
( i_output-recovered_inv / v_processed_inv ) * 100 * -1.
i_output-other =
( i_output-other / v_processed_inv ) * 100 * -1.
endif.
record material number
move i_movement-matnr to i_output-matnr.
i_output-meins = x_movement-meins.
append i_output.
clear i_output.
endat.
endloop.
clear i_movement.
ENDFORM. " build_report
FORM E01_FIELDCAT_INIT *
--> E01_LT_FIELDCAT *
FORM E01_FIELDCAT_INIT USING E01_LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
I_INTERNAL_TABNAME = G_TABNAME_ITEM
I_STRUCTURE_NAME = 'ZFD_MOVEMENT_ANALYSIS'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = E01_LT_FIELDCAT[].
ENDFORM.
FORM E03_EVENTTAB_BUILD *
--> E03_LT_EVENTS *
FORM E03_EVENTTAB_BUILD USING E03_LT_EVENTS TYPE SLIS_T_EVENT.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 1
IMPORTING
ET_EVENTS = E03_LT_EVENTS.
tell program which form to call for top of page event
READ TABLE E03_LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
tell program which form to call for item expand event
READ TABLE E03_LT_EVENTS WITH KEY NAME = slis_ev_item_data_expand
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_ITEM_EXPAND TO LS_EVENT-FORM.
APPEND LS_EVENT TO E03_LT_EVENTS.
ENDIF.
ENDFORM.
FORM E04_COMMENT_BUILD *
--> E04_LT_TOP_OF_PAGE *
FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Listenüberschrift: Typ H
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
write sy-datum to LS_LINE-INFO.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = 'FreshDirect Product Reorder Report'.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Kopfinfo: Typ S
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = TEXT-050.
LS_LINE-INFO = TEXT-010.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
LS_LINE-KEY = TEXT-051.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
Aktionsinfo: Typ A
CLEAR LS_LINE.
LS_LINE-TYP = 'A'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = TEXT-002.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
ENDFORM.
FORM E05_LAYOUT_BUILD *
<-> E05_LS_LAYOUT *
FORM E05_LAYOUT_BUILD USING E05_LS_LAYOUT TYPE SLIS_LAYOUT_ALV.
E05_LS_LAYOUT-F2CODE = P_F2CODE.
E05_LS_LAYOUT-ZEBRA = 'X'.
E05_LS_LAYOUT-colwidth_optimize = 'X'.
ENDFORM.
FORM E06_T_SORT_BUILD *
--> E06_LT_SORT *
FORM E06_T_SORT_BUILD USING E06_LT_SORT TYPE SLIS_T_SORTINFO_ALV.
DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR LS_SORT.
LS_SORT-FIELDNAME = 'MATNR'.
LS_SORT-TABNAME = G_TABNAME_ITEM.
LS_SORT-SPOS = 1.
LS_SORT-UP = 'X'.
APPEND LS_SORT TO E06_LT_SORT.
ENDFORM.
FORM E07_SP_GROUP_BUILD *
--> E07_LT_SP_GROUP *
FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
CLEAR LS_SP_GROUP.
LS_SP_GROUP-SP_GROUP = 'A'.
LS_SP_GROUP-TEXT = TEXT-005.
APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
ENDFORM.
FORM TOP_OF_PAGE *
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
data v_repid like sy-repid.
write: / sy-datum, sy-uzeit,
100 'FreshDirect Material Movement Type Analysis Report'.
show parameters chosen on selection screen in header
v_repid = sy-repid.
CALL FUNCTION 'Z_WRITE_SELECTION_SCREEN'
EXPORTING
REPID = v_repid
EXCEPTIONS
REPORT_NOT_FOUND = 1
OTHERS = 2.
write column headings
format color col_heading.
write: /(18) 'Material #',
(40) 'Description',
(16) ' Beginning Inv.',
(16) ' Purchased',
(16) ' Available Inv.',
(16) ' Ending Inv.',
(16) ' Processed Inv.',
(25) ' Sold',
(25) ' Scrapped',
(25) ' Transferred',
(25) ' Cycle Counted',
(25) ' Other'.
format color off.
uline /1(278).
ENDFORM.
FORM F4_FOR_VARIANT *
FORM F4_FOR_VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
IS_VARIANT = G_VARIANT
I_SAVE = G_SAVE
I_TABNAME_HEADER = G_TABNAME_HEADER
I_TABNAME_ITEM = G_TABNAME_ITEM
it_default_fieldcat =
IMPORTING
E_EXIT = G_EXIT
ES_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 2.
MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF G_EXIT = SPACE.
P_VARI = GX_VARIANT-VARIANT.
ENDIF.
ENDIF.
ENDFORM.
*& Form PAI_OF_SELECTION_SCREEN
text
FORM PAI_OF_SELECTION_SCREEN.
IF NOT P_VARI IS INITIAL.
MOVE G_VARIANT TO GX_VARIANT.
MOVE P_VARI TO GX_VARIANT-VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT.
G_VARIANT = GX_VARIANT.
ELSE.
PERFORM VARIANT_INIT.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
*& Form VARIANT_INIT
text
--> p1 text
<-- p2 text
FORM VARIANT_INIT.
CLEAR G_VARIANT.
G_VARIANT-REPORT = G_REPID.
ENDFORM. " VARIANT_INIT
INCLUDE ZQA_UTILITY_INCLUDE.
***INCLUDE ZQA_UTILITY_INCLUDE .
*& Form display_popup_message
text
--> p1 text
<-- p2 text
form display_popup_message using x_text1
x_text2.
data: int_popuptext like popuptext occurs 2 with header line.
int_popuptext-text = x_text1.
append int_popuptext.
int_popuptext-text = x_text2.
append int_popuptext.
call function 'DD_POPUP_WITH_INFOTEXT'
exporting
titel = 'Please Note'
start_column = 1
start_row = 1
end_column = 5
end_row = 3
tables
lines = int_popuptext.
endform. " display_popup_message
*& Form upload_data_file
text
-->P_int_INPUTDATA text
form upload_data_file tables x_inputdata
using x_filename like rlgrap-filename.
clear x_inputdata.
refresh x_inputdata.
file on UNIX app server
if x_filename+0(1) = '/'.
open dataset x_filename for input.
if sy-subrc <> 0.
perform display_popup_message using 'Error opening file'
x_filename.
stop.
else.
do.
read dataset x_filename into x_inputdata.
if sy-subrc <> 0.
exit.
endif.
append x_inputdata.
clear x_inputdata.
enddo.
endif.
close dataset x_filename.
else.
file on local PC of GUI
call function 'UPLOAD'
exporting
filename = x_filename
filetype = 'ASC'
tables
data_tab = x_inputdata
exceptions
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
guint_refuse_filetransfer = 6
others = 7
if sy-subrc <> 0.
perform display_popup_message using 'Error opening file'
x_filename.
stop.
endif.
endif.
endform. " upload_data_file
*& Form check_background_processing
text
--> p1 text
<-- p2 text
form check_background_processing.
endform. " check_background_processing
Reward Points if it is helpful
Thanks
Seshu -
Date condition not working correctly in Desktop
Hello,
I have two custom folders in Admin that are joined. One of the folders contains the following query:
SELECT ORGANIZATION_ID, ASSET_NUMBER, MIN(CURRENT_READING_DATE) FIRST_READ_DATE, MIN(CURRENT_READING) FIRST_READING
FROM EAM_METER_READINGS_V
WHERE PREV_DESC IS NULL
Group By ORGANIZATION_ID, ASSET_NUMBER
I want my workbook to report the earliest meter reading that exists, based on the date that is specified in the parameters in Desktop. When I create a parameter for the date, the workbook reports the earliest reading in the database; it ignores the date restriction entered in the parameter. This is the parameter:
First Read Date MIN BETWEEN :First Reading Date and SYSDATE
If I include the date condition in the SQL of the custom folder the workbook functions exactly as it should. The date condition is in the SQL as the following:
and current_reading_date between '01-JAN-2007' and SYSDATE
Since the workbook functions correctly when the condition is coded in the SQL but not when it is based on a parameter, I assume the problem is with the parameter. Any ideas on how I may correct this?
Thanks,
SteveThanks for the response Michael. I tried using the MIN function as you suggested, but I still am not getting the expected result. I’m not sure that I was clear in my initial problem description. I will try to provide more detail with this post.
The reason I have two custom folders is that my original query has a nested Select statement (EAMV) and I couldn’t find a way to pass the parameter from EAMV to Discoverer. Following is the original query. I suppose the first logical questions would be, is there a way to pass the parameter to Discoverer? Would this alleviate the need for the second custom folder?
SELECT K.ORGANIZATION_CODE "ORG" -- ORGANIZATION
, K.ORGANIZATION_ID
,A.NAME "PM SCHEDULE NAME" -- PREVENTIVE MAINTENANCE SCHEDULE NAME
--( (B.RUNTIME_INTERVAL/F.USER_DEFINED_RATE) + D.LAST_SERVICE_END_DATE) "PROJECTED READ DATE" -- USES USER_DEFINED_RATE FROM METER DEFINITION
,(C.LAST_SERVICE_READING + B.RUNTIME_INTERVAL) "PROJECTED READ UNITS" -- NEXT SERVICE READING DUE UNITS
,F.METER_UOM "UOM" -- UNIT OF MEASURE ON METER
,F.METER_NAME "METER NAME" -- METER NAME
,G.SERIAL_NUMBER "MAINT EQ NO" -- MAINTAINED EQUIPMENT NUMBER
,H.C_ATTRIBUTE1 "MAKE" -- MAINTAINED EQUIPMENT NUMBER - MAKE/MANUFACTURER
,H.C_ATTRIBUTE2 "MODEL" -- MAINTAINED EQUIPMENT NUMBER - MODEL
,H.C_ATTRIBUTE4 "SERIAL NO" -- MAINTAINED EQUIPMENT NUMBER - SERIAL NUMBER
,I.SEGMENT1 "ACTIVITY" -- ASSET ACTIVITY
,D.LAST_SERVICE_END_DATE "LAST READ DATE" -- DATE OF LAST PM SERVICE READING
,C.LAST_SERVICE_READING "LAST READ UNITS" -- UNITS OF LAST PM SERVICE READING
,E1.CURRENT_READING_DATE "CURRENT READ DATE" -- DATE OF CURRENT SERVICE READING (FROM METER FORM)
,E1.CURRENT_READING "CURRENT READ UNITS" -- UNITS OF CURRENT SERVICE READING (FROM METER FORM)
,E1.LIFE_TO_DATE_READING "LIFE TO DATE READING" LIFE TO DATE READING
--,(E1.CURRENT_READING - C.LAST_SERVICE_READING) "CURRENT/LAST VARIANCE" -- UNITS SINCE LAST PM SERVICE READING
,( (C.LAST_SERVICE_READING + B.RUNTIME_INTERVAL) - E1.CURRENT_READING ) "PROJECTED/CURR VARIANCE" -- UNITS REMAINING UNTIL NEXT SCHEDULED READING
,J.DESCRIPTION "LOCATION" -- OWNING DEPARTMENT DESCRIPTION OF ASSET NUMBER
,J.DEPARTMENT_CODE
,E1.DISABLE_FLAG
,G.CURRENT_STATUS
,B.RUNTIME_INTERVAL
,Y.SET_NAME
,EAMV.FIRST_READ_DATE READ_DATE
,EAMV.FIRST_READING READING
FROM EAM.EAM_PM_SCHEDULINGS A
,EAM.EAM_PM_SCHEDULING_RULES B
,EAM.EAM_PM_LAST_SERVICE C
,INV.MTL_EAM_ASSET_ACTIVITIES D
,EAM.EAM_ASSET_METERS E
,EAM.EAM_METER_READINGS E1
,EAM.EAM_METERS F
,INV.MTL_SERIAL_NUMBERS G
,INV.MTL_EAM_ASSET_ATTR_VALUES H
,INV.MTL_SYSTEM_ITEMS_B I
,BOM.BOM_DEPARTMENTS J
,INV.MTL_PARAMETERS K
,EAM.EAM_PM_SET_NAMES Y
,(SELECT ORGANIZATION_ID, ASSET_NUMBER, MIN(CURRENT_READING_DATE) FIRST_READ_DATE, MIN(LIFE_TO_DATE_READING) FIRST_READING
FROM EAM_METER_READINGS_V
WHERE CURRENT_READING_DATE BETWEEN '01-JAN-2007' AND '30-JUN-2007'
GROUP BY ORGANIZATION_ID, ASSET_NUMBER) EAMV
WHERE A.PM_SCHEDULE_ID = B.PM_SCHEDULE_ID
AND A.ACTIVITY_ASSOCIATION_ID = C.ACTIVITY_ASSOCIATION_ID
AND C.ACTIVITY_ASSOCIATION_ID = D.ACTIVITY_ASSOCIATION_ID
AND D.SERIAL_NUMBER = E.ASSET_NUMBER
AND D.ORGANIZATION_ID = E.ORGANIZATION_ID
AND E.METER_ID = E1.METER_ID
AND E1.METER_READING_ID =
(SELECT MAX(METER_READING_ID)
FROM EAM_METER_READINGS
WHERE METER_ID = E1.METER_ID
AND (DISABLE_FLAG = 'N' OR DISABLE_FLAG IS NULL))
AND E.METER_ID = C.METER_ID
AND E.METER_ID = B.METER_ID
AND E.METER_ID = F.METER_ID
AND D.MAINTENANCE_OBJECT_ID = G.GEN_OBJECT_ID
AND D.ORGANIZATION_ID = G.CURRENT_ORGANIZATION_ID
AND G.SERIAL_NUMBER = H.SERIAL_NUMBER
AND G.CURRENT_ORGANIZATION_ID = H.ORGANIZATION_ID
AND D.INVENTORY_ITEM_ID = H.INVENTORY_ITEM_ID
AND H.ATTRIBUTE_CATEGORY = 'EQUIPMENT DETAILS'
AND D.ASSET_ACTIVITY_ID = I.INVENTORY_ITEM_ID
AND D.ORGANIZATION_ID = I.ORGANIZATION_ID
AND G.OWNING_DEPARTMENT_ID = J.DEPARTMENT_ID (+)
AND I.ORGANIZATION_ID = K.ORGANIZATION_ID
AND A.SET_NAME_ID = Y.SET_NAME_ID
AND Y.SET_NAME IN ('MAIN','COMP')
AND G.CURRENT_ORGANIZATION_ID = EAMV.ORGANIZATION_ID
AND G.SERIAL_NUMBER = EAMV.ASSET_NUMBER
AND K.ORGANIZATION_CODE = 'MCC'
Using this query I want to show the most recent reading (current reading) and then give users the flexibility to enter an earlier date so the earliest reading as of that date will also show. For example, if they enter 1-JAN-2007 as the parameter and there was a reading taken on 2-JAN-07 and 28-JAN-07, the report should show the 2-JAN-2007 reading (in addition to the most recent reading in a separate column). Currently, everything on the report displays correctly, except for the reading based on the parameter. -
Material with PPM allow the date change
Hi Experts,
I have a issue regarding the date change in process order which is effected by the APO scheduling dates.
Now i have observed that materials having PPM are not allowing me to change the dates even if i try manually.
But Materials without it are easyily taking the dates in changed mode.
My requirement is to change the date manually and APO should not effect the dates later on.
Any timely suggestion will be rewarded .
Reagrds
AthillesHi,
In R3, check under "Adjust dates" in define scheduling parameters for process orders ( OPUZ) what is the setting defined.
Try with different settings.
Thanks,
nandha -
Select Query Based on date condition
Hi ,
Is it Possible.
i want to run select query based on date condition.
Eg...
if the date between 01-jan-01 and 01-jan-05 then
select * from table1;
if the date between 02-jan-05 and 01-jan-08 then
select * from table2;
Becaz i have data in 2 diffrent tables , based on the date condition i wnt to run the select statement to diffrent tables.
i dont want plsql here Just SQL needed.
thanks,
-R
Edited by: infant_raj on May 5, 2009 11:48 PMHelo Kanish,
this is not the one i was asking..
wht i mean was .
i use bind variable to get date while running the select statement , once i get the date then i want to choose any one of the table to run select query.
EG..
select col1,col2 from table1 where date between only if 01-jan-01 and 01-jan-05;
select col1,col2 from table2 where date between only if 02-jan-05 and 01-jan-08;
Run any one of the two . not all
thanks,
_raj -
Regarding the Line Item Information in BEx
Hi All,
I am having an issue regarding the data in an InfoCube..
According our report we need information from 0SD_C04. The information needed is Goods Issue Date, Actual Goods issue date, Quatity delivered, Quatity delivered lately, Quatity delivered on time.
In R/3 we are having the data date wise at line item level. I am getting the correct information if a particular Material (1000 Qty) sold on a particular date.
But if same material(1000 Qty)is sold on different dates then I am getting a Red X in BEx Report. How to get the date data at that level???
Thanks in advance...
Regards
YJHi Arun,
Sorry for the late response.
I am having the following structure in R/3
Material Goods Issue Date Act.g date Del Qty
100000070 20.08.2005 20.08.2005 1000
100000080 20.08.2005 20.08.2005 1000
100000080 21.08.2005 30.08.2005 600
But in BW I am getting:
Material Goods Issue Date Act.g date Del Qty
100000070 20.08.2005 20.08.2005 1000
100000080 X X 1600
If same material is delivered on different dates it is giving X in Report.
I hope it is now clear to you.
Regards
YJ -
Understanding the data storage
Hello,
In order to understand very well what happens regarding the data in the cube and in the relational database, here is a little scenario.
Clould you please tell me whether my understanding is correct or not. Further precisions are welcome :
If I send an amount (10 for example) in a based members intersection, the number 10 will be in the WB fact table (supposing that the table was empty just before) and in the WB partition.
Now supposing, I change the amount, in the same intersection, I send the number 20. Thus, there will be 2 entries in the wb table with the same SIGNEDDATA to 10.
Are there also 2 entries in the WB partition in the cube or only one to 20 ?
After that, I run a lite optimization, now both the entries are in the FAC2 tables.
Now If I send the amount 5 (still in the same intersection), there will be the amount -15 in the WB table. is it exact ?
At this moment, what is the situation regarding the OLAP WB and FAC2 partitions ?
If I retrieve the amount through a report, I asume that there will be a merger between the two fact tables in order to retrieve the right amount (ie 5 : 10 +10 -15), but I'm not sure.
Also, as long as the data intersection concerned a based member, the retrieve is made from the relational database, Right ? The OLAP partitions are used when the data we want to retrieve concerned parent members? The retrieve will be made through MDX queries ?
So, there is also a merger between the OLAP partitions in order to retrieve the right data ?
Best regards,
LionelI think it is question regarding Microsoft OLAP database. I am not sure about the other OLAP database's behavior.
Simple answers:
If you send 10 and 20 to make it 20, you have 2 entries in WB table. Each entry has 10 for their own intersection.
If you do lite optimize, your WB tables will be empty. And exact records will be moved to FAC2 table.
If you send 5, your WB table will have 1 entry that has -15. Total number of record for that intersection is 3.
However, number of records will not changed no matter what. Only exception is compress data during full optimize.
That value, 5 from cube is by merge of three partitions - FACT, FAC2 and FACTWB. Normally, you do not need to care about table itself. SSAS will do it based on partition scheme.
Data from relational database tables are correct in some cases such as WB partition. But if your WB partition is empty, data is from OLAP partition no matter it is base level or parent level.
We are using some different way to lookup relational tables to get data faster and faster in BPC. But it is your own risk if you try to make something to lookup that tables directly.
Maybe you are looking for
-
No audio call on my 900... can some one help?
I am having issues with my 900, I have no audio when making calls either outgoing or incoming...no speaker phone either. When I use Tango Video calls the audio works fine. Does anybody else have this problem and if so how did you solve it. I have a
-
Dear Experts can anybody please help me in getting ageing report project wise . We already have the ageing report Debtors or Creditors wise in the system but i want the ageing report project wise warm regards anand
-
ALL e-mail SENT since 28 Oct FAILED. Is this a SMP...
I use BT Yahoo e-mail and Outlook 2003. No problems whatsoever until yesterday when a client advised that he'd not received a couple of e-mails. I re-sent them and all looked fine. The pop-up box confirmed Send/Receive complete & the e-mail moved fro
-
Trying to install solaris 10 on sun file v210
Rebooting with command: boot net - install nowin Boot device: /pci@1f,700000/network@2 File and args: - install nowin 1000 Mbps FDX Link up Timeout waiting for ARP/RARP packet Timeout waiting for ARP/RARP packet Timeout waiting for ARP/RARP packet Ti
-
Can anyone give me an idea of how I could dynamically create graphs in my jsp? Any help will greatly be appreciated! Thanks!