How to add colour to a HTMLDB_ITEM.select_list_from_query in APEX?
I have created a manual tabular form using HTMLDB_ITEM.select_list_from_query as on of the fields. it queries a look up table for the values.
for eg. if the field is 'PRIORITY' the list will show 'High', 'Medium', Low.
I need to color code it as Red, Orange, Yellow resp.
HTMLDB_ITEM.SELECT_LIST_FROM_QUERY (12,PRIORITY,'SELECT
INITCAP(lookup_value)
,lookup_value r
FROM ofss_lookup
WHERE lookup_name = ''PRIORITY''
ORDER BY lookup_sequence') "PRIORITY"
that is When the user is inserting a new record he chooses 'High' , in the drop down list the Background color for the word 'High' is red.
also the existing records queried will also display the color based on the data in the field.
How can this be done?
How do i pass the HTML parameters
Hi,
You can only update the background colour of the OPTION tag itself.
What you could do, is something like:
SELECT ENAME d, EMPNO || '" style="color:yellow; background-color:' || CASE WHEN ENAME LIKE 'A%' THEN 'red' ELSE 'blue' END || '"' r
FROM EMP
ORDER BY 1
{code}
This example sets the font colour to yellow and the background colour to either red or blue depending on the ENAME value - obviously, adjust as required.
Andy
Similar Messages
-
HI guru,
WA_HEAD-TYP = 'S'.
WA_HEAD-KEY = 'ON SPEC PRODUCTION' .
CONCATENATE ON_SPEC '%' INTO LV_ONSPEC.
WA_HEAD-INFO = LV_ONSPEC.
APPEND WA_HEAD TO TS_HEAD.
CLEAR WA_HEAD.
here i want add colour for onspec production.
how to do this???Hi Subhasis,,
Demo program to color particular row or column or cell of an ALV list using 'REUSE_ALV_LIST_DISPLAY'
Check this link for the demo program:
http://****************/Tutorials/ALV/ColorSALV/Demo.htm
REPORT ZALV_LIST1.
TABLES:
SPFLI.
TYPE-POOLS:
SLIS.
PARAMETERS:
P_COL TYPE I ,
P_ROW TYPE I,
P_COLOR(4) TYPE C .
DATA:
T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FS_FIELDCAT LIKE LINE OF T_FIELDCAT,
FS_LAYOUT TYPE SLIS_LAYOUT_ALV ,
W_COLOR(4) ,
W_ROW TYPE I,
W_FIELDNAME(20),
W_PROG TYPE SY-REPID.
DATA:
BEGIN OF T_SPFLI OCCURS 0,
COLOR(4),
CHECKBOX ,
CELL TYPE SLIS_T_SPECIALCOL_ALV,
CARRID TYPE SPFLI-CARRID,
CONNID TYPE SPFLI-CONNID,
CITYFROM TYPE SPFLI-CITYFROM,
CITYTO TYPE SPFLI-CITYTO,
DISTANCE TYPE SPFLI-DISTANCE,
END OF T_SPFLI.
DATA:
FS_CELL LIKE LINE OF T_SPFLI-CELL.
SELECT *
FROM SPFLI
INTO CORRESPONDING FIELDS OF TABLE T_SPFLI.
W_COLOR = P_COLOR.
T_SPFLI-COLOR = P_COLOR.
IF P_COL IS INITIAL AND P_ROW GT 0.
MODIFY T_SPFLI INDEX P_ROW TRANSPORTING COLOR.
ENDIF.
FS_FIELDCAT-FIELDNAME = 'CARRID'.
FS_FIELDCAT-REF_TABNAME = 'SPFLI'.
FS_FIELDCAT-COL_POS = 1.
FS_FIELDCAT-KEY = 'X'.
FS_FIELDCAT-HOTSPOT = 'X'.
APPEND FS_FIELDCAT TO T_FIELDCAT.
CLEAR FS_FIELDCAT .
FS_FIELDCAT-FIELDNAME = 'CONNID'.
FS_FIELDCAT-REF_TABNAME = 'SPFLI'.
FS_FIELDCAT-COL_POS = 2.
FS_FIELDCAT-KEY = 'X'.
FS_FIELDCAT-HOTSPOT = 'X'.
APPEND FS_FIELDCAT TO T_FIELDCAT.
CLEAR FS_FIELDCAT .
FS_FIELDCAT-FIELDNAME = 'DISTANCE'.
FS_FIELDCAT-REF_TABNAME = 'SPFLI'.
FS_FIELDCAT-COL_POS = 3.
FS_FIELDCAT-KEY = ' '.
FS_FIELDCAT-EDIT = 'X'.
APPEND FS_FIELDCAT TO T_FIELDCAT.
CLEAR FS_FIELDCAT.
FS_FIELDCAT-FIELDNAME = 'CITYFROM'.
FS_FIELDCAT-REF_TABNAME = 'SPFLI'.
FS_FIELDCAT-COL_POS = 4.
FS_FIELDCAT-KEY = ' '.
APPEND FS_FIELDCAT TO T_FIELDCAT.
LOOP AT T_FIELDCAT INTO FS_FIELDCAT.
IF FS_FIELDCAT-COL_POS EQ P_COL.
FS_FIELDCAT-EMPHASIZE = P_COLOR.
W_FIELDNAME = FS_FIELDCAT-FIELDNAME.
IF P_ROW IS INITIAL AND P_COL GT 0.
MODIFY T_FIELDCAT FROM FS_FIELDCAT TRANSPORTING EMPHASIZE.
ENDIF.
ENDIF.
ENDLOOP.
FS_CELL-FIELDNAME = W_FIELDNAME .
FS_CELL-COLOR-COL = 6.
FS_CELL-NOKEYCOL = 'X'.
APPEND FS_CELL TO T_SPFLI-CELL.
IF P_ROW IS NOT INITIAL AND P_COL IS NOT INITIAL.
MODIFY T_SPFLI INDEX P_ROW TRANSPORTING CELL.
ENDIF.
FS_LAYOUT-INFO_FIELDNAME = 'COLOR'.
FS_LAYOUT-BOX_FIELDNAME = 'CHECKBOX'.
FS_LAYOUT-COLTAB_FIELDNAME = 'CELL'.
FS_LAYOUT-F2CODE = '&ETA'.
W_PROG = SY-REPID.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = W_PROG
IS_LAYOUT = FS_LAYOUT
IT_FIELDCAT = T_FIELDCAT
TABLES
T_OUTTAB = T_SPFLI
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.
NOTE
Column and Row are colored with a coded color Cxyz.
Where C: Color (coding must begin with C)
X: Color Number
Y: Bold
Z: Inverse.
Reward if found useful...,,,,,
Regards ,
Sreekar.Kadiri. -
How to add a copy option or button in apex report
I aint sure if this is meant to go in this disccussion. If an wrong please let me know the right place it should go. Thanks
I need soime help implamenting a copy button/option in oracle. I have a interactive report and when you click on the unique id it takes you to the form where you can edit the report. Now I wanted to add an option so when you click on the unqie id(pencil in edit area). It will give you 2 option, one of the option will be to view the report(view) and the other option will be to copy the report. If you click on view, it should take you the form where you can edit the report and when you click on copy, it should copy the report and take you to a blank form.
Another option is to have a copy button on each report next to the unquie id. In the image belowyou will see the edit pencil and sure everyone know what it is, if you deal with oracle apex.
Basically, when you click on the pencil you will get those two options above. The alternative way was to just have a copy button next to each of them and you can just click on that to copy.
The reason why I want to do this is because I was having some issues with colons, commas, etc. Basically I had a copy button in the form and some of the form has colons, etc and because of this the copy button stop the form from render and also shows a 404 error page, which was quiet annoying.
If anyone have any idea how to do one of the two approaches, please give me a stage by stage PLEASE.
Thanks youdave_414 wrote:
I aint sure if this is meant to go in this disccussion. If an wrong please let me know the right place it should go. Thanks
I need soime help implamenting a copy button/option in oracle. I have a interactive report and when you click on the unique id it takes you to the form where you can edit the report. Now I wanted to add an option so when you click on the unqie id(pencil in edit area). It will give you 2 option, one of the option will be to view the report(view) and the other option will be to copy the report. If you click on view, it should take you the form where you can edit the report and when you click on copy, it should copy the report and take you to a blank form.
Another option is to have a copy button on each report next to the unquie id. In the image belowyou will see the edit pencil and sure everyone know what it is, if you deal with oracle apex.
Basically, when you click on the pencil you will get those two options above. The alternative way was to just have a copy button next to each of them and you can just click on that to copy.
The reason why I want to do this is because I was having some issues with colons, commas, etc. Basically I had a copy button in the form and some of the form has colons, etc and because of this the copy button stop the form from render and also shows a 404 error page, which was quiet annoying.
If anyone have any idea how to do one of the two approaches, please give me a stage by stage PLEASE.
Thanks you
Your question has to do with Apex, not the database. Please see the Apex forum at Oracle Application Express (APEX) -
How do I colour the background on my form and add a header to each page
I have created a 4 page form. HI want to have each page a light cream but can not finure out how to add colour and I want the header to show on each page. Any ideas?
Hi DouglasReid,
Please try the steps mentioned below to add color and headed and footer.
Once you are in the design view,
1) Click on the Option >Click to Add Header to add Header.
2) Click on forms setup to change to color of the form.
Thanks,
Vikrantt Singh -
How to add a gradient or 50% transparent fill to an .ai imported path?
Hello All;
I need some help. My task sounds simple enough but not sure how to accomplish it.
I created the following path in Illustrator (See attached illustration - the top one). This is actually for a lower-third graphic.
I have been successful at importating that into .ai. Though should I be using a solid or a shape layer or doesn't it matter ?
I can add a stroke which affects the color and thickness of the outlines OK.
However, I can't figure out how to add either a gradient fill or one that is 50% transparent ? Can anyone help ?
Oh ... I'll mention I'm using After Effects CS3.
Thanks.
TimRick;
I've used Illustrator for quite a while both at home and at work but I really havn't had to do anything that complex yet. Same goes for Photoshop. I bought DVD tutorials for most of the productivity software I use and when you gave your first explanation, I watched the DVD tutorial on Importing into AE so I know what you're referring to when you say to import as composition. So far, I've only tried to import into AE by copying and pasting. I think that's why I just got the path and not the background. I'll try importing a composition shortly and see if I get the fill too. I actually found a tutorial on making the type of shape I need to in Photoshop so maybe I'll try that instead of Illustrator and then import that into AE.
Btw - It may not actually be a gradient fill I need to use but instead a solid fill with the top half lighter and buttom half darker.
In case you're interested, here's actually what I'm trying to create for a video project. I could actually buy the animation for $8 but I figured that this can't be that difficult and I need to learn this stuff anyway ... http://videohive.net/item/lower-third-15-different-colour-schemes/145337?WT.ac=category_th umb&WT.seg_1=category_thumb&WT.z_author=berol
Tim -
Hi, All.
Please , tell me how to add a new CSS definition.
do i have to add a new file(ccs or xss)?
Where should i add a definition to use it in property pane in Jdev ?
regardsUse key words like "CSS" to search. You can also refer to this recent thread :
Can we colour the rows in the column of a table
--Mukul -
How to add new field XREF3 in FB50
Hi,
I have a problem with adding the new field XREF3 in FB50 transaction in Items window. I configured field status group in OBC4 and OB41 transaction for XREF3 as optional entry. XREF3 is available in FB01 transaction but not in FB50. I checked table settings for Item window in FB50 using Administrator button. Field XREF3 is not displayed in current settings window. I checked also that structure ACGL_ITEM include the field XREF3. Can you give me any advice how to add the field XREF3 in this enjoy transaction FB50 ?
Thanks in advance.
Zbigniew Debowskihi,
start FB50!
at the upper right corner of the items, there is a small coloured box (blue, yellow and white), click on it
click Administrator in the popup
search for XREF3 in the list, the field Invisible (last coloum) should be ticked, untick it!
click Activate, than Close, than Close again
hope this helps
ec -
How to add join conditions in ABAP Query.
Hi,
I need a help on "ABAP Query".
How to add join conditions in ABAP Query.
Thanks in advance.
Thanks & Regards,
RamanaHi,
See below code,
*& Report ZRNP_ALV_SO
REPORT zrnp_alv_so MESSAGE-ID z7rnp .
INCLUDE zrnp_include .
*SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-004 .
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln ,
s_auart FOR v_auart ,
s_vkorg FOR v_vkorg ,
s_spart FOR v_spart ,
s_kunnr FOR v_kunnr ,
s_matnr FOR v_matnr .
SELECTION-SCREEN END OF BLOCK blk1 .
*AT SELECTION SCREEN *
AT SELECTION-SCREEN.
SELECT SINGLE vbeln
FROM vbak INTO vbak-vbeln
WHERE vbeln IN s_vbeln.
IF sy-subrc <> 0.
MESSAGE e202.
ENDIF.
*START OF SELECTION *
START-OF-SELECTION .
PERFORM data_select.
PERFORM t_sort USING i_sort .
PERFORM event_cat USING i_event .
PERFORM fld_cat USING i_fldcat[] .
PERFORM t_layout USING i_layout .
PERFORM fld_cat2 USING i_fldcat2[] .
PERFORM call_alv.
* DATA SELECT *
*& Form DATA_SELECT
* text
* --> p1 text
* <-- p2 text
FORM data_select .
REFRESH: it_vbfa, it_so1, it_del_ful ,it_del1 .
BREAK-POINT.
*SELECT*
*a~vbeln*
*a~auart*
*a~vkorg*
*a~spart*
*a~kunnr*
*b~posnr*
*b~matnr*
*c~maktx*
*b~kwmeng*
*b~vrkme*
*INTO TABLE it_so1 FROM vbak AS a*
*INNER JOIN vbap AS b ON b~vbeln = a~vbeln*
*INNER JOIN makt AS c ON c~matnr = b~matnr*
*AND c~spras = sy-langu*
*WHERE a~vbeln IN s_vbeln .*
IF sy-subrc = 0.
SORT it_so1 BY vbeln.
DELETE ADJACENT DUPLICATES FROM it_so1.
ENDIF.
* COLURING DISPLAY *
DATA: ld_color(1) TYPE c .
* LOOP AT it_so1 INTO wa_so.
* Populate color variable with colour properties
* Char 1 = C (This is a color property)
* Char 2 = 3 (Color codes: 1 - 7)
* Char 3 = Intensified on/off ( 1 or 0 )
* Char 4 = Inverse display on/off ( 1 or 0 )
* i.e. wa_ekko-line_color = 'C410'
* ld_color = ld_color + 1.
* Only 7 colours so need to reset color value
* IF ld_color = 8.
* ld_color = 1.
* ENDIF.
* CONCATENATE 'C' ld_color '10' INTO wa_so-line_color.
** wa_ekko-line_color = 'C410'.
* MODIFY it_so1 FROM wa_so.
* ENDLOOP .
* IF sy-subrc = 0.
IF NOT it_so1[] IS INITIAL.
SELECT vbelv
posnv
vbeln
posnn
vbtyp_n
INTO TABLE it_vbfa
FROM vbfa
FOR ALL ENTRIES IN it_so1
WHERE vbelv = it_so1-vbeln
AND posnn = it_so1-posnr
AND vbtyp_n ='J' .
IF sy-subrc = 0.
SELECT vbeln
posnr
matnr
werks
lgort
charg
lfimg
vrkme
FROM lips INTO TABLE it_del_ful
FOR ALL ENTRIES IN it_vbfa
WHERE vbeln = it_vbfa-vbeln
AND posnr = it_vbfa-posnn.
ENDIF.
ENDIF.
ENDFORM. " DATA_SELECT
**************** EVENT CATALOG ****************************************
*& Form EVENT_CAT
* text
* -->P_I_EVENT text
FORM event_cat USING p_i_event TYPE slis_t_event .
REFRESH p_i_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
* EXPORTING
* I_LIST_TYPE = 0
IMPORTING
et_events = p_i_event
* EXCEPTIONS
* LIST_TYPE_WRONG = 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.
READ TABLE p_i_event WITH KEY name = slis_ev_top_of_page INTO t_event.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO t_event-form.
MODIFY p_i_event FROM t_event INDEX sy-tabix TRANSPORTING form.
ENDIF.
CLEAR t_event .
ENDFORM. " EVENT_CAT
**********FORM FOR EVENT TOP_OF_PAGE**********************************
FORM top_of_page .
REFRESH i_listheader.
DATA: t_header TYPE slis_listheader.
DATA: v_text(50).
WRITE sy-datum TO v_text.
CLEAR t_header.
t_header-typ = 'S'.
t_header-key = "Date".
t_header-info = v_text.
APPEND t_header TO i_listheader.
CLEAR t_header.
CLEAR v_text.
WRITE: 'SALES ORDER & DELIVERY DETAILS REPORT ' TO v_text .
t_header-typ = 'S'.
t_header-key = 'TITLE'.
t_header-info = v_text.
APPEND t_header TO i_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader.
* I_LOGO = 'ALV_BACKGROUND'.
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
******** FIRST ALV GRID DISPLAY ***************************************
FORM call_alv .
* FORM TO MAKE THE CELL CONTENTS INVISIBLE.
* PERFORM INVISIBLE_CELL_CONTENTS. *
*EXCLUDE-DECLARATION.
CLEAR wa_exclude.
wa_exclude-fcode = '&VEXCEL'.
APPEND wa_exclude TO i_exclude.
*& Form CALL_ALV
* text
* --> p1 text
* <-- p2 text
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND1'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_background_id = 'ALV_BACKGROUND'
is_layout = i_layout
it_fieldcat = i_fldcat[]
it_excluding = i_exclude
it_sort = i_sort
it_events = i_event
TABLES
t_outtab = it_so1
* 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. " CALL_ALV
************** FIRST FIELDCATALOG *************************************
*& Form FLD_CAT
* text
* -->P_I_FLDCAT[] text
FORM fld_cat USING p_i_fldcat TYPE slis_t_fieldcat_alv.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES ORDER NO.'.
i_fldcat-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-hotspot = 'X'.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'AUART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'."TABLE NAME
i_fldcat-seltext_m = 'SALES DOC. TYPE'.
i_fldcat-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VKORG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES ORG.'.
i_fldcat-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 12. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'SPART'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DIVISION'.
i_fldcat-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KUNNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SOLD TO PARTY'.
i_fldcat-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES DOC. ITEM'.
i_fldcat-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 17. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'MATERIAL NO.'.
i_fldcat-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'MAKTX'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'DESCRIPTION'.
i_fldcat-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'KWMENG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'QUANTITY'.
i_fldcat-col_pos = 9. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 15. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-do_sum = 'X'. " For doing "SUM"
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
CLEAR i_fldcat.
i_fldcat-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat-tabname = 'IT_SO1'.
i_fldcat-seltext_m = 'SALES UNIT'.
i_fldcat-col_pos = 10. " POSITION OF THE COLUMN.
i_fldcat-outputlen = 10. " SET THE OUTPUT LENGTH.
i_fldcat-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat-just(1) = 'C'.
APPEND i_fldcat.
ENDFORM. " FLD_CAT
****************** ALV SORTING ***************************************
*& Form SORT
* text
* -->P_I_SORT text
FORM t_sort USING p_i_sort TYPE slis_t_sortinfo_alv .
DATA: i_sort TYPE slis_sortinfo_alv .
REFRESH p_i_sort .
CLEAR i_sort.
i_sort-spos = 1.
i_sort-tabname = 'IT_SO1'.
i_sort-fieldname = 'VBELN'.
i_sort-up = 'X'.
i_sort-subtot = 'X'.
i_sort-group = '*'.
APPEND i_sort TO p_i_sort.
ENDFORM. " SORT
*FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
* SET PF-STATUS 'ZSTANDARD'.
*ENDFORM. "Set_pf_status
***********FORM FOR EVENT USER_COMMAND1********************************
FORM user_command1 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
*CASE R_UCOMM .
* WHEN '&IC1' .
* IF rs_selfield-FIELDNAME = 'VBELN' .
* ENDIF .
* WHEN OTHERS .
* ENDCASE .
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_so-vbeln
AND posnv = wa_so-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = wa_vbfa-vbelv
posnr = wa_vbfa-posnn.
IF sy-subrc = 0.
CLEAR wa_del.
MOVE wa_it_del_ful TO wa_del.
APPEND wa_del TO it_del1.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
********* SECOND ALV GRID DISPLAY ***********************************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND2'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_background_id = 'ALV_BACKGROUND'
it_fieldcat = i_fldcat2[]
it_sort = i_sort
TABLES
t_outtab = it_del_ful
* 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 . "USER_COMMAND1
********** FORM FOR EVENT USER_COMMAND 2 ******************************
FORM user_command2 USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CLEAR wa_so.
REFRESH: it_del1 .
IF r_ucomm = '&IC1' AND rs_selfield-fieldname = 'VBELN' AND
rs_selfield-value IS NOT INITIAL.
READ TABLE it_so1 INTO wa_so INDEX rs_selfield-tabindex.
* IF SY-SUBRC = 0.
* LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = WA_SO-vbeln
* AND posnv = WA_SO-posnr.
READ TABLE it_del_ful INTO wa_it_del_ful
WITH KEY vbeln = rs_selfield-value
" vbeln = wa_vbfa-vbeln
posnr = wa_vbfa-posnn.
IF rs_selfield-fieldname = 'VBELN'.
SET PARAMETER ID 'VL' FIELD wa_vbfa-vbeln .
CALL TRANSACTION 'VL03' AND SKIP FIRST SCREEN.
ENDIF .
* ENDLOOP.
* ENDIF.
ENDIF.
ENDFORM . "USER_COMMAND2
********* SECOND FIELDCATALOG ******************************************
*& Form FLD_CAT2
* text
* -->P_I_FLDCAT2[] text
FORM fld_cat2 USING p_i_fldcat2 TYPE slis_t_fieldcat_alv .
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VBELN'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-tabname = 'IT_DEL_FUL'."TABLE NAME
i_fldcat2-seltext_m = 'DELIVERY NO.'.
i_fldcat2-col_pos = 1. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-hotspot = 'X'.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'POSNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'DELIVERY ITEM'.
i_fldcat2-col_pos = 2. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'MATNR'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'MATERIAL NO.'.
i_fldcat2-col_pos = 3. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'WERKS'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'PLANT.'.
i_fldcat2-col_pos = 4. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LGORT'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ST. LOCATION'.
i_fldcat2-col_pos = 5. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'CHARG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'BATCH NO.'.
i_fldcat2-col_pos = 6. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'LFIMG'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'ACT. DEL. QTY.'.
i_fldcat2-col_pos = 7. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
CLEAR i_fldcat2.
i_fldcat2-fieldname = 'VRKME'. "FIELD FOR WHICH CATALOG ID FILLED
i_fldcat2-seltext_m = 'SALES UNIT.'.
i_fldcat2-col_pos = 8. " POSITION OF THE COLUMN.
i_fldcat2-outputlen = 20. " SET THE OUTPUT LENGTH.
i_fldcat2-emphasize = 'X'. " COLOR OF THIS COLUMN.
i_fldcat2-key = 'X'. " SO THAT THIS FIELD IS NOT
"SCROLLABLE AND HIDDABLE.
i_fldcat2-just(1) = 'C'.
APPEND i_fldcat2.
ENDFORM. " FLD_CAT2
***************** ALV LAYOUT *******************************************
*& Form LAYOUT
* text
* -->P_I_LAYOUT text
FORM t_layout USING p_i_layout TYPE slis_layout_alv .
p_i_layout-zebra = 'X'.
p_i_layout-totals_text = 'GRAND TOTAL ='.
* p_i_layout-CONFIRMATION_PROMPT = 'X'.
* p_i_layout-DEF_STATUS = ' '.
p_i_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " LAYOUT -
Htmldb_item.select_list_from_query
Hi, I am running into character or string buffer too small issue when I use
htmldb_item.select_list_from_query or htmldb_item.select_list_from_LOV due to the list being a long one.
Does anyone have a way to overcome this ?
Thank you.I'm requesting for a workspace.........
Here;s the code while waiting, maybe it's a quick fix.
Basically, when I take off LEVEL4, I do not get the buffer string error.Once I add this field in, the error comes back.
This field is the same as LEVEL1, LEVEL2, LEVEL3.
Code below :
select wwv_flow_item.hidden(1,bud.budget_code_id) BID,
wwv_flow_item.display_and_save(2,bud.company,5) CO,
wwv_flow_item.display_and_save(3,bud.region,5) RG,
wwv_flow_item.display_and_save(4,bud.cost_center,5) CC,
wwv_flow_item.display_and_save(5,bud.product,5) PROD,
apex_item.select_list_from_query_xl(6,level1_id,'select object_name , sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_1,
apex_item.select_list_from_query_xl(7,level2_id,'select object_name, sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_2,
apex_item.select_list_from_query_xl(8,level3_id,'select object_name, sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_3,
apex_item.select_list_from_query_xl(9,level4_id,'select object_name, sequence_id from qstadmin.qstgl_object_name@apex_oatst order by object_name') LEVEL_4
from
qstadmin.qstgl_budget_code_combo@apex_oatst bud,
qstadmin.qstgl_object_name@apex_oatst obj1,
qstadmin.qstgl_object_name@apex_oatst obj2,
qstadmin.qstgl_object_name@apex_oatst obj3,
qstadmin.qstgl_object_name@apex_oatst obj4
where bud.level1_id = obj1.sequence_id (+)
and bud.level2_id = obj2.sequence_id (+)
and bud.level3_id = obj3.sequence_id (+)
and bud.level4_id = obj4.sequence_id (+)
--and bud.level5_id = obj5.sequence_id (+)
--and bud.level6_id = obj6.sequence_id (+)
and bud.company like decode(:P21_COMPANY,'%null%',bud.company,:P21_COMPANY)
and bud.region = decode(:P21_REGION,'%null%',bud.region,:P21_REGION)
and bud.cost_center like nvl(:P21_COST_CENTER_BEGINS,decode(:P21_COST_CENTER,'%null%', bud.cost_center,:P21_COST_CENTER))||'%'
and bud.product = decode(:P21_PRODUCT,'%null%',bud.product,:P21_PRODUCT)
and nvl(obj1.sequence_id,999) = nvl(decode(:P21_LEVEL1, '%null%',obj1.sequence_id, 0,999,:P21_LEVEL1),999)
and nvl(obj2.sequence_id,999) = nvl(decode(:P21_LEVEL2, '%null%',obj2.sequence_id, 0,999,:P21_LEVEL2),999)
and nvl(obj3.sequence_id,999) = nvl(decode(:P21_LEVEL3, '%null%',obj3.sequence_id, 0,999,:P21_LEVEL3),999)
and nvl(obj4.sequence_id,999) = nvl(decode(:P21_LEVEL4, '%null%',obj4.sequence_id, 0,999,:P21_LEVEL4),999) -
ALV - add colour to columns, sorting columns
Hi Experts,
Using ALV oops......I am using field catalog merge FM.
After using that how do I use color & sort options.
How to add colors to columns
How to sort columns
Thanks in advance.
Edited by moderator to more meaningful titleHello Ravindar
Of course you can use the colouring options:
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'ZSHHR207'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = it_fdcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
DATA: ls_fcat TYPE lvc_s_fcat.
LOOP AT it_fdcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN '...'.
ls_fcat-emphasize = 'C410'.
WHEN '...'.
ls_fcat-emphasize = 'C600'.
WHEN OTHERS.
CONTINUE.
ENDCASE.
MODIFY it_fdcat FROM ls_fcat INDEX syst-tabix.
ENDLOOP.
Regards
Uwe -
How to add a watermark to pictures
How to add my name to a photo to make sure that my photo is mine...Do I need to download a app for the iMac..
Thanks,
DavidIn Keynote, use the text tool, enter text and select the font, size and colour.
To create the watermark effect, reduce the opacity in the colour palette. -
Passing parameter to htmldb_item.select_list_from_query
Hi,
I want labeles to be printed in front of my select list boxes but the following call to htmldb_item doesn't work
SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,job,'SELECT DISTINCT job FROM emp',NULL,NULL,NULL,NULL,NULL,'My Label',NULL) job
FROM emp
Do I need to specify all NULL values to set the value of p_item_label
ThanksI am refering to HTMLDB doc. regarding this function:
HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(
p_idx IN NUMBER,
p_value IN VARCHAR2 DEFAULT,
p_query IN VARCHAR2,
p_attributes IN VARCHAR2 DEFAULT,
p_show_null IN VARCHAR2 DEFAULT,
p_null_value IN VARCHAR2 DEFAULT,
p_null_text IN VARCHAR2 DEFAULT,
p_item_id IN VARCHAR2 DEFAULT,
p_item_label IN VARCHAR2 DEFAULT,
p_show_extra IN VARCHAR2 DEFAULT)
RETURN VARCHAR2;
I need to print a label for each item. How do I pass the parameter to the
function? How do I do that?
SELECT HTMLDB_ITEM.SELECT_LIST_FROM_QUERY(3,job,'SELECT DISTINCT job FROM emp',NULL,NULL,NULL,NULL,NULL,'My Label',NULL) job FROM emp
Doesn't work
John -
Hi,
How to add a selected pictures while clicking submit button in webdynpro application.The image (Library) should be in adobe form.If i select any picture means i want to dispaly it in adobe form.In Keynote, use the text tool, enter text and select the font, size and colour.
To create the watermark effect, reduce the opacity in the colour palette. -
I haven't used ID for a while now and I'm a little rusty. I'm sure there's a way to add a colour to an eps that I've imported from AI but can't for the life of me figure out how to add it.
Any ideas?>I'm not sure if David meant bitmap mode in the Photoshop sense,...
Yes--I did mean as in Photoshop.
I did not discuss grayscale because I was responding to a preview quote about bitmap images.
I was not dealing with the file format at all, but I usually use TIFF for bitmap-mode images since the PSD format has not advantage for that mode (that I know of). JPEG would be a BAD format for bitmap-mode images (I realize Peter was just giving a list of formats, not commenting on which would to use.) -
How to add fields to already loaded cube or dso and how to fill records in
how to add fields to already loaded cube or dso and how to fill it.can any one tell me the critical issues in data loading process..?
This is sensitive task with regards to large volumes of data in infoproviders.
The issue is to reload of data in case of adjusted structures of infoproviders.
Indeed there are some tricks. See following:
http://weblogs.sdn.sap.com/cs/blank/view/wlg/19300
https://service.sap.com/sap/support/notes/1287382
Maybe you are looking for
-
Statement not accessible error - Any ideas please.
Hello all: We were using macro from TRMAC table in 4.6C version and it used to give a warning but after upgrading to ECC6.0 it is syntax error! Please look at the code below: *SELECTION SCREN / PARAMETERS
-
Reference to 1.4.2_06
I saw a posting in a Java Web Start FAQ about a defect fixed in 1.4.2_06. However, if I go to the download section for J2SE I only find 1.4.2_05. Is the _06 release imminent? Humberto A. Sanchez II
-
Hi there, I'm having problems with my wired network and desktop machine running arch. my problem is the internet connection when browsing keeps appearing to drop when I'm running other internet based things. For instance if I'm downloading a torrent
-
JDeveloper, JPA named query String parameter with length of 1
Hi, I use JDeveloper 11.1.1.2.0. and have the following table: CREATE SEQUENCE COUNTRY_SEQ; CREATE TABLE COUNTRY ( COUNTRY_ID NUMBER NOT NULL, COUNTRY_NAME VARCHAR2(40), COUNTRY_CODE CHAR(2) NOT NULL, CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID)
-
I have just upgraded to Final Cut Express HD from imovie and I am looking for a suitable manual. I found The Missing Manual very useful for imovie but I don't beleive there is one for FCE. Any recommendations would be appreciated.