Refresh internal table records in web dynpro
Hi Guru's
I am facing an issue in web dynpro abap.
in my application there is a button called OPEN.
when i click on open button internal table records should be refreshed.
so i have written code like this
DATA lo_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
lo_COMPONENTCONTROLLER = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->clear_info_refresh_visible( ).
but iam getting an error message Method "CLEAR_INFO_REFRESH_VISIBLE" is unknown or PROTECTED or PRIVATE
Could you please help me to how do i activate and refresh the things.
Thanks
Rajue
wd.rajue wrote:
Hi Guru's
>
> I am facing an issue in web dynpro abap.
> in my application there is a button called OPEN.
> when i click on open button internal table records should be refreshed.
> so i have written code like this
>
> DATA lo_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
>
> lo_COMPONENTCONTROLLER = wd_this->get_componentcontroller_ctr( ).
>
> lo_componentcontroller->clear_info_refresh_visible( ).
>
>
>
> but iam getting an error message Method "CLEAR_INFO_REFRESH_VISIBLE" is unknown or PROTECTED or PRIVATE
>
>
> Could you please help me to how do i activate and refresh the things.
>
> Thanks
> Rajue
Raju,
Please clarify this.
Do you have a method clear_info_refresh_visible in your component controller. I think not.
I am not able to relate your request and coding.
You can simply clear the internal table like this
clear lt_intern_tab[].
If it is a context node then you can bind a empty table to the node to make it empty.
lo_nd_data->bind_table(
new_items = lt_intern_tab
set_initial_elements = abap_true ).
Similar Messages
-
Insert multiple records from web dynpro
Hi,
How to insert multiple records from web dynpro applications to SAP backend system ?
Thanks,
sowmyaHi soumya..
if want to multiple row selected then save into the Sap back End..
value node--table.
Backend value node=table_bapi_input;
back end internal table --tableback.
int size=wdcontext.nodeTable().size();
int lead=wdcontext.nodeTable().getLeadSelection();
table_bapi_input in=new table_bapi_input();
wdcontext.nodetable_bapi_input().bind(in);
for(int i=size-1;i>0;i--){
tableback set=new tableback()
if(lead==i || wdcontext.nodeTable().ismultiSelection(i)){
set.setName(wdContext.nodeTable().getTableElementAt(i).getName();
in.addZc_input(set);
wdContext.currenttable_bapi_inputElement().modelobject().excute();
wdContext.nodeOutput().invalidate();
thanks
jati -
How to display the Internal table records in table format?
Hi Gurus,
I want to display my print prg internal table records in d appropriate form in a table format, give some solution
with regards
ThambeThere are lot many options to do that
one way is create template in the maikn window and define the line types according to your data cretae text and put your data in the text and go to output options and give the line type to be used . You can also select details option to have lines in your output.
similarly YOU CAN CREATE TABLE IN THE MAIN WINDOW FOR THIS YOU DONT NEED TO DEFINE THE LINE TYPES .
WHEN YOU ARE IN MAIN WINDOW RIGHT CLICK ON TABLE AND GO TO PATH
CREATE -> TABLE
-> TEMPLATE
REWARD IF USEFUL
Regards,
Nageswar -
Function module for move internal table records into MSexcel file
Hi all,
Tell me the function module which is used to
move internal table records in to MSexcel file.
Give the sample program...Please search the forum for FM "GUI_DOWNLOAD" You will get tons of threads with sample code.
Also take a look into SAP_CONVERT_TO_XLS_FORMAT
Thanks -
Create a Table Dynamically in WEB Dynpro Java with diferent type of column
Hi everyone, I have a question if is possible to create a table dynamically in Web Dynpro Java?, depending of the RFC consults create the rows dynamically, ,this table must have diferent type of columns, for example link column (when the user click this link execute an action and show a adobe interactive form in another view), image column (show an image depending of the information)
Thank you everyone
Atte IsraelHello,Israel.
Yes , it is possible through dynamic programming in wdModify of the View.
You can do this ,for example, using cell variants.
IWDTable tab = (IWDTable) view.getElement("TABLE_NAME");
IWDTableStandardCell cellV= (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class,"TableStandardCell"+i);
cellV.setVariantKey("NotEditableVariant");
cellV.setCellDesign((WDTableCellDesign)wdContext.nodeTableDaysTitle().currentTableDaysTitleElement().getAttributeValue("CellDesign"+i));
IWDTextView textViewi= (IWDTextView) view.createElement(IWDTextView.class,"TextView"+i); // -- here you control the type of the object that is displayed in the cell
textViewi.bindText(dayAttrib);
cellV.setEditor(textViewi);
tabColumn.addCellVariant(cellV);
tab.addGroupedColumn(tabColumn,tab.numberOfGroupedColumns());
Using this code you can control even specific cells in the table and not only columns.
Hope this helps you,
Constantine -
SRM 7.0 find transparent table name from Web dynpro Component
Hi ,
I am trying to find the transparent table name from Web dynpro component dictionary structure. I am working in SRM 7.0. Please let me know how to find the transpartent table for a field.
Thanks,
Monicahi,
your question is very unclear and does not relate to performance.
SRM uses webdynpro ABAP so the recommendation will not help.
Do you need a technical UI element?
Or the application table where the business data of an UI is stored???
If it is the later, then you can use the SQL trace, change to element you are interested in, and trace it. The table should appear in the trace in connection which an UPDATE command. Still a bit cimbersome.
Siegfried -
Help on Delete Internal table records
Hi,
I have a internal table with some records in it.
I need to delete the contents of this based on the condition as below.
if product_search-Resp_product_company is not initial.
SORT i_equi BY zzrefeng.
DELETE i_equi WHERE zzrefeng <> product_search-Resp_product_company.
endif.
when i execute this all the records are getting deleted irrespective of the condition mentioned.
Can anyone help me on this.
Regards,
RamHi,
Need to delete the records if <b>ZZREFENG</b> does not have the value of <b>product_search-Resp_product_company</b> .
Here I have product_search-Resp_product_company value as FI14. And also the internal table contains some records with ZZREFENG = FI14.
I need to delete the internal table records if ZZREFENG <> FI14. But when i execute the statement it is deletng all the records even ZZREFENG = FI14 records also.
Regards,
Ram -
How to set first_visible_row for a table on a web dynpro
How can I set the attribute first_visible_row in a table which I placed on a Web Dynpro?
I need the table to scroll automatically to a specific row depending on a date. So I'm calling a method using this date, but how can I change the attribute of the table?
Thank you!Follow these steps,
1- Create an attribute with char1 in the view context e.g first_vis_row
2- go to the table properties in view and bind the property first_visible_row to this attribute.
3- NOw go to the wddoinit method of the view...
4- read the internal table and find out the index of the row which you want to set as first row. As in ur case you want a specific date in first row. So read the internal table and findout the index.
5- now write this code, say your attribute name is first row inside node flag1...(you can change it for yoru requirement)
DATA lo_nd_flag1 TYPE REF TO if_wd_context_node.
DATA lo_el_flag1 TYPE REF TO if_wd_context_element.
DATA ls_flag1 TYPE wd_this->element_flag1.
DATA lv_first_row LIKE ls_flag1-first_row.
* navigate from <CONTEXT> to <FLAG1> via lead selection
lo_nd_flag1 = wd_context->get_child_node( name = wd_this->wdctx_flag1 ).
* get element via lead selection
lo_el_flag1 = lo_nd_flag1->get_element( ).
* get single attribute
lo_el_flag1->get_attribute(
EXPORTING
name = `FIRST_ROW`
IMPORTING
value = lv_first_row ).
here change the lv_first_row to the index which you got after raeading the internal table.
suppose it's
lv_first_row = 4.
lo_el_flag1->set_attribute(
EXPORTING
name = `FIRST_ROW`
value = lv_first_row ).
Hope it works. -
Dynamic table columns in web dynpro abap
Hi,
In my current project I have got a requirement whose solution I am not able to figure out.
My requirement is this:
I will have a table containig budget owners name(since its compensation management in HR).There will be a table popin inside this table on the click of the personal number of the budget owner. Now the table popin will have another table with all employees name under that particular budget owner.
The problem is that the table inside the popin will not be having fixed columns.Actually the columns will be coming from a standard java web dynpro application (say in the form of an internal table).
My requirement is this how can this be handled?Can we include all the possible columns in the node(which i bind to the child table) and make them visible/invisible during runtime? or create a dynamic node and assign it to the table(but in this case a node needs to be bound to the table during design time,what to bind?) ?
Can u please help along with code snippets.
Thanks and Regards,
Saikat.Thnx for the input.
I am abke to make the table columns inside the popin visible/invisible.
I have a tabstrip.Indise one of the tabs is my main table and inside one of the columns is the popin.Inside that a transparent container and finally the table inside that.
This is the code that worked for me.
METHOD wddomodifyview .
DATA lr_root_container TYPE REF TO cl_wd_uielement_container.
DATA lr_table_popin TYPE REF TO cl_wd_table_popin.
DATA lr_transparent_container TYPE REF TO cl_wd_transparent_container.
DATA lr_table TYPE REF TO cl_wd_table.
DATA lr_table_column TYPE REF TO cl_wd_table_column.
DATA lr_table_in_table_popin TYPE REF TO cl_wd_table.
DATA lr_node_header_node TYPE REF TO if_wd_context_node.
DATA lr_node_item_node TYPE REF TO if_wd_context_node.
DATA lr_tabstrip TYPE REF TO cl_wd_tabstrip.
DATA lr_tab TYPE REF TO cl_wd_tab.
data lr_tc type ref to CL_WD_TRANSPARENT_CONTAINER.
data lr_table2 type ref to cl_wd_table.
DATA lr_table2_column TYPE REF TO cl_wd_table_column.
IF first_time = abap_false.
lr_root_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_tabstrip ?= lr_root_container->get_child( id = 'TABSTRIP1' ). "GETTING THE TABSTRIP
lr_tab ?= lr_tabstrip->get_tab( id = 'TAB1' ). "GETTING THE TAB INSIDE TABSTRIP
lr_table ?= lr_tab->GET_CONTENT( ). "GETTING THE CONTENT(TABLE IN THIS CASE) INSIDE TABSTRIP
lr_table_column ?= lr_table->get_grouped_column( id = 'TABLE_MAIN_PERNR' ). "GETTING THE COLUMN INSIDE THE TABLE
"Table popin
lr_table_popin ?= lr_table_column->GET_POPIN( ). "GETTING THE POPIN INSIDE THE TABLE
lr_tc ?= lr_table_popin->GET_CONTENT( ). "GETTING THE CONTENT(TRANSPARENT CONTAINER IN THIS CASE)INSIDE THE TABLE
lr_table2 ?= lr_tc->get_child( id = 'TABLE_EMPLOYEE' ). "GETTING THE EMPLOYEE TABLE INSIDE THE TRANSPARENT CONTAINER
lr_table2_column ?= lr_table2->get_grouped_column( id = 'TABLE_EMPLOYEE_PERNR' ). "GETTING THE COLUMN INSIDE THE TABLE
lr_table2_column->SET_VISIBLE( '02' ). "SETTING VISIBILITY FOR THE COLUMN
ENDIF.
ENDMETHOD.
But I'm still considering the dynamic node concept.Lets see if this works out or not.If not then I'll have to go for the dynamic node thing.
Thanks,
Saikat -
Reg : Joining the all internal table records into a single internal table
Hi all
I am having 5 internal tables and i want to put all these entries in a single intrnal table and my requirement is for each and every record it has to go through all the internal tables and if an entry is missing meand.it has to go through the other internal tables and for missing entries i should leave it as blank and rest of the contents i have to display can any please gimme some logic how to do this??
Thanks in advanceDon't have time or will to deliver turnkey solutions, but here is a frame:
LOOP AT itab1...
READ TABLE itab2 WITH TABLE KEY... (fields linking itab1 and itab2)
READ TABLE itab3 WITH TABLE KEY... (fields linking itab1 and itab3)
LOOP AT itab4 WHERE... (fields linking itab1 and itab4)
READ TABLE itab5 WITH TABLE KEY... (fields linking itab4 and itab5)
MOVE-CORRESPONDING... (all five work areas to target work area)
APPEND itabtarget...
ENDLOOP.
ENDLOOP.
so use READ when there is a 1:1 relationship (e.g. check table entry), and LOOP when there is a 1:N relationship (e.g. items for a header)
Thomas -
How to send Internal table records to Idoc Inbound posting FM to create Ido
Hello Experts,
I have all the data necessary to create shipments in one internal table inside my ABAP program.
I can use BAPI_SHIPMENT_CREATE to create shipments. But associated with this BAPi there is one ALE message type SHIPMENT_CREATEFROMDATA. Now my requirement is to use this message type to cretae my shipments via idocs for one scenario for some of the records in the internal table.
For this message type, I got the inbound function module IDOC_INPUT_SHIPMENT_CREATEFROM from TBDBE table.
Can anybody please let me know how to send the data from the internal table to this inbound function module?
Becasue it has mandatory parameters INPUT_METHOD, MASS_PROCESSING. What values should be passed to these parameters if the data has to be sent to this function module?
Regards.Hi Ravikanth,
Thankyou very much for your quick reply.
So If I split my internal table data and populate IDOC_DATA and IDOC_CONTROL and pass to the inbound function module directly in my ABAP program, will that be going to create idocs and post shipments?
I mean is it enough to call the Inbound posting function module directly in my ABAP program or any other FMs to be called to take care of ALE settings and shipment creation?
Please confirm.
REgards. -
How to Refresh "Internal table values" in User EXIT.
Dear All,
My requirement is to place some checks in exit ZXQQMU20 in different tabs from the TCODE IW21 . IW22 etc.
Now after placeing the checks towards the different tabs while doing "NOCO" from IW21 the conditions are fullfilled but
when i go ahead to modify the created "NOCO " from the TCODE IW22 by deleting the created values and saving in IW22 , the conditions written in the exit are still satisfied eventhough i have deleted the values in IW22.
The reason for this is that the tables which are there in the exit ZXQQMU20 T_VIQMFE , T_VIQMUR , T_VIQMMA
still contains the old values which were there at the time of creation of "NOCO" in IW21 .
How to refresh my " internal tables values" used in such that even at the time of modification of the NOCO through IW22 my table values should pick the current screen values and not the values which were there at the time of creation.
Please help.
The code i have written in the exit is as below:-
********************* Changed vide ******START
*****IW21 IW22 also added in filter criteria of notification *************
******The purpose of this modification is that in the execution of IW21 or IW22 or IW24 or IW25 we have to give a check that if the
******notification type is M2 than inside the Transaction screen , if the Breakdown duration comes less than 15 min than there are
******no issues but if the breakdown duration is more than 15 min than the mandatory fields needs to be entered in the analysis tab.
** The user has to fill up either following mandatory fields in Analysis Data tab.
** A. Object Parts & Damages sub tab
** Code Group - Object Parts (OTGRP, VIQMFE)
** AND
** Code Group - Problem / Damage (FEGRP, VIQMFE)
** Or
** Notification Item Short Text (FETXT, VIQMFE)
** B. Cause sub tab
** Code Group # Causes (URGRP, VIQMUR)
** Or
** Cause Text (URTXT, VIQMUR)
** C. Action Taken sub tab
** Code Group # Activities (MNGRP, VIQMMA)
** Or
** Activity Text (MATXT, VIQMMA)
** Then, allow user to complete notification (NOCO).
CLEAR : L_VAR , L_COMP_TIME.
IF ( SY-TCODE EQ 'IW21' OR SY-TCODE EQ 'IW22' OR SY-TCODE EQ 'IW24' OR
SY-TCODE EQ 'IW25' ).
IF ( E_VIQMEL-IWERK = '061' ) OR ( E_VIQMEL-IWERK = '062' ).
IF E_VIQMEL-QMART = 'M2'.
L_VAR = E_VIQMEL-AUSZT.
L_COMP_TIME = L_VAR / 60.
IF L_COMP_TIME < 15.
EXIT.
ELSEIF L_COMP_TIME > 15..
* IF ( T_VIQMFE-OTGRP IS INITIAL AND T_VIQMFE-FEGRP IS INITIAL ) OR ( T_VIQMFE-FETXT IS INITIAL ) .
* MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
* ENDIF.
IF T_VIQMFE-OTGRP EQ '' OR T_VIQMFE-FEGRP EQ ''.
IF T_VIQMFE-FETXT EQ ''.
MESSAGE 'Please fill the mandatory analysis data in Object Parts' TYPE 'E'.
ENDIF.
ENDIF.
CLEAR L_TAG.
IF T_VIQMUR[] IS INITIAL.
MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
ELSE.
LOOP AT T_VIQMUR.
IF T_VIQMUR-URGRP IS INITIAL .
IF T_VIQMUR-URTXT IS INITIAL.
L_TAG = 'X'.
ENDIF.
ENDIF.
ENDLOOP.
IF L_TAG = 'X'.
MESSAGE 'Please fill the mandatory analysis data in Cause tab' TYPE 'E'.
ENDIF.
ENDIF.
CLEAR L_TAG.
IF T_VIQMMA[] IS INITIAL.
MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
ELSE.
LOOP AT T_VIQMMA.
IF T_VIQMMA-MNGRP IS INITIAL .
IF T_VIQMMA-MATXT IS INITIAL.
L_TAG = 'X'.
ENDIF.
ENDIF.
ENDLOOP.
IF L_TAG = 'X'.
MESSAGE 'Please fill the mandatory analysis data in Action' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
<Added code tags>
Thank you so much in advance..
-Sudhish
Please use the code tags when you're posting any code snippet
Edited by: Suhas Saha on Jul 13, 2011 12:39 PMHi, I was thinking just like XVBAP and YVBAP values in the USEREXIT_SAVE_DOCUMENT.
Plz check u have x /y versions or tables like _old/ _new suffixes and then move the value accordingly.
otherwise there may be inconsistency.
Edited by: Prasenjit S. Bist on Jul 13, 2011 3:03 PM -
What is the right way to display a table in Java web dynpro using a node.
Hi experts,
I am trying to show a node of cardinality 0...n as a table in an adobe form in Java web dynpro. But its not showing it properly. Can anybody please tell me what is the right way to display a table on adobe form using a node of cardinality 0...n or 1...n in Java Webdynpro. In ABAP webdynpro, we can drag and drop a node of cardianlity 0...n or 1...n to show as a table and it works fine. Is the same possible in Java webdynpro also. Please help.
Thanks and Regards.
Vaibhav Tiwari.Please refer to my post.. you will get the answer
Dynamic Table - same data repeating in all rows
Special care should be taken in designing the context for table attribute.
The attribute type singletone also plays a important role. I have this doubt from the beginning when you have reported this problem for the first time but finally you marked it as solved so i thought there might be some other issues but again when you reported that again i did some analysis.
Now coming to final solution :
For designing a table in adobe interactive form you have consider following
You have to design the view context upto three level, I am explaining you the properties
PDFDataSource (Parent Level1) - Cardinality 1:1 - Signetone -True - This is assigned to datasource
TableList (Parent Level2) - Cardinality (1:1) - Signetone -True
TableWrapper(Parent Level3) - Cardinality (0:n) - Signetone -True
TableData (Parent Level4) - Cardinality (0:1) - Signetone - false (This is the main point)
Then under TableData value node, you have to put all your table attributes.
This Value Node name can be anything but hierarchy should be same as I have mentioned above.
Please try out these steps and get back to me if you have any doubt. -
Doubt in internal table record count
Hi,
i have an internal table with 5 fields. Last field is flag. In my internal table lot many records are there. i want to count only the records with flag 'E'. How to count the total records with 'E'.
MohanaTry like this,
Data: c type i.
Loop at itab into wa.
if wa-flag = 'E'.
c = c + 1.
endif.
Endloop.
Write:/ 'Total records', c.
OR
LOOP AT itab WHERE flag = 'E'.
c = c + 1.
ENDLOOP.
Edited by: Sap Fan on Apr 3, 2009 5:21 PM -
Problem in Internal table Record Splitting
Hi All,
Plz look into my below requirement and me know your Suggestions.
My Internal tables :
1.*Internal table for Infotype 2002 (Attendances)
DATA : BEGIN OF T_PA2002 OCCURS 0,
PERNR LIKE PA2002-PERNR,
BEGDA LIKE PA2002-BEGDA,
ENDDA LIKE PA2002-ENDDA,
BEGUZ LIKE PA2002-BEGUZ,
ENDUZ LIKE PA2002-ENDUZ,
SUBTY LIKE PA2002-SUBTY,
END OF T_PA2002.
1.*Internal table for Infotype 9003 (Custom Attendances)
DATA : BEGIN OF T_PA9003HRABS OCCURS 0,
PERNR LIKE PA9003-PERNR,
BEGDA LIKE PA9003-BEGDA,
ENDDA LIKE PA9003-ENDDA,
SHIFT LIKE PA9003-SHIFT,
OTHOURS LIKE PA9003-OTHOURS,
BEGUZ LIKE PA2002-BEGUZ,
ENDUZ LIKE PA2002-ENDUZ,
NSA LIKE PA9003-NSA,
MA LIKE PA9003-MA,
CA LIKE PA9003-CA,
END OF T_PA9003HRABS.
Requirement :
1. Internal table T_PA2002
PERNR BEGDA ENDDA BEGUZ ENDUZ
5 27.12.2006 27.12.2006 10:00:00 14:30:00
2. Internal table T_PA9003HRABS
PERNR BEGDA ENDDA BEGUZ ENDUZ HRABS OTHOURS MA CA WA
5 27.12.2006 27.12.2006 08:00:00 14:30:00 2 2
Iam doing comparision between T_PA2002 and T_PA9003HRABS.
Iam doing some caluculation to get Hourly absence,OT Hours and else ( Fields)
So my Hourly absence on 27.12.2006 was 2Hours.
So i need to split my Final table as below how to do that....( It is like In infotypes COPY option i.e 1 record to 3 Record )
I need the Output like this...
3. Final Internal table T_PA9003HRABS
PERNR BEGDA ENDDA BEGUZ ENDUZ HRABS OTHOURS MA CA WA
5 25.12.2006 26.12.2006 08:00:00 14:30:00 0 0
5 27.12.2006 27.12.2006 08:00:00 14:30:00 2 2
5 25.12.2006 26.12.2006 08:00:00 14:30:00 0 0
Points will be rewarded.
Thanks,
Suresh.Uyou could:
sort T_PA2002 by pernr.
sort T_PA9003HRABS by pernr.
loop at T_PA2002
read table T_PA9003HRABS with key
pernr = T_PA2002-pernr
begda = T_PA2002-begda
binary search.
***here you can specify how you calculate
***your absences and apply them to your
***final internal table.
endloop.
hope this helps.
Warren
Maybe you are looking for
-
HDMI audio works only with pavucontrol
I am having a weird problem with my HDMI audio output. I can have sound only if I use pavucontrol to switch the per app output to HDMI. If I make HDMI as my default device, it would not work anymore until I delete .config/pulse and restart gdm. I mus
-
Flash Player 13 crashes with Mac OS X 10.6.8
Any version of Flash Player 13 crashes on activation. Installing FP 12 as suggested allows Flash Player to work, but FF 28 plugin check complains "Out of Date" plugin. Update. How serious is the security issue of running this older version of Flash P
-
Mavericks upgrade...lost my 2nd monitor
Need help. Just upgraded to Mavericks. I've been using a 2nd 23" Cinema Display w/o problems with my MacBookPro. After the upgrade, the 2nd display only shows the background and tool bar at the top. No desktop icons, no Dock, and the cursor is also g
-
Why the Orgunit from Orgstructure not beeing called in Get Pernr
Dear Freinds Iam using the logical database PNP for my payroll repot. So i have modified the selection screen and keppt only a) paroll area, b) otherperiod and current period c) organizational unit. My intention is to read all the orguni
-
Can I get Flash for Samsung Galaxy Note 3?
Is there a way to run Flash player on the Note 3?