2006 Sep 13 4:29 PM
Hi friends,
plz help me with the below requirement..
1. Above the ALV Grid report, below date and time should display the following :
a. display - Provided selection criteria:
Material Group: <print the select-options value user provided>
Batch Number:<print the select-options value user provided>
Movement Type:<print the select-options value user provided>
% Tolerance:<print the select-options value user provided>
how to achieve the above.
regards,
siri.
2006 Sep 13 4:41 PM
CALL FUNCTION 'SELOPT_PRINT'
EXPORTING
TEXT = TEXT-T06
TABLES
SELOPT = SO_DOCNO.
U can use the above FM to get the description for the select-option. The above SO_DOCNO is for document numbers and it would print in the report as below.
Document : selectoption text.
Hi friends,
plz help me with the below requirement..
1. Above the ALV Grid report, below date and time should display the following :
a. display - Provided selection criteria:
Material Group: <print the select-options value user provided>
Batch Number:<print the select-options value user provided>
Movement Type:<print the select-options value user provided>
% Tolerance:<print the select-options value user provided>
how to achieve the above.
regards,
siri.
2006 Sep 13 4:36 PM
Hi Sireesha,
Try this..
use this code in top-of-page event.
DATA: lt_selections TYPE TABLE OF rsparams
WITH HEADER LINE INITIAL SIZE 30.
REFRESH lt_selections.
WRITE:/2 'Selection-screen Parameters:'(020) COLOR COL_HEADING.
FORMAT COLOR OFF.
Get the contents of current selections of report in the internal
table LT_SELECTIONS.
FI_DOCUMENT
IF p_fidoc = 'X'.
lt_selections-selname = 'P_FIDOC'.
lt_selections-kind = 'P'.
lt_selections-low = 'X'.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_BUKRS'.
lt_selections-kind = 'P'.
lt_selections-low = p_bukrs.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_GJAHR'.
lt_selections-kind = 'P'.
lt_selections-low = p_gjahr.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_BGJAHR'.
lt_selections-kind = 'P'.
lt_selections-low = p_bgjahr.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_MONAT'.
lt_selections-kind = 'P'.
lt_selections-low = p_monat.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_BMONAT'.
lt_selections-kind = 'P'.
lt_selections-low = p_bmonat.
APPEND lt_selections.
CLEAR lt_selections.
EC_PCA_ITM
ELSEIF NOT p_fisl IS INITIAL.
lt_selections-selname = 'P_FISL'.
lt_selections-kind = 'P'.
lt_selections-low = 'X'.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_RCOMP'.
lt_selections-kind = 'P'.
lt_selections-low = p_rcomp.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_RLDNR'.
lt_selections-kind = 'P'.
lt_selections-low = p_rldnr.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_RYEAR'.
lt_selections-kind = 'P'.
lt_selections-low = p_ryear.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_BRYEAR'.
lt_selections-kind = 'P'.
lt_selections-low = p_bryear.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_POPER'.
lt_selections-kind = 'P'.
lt_selections-low = p_poper.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_BPOPER'.
lt_selections-kind = 'P'.
lt_selections-low = p_bpoper.
APPEND lt_selections.
CLEAR lt_selections.
EC_PCA_ITM
ELSEIF NOT p_ecpca IS INITIAL.
lt_selections-selname = 'P_ECPCA'.
lt_selections-kind = 'P'.
lt_selections-low = 'X'.
APPEND lt_selections.
CLEAR lt_selections.
lt_selections-selname = 'P_KOKRS'.
lt_selections-kind = 'P'.
lt_selections-low = p_kokrs.
APPEND lt_selections.
CLEAR lt_selections.
PP_ORDERS
ELSEIF NOT p_ppord IS INITIAL.
lt_selections-selname = 'P_PPORD'.
lt_selections-kind = 'P'.
lt_selections-low = 'X'.
APPEND lt_selections.
CLEAR lt_selections.
-Start-Mod$01CHG999999--
lt_selections-selname = 'P_WERKS'.
lt_selections-kind = 'P'.
lt_selections-low = p_werks.
APPEND lt_selections.
CLEAR lt_selections.
-End-Mod$01--CHG999999--
WORKITEM
ELSEIF NOT p_wkitm IS INITIAL.
lt_selections-selname = 'P_WKITM'.
lt_selections-kind = 'P'.
lt_selections-low = 'X'.
APPEND lt_selections.
CLEAR lt_selections.
IDOC
ELSEIF NOT p_idoc IS INITIAL.
lt_selections-selname = 'P_IDOC'.
lt_selections-kind = 'P'.
lt_selections-low = 'X'.
APPEND lt_selections.
CLEAR lt_selections.
ENDIF.
IF sy-subrc <> 0.
TEXT-014 = 'Error getting selection criteria of report'.
WRITE AT /(sy-linsz)
'Error getting selection criteria of report'(014) CENTERED.
SKIP 2.
EXIT.
ENDIF.
Display the selection criteria
CALL FUNCTION 'RS_LIST_SELECTION_TABLE'
EXPORTING
report = sy-cprog
seltext = 'X'
newpage = 'X'
TABLES
sel_tab = lt_selections
EXCEPTIONS
sel_tab_empty = 1
OTHERS = 2.
CASE sy-subrc.
WHEN 0.
WHEN 1.
TEXT-015 = 'No selection criteria found'.
WRITE AT /(sy-linsz) 'No selection criteria found'(015) CENTERED.
SKIP 2.
WHEN OTHERS.
TEXT-016 = 'Errors occured while displaying selection criteria'.
WRITE AT /(sy-linsz)
'Errors occured while displaying selection criteria'(016) CENTERED
.
SKIP 2.
ENDCASE.
-Anu
2006 Sep 13 4:39 PM
Hi Anup,
Thankx.
i have to display both high and low values .
will the above work for me?
regards,
siri.
2006 Sep 13 4:39 PM
if i understood your problem correctly, you want the Material Group,Batch no etc... fields to be appear on the top of list of ALV GRID.
if i am right, follow as below.
check this link to know how to call
"REUSE_ALV_COMMENTARY_WRITE" function to display HEADINGS.
in this program they used <b>t_header</b> to populate headings.
what you have to do is,also append your material group ,batch no etc.. fields to this <b>t_header</b>. and call the above function module.
like,
<b>t_header</b>
wa_header-typ = 'S'.
read table S_MAT_GRP INDEX 1.
concatenate S_MAT_GRP-LOW
S_MAT_GRP-HIGH INTO
wa_header-info.
append wa_header to t_header.
like this you have to add your material group,batch no etc..
Regards
srikanth
2006 Sep 13 4:41 PM
CALL FUNCTION 'SELOPT_PRINT'
EXPORTING
TEXT = TEXT-T06
TABLES
SELOPT = SO_DOCNO.
U can use the above FM to get the description for the select-option. The above SO_DOCNO is for document numbers and it would print in the report as below.
Document : selectoption text.
2006 Sep 13 4:49 PM
2006 Sep 13 6:05 PM
hi friends,
help me with this.
how can i get some space between time,date and the select-option data.
regards,
siri.