07-17-2014 11:09 AM
My Requirement:
Suppose I am having a search help with the following data.
MATNR | SLNO | OPERN | PREHT |
---|---|---|---|
A | 1 | A1 | X |
A | 2 | A2 | |
A | 3 | A3 | X |
A | 4 | A4 | |
B | 1 | B1 | |
B | 2 | B2 | |
B | 3 | B3 | |
C | 1 | C1 | |
C | 2 | C2 |
Now I want to display the Search help with two colours [ZEBRA]
as shown above. The criteria will be defined by "Group by MATNR"
as shown above.
************************
" What I did till now.
SELECTION-SCREEN:
BEGIN OF BLOCK bl WITH FRAME TITLE text-001.
PARAMETERS:
s_matnr TYPE matnr OBLIGATORY, " Material Number
s_matkl TYPE matkl OBLIGATORY. " Material Group
SELECTION-SCREEN:
END OF BLOCK bl.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_matnr.
PERFORM f4_help_for_material USING 'S_MATNR'. " Search Help Working Fine
*******F4 Help **********
FORM f4_help_for_material USING l_dynprofield.
TYPES: BEGIN OF str_mat_oper,
matnr TYPE zpp_oper_master-matnr,
slno TYPE zpp_oper_master-slno,
opern TYPE zpp_oper_master-opern,
preht TYPE zpp_oper_master-preht,
END OF str_mat_oper.
DATA: it_mat_oper TYPE STANDARD TABLE OF str_mat_oper INITIAL SIZE 0,
wa_mat_oper TYPE str_mat_oper.
SELECT * FROM zpp_oper_master
CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_mat_oper
WHERE mandt = sy-mandt
ORDER BY matnr slno ASCENDING.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = l_dynprofield
value_org = 'S'
TABLES
value_tab = it_mat_oper.
ENDFORM. " F4_HELP_FOR_MATERIAL
Thanks in advance
Satpathy
07-17-2014 11:31 AM
Hi Satpathy,
Use FM: REUSE_ALV_POPUP_TO_SELECT insted of F4IF_INT_TABLE_VALUE_REQUEST.
prepare Fieldcatalog and pass I_ZEBRA = 'X'.
Regards,
Srikanth
07-17-2014 11:42 AM
Dear Srikanth
I want the colours in Group as shown in my Discussion..!!
For a Particular group One Color
For Another Group Another Color
Thanks
07-17-2014 11:54 AM
07-17-2014 12:57 PM
Hi Satpathy,
Ok...
Then try some thing like this....
Step1: call a subscreen whenever F4 event triggers: use CALL SCREEN...
Step2: In that subscreen display an ALV (REUSE_ALV_GRID_DISPLAY)and while displaying assign colors to the rows based on the MATNR
Step3: Enable user command event to capture the selected row value and pass back this to the req field.
Srikanth.