How to dynamically insert UI to View
i need dynamically create link,
like HTML Tag <a href='URL' >text</a>
public void wdDoInit()
ArrayList al = .... (URL String List)
for(int i =0;i<al.size(); i++)
..... HOW TO CODING??
Dynamically Insert UI to View or Dynamically Insert UI to View LinkToURL
hi Sarbjeet
this is my code,
how coding LinkToURL UI put in Group UI and how use group.createLayout() method for GridLayout ?
if(firstTime)
IWDTransparentContainer tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDCaption groupTitle = (IWDCaption)view.createElement(IWDCaption.class,"GroupTitle");
groupTitle.setText("TempGroup");
IWDGroup group = (IWDGroup)view.createElement(IWDGroup.class,"DynamicallyGroup");
group.setHeader(groupTitle);
group.setWidth("100%");
group.setEnabled(true);
tc.addChild(group);
for (int i=0 ; i<10; i++)
tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDLinkToURL ld = (IWDLinkToURL)view.createElement(IWDLinkToURL.class,"ltu"+i );
ld.setTarget("http://www.google.com");
ld.setReference("http://www.google.com");
ld.setText("test..."+i+"\t");
ld.setEnabled(true);
tc.addChild(ld);
Similar Messages
-
How can I insert into a view cache???
I have a problem in JClient like that:
A form that have 3 JTable:
- Table1 get data from UserTable in DB
- Table2 get data from GroupTable in DB
- Table3 get data from GroupTable in DB
and 2 buttons: btnAdd, btnRemove.
When I select a row in Table1, Table2 will get all records in GroupTable that row in Table1 belonging to and Table3 will get all records in GroupTable that row in Table1 not belonging to.
I want that when I select some rows in Table3 and click btnAdd then those rows in Table3 will be insert into Table2 and remove those rows from Table3. And when I select some rows in Table2 and click btnRemove then those rows in Table2 will be insert into Table3 and remove those rows from Table2.
Can you show me how to show that problem.
Thanks.Hi,
When do you get this error? Is it while running or while creating the form.
Here is a sample code which inserts a non-database column dummy into a table called dummy. This is done in successful procedure.
declare
l_dummy varchar2(1000);
begin
l_dummy := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT',
p_attribute_name=>'A_DUMMY');
insert into sjayaram903_1g.dummy values(l_dummy);commit;
end;
Please check in your case if the size of the local variable is enough to hold the values being returned.
Thanks,
Sharmila -
Label and Button in VBox, how to dynamically insert something between them?
I'm probably missing something simple here, but scratching my head. If I have a VBox with a label and a button in it, is there no way to insert a new child between the other two children ? Something like a way to get at "nth child"? or "insertAtIndex" ? Most likely I am just thinking about this wrong-headedly. Thanks.
ah, so .add() takes an int which determines the position among the children in which it will be inserted? I knew I was completely missing something critically simple. Thank you.
-
Dynamically generated Link for View uFF1F
i need dynamically create link,
like HTML Code <a href='URL'>text</a>
public void wdDoInit()
ArrayList al = .... (URL String List)
for(int i =0;i<al.size(); i++)
..... HOW CODING??[How to dynamically insert UI to View|How to dynamically insert UI to View]
duplicate thread
Sarbjeet -
How to create a webdynpro view dynamically and embed into view container?
Hi all,
Anyone knows how to create a view dynamically and embed the view into an existing view container?
My layout looks like this:
I have an existing view named main_view.
Inside main_view, I create a view ui container named vcu_view.
I embed the main_view into my window.
I need the codes to create a view dynamically and embed the view into the view container. Anyone have any idea?
Thanks in advance.
Rgds,
Siong Chaohi Siong Chao ,,
empty view insence ..( create a view without any UI element in it ) in design time ..
>
Siong Chao wrote:
> Hi Chinnaiya,
>
> How do you create an empty view dynamically then? Thanks in advance.
i think we cannot create a new view dynamically because it is a webdynpro restriction ..
NOTE: experts correct me if i am wrong in this answer
Regards
Chinnaiya P -
How to insert a custom view?
Hi,
I have created a ListView on a custom layout page:
<SharePoint:ListView runat="server" ID="ListView1" />
SPWeb web = SPContext.Current.Web;
SPList list = web.Lists["TestList"];
SPView view = list.DefaultView;
try
web.AllowUnsafeUpdates = true;
view.TabularView = false; // hide the left-most column containing checkboxes
view.Update();
finally
web.AllowUnsafeUpdates = false;
ListView1.ListId = list.ID.ToString();
ListView1.ViewId = view.ID.ToString();
I'd like to insert my layout page into the menu in the page header:
How can I insert a menu item to the above menu that would lead to my layout page?
Thanks,
Leszek
Wiki: wbswiki.comHi,
if the whole purpose is hiding the checkbox, then you should use JSLink property of the view, instead of creating a new layout page...
The following javascript will hide the checkbox column.
(function () {
var overrideCtx = {};
overrideCtx.Templates = {};
overrideCtx.OnPostRender = postRenderHandler;
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
function postRenderHandler(ctx) {
$('td.ms-cellStyleNonEditable, th.ms-headerCellStyleIcon').hide();
Just add the script in js file, deploy in layout folder. Then edit the view page, and refer the js file in JSLink.
More details on how to configure JSLink can be found in the following links:
http://www.rbradbrook.co.uk/blog/2013/04/14/introduction-to-client-side-rendering-in-sharepoint-2013/
http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views
Thanks,
Sohel Rana
http://ranaictiu-technicalblog.blogspot.com -
How to create dynamic connection in business view manager.
Hi Sir,
Can u explain how to create dynamic connection in business view manager.
Thanks
Vishali Raghava RajuHI Vaishali,
Can you please elaborate your requirement ?
-Regards
B -
How to dynamic field insert into intenal table?
hi friends
this is my urgent requirements .... how to dynamic field insert into internal table if it possible please tell me
thanks & regards
pauldharmaHi,
Go through this
REPORT yusmm_text1 NO STANDARD PAGE HEADING
LINE-SIZE 199.
T A B L E S
TABLES: MARA,
MAKT,
THEAD.
GLOBAL TYPE-POOLS
TYPE-POOLS : SLIS.
GLOBAL TYPES
TYPES : BEGIN OF TP_FINAL,
MATNR TYPE MARA-MATNR,
BEGRU TYPE MARA-BEGRU,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
SPRAS TYPE MAKT-SPRAS,
LTXT(2000) TYPE C ,
SRNO TYPE N ,
END OF TP_FINAL.
TYPES : BEGIN OF TP_T002,
SPRAS TYPE T002-SPRAS,
LAISO TYPE T002-LAISO,
SRNO TYPE N ,
END OF TP_T002.
TYPES : BEGIN OF TP_MARA_MAKT,
MATNR TYPE MARA-MATNR,
BEGRU TYPE MARA-BEGRU,
MTART TYPE MARA-MTART,
SPRAS TYPE MAKT-SPRAS,
MAKTX TYPE MAKT-MAKTX,
END OF TP_MARA_MAKT.
Types: BEGIN OF tp_matnr,
matnr TYPE mara-matnr,
END OF tp_matnr.
GLOBAL ELEMENTARY VARIABLES
DATA : gv_date TYPE sy-datum.
DATA : gv_repid TYPE sy-repid.
DATA : g_var1(10) TYPE C.
DATA : gv_index TYPE sy-tabix.
DATA: gv_strg TYPE string,
gv_strg1(2000) TYPE C.
DATA : gv_lang TYPE sy-langu.
DATA : g_v(3) TYPE N .
DATA : gv_lines(3) TYPE N .
DATA : gv_var(3) TYPE N .
DATA : gv_var1(3) TYPE N.
DATA: gv_str TYPE STRING.
DATA: gv_str1 TYPE STRING.
DATA : gv_li TYPE I,
gv_lit TYPE I,
gv_lin TYPE I.
DATA: g_var11(3) TYPE N,
gv_li1(3) TYPE N,
g_var2(3) TYPE N.
DATA : gv_i1 TYPE I.
DATA : gv_i TYPE I.
DATA: gl_lenght TYPE I.
GLOBAL STRUCTURES
DATA: T_NEWTABLE TYPE REF TO DATA,
T_NEWLINE TYPE REF TO DATA,
T_FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
T_FLDCAT TYPE LVC_T_FCAT,
WA_IT_FLDCAT TYPE LVC_S_FCAT,
WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV,
WA_COLNO(2) TYPE N,
WA_FLNAME(5) TYPE C,
L_LT TYPE SLIS_LAYOUT_ALV.
GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
DATA : IG_MARA_MAKT TYPE STANDARD TABLE OF TP_MARA_MAKT,
WG_MARA_MAKT TYPE TP_MARA_MAKT.
DATA : IG_T002 TYPE STANDARD TABLE OF TP_T002,
WG_T002 TYPE TP_T002.
DATA : IG_FINAL TYPE STANDARD TABLE OF TP_FINAL,
WG_FINAL TYPE TP_FINAL.
data : IG_MATNR TYPE STANDARD TABLE OF TP_MATNR WITH HEADER LINE,
WG_MATNR TYPE TP_MATNR.
DATA:BEGIN OF IG_THEAD OCCURS 0.
INCLUDE STRUCTURE THEAD .
DATA: END OF IG_THEAD.
DATA:BEGIN OF IG_TLINE OCCURS 0.
INCLUDE STRUCTURE TLINE .
DATA:END OF IG_TLINE.
FIELD-SYMBOLS
FIELD-SYMBOLS: <T_DYNTABLE> TYPE STANDARD TABLE,"Dynamic internal
"tablename
<FS_DYNTABLE>, "Field symbol to create work area
<FS_FLDVAL> TYPE ANY. " Field symbol to assign values
COMPULSORY
FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
<FS_DATA1> TYPE REF TO DATA,
<FS_2> TYPE STANDARD TABLE,
<FS_22> TYPE STANDARD TABLE,
<FS_1>,
<FS_11>,
<F>,
<FA>,
<LWA_LINE_WA>,
<LWA_LINE_WA1>.
------- Create Dyn Table From FC
DATA: LT_DATA TYPE REF TO DATA,
LT_DATA1 TYPE REF TO DATA,
LWA_LINE TYPE REF TO DATA,
LWA_LINE1 TYPE REF TO DATA,
LI_FIELD_CAT TYPE LVC_T_FCAT,
LWA_FIELD_CAT TYPE LVC_S_FCAT.
PARAMETERS & SELECT-OPTIONS
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_SPRAS FOR MAKT-SPRAS NO INTERVALS DEFAULT 'EN'
OBLIGATORY ,
S_MATNR FOR MARA-MATNR,
S_MTART FOR MARA-MTART.
PARAMETERS: GP_SIZE TYPE I DEFAULT '200'.
SELECTION-SCREEN : END OF BLOCK B1.
INITIALIZATION
INITIALIZATION.
gv_repid = sy-repid.
gv_date = sy-datum.
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
IF GP_SIZE < 0.
MESSAGE E002(00).
ENDIF.
IF GP_SIZE > 50000.
MESSAGE W130(26) WITH TEXT-004.
SET CURSOR FIELD 'gp_size'.
ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM FIELDCAT.
PERFORM LAYOUT.
PERFORM DATA_FETCH.
PERFORM READ_DATA_TO_FINAL.
SORT ig_final BY matnr spras.
gv_lin = gv_li.
gv_li = gv_li - 2.
LOOP AT ig_final INTO wg_final.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'Material Number'.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'Authorization Group'.
g_VAR11 = wg_final-srno + 2.
gv_li1 = gv_li1 + 2.
MOVE : g_var11 TO gv_i1.
ASSIGN COMPONENT g_var11 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'MatDesc'.
g_var2 = g_var11 + gv_lines.
ASSIGN COMPONENT g_var2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = 'BasicData'.
APPEND <LWA_LINE_WA1> TO <FS_22>.
EXIT.
ENDLOOP.
LOOP AT ig_final INTO wg_final.
AT NEW matnr.
gv_index = sy-tabix.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-matnr.
ENDAT.
AT NEW MATNR.
GV_INDEX = SY-TABIX.
ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-matnr.
ENDAT.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-begru.
ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-begru.
gv_var = wg_final-srno + 2.
gv_li = gv_li + 2.
MOVE : gv_var TO gv_i.
ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-maktx.
ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-maktx.
gv_var1 = gv_var + gv_lines .
ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
<F> = wg_final-ltxt.
ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
<FA> = wg_final-ltxt.
AT END OF matnr.
APPEND <LWA_LINE_WA> TO <FS_2>.
CLEAR <LWA_LINE_WA>.
ENDAT.
AT END OF matnr.
APPEND <LWA_LINE_WA1> TO <FS_22>.
CLEAR <LWA_LINE_WA1>.
ENDAT.
ENDLOOP.
PERFORM display..
*& Form data_fetch
text
--> p1 text
<-- p2 text
FORM DATA_FETCH .
SELECT matnr
from mara up to gp_size rows
appending corresponding fields of table ig_matnr
where matnr in s_matnr
and mtart in s_mtart.
loop at ig_matnr.
SELECT MARA~MATNR
MARA~BEGRU
MARA~MTART
MAKT~SPRAS
MAKT~MAKTX FROM MARA INNER JOIN MAKT
ON MARAMATNR = MAKTMATNR
appending corresponding fields of TABLE ig_mara_makt UP TO GP_SIZE
ROWS
WHERE makt~spras IN s_spras
AND mara~matnr IN s_matnr
AND mara~mtart IN s_mtart
AND mara~matnr EQ ig_matnr-matnr.
endloop.
IF sy-subrc = 0.
SORT ig_mara_makt.
ENDIF.
ENDFORM. " data_fetch
*& Form read_data_to_final
text
--> p1 text
<-- p2 text
FORM READ_DATA_TO_FINAL .
LOOP AT ig_mara_makt INTO wg_mara_makt .
wg_final-MATNR = wg_mara_makt-MATNR.
wg_final-BEGRU = wg_mara_makt-BEGRU.
wg_final-MTART = wg_mara_makt-MTART.
wg_final-SPRAS = wg_mara_makt-SPRAS.
wg_final-MAKTX = wg_mara_makt-MAKTX.
READ TABLE ig_t002 INTO wg_t002 WITH KEY spras = wg_final-spras.
IF sy-subrc = 0.
wg_final-srno = wg_t002-srno.
ENDIF.
CLEAR ig_thead[].
ig_thead-TDOBJECT = 'MATERIAL'.
ig_thead-TDNAME = wg_final-matnr.
ig_thead-TDID = 'GRUN'.
ig_thead-TDSPRAS = wg_final-spras.
CALL FUNCTION 'TEXT_READ'
EXPORTING
I_HEADER = IG_THEAD
I_READONLY = 'X'
IMPORTING
E_HEADER = IG_THEAD
TABLES
T_LINES = IG_TLINE[]
EXCEPTIONS
NOTFOUND = 1.
IF sy-subrc EQ 0.
LOOP AT ig_tline.
gv_strg = ig_tline-tdline.
IF gv_strg1 <> ' '.
CONCATENATE gv_strg1 ';' gv_strg INTO gv_strg1.
ELSE.
gv_strg1 = gv_strg.
ENDIF.
ENDLOOP.
wg_final-ltxt = gv_strg1.
APPEND wg_final TO ig_final.
CLEAR wg_final.
gv_strg1 = ' '.
ELSE.
APPEND wg_final TO ig_final.
ENDIF.
ENDLOOP.
ENDFORM. " read_data_to_final
" read_data_to_final
*& Form layout
text
--> p1 text
<-- p2 text
FORM LAYOUT .
CLEAR L_LT.
L_LT-ZEBRA = 'X'.
L_LT-COLWIDTH_OPTIMIZE = 'X'.
L_LT-WINDOW_TITLEBAR = 'MATERIAL DETAILS'.
ENDFORM. " layout
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM FIELDCAT .
SELECT SPRAS
LAISO FROM t002 INTO CORRESPONDING FIELDS OF TABLE ig_t002
WHERE spras IN s_spras.
DESCRIBE TABLE ig_t002 LINES gv_lines.
LOOP AT ig_t002 INTO wg_t002.
g_v = g_v + 1.
Wg_t002-srno = g_v.
MODIFY ig_t002 FROM wg_t002 TRANSPORTING SRNO.
ENDLOOP.
LOOP AT ig_t002 INTO wg_t002.
CLEAR WA_IT_FLDCAT.
MOVE SY-INDEX TO WA_COLNO.
CONCATENATE 'MD-' wg_t002-LAISO
WA_COLNO
INTO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
CLEAR wg_t002.
ENDLOOP.
LOOP AT ig_t002 INTO wg_t002.
CLEAR WA_IT_FLDCAT.
MOVE SY-INDEX TO WA_COLNO.
CONCATENATE 'BD-' wg_t002-LAISO
WA_COLNO
INTO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
WA_IT_FLDCAT-INTLEN = 250.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
APPEND WA_IT_FLDCAT TO T_FLDCAT.
CLEAR wg_t002.
ENDLOOP.
MOVE 'MATNR' TO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = 'Material No'.
WA_IT_FLDCAT-INTLEN = 18.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 1.
MOVE 'BEGRU' TO WA_FLNAME.
WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-SELTEXT = 'Authorization Group'.
WA_IT_FLDCAT-INTLEN = 4.
WA_IT_FLDCAT-TABNAME = '<FS_2>'.
INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 2.
DESCRIBE TABLE T_FLDCAT LINES gv_li.
ASSIGN LT_DATA TO <FS_DATA>.
Creating the Dynamic Internal Table
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = T_FLDCAT " Fieldcatalogue
IMPORTING
EP_TABLE = <FS_DATA> " Dynamic Internal Table
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
Assign Dyn Table To Field Sumbol
ASSIGN <FS_DATA>->* TO <FS_1>.
Assigning the Internal Table TYPE ANY to Standard internal Table
ASSIGN <FS_1> TO <FS_2>.
Creating a Workarea
CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
Assigning the Content to the workares as a Pointer
ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
LOOP AT T_FLDCAT INTO WA_IT_FLDCAT.
WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
WA_IT_FLDCAT1-TABNAME = WA_IT_FLDCAT-TABNAME.
WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-SELTEXT.
WA_IT_FLDCAT1-REF_TABNAME = 'MARC'.
APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
ENDLOOP.
ASSIGN LT_DATA1 TO <FS_DATA1>.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = T_FLDCAT " Fieldcatalogue
IMPORTING
EP_TABLE = <FS_DATA1> " Dynamic Internal table
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
OTHERS = 2.
Assign Dyn Table To Field Sumbol
ASSIGN <FS_DATA1>->* TO <FS_11>.
Assigning the Internal Table TYPE ANY to Standard internal Table
ASSIGN <FS_11> TO <FS_22>.
Creating a Workarea
CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
Assigning the Content to the workares as a Pointer
ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
ENDFORM. " fieldcat
*& Form show
text
--> p1 text
<-- p2 text
FORM Display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = GV_REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = L_LT
IT_FIELDCAT = T_FLDCAT1[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = <FS_2>
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. " display
FORM PF_STATUS_SET USING RS_EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'DISPLAY' .
ENDFORM. "PF_STATUS_SET
*& Form Name: user_command *
*& Form Desc: For Handling USER_COMMAND *
FORM USER_COMMAND USING IF_UCOMM TYPE SY-UCOMM
IS_SELFIELD TYPE SLIS_SELFIELD.
CASE IF_UCOMM.
WHEN 'DOWNLOAD'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
TEXT_QUESTION = 'Data download to excel'
TEXT_BUTTON_1 = 'Ja'(001)
ICON_BUTTON_1 = ' '
TEXT_BUTTON_2 = 'Nein'(002)
ICON_BUTTON_2 = ' '
DEFAULT_BUTTON = '1'
DISPLAY_CANCEL_BUTTON = 'X'
USERDEFINED_F1_HELP = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IMPORTING
ANSWER =
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'C:\Material-Text.xls'
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = 'X'
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = 'X'
IMPORTING
FILELENGTH = GL_LENGHT
TABLES
DATA_TAB = <FS_22>
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF GL_LENGHT NE 0.
MESSAGE S398(00) WITH 'DATA downloaded to EXCEL'.
ENDIF.
Thanks
ENDCASE.
ENDFORM. "user_command -
How to dynamically hide the Field Label in the overview page's form view?
Hi Experts,
How to dynamically hide, for certain condition, the Field Label in the overview page's form view?
Please reply me.
Regards,
VishalHi Vishal,
It is not possible to dynamically hide/display fields if the UI is build using configurations.
The work around is to have multiple configurations, and based on the condition, load the
corresponding configuration at runtime.
The other approach is to code the complete htm view(htm coding) without using the configuration provided by the framework.
Regards,
Leon -
How do I insert views in work book (Multiple)?
Hi Jr,
I have managed to get my work book with multiple queries in it. which is working fine n the credit goes to your answers in the forum.
Now I want to insert views instead of queries. when I tried to do so it is giving me some critical error.
Can you please explain me how do I insert multiple views in a workbook?
Thanks and Regards,
Sekhar.Hello Chandran,
Thanks for your reply. It is working fine now.
Now I want to insert VIEWS in the place of queries in one workbook. When I tryed to do that its giving me a critical error and closing the Bex. Can you please explain me how do I insert query Views in to one work book?
Thannks and Regards,
Sekhar. -
How I disable my textbox at view time and Enable only when insert or edit t
hi master
Sir i have master detail form and i am not use toolbar i am usint my button add/edit/view/next/last and other
sir my requirement is all textbox disable at view time enable ony edit or inserting time
how I disable my textbox at view time and Enable only when insert or edit time.
i use this
if :system.form_status='change' then
if :system.form_status='insert' then
if :system.form_status='execute query' then
but not right work
please give my idea where i use what statment
send me sample
AamirAamir,
Set the text item's Enabled property to False at design time. Then, using SET_ITEM_PROPERTY (see Forms Help), set to Enabled in the relevent part of the code on the WHEN-BUTTON-PRESSED triggers on your Insert and Update buttons. Similarly, disable on your Save button once the cnahges are saved etc. -
How to putXML on a joined View?
Hi
I would like to insert an XML document into two tables (some
elements into table 1 and some into table 2). I have created a
joined view of the two tables and have tried to insert into the
view with:
java OracleXML putXML -user %USER_PASSWORD% -filename myfile.xml
myView
But I get the error "cannot modify a column which maps to a non
key-preserved table". PLEASE GIVE A SPECIFIC EXAMPLE OF AN
UPDATABLE 'VIEW' WHERE AN INSERT CAN MODIFY MORE THAN ONE
UNDERLYING TABLE. Is it possible?
Any example will do. But here is what I tried to do. I tried
to map the first few ROW child elements of an XML document (shown
at the bottom) into columns of the EMP table and the remaining
child
elements into another table called RELATIVE (this is a table
containing next-of-kin contact information for each employee). I
created a RELATIVE table with:
CREATE TABLE RELATIVE (
IDREL NUMBER(15) PRIMARY KEY,
EMPNUM NUMBER(4) CONSTRAINT FK_REL REFERENCES SCOTT.EMP(EMPNO),
RNAME VARCHAR2(20) NOT NULL,
TEL NUMBER(14),
STREET VARCHAR2(30),
CITY VARCHAR2(20),
STATE VARCHAR2(10),
ZIP VARCHAR2(12),
COUNTRY VARCHAR2(20)
I added a EMPNO_DUP column to the EMP table that is a copy of
the
EMPNO primary key (I did this so as to use EMPNO_DUP for the two
table join, rather than the EMPNO primary key. My first attempts
to make the joined view with EMPNO also gave the same error). I
wrote a PL/SQL trigger than would make sure that EMPNO_DUP and
EMPNO remain in synch if EMPNO is updated or if there is an
INSERT on EMP. Then I created a joined view of EMP and RELATIVE
with:
CREATE OR REPLACE VIEW EMPREL
(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO, EMPNO_DUP
IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
AS SELECT
E.EMPNO, E.ENAME, E.JOB, E.MGR, E.HIREDATE, E.SAL, E.COMM,
E.DEPTNO,E.EMPNO_DUP,
R.IDREL, R.EMPNUM, R.RNAME, R.TEL, R.STREET, R.CITY, R.STATE,
R.ZIP, R.COUNTRY
FROM EMP E, RELATIVE R WHERE E.EMPNO_dup=R.EMPNUM;
I tried to insert the XML document shown at the bottom with:
java OracleXML putXML -user %USER_PASSWORD% -filename myfile.xml
myView
I also tried the direct SQL command:
INSERT INTO EMPREL
(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO,EMPNO_DUP,
IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
VALUES
(7944, 'WIZARD', 'CLERK', 7782, '25-JUL-82', 1325, 0, 10, 7944,
1, 7944, 'SUE', 4087200111, '200 MAIN ST.', 'PALO ALTO', 'CA',
'94043', 'USA')
Both attempts resulted in this error message:
"cannot modify a column which maps to a non key-preserved table"
I would really appreciate an example of how to create an
updatable view where two or more underlying tables can be
modified. Thanks.
Regards
Mehran Moshfeghi
Here is the sample XML file. I want the first set of elements to
map to EMP table columns and the second set of elements (after
the blank line) to map to the RELATIVE table columns.
<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7942</EMPNO>
<ENAME>GUNNEL</ENAME>
<JOB>CLERK</JOB>
<MGR>7782</MGR>
<HIREDATE>1982-02-25 00:00:00.0</HIREDATE>
<SAL>1350</SAL>
<DEPTNO>10</DEPTNO>
<EMPNO_DUP>7942</EMPNO_DUP>
<IDREL>2</IDREL>
<RNAME>SMITH</RNAME>
<TEL>6504262551</TEL>
<STREET>2171 LANDINGS DRIVE</STREET>
<CITY>MOUNTAIN VIEW</CITY>
<STATE>CA</STATE>
<ZIP>94043-0837</ZIP>
<COUNTRY>USA</COUNTRY>
</ROW>
</ROWSET>
nullHi Mehran,
This is a classic view update problem where the database cannot
figure out automatically which table(s) to update given a join
view. Any update/insert/delete cannot act on more than one
table.So if you are updating a column in a join-view, then that
column must map to a particular column of a single table
unambigously. You should look at the documentation on updatable
join views.
One of the easiest solutions to your problem is to create
INSTEAD-OF trigger on those views. INSTEAD-OF triggers are
triggers that can be created over non-updatable views to make
them updatable. Here in the trigger body you specify the
appropriate insert statements into the base tables. So your view
can be as complicated as possible and yet updatable using these
triggers.
Thx
oracle XML team
Mehran (guest) wrote:
: Hi
: I would like to insert an XML document into two tables (some
: elements into table 1 and some into table 2). I have created a
: joined view of the two tables and have tried to insert into
the
: view with:
: java OracleXML putXML -user %USER_PASSWORD% -filename
myfile.xml
: myView
: But I get the error "cannot modify a column which maps to a
non
: key-preserved table". PLEASE GIVE A SPECIFIC EXAMPLE OF AN
: UPDATABLE 'VIEW' WHERE AN INSERT CAN MODIFY MORE THAN ONE
: UNDERLYING TABLE. Is it possible?
: Any example will do. But here is what I tried to do. I tried
: to map the first few ROW child elements of an XML document
(shown
: at the bottom) into columns of the EMP table and the remaining
: child
: elements into another table called RELATIVE (this is a table
: containing next-of-kin contact information for each employee).
I
: created a RELATIVE table with:
: CREATE TABLE RELATIVE (
: IDREL NUMBER(15) PRIMARY KEY,
: EMPNUM NUMBER(4) CONSTRAINT FK_REL REFERENCES SCOTT.EMP
(EMPNO),
: RNAME VARCHAR2(20) NOT NULL,
: TEL NUMBER(14),
: STREET VARCHAR2(30),
: CITY VARCHAR2(20),
: STATE VARCHAR2(10),
: ZIP VARCHAR2(12),
: COUNTRY VARCHAR2(20)
: I added a EMPNO_DUP column to the EMP table that is a copy of
: the
: EMPNO primary key (I did this so as to use EMPNO_DUP for the
two
: table join, rather than the EMPNO primary key. My first
attempts
: to make the joined view with EMPNO also gave the same error).
I
: wrote a PL/SQL trigger than would make sure that EMPNO_DUP and
: EMPNO remain in synch if EMPNO is updated or if there is an
: INSERT on EMP. Then I created a joined view of EMP and
RELATIVE
: with:
: CREATE OR REPLACE VIEW EMPREL
: (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO, EMPNO_DUP
: IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
: AS SELECT
: E.EMPNO, E.ENAME, E.JOB, E.MGR, E.HIREDATE, E.SAL, E.COMM,
: E.DEPTNO,E.EMPNO_DUP,
: R.IDREL, R.EMPNUM, R.RNAME, R.TEL, R.STREET, R.CITY, R.STATE,
: R.ZIP, R.COUNTRY
: FROM EMP E, RELATIVE R WHERE E.EMPNO_dup=R.EMPNUM;
: I tried to insert the XML document shown at the bottom with:
: java OracleXML putXML -user %USER_PASSWORD% -filename
myfile.xml
: myView
: I also tried the direct SQL command:
: INSERT INTO EMPREL
: (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO,EMPNO_DUP,
: IDREL, EMPNUM, RNAME, TEL, STREET, CITY, STATE, ZIP, COUNTRY)
: VALUES
: (7944, 'WIZARD', 'CLERK', 7782, '25-JUL-82', 1325, 0, 10, 7944,
: 1, 7944, 'SUE', 4087200111, '200 MAIN ST.', 'PALO
ALTO', 'CA',
: '94043', 'USA')
: Both attempts resulted in this error message:
: "cannot modify a column which maps to a non key-preserved
table"
: I would really appreciate an example of how to create an
: updatable view where two or more underlying tables can be
: modified. Thanks.
: Regards
: Mehran Moshfeghi
: Here is the sample XML file. I want the first set of elements
to
: map to EMP table columns and the second set of elements (after
: the blank line) to map to the RELATIVE table columns.
: <?xml version="1.0"?>
: <ROWSET>
: <ROW>
: <EMPNO>7942</EMPNO>
: <ENAME>GUNNEL</ENAME>
: <JOB>CLERK</JOB>
: <MGR>7782</MGR>
: <HIREDATE>1982-02-25 00:00:00.0</HIREDATE>
: <SAL>1350</SAL>
: <DEPTNO>10</DEPTNO>
: <EMPNO_DUP>7942</EMPNO_DUP>
: <IDREL>2</IDREL>
: <RNAME>SMITH</RNAME>
: <TEL>6504262551</TEL>
: <STREET>2171 LANDINGS DRIVE</STREET>
: <CITY>MOUNTAIN VIEW</CITY>
: <STATE>CA</STATE>
: <ZIP>94043-0837</ZIP>
: <COUNTRY>USA</COUNTRY>
: </ROW>
: </ROWSET>
Oracle Technology Network
http://technet.oracle.com
null -
How do I insert multiple rows from a single form ...
How do I insert multiple rows from a single form?
This form is organised by a table. (just as in an excel format)
I have 20 items on a form each row item has five field
+++++++++++ FORM AREA+++++++++++++++++++++++++++++++++++++++++++++++++++++
+Product| qty In | Qty Out | Balance | Date +
+------------------------------------------------------------------------+
+Item1 | textbox1 | textbox2 | textbox3 | date +
+ |value = $qty_in1|value= &qty_out1|value=$balance1|value=$date1 +
+------------------------------------------------------------------------+
+Item 2 | textbox1 | textbox2 | textbox4 | date +
+ |value = $qty_in2|value= $qty_out1|value=$balance2|value=$date2 +
+------------------------------------------------------------------------+
+ Item3 | textbox1 | textbox2 | textbox3 | date +
+------------------------------------------------------------------------+
+ contd | | | +
+------------------------------------------------------------------------+
+ item20| | | | +
+------------------------------------------------------------------------+
+ + + SUBMIT + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Database Structure
+++++++++++++++++
+ Stock_tabe +
+---------------+
+ refid +
+---------------+
+ item +
+---------------+
+ Qty In +
+---------------+
+ Qty Out +
+---------------+
+ Balance +
+---------------+
+ Date +
+++++++++++++++++
Let's say for example user have to the use the form to enter all 10 items or few like 5 on their stock form into 4 different textbox field each lines of your form, however these items go into a "Stock_table" under Single insert transaction query when submit button is pressed.
Please anyone help me out, on how to get this concept started.Hello,
I have a way to do this, but it would take some hand coding on your part. If you feel comfortable hand writing php code and doing manual database calls, specificaly database INSERT calls you should be fine.
Create a custom form using the ADDT Custom Form Wizard that has all the rows and fields you need. This may take a bit if you are adding the ability for up to 20 rows, as per your diagram of the form area. The nice thing about using ADDT to create the form is that you can setup the form validation at the same time. Leave the last step in the Custom Form Wizard blank. You can add a custom database call here, but I would leave it blank.
Next, under ADDT's Forms Server Behaviors, select Custom Trigger. At the Basic tab, you enter your custom php code that will be executed. Here you are going to want to put your code that will check if a value has been entered in the form and then do a database INSERT operation on the Stock_table with that row. The advanced tab lets you set the order of operations and the name of the Custom Trigger. By default, it is set to AFTER. This means that the Custom Trigger will get executed AFTER the form data is processed by the Custom Form Transaction.
I usually just enter TEST into the "Basic" tab of the Custom Trigger. Then set my order of operations in the "Advanced" tab and close the Custom Trigger. Then I go to the code view for that page in Dreamweaver and find the Custom Trigger function and edit the code manually. It's much easier this way because the Custom Trigger wizard does not show you formatting on the code, and you don't have to keep opening the Wizard to edit and test your code.
Your going to have to have the Custom Trigger fuction do a test on the submitted form data. If data is present, then INSERT into database. Here's a basic example of what you need to do:
In your code view, the Custom Trigger will look something like this:
function Trigger_Custom(&$tNG) {
if($tNG->getColumnValue("Item_1")) {
$item1 = $tNG->getColumnValue("Item_1");
$textbox1_1 = $tNG->getColumnValue("Textbox_1");
$textbox1_2 = $tNG->getColumnValue("Textbox_2");
$textbox1_3 = $tNG->getColumnValue("Textbox_3");
$date1 = $tNG->getColumnValue("Textbox_3");
$queryAdd = "INSERT INTO Stock_table
(item, Qty_In, Qty_Out, Balance, Date) VALUES($item1, $textbox1_1, $textbox1_2, $textbox1_3, $date1)"
$result = mysql_query($queryAdd) or die(mysql_error());
This code checks to see if the form input field named Item_1 is set. If so, then get the rest of the values for the first item and insert them into the database. You would need to do this for each row in your form. So the if you let the customer add 20 rows, you would need to check 20 times to see if the data is there or write the code so that it stops once it encounters an empty Item field. To exit a Custom Trigger, you can return NULL; and it will jump out of the function. You can also throw custom error message out of triggers, but this post is already way to long to get into that.
$tNG->getColumnValue("Item_1") is used to retrieve the value that was set by the form input field named Item_1. This field is named by the Custom Form Wizard when you create your form. You can see what all the input filed names are by looking in the code view for something like:
// Add columns
$customTransaction->addColumn("Item_1", "STRING_TYPE", "POST", "Item_1");
There will be one for each field you created with the Custom Form Wizard.
Unfortunately, I don't have an easy way to do what you need. Maybe there is a way, but since none of the experts have responded, I thought I would point you in a direction. You should read all you can about Custom Triggers in the ADDT documentation/help pdf to give you more detailed information about how Custom Triggers work.
Hope this helps.
Shane -
I have powerpoint for Mac on my imac. I can't seem to get the active text box function to work like it did on my PC. How can I insert an active textbox into a presentation that will allow me to type while presenting?
I've gotten a little further on this. The dynamic select is
working fine. It's the "a href" code that isn't. I'm wondering if
someone can look at this line and tell me if it's okay to build the
query string this way. The storeid comes through fine but I'm still
not getting the employeeid value to pass. Here's line that's not
working:
td><a href="registerStoreCust.php?storeid=<?php echo
$row_storeRS['storeid']; echo "&employeeid="; echo
$_GET['employeeLM']; ?>">Register
Customer</a></td> -
How to get "Calendar in the View" displayed on the page where Calendar web part is displayed?
I have a calendar with overlay set up for 5 views. When the calendar list is open in full page, the "Calendars in View" is displayed on the left pane with all 5 views listed by colors.
1) I want to display the calendar right on the home page, so I added the calendar web part to the page. But the problem is the "Calendars in the View" does not show up on the quick launch on home page, it only shows up in calendar list view.
How can I get "Calendars in View" displayed on left pane when calendar web part is displayed? so that users can select different views?
2) Also it will be better if the "Calendars in View" can display all components of the overlay when not in the default view, so user can toggle thru different views to see each one on the main pane.
Currently, only the default view has all colored views displayed under "Calendars in Views", once you click another view on the list, it just displays the current view, and you have to click the "Calendar" to see all and select another
one.
Really appreciated if someone can give a solution for at least the #1 problem. great if you have a solution for #2 as well!Hi,
According to your post, my understanding is that you wanted to know how to add iFrame via Content Editor web part.
There are two articles for your reference.
How to insert an iFrame into a SharePoint web page
Embed YouTube video in SharePoint 2010
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support
Maybe you are looking for
-
HUGE Error Message When Syncing IPod!!!
alright well first of all i have the new nano 4G ipod. Recently i added a TON of new songs, and apparantly i went over the size limit that my ipod could hold. In other words I had more songs on my itunes library than could fit into my ipod. I found t
-
BAPI_DOCUMENT_SETSTATUS after BAPI_DOCUMENT_CREATE2
Hi Guys, I am trying to create a DMS document with BAPI_DOCUMENT_CREATE2, and then change the document status using BAPI_DOCUMENT_SETSTATUS but I get the error 'Document XXXXX does not exist' when I remove the BAPI_TRANSACTION_COMMIT after BAPI_DOCUM
-
Experts, Need your inputs. One particular series of call Ex 6XXXX does not go thru and path is PSTN-->CUCM-->Unity Express autoattended script(8.0.2)-->ext 6XXXX-->Gatekeeper-->main location Translation patter--> PSTN. Using the above same path 5XXXX
-
Hello, We recently had an employee of our helpdesk delete (by accident) and recreate a number of Active Directory user profiles. The profiles were created exactly like they were before, but now those users are not able to access the projects in TFS
-
hi, im suffering on how to send an email to reset the security question this is because i have been already log in to the page and in the password & security there but there have no any link such as "send an rescue email to xxx mail" for me to click.