Logic required for Sort in ALV
Hi All,
I am dowloding the ALV report layout in excel sheet thorough mailing functionality.
I want to implenemnt the dynamic sort. Here I am writing this.but i want the logic for below code.
CALL FUNCTION 'LT_DBDATA_READ_FROM_LTDX'
EXPORTING
I_TOOL = 'LT'
IS_VARKEY = W_VARKEY_EU
TABLES
T_DBFIELDCAT = IT_DBFIELDCAT_EU
T_DBSORTINFO = IT_DBSORTINFO
T_DBFILTER = IT_FILTER_LAYOUT
T_DBLAYOUT = IT_DB_LAYOUT.
LIT_DBSORTINFO[] = IT_DBSORTINFO[].
SORT LIT_DBSORTINFO[] BY KEY1.
DELETE ADJACENT DUPLICATES FROM LIT_DBSORTINFO[] COMPARING KEY1.
LOOP AT LIT_DBSORTINFO[].
CLEAR: LW_SPOS,
LW_UP,
LW_DOWN,
LW_SUBTOT,
LW_COMP,
LW_EXPA,
LW_GROUP.
CLEAR IT_DBSORTINFO[].
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'SPOS'.
IF SY-SUBRC = 0.
LW_SPOS = IT_DBSORTINFO-VALUE.
ENDIF.
CLEAR IT_DBSORTINFO.
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'UP'.
IF SY-SUBRC = 0.
LW_UP = IT_DBSORTINFO-VALUE.
ENDIF.
CLEAR IT_DBSORTINFO.
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'DOWN'.
IF SY-SUBRC = 0.
LW_DOWN = IT_DBSORTINFO-VALUE.
ENDIF.
CLEAR IT_DBSORTINFO.
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'SUBTOT'.
IF SY-SUBRC = 0.
LW_SUBTOT = IT_DBSORTINFO-VALUE.
ENDIF.
CLEAR IT_DBSORTINFO.
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'COMP'.
IF SY-SUBRC = 0.
LW_COMP = IT_DBSORTINFO-VALUE.
ENDIF.
CLEAR IT_DBSORTINFO.
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'EXPA'.
IF SY-SUBRC = 0.
LW_EXPA = IT_DBSORTINFO-VALUE.
ENDIF.
CLEAR IT_DBSORTINFO.
READ TABLE IT_DBSORTINFO WITH KEY
KEY1 = LIT_DBSORTINFO-KEY1
PARAM = 'GROUP'.
IF SY-SUBRC = 0.
LW_GROUP = IT_DBSORTINFO-VALUE.
ENDIF.
LOOP AT IT_ALV_DATA FROM W_LOOP_FROM_EU TO W_LOOP_TO_EU.
LW_TABIX = SY-TABIX.
READ TABLE IT_FIELDCAT INTO LW_FIELDCAT WITH KEY
FIELDNAME = LIT_DBSORTINFO-KEY1.
IF SY-SUBRC = 0.
ASSIGN COMPONENT SY-TABIX OF
STRUCTURE IT_ALV_DATA TO <LFS>.
IF SY-SUBRC = 0.
CLEAR LW_CHAR.
LW_CHAR = <LFS>.
IF LW_SPOS= 'SPOS'.
LOGIC Required
ENDIF.
ELSEIF LW_OPTION = 'DOWN'.
LOgic required
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
regards,
Ajay reddy
Hai,
Let
1)general data
2)all customers
3)company code data
4)sales organization data
are the check box names,Then
Just use the piece of code below:
<b>IF general data = 'X'.
COUNT = COUNT + 1.
ENDIF.
IF all_customers = 'X'.
COUNT = COUNT + 1.
ENDIF.
IF company_code_data = 'X'.
COUNT = COUNT + 1.
ENDIF.
IF sales_organization_data = 'X'.
COUNT = COUNT + 1.
ENDIF.</b>
Now check whether more than one Check Boxes are selected or not
<b>IF COUNT GT 1.
"* Do the oprations what ever you want here
ENDIF.</b>
<b>Reward points if it helps you.</b>
Regds,
Rama chary.Pammi
Similar Messages
-
Logic required for a Internal table issue
Hi All,
I have 2 internal table. I need STLNR value to another internal table. Both having same field. But while reading from one internal table to another internal table using IDNRK key, One idnrk having 2 different stlnr value. But its taking only one. How to take both the values?
The internal table value like below.
it_stpo--> This is first table, Here one Idnrk having different stlnr value. I need the same in to next table. Here i read with idnrk field but its taking one stlnr value only into next table.
How to change the logic ?
Below is it_stpo table and next one is it_mbew_1
it_stpo
STLNR IDNRK MENGE
17224 00439RM1 2.3
17225 00439RM1 4.2
172333 00849RM2 5.6
172158 00432TM3 7.2
152164 00583RM4 8.4
176123 00583RM4 2.3
it_mbew_1
STLNR IDNRK STPRS
00439RM1 111.22
00439RM1 126.45
00849RM2 3.3364
00432TM3 15.5888
00583RM4 0
00583RM4 0.235
My logic like below,
SORT it_stpo BY idnrk.
SORT it_mbew_1 BY matnr.
LOOP AT it_mbew_1 INTO wa_mbew_1.
READ TABLE it_stpo INTO wa_stpo WITH KEY idnrk = wa_mbew_1-matnr BINARY SEARCH.
IF sy-subrc = 0.
wa_mbew_1-stlnr = wa_stpo-stlnr.
MODIFY it_mbew_1 FROM wa_mbew_1 TRANSPORTING stlnr WHERE matnr = wa_mbew_1-matnr.
ENDIF.
ENDLOOP.
Kindly help us.
MohanaTry below logic.
add one more field to it_stpo flag type char01.
update the field with value 'X'.
SORT it_stpo BY idnrk.
SORT it_mbew_1 BY matnr.
LOOP AT it_mbew_1 INTO wa_mbew_1.
CLEAR WA_STPO.
READ TABLE it_stpo INTO wa_stpo WITH KEY idnrk = wa_mbew_1-matnr
flag = 'X'.
if sy-subrc eq 0.
move ' ' to wa_stpo-flag.
modify it_stpo from wa_stpo index sy-tabix.
wa_mbew_1-stlnr = wa_stpo-stlnr.
MODIFY it_mbew_1 FROM wa_mbew_1 TRANSPORTING stlnr WHERE matnr = wa_mbew_1-matnr.
endif.
ENDLOOP.
Regards
Vinod -
Programming Logic required for pulling the records for past month /week
Hi All
I need help in the SQL programming logic.
Oracle Database Version: 10.2.0.3.0
Requirement
In a data warehouse environment, I need to programme for weekly and monthly automated batch jobs to insert the data from Data_tbl to Reporting_tbl for generating reports. Tables descriptions are given below.
Table1 - Data_tbl (Source table –this table gets updated everyday).
Record_dt first_name last_name
Table2 - Reporting_tbl_(Target table)
Cycle_dt first_name last_name
1. Monthly Report
In the SQL Query, I have where clause condition—
Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’
Using the above condition in development, I am pulling the data from source table for the past month data. This will be repeated every month and it should be automated.
i.e., if I run this report any time in dec 2008, it should pick records of dates from Nov 01st to Nov 30th 2008. if I run this report any time in Jan 2009, it should pick records of dates from Dec 01st to Dec 31st 2008.
Date Values should be assigned for past month. Value of Cycle_dt in target table should be end date of past month like 30-nov-2008, 31-dec-2008.
2. Weekly Report
In the SQL Query, I have where clause condition—
Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’
Here week start day is Monday and end day is Sunday.
If I run the report between Dec 08th to Dec 14th , it should pull records of dates from Dec 01st to Dec 07th 2008.
On Dec 15th, it should pick from Dec 08th to Dec 14th.
Value of Cycle_dt in target table should be end date of past week like 07-Dec-2008, 14-Dec-2008.
Please help me with the logics for both Monthly and Weekly reports.
ThanksHi,
For the monthly report, instead of
Where Record_dt >=’01-nov-08’ and record_dt<=’30-nov-08’say:
Where Record_dt >= TRUNC (ADD_MONTHS (SYSDATE, -1), 'MM')
and record_dt < TRUNC (SYSDATE, 'MM')SYSDATE is the current DATE.
TRUNC (SYSDATE, 'MM') is the beginning of the current month. (Notice the condition above is less than this date, not equal to it.)
ADD_MONTHS (STSDATE, -1) is a date exactly one month ago, therefore it is in the previous month.
For the weekly report, instead of:
Where Record_dt >=’01-dec-08’ and record_dt<=’07-dec-08’say
Where Record_dt >= TRUNC (SYSDATE - 7, 'IW')
and record_dt < TRUNC (SYSDATE, 'IW')TRUNC (dt, 'IW') is the beginning of the ISO week (Monday-Sunday) that contains dt. Again, notice the end condition is strictly less than the beginning of the current week. -
Reg logic required for selection-screen.
Hi,
i have one requirement
on selection screen 2 radio button
1 for service
2 for account
Parameter FILE LOCALFILE Filename
If the radiobutton ACCOUNT is selected the default name for file will be:
Rev_acc_com_&system_time_stamp&.dat
Elseif the radiobutton SERVICE is selected the default name for file will be:
Rev_srv_com_&system_time_stamp&.dat
some body can give the logic for this.take the following solution
data: tstamp type TZNTSTMPS.
data: filename type string.
call function 'CONVERT_INTO_TIMESTAMP'
exporting
I_DATLO = sy-datum
I_TIMLO = sy-uzeit
importing
E_TIMESTAMP = tstamp.
if ACCOUNT is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
else if SERVICE is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
the filename variable will be containing ur required file name..
reward points if useful.... -
Logic required for the requirement (urgent)
HI experts,
can anyone help me out regarding the following logic.
The logic will check for both complete and partial goods receipts and invoice receipts. Based on the PO line item history it will calculate the totals into following categories:
(1) Total PO Line Item value with both GR & IR
(2) Total PO Line Item value with GR but no IR
(3) Total PO Line Item value with IR but no GR
For a single PO line, it is possible to have the Total Line Item Value divided into one or more of the above three categories at the same time. For example, if for a PO line item with 100 unit at $10.00 per unit, there is a GR for 50 Units and IR for only 30 units, the three columns above will be populated as:
(1) Total PO Line Item value with both GR & IR 30 x 10 = 300
(2) Total PO Line Item value with GR but no IR 20 x 10 = 200
(3) Total PO Line Item value with IR but no GR 0 x 10 = 0
Similarly, if for a PO line item with 100 units and $10.00 per unit, there is a GR for 50 units and IR for 70 units, the three columns will be populated as:
(1) Total PO Line Item value with both GR & IR 50 x 10 = 500
(2) Total PO Line Item value with GR but no IR 0 x 10 = 0
(3) Total PO Line Item value with IR but no GR 20 x 10 = 200
Regards,
NagarajMaybe this example will help....
report zrich_0002 .
data: iekbe type table of ekbe with header line.
data: xmbew type mbew.
data: xekpo type ekpo.
data: begin of ibuckets occurs 0,
ebeln type ekpo-ebeln,
ebelp type ekpo-ebelp,
pgrir type p decimals 2, " Total GR & IR
pgr type p decimals 2, " Total GR
pir type p decimals 2, " Total IR
pgrni type p decimals 2, "GR no IR
pirng type p decimals 2, "IR no GR
end of ibuckets.
parameters: p_ebeln type ekko-ebeln,
p_ebelp type ekpo-ebelp.
start-of-selection.
clear iekbe. refresh iekbe.
select * into table iekbe from ekbe
where ebeln = p_ebeln
and ebelp = p_ebelp
and vgabe in ('1','2').
loop at iekbe.
clear ibuckets.
ibuckets-ebeln = iekbe-ebeln.
ibuckets-ebelp = iekbe-ebelp.
select single * from ekpo into xekpo
where ebeln = iekbe-ebeln
and ebelp = iekbe-ebelp.
select single * from mbew into xmbew
where matnr = xekpo-matnr.
case iekbe-vgabe.
when '1'.
ibuckets-pgrir = iekbe-menge * xmbew-stprs.
ibuckets-pgr = iekbe-menge * xmbew-stprs.
when '2'.
ibuckets-pgrir = iekbe-menge * xmbew-stprs.
ibuckets-pir = iekbe-menge * xmbew-stprs.
endcase.
collect ibuckets.
endloop.
loop at ibuckets.
ibuckets-pgrni = ibuckets-pgr - ibuckets-pir.
ibuckets-pirng = ibuckets-pir - ibuckets-pgr.
if ibuckets-pgrni < 0.
clear ibuckets-pgrni.
endif.
if ibuckets-pirng < 0.
clear ibuckets-pirng.
endif.
modify ibuckets.
endloop.
loop at ibuckets.
write:/ ibuckets-ebeln,
ibuckets-ebelp ,
ibuckets-pgrir,
ibuckets-pgr ,
ibuckets-pir ,
ibuckets-pgrni ,
ibuckets-pirng .
endloop.
Regards,
Rich Heilman -
MTD Logic Required for Calculation
I have Month and year field in my DSO. Values Year(2009) and Month(4)
I want below logic to calculate -
MTD qty % = (qty * elapse days) / no of days in month
so from the above, I want to know,
1. How can we get the no of days from the above 2 objects (year and month).
2. Elapse days are the days that are over from current date to Ist day of that month.
eg: current date - 04.03.2009 , 1st day of the month - 04.01.2009,
elapse days = 2. (you need to consider all days in the month, not only working days)
so my questions is how can we get, # of days n a month from above 2 fields and elapse days based on the above condition.
Also let me know, where in I need to put in my calculations at transformation level or at query level
please provide your suggestions.
Thanks,
PraHi Pra,
you can do this in both levels. But in this szenarion I would prefer a customer exit on query level. Otherwise you have to load data on daily basis.
There are several function modules to implement this logic. Take a look at e.g. FIMA_DAYS_AND_MONTHS_AND_YEARS. This FM expects 2 import dates. You can fill in 2 dates like 1st day of month & last day of month. You can use this FM two times. First for calcualting all days of the month, second with last day sy-datum.
I would use a calcualted key figure with formula variable of type customer exit. This variable will read the input date from an input ready date variable of type intervall based on 0CALMONTH.
Regards
Andreas -
Logic required for my normal report
Hi,
my report output is below .
docu # material no. quantity net price
55467488 12376 10 5
55467488 12376 20 10
55467489 12376 30 12
60 27
55347388 34567 56 8
55347387 34567 12 12
68 20
grand total ________________
128 47
My requirement is now user wants for same material instead of individual lines it should come only one line with addition operation.please help me how to do it ??In my int. table all the records availavle but ho
ex. 55467488 12376 60 27
55347388 34567 68 20
Please search for available information before turning to the forums for help.
Edited by: kishan P on Sep 3, 2010 11:00 AMHi,
Use AT NEW and AT END OF control statements for ur requirement. Search SCN how to use AT NEW and AT END OF statement or press F1.
Regards,
Selva -
Logic required for the following
hello all,
this is naveen.
i hope you will help me out with the following.
I'm creating a screen with vendor id,country,name and no push buttons.
in the next screen i'm having purchase doc., purchase group, company code along with insert and exit push buttons.
when i enter the data in the in both the screens and press insert only data from the second screen is uploading into the master table.
I request you to provide the correct PBO and PAI logic for this in a simple way.
points will be rewarded.
thanks
naveenPROGRAM ZVENDORMPOOL .
*& Module USER_COMMAND_0100 INPUT
text vendor first screen.
tables : lfa1.
DATA : BEGIN OF IT OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
LAND1 LIKE LFA1-LAND1,
NAME1 LIKE LFA1-NAME1,
END OF IT.
MODULE USER_COMMAND_0100 INPUT.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module USER_COMMAND_0110 INPUT
text vendor second screen
TABLES : EKKO.
DATA : BEGIN OF JT OCCURS 0,
EBELN LIKE EKKO-EBELN,
BUKRS LIKE EKKO-BUKRS,
EKORG LIKE EKKO-EKORG,
EKGRP LIKE EKKO-EKGRP,
END OF JT.
MODULE USER_COMMAND_0110 INPUT.
CASE SY-UCOMM.
WHEN 'INSE'.
INSERT: LFA1, EKKO.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0110 INPUT
Following are the screens designed
Ist screen with out any push buttons(PB).
2nd screen with PB.
When we click the insert PB in second screen data from both screens should be updated in corresponding master data tables.
(both screen logic is written in pai only by me)
pls got through and give suggestion) -
Logic required for creation of PR and PO report
Dear Experts,
I want to create a report which gives the details of internal lead time for creation purchase requisition to purchase order. Well which tables I need to use for this . I know some tables like eban, ekko to join. Can you please give me the correct information. I only want those purchase orders which are created with purchase requisition. I need to calculate how many days taken from PR to PO.Dear,
PR release date will be found in CDHDR table in CDHDR-UDATE. PO dates you can find as mentioned in replies.
But the problem is the time taking for executing the report. It will more lenghty to read different tables and give you output (if you go for yearly range data). ABAP dump error.
Better, just consult with ABAP team and they can give you a correct solution.
Regards,
Syed Hussain. -
CREATE TABLE COUNTRIES(CID INT,CNAME VARCHAR(100))
INSERT INTO COUNTRIES VALUES(1,'AUSTRALIA')
INSERT INTO COUNTRIES VALUES(2,'INDIA')
INSERT INTO COUNTRIES VALUES(3,'FRANCE')
INSERT INTO COUNTRIES VALUES(4,'BERLIN')
SELECT * FROM COUNTRIES
o/p
CID CNAME
2 INDIA
1 AUSTRALIA
4 BERLIN
3 FRANCE
here India should be always first position remaining countries values should be in sorted orderYou can use a conditional sorting =>
SELECT *
FROM COUNTRIES
ORDER BY CASE WHEN CNAME = 'INDIA'
THEN 0
ELSE 1 END,
CNAME
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Logic required for report in which selection criteria is more than one
Hi Friends,
I have below piece of selection-screen criteria in my report.
1)general data
2)all customers
3)company code data
a)company code
4)sales organization data
a)sales org.
b)dist. channel
c)division
d)field group
In above one, 1..4 are check boxes and a..d are select-options under the respective check box.
Please provide me the sample logic which I need to maintain in my report if user selects more than 1 check box.
Thnks in advance.Hai,
Let
1)general data
2)all customers
3)company code data
4)sales organization data
are the check box names,Then
Just use the piece of code below:
<b>IF general data = 'X'.
COUNT = COUNT + 1.
ENDIF.
IF all_customers = 'X'.
COUNT = COUNT + 1.
ENDIF.
IF company_code_data = 'X'.
COUNT = COUNT + 1.
ENDIF.
IF sales_organization_data = 'X'.
COUNT = COUNT + 1.
ENDIF.</b>
Now check whether more than one Check Boxes are selected or not
<b>IF COUNT GT 1.
"* Do the oprations what ever you want here
ENDIF.</b>
<b>Reward points if it helps you.</b>
Regds,
Rama chary.Pammi -
Logic required for select query
i have a internal table with 4 columns. 3 columns having varrious material numbers. i want to check every material with mara table. its available or not?
I need to write a single select queary? how to do this?
My internal table looks like
matnr idnrk s_idnrk normt
test10 10UPC3050 F14839030 test.
i wrotes like below
select matnr from mara into table
i_mara2 for all entries in
i_sub_file
where matnr = i_sub_file-matnr and
matnr = i_sub_file-idnrk and
matnr = i_sub_file-s_idnrk.
Its not working, How to manage this? Anyone help this.
MohahaHi fill the ranges with ur 3 material numbers.
and use it in ur select query.
define a range for mat no.
ranges : r_matnr for mara-matnr.
read table or loop with i_sub_file.
r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low = 'i_sub_file-matnr.
append r_matnr. clear r_matnr.
r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low = 'i_sub_file-idnrk.
append r_matnr. clear r_matnr.
r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low = 'i_sub_file-s_idnrk.
append r_matnr. clear r_matnr.
now in select.
select matnr from mara into table
i_mara2 where matnr in r_matnr. -
ALV ...Logic required
Hi every body,
I have one requirement like an alv report will display
output which contains a material number.
<b>If i click On the material number it shud go to MM03...Accounting view
Logic required for this.</b>I am a beginner ...Plz help me...
Thanks in advance.
Message was edited by: raja gurralaHi,
See the code sample,
INCLUDE <icon>.
* Predefine a local class for event handling to allow the
* declaration of a reference variable before the class is defined.
CLASS lcl_event_receiver DEFINITION DEFERRED.
DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid ,
o_dockingcontainer TYPE REF TO cl_gui_docking_container ,
o_eventreceiver TYPE REF TO lcl_event_receiver,
wa_layout TYPE lvc_s_layo ,
wa_variant TYPE disvariant.
CONSTANTS : c_a(1) TYPE c VALUE 'A' , " All Layouts
c_x(1) TYPE c VALUE 'X'.
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
* Hot Spot Click
handle_hotspot
FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING e_row_id
e_column_id
es_row_no,
* Double Click
handle_double_click
FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row
e_column
es_row_no,
ENDCLASS. "lcl_event_receiver DEFINITION
* Implementation
CLASS lcl_event_receiver IMPLEMENTATION.
*& Method handle_hotspot
* This method is called when the user clicks on a hotspot to drill down.
* The following types are exported from the ALV
* LVC_S_ROW
* LVC_S_COL
* LVC_S_ROID
METHOD handle_hotspot.
* The hotspot processing coded in the form below.
PERFORM f9900_handle_hotspot USING e_row_id
e_column_id
es_row_no.
ENDMETHOD. "handle_hotspot
*& Method handle_double_click
METHOD handle_double_click.
* The double click processing should be coded in the form below.
PERFORM f9901_handle_double_click USING e_row
e_column
es_row_no.
ENDMETHOD. "HANDLE_DOUBLE_CLICK
FORM f9900_handle_hotspot USING p_row_id
p_column_id
p_row_no.
*Read internal table for proper value.
READ TABLE i_output
INDEX p_row_id
INTO wa_output.
* Call the transaction MMBE
SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
ENDFORM. " f9900_handle_hotspot
*& Form f9901_handle_double_click
* Double Click
FORM f9901_handle_double_click USING p_row
p_column
p_row_no.
READ TABLE i_output INDEX p_row INTO wa_output.
CASE p_column.
WHEN 'MATNR'.
IF NOT wa_output-matnr IS INITIAL.
SET PARAMETER ID 'MAT' FIELD wa_output-matnr.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
ENDIF.
ENDCASE.
ENDFORM. " f9901_handle_double_click
U can use either hot spot or double click event.
If u r using hotspot set the hotspot = 'X' in fieldcatalog.
Hope this helps.
OR another method without oops concept
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
data:lv_matnr LIKE v_mmim_lc-matnr, "Material
read table i_output into w_output index rs_selfield-tabindex.
lv_matnr = w_output-matnr.
SET PARAMETER ID 'MAT' FIELD lv_matnr.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
Clear: lv_matnr.
ENDFORM.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
<b> i_callback_user_command = 'USER_COMMAND'</b>
i_background_id = 'ALV_BACKGROUND'
IS_LAYOUT = I_LAYOUT
it_fieldcat = i_fieldcat "field catalog
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
TABLES
t_outtab = i_output "output table
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.
Kindly reward points if this helps u, revert back with queries.
Message was edited by: Judith Jessie Selvi -
Why Data Sort is required for Merge Join Transformation
hi,
In my understanding Merge Join works very similar to T SQL joins. But I am trying to understand why Sort is a compulsory requirement? I have looked into following article but not helpful
http://technet.microsoft.com/en-us/library/ms137653(v=sql.105).aspx
aamertaimor
aamertaimorMerge Join is going to walk through two sets in the order that you gave in your input or using the Sort transformation. So, it loads one record from one input and one record from the second input. If the keys match, it will output the row with information
from both inputs. If the left input has a value that is less than the value in right input, then either the row from the left input is sent out with no right input information (if there is an outer join) or if the join is an inner join, the
Merge Join component will get the next row from Left input. If the right input has a value that is less than the value that in the left input, then if there is a full outer join, output the right input with no left input information otherwise, get the
next row from the right input.
Here is the beauty, SSIS only needs to retain a couple rows in memory.
What if Microsoft decided that there is no requirement for sorting? Then in order for the Merge join to work is that it would load all of the rows from one input into memory and then the Merge Join would look up the row in memory. That means
a large amount of memory would be needed.
By the way, if you want Merge Join behavior without the sort, use a Lookup component.
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com -
Logic for Refreshing the ALV Report (Very Urgent)
Hi Experts,
My <b>ALV report</b> needs a <b>refresh button</b> on the output.
The <b>Refresh button</b> should be available to allow user to keep this report on screen and <b>refresh regularly</b> rather than <b>going back</b> and <b>running it again.</b>
I am using <b>Function modules</b> and not <b>OOPS Concept</b> here.............As i am<b> unaware</b> of OOPS Please provide me solution in <b>FM's Only</b>.
Kindly send me <b>sample logic</b> for this, <b>Very urgent</b> if ur reply is helpfull.... u will be <b>rewarded heavily</b>.......................
THanks in advance.
Rajesh KumarHi,
This mean to say that if you have a 'refresh' push button in your gui status, every time you press the button, the list should get refreshed.
In ALV, to refresh the table you have to call the method "refresh_table_display".
It has the syntax very similar to creating the table.
It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)
or
if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).
the synatx is :-
call method grid (name of grid )->refresh_table_display
exporting
IS_STABLE = <STRUCT OF TYPE LVC_S_STBL> (THIS IS FOR DATA REFRESHING)
I_SOFT_REFRESH = <VARIABLE OF CHAR 01> (THIS IS FOR ICON REFRESHING).
Regards,
Bhaskar
Maybe you are looking for
-
Help getting"use itunes to restore" error message
I connected my ipod to my friends computer to copy a program i had on their to his computer and i then i take my ipod out and get the "connect to your computer use itunes to restore: error message. I know i can just restore it im not going to do that
-
Oracle Application Express (APEX) and WebLogic Security
Hi, Has anyone tried integrating Oracle APEX (custom authentication) with WebLogic Security as the user store? Thanks Joel
-
I am creating an "electronic" panel that will be viewed at a convention. I am going to set my document properties to open at "full screen". I also want to set the transitions and the seconds each panel will appear on the screen and the background col
-
Before I make a fool of myself on a devel ML that I really shouldn't be on, can someone confirm something for me? I have a patch that starts something like this: --- file.c.orig 2006-03-31 14:37:18.000000000 +0200 +++ file.c 2006-03-31 14:41:10.00000
-
What is the fastest OP system for a Macbook Pro Retina 2.6?
What is the fastest OP system for a Macbook Pro Retina 2.6? I'm new to Mac so please excuse the weird question.