Hierarchical sequential display in ALV for webdynpro ABAP
Hello,
I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
Thank you for all your help.
Sumit.
Hello,
I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
Thank you for all your help.
Sumit.
Similar Messages
-
Drop down in ALV for Webdynpro ABAP
Hi Experts,
I was trying to implement one Web dynpro ABAP application that will show one ALV and ALV will content one dropdown so that user can select data from the drop down. Addtion to that, my dropdown should have data based on another column of ALV.
I have followed one article which is available in Net.
At the end of development, ALV is displayed with dropdown. Also dropdown has data binded. However, no data is visible in dropdown.
I have created one context node having four dictionary element and one elemt for dispplaying the dropdown.
In the DoInit method of view, i have written below code:
Data Declaration
DATA:
lo_node_cskt TYPE REF TO if_wd_context_node,
lo_el_cskt TYPE REF TO if_wd_context_element,
ls_cskt TYPE wd_this->element_cskt,
lt_cskt TYPE wd_this->elements_cskt,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lv_value TYPE REF TO cl_salv_wd_config_table,
lr_column TYPE REF TO cl_salv_wd_column,
lr_drdn TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
ls_value_set TYPE wdr_context_attr_value,
lv_tabix TYPE sy-tabix,
lv_count(2) TYPE c,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
Navigate from <CONTEXT> to <CSKT> via lead selection:
lo_node_cskt = wd_context->get_child_node( name = wd_this->wdctx_cskt ).
get element via lead selection
lo_el_cskt = lo_node_cskt->get_element( ).
Get Data:
SELECT kokrs kostl datbi ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE lt_cskt.
lv_count = 0.
Populate value set
LOOP AT lt_cskt INTO ls_cskt.
lv_tabix = sy-tabix.
CLEAR ls_cskt-ktext.
DO 3 TIMES.
lv_count = lv_count + 1.
CONCATENATE 'TEST' lv_count INTO ls_value_set-text.
CONCATENATE 'TEST' lv_count INTO ls_value_set-value.
if lv_tabix = 2.
if sy-index = 2.
EXIT.
endif.
endif.
APPEND ls_value_set TO ls_cskt-valueset.
ENDDO.
MODIFY lt_cskt FROM ls_cskt INDEX lv_tabix TRANSPORTING ktext valueset.
ENDLOOP.
Bind data
lo_node_cskt->bind_table( lt_cskt ).
Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
Bind Data to Interface Controller Node
lo_interfacecontroller->set_data(
r_node_data = lo_node_cskt
Get ALV reference table
lv_value = lo_interfacecontroller->get_model( ).
Make KTEXT column as drop down
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'KTEXT'
RECEIVING
value = lr_column.
Create Object for Drop down
CREATE OBJECT lr_drdn
EXPORTING
selected_key_fieldname = 'KTEXT'.
CALL METHOD lr_drdn->set_valueset_fieldname
EXPORTING
value = 'VALUESET'.
CALL METHOD lr_drdn->set_type
EXPORTING
value = IF_SALV_WD_C_UIE_DRDN_BY_INDEX=>TYPE_KEY_CONVERT_TO_VALUE.
CALL METHOD lr_column->set_cell_editor
EXPORTING
value = lr_drdn.
CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only
EXPORTING
value = abap_false.
I am still finding the answer why data in drop down is not visible. However, I can select by clicking dropdown and blank elements (since data is not visible) can be selected.Hey
i am using the same code except i have just modified little bit the select statement to restrict the number of entries.
and also besides writing the code in wddoinit i have added the compenent usage of alv component and added the node
having the structure ckst and after that deleting the dictionary reference to add the attribute valueset in both places
component controller and view controller and mapped them and mapped the data node of interface controller of comp
usage to this node in comp contrlr.
and adding the view container and embeding table view of alv comp there.
that's it
and here is the code which is almost same as yours except small change in select statement.
method WDDOINIT .
DATA:
lo_node_cskt TYPE REF TO if_wd_context_node,
lo_el_cskt TYPE REF TO if_wd_context_element,
ls_cskt TYPE wd_this->element_cskt,
lt_cskt TYPE wd_this->elements_cskt,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lv_value TYPE REF TO cl_salv_wd_config_table,
lr_column TYPE REF TO cl_salv_wd_column,
lr_drdn TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
ls_value_set TYPE wdr_context_attr_value,
lv_tabix TYPE sy-tabix,
lv_count(2) TYPE c,
lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
* Navigate from <CONTEXT> to <CSKT> via lead selection:
lo_node_cskt = wd_context->get_child_node( name = wd_this->wdctx_cskt ).
* get element via lead selection
lo_el_cskt = lo_node_cskt->get_element( ).
* Get Data:
SELECT kokrs kostl datbi ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE lt_cskt up to 10 rows .
lv_count = 0.
* Populate value set
LOOP AT lt_cskt INTO ls_cskt.
lv_tabix = sy-tabix.
CLEAR ls_cskt-ktext.
DO 3 TIMES.
lv_count = lv_count + 1.
CONCATENATE 'TEST' lv_count INTO ls_value_set-text.
CONCATENATE 'TEST' lv_count INTO ls_value_set-value.
if lv_tabix = 2.
if sy-index = 2.
EXIT.
endif.
endif.
APPEND ls_value_set TO ls_cskt-valueset.
ENDDO.
MODIFY lt_cskt FROM ls_cskt INDEX lv_tabix TRANSPORTING ktext valueset.
ENDLOOP.
* Bind data
lo_node_cskt->bind_table( lt_cskt ).
* Instantiate ALV
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
* Bind Data to Interface Controller Node
lo_interfacecontroller->set_data(
r_node_data = lo_node_cskt
* Get ALV reference table
lv_value = lo_interfacecontroller->get_model( ).
* Make KTEXT column as drop down
CALL METHOD lv_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'KTEXT'
RECEIVING
value = lr_column.
* Create Object for Drop down
CREATE OBJECT lr_drdn
EXPORTING
selected_key_fieldname = 'KTEXT'.
CALL METHOD lr_drdn->set_valueset_fieldname
EXPORTING
value = 'VALUESET'.
CALL METHOD lr_drdn->set_type
EXPORTING
value = IF_SALV_WD_C_UIE_DRDN_BY_INDEX=>TYPE_KEY_CONVERT_TO_VALUE.
CALL METHOD lr_column->set_cell_editor
EXPORTING
value = lr_drdn.
CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only
EXPORTING
value = abap_false.
endmethod.
thanks
sarbjeet -
How to use traffic lights concept in alv in webdynpro abap
Hai ,
How to use traffic lights concept for alv in webdynpro abap. If possible give me some code.Hi Ravi,
You can create ICON to get traffic light.
Go through this step by step.. in this example
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1190424a-0801-0010-84b5-ef03fd2d33d9?quicklink=index&overridelayout=true
Please go through this...
Re: Display ICON in the ALV table column
Re: Image in ALV
cheers,
Kris. -
How to restrict the no of rows to be displayes in ALV in webdynpro
Hi All,
Can any one suggest how to restrict the no of records to be displayed in the portal in the ALV through webdynpro ABAP.
Thanks & Regards,
Sreelatha Gullapalli.HI,
If you want to change the Source (Design time) then you can do that via the alv configuration.
Something like this in the component SALV_WD_COLUMNS_UI
lr_available_model->if_salv_wd_table_settings~set_visible_row_count( lc_row_count ). -
Why do we go for Webdynpro ABAP?
Hi All,
Why do we go for Webdynpro ABAP and How is it beneficial comparing with other technologies in SAP?
Thanks
Gopi.hi ,
u may wish to like to go thru this WIKI
http://wiki.sdn.sap.com/wiki/display/WDABAP/General+Issues#GeneralIssues-1.95
in whch WD ABAP is compared with WD JAVA , BSP , JSP and HTMLB and mobile infrastrucutre .
u may wish to go thru these WD ABAP tutorials :
http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/content.htm
Main Topic Page:
http://sdn.sap.com/irj/sdn/nw-wdabap#section2
Tutorials for Beginners:
Web Dynpro for ABAP: Tutorials for Beginners [original link is broken]
eLearning Videos:
/people/thomas.jung/blog/2006/06/20/web-dynpro-abap-demonstration-videos
go thru this quote by thomas
The designers of WDA didn't want to lock developers into having to create an extra model layer. One of the values of WDA is that it sits closely with the underlying business logic and data. Therefore it can easily reuse existing function modules or classes (or even contain SQL directly - although this isn't recommended).
There are different options for playing the role of model. You could create a faceless web dynpro component. This is sometimes used in large complex Floorplan Manager applications. However the cross-component context binding can represent a performance problem.
More often a class is used as a simple model. These are called feeder classes in POWL. But really any ABAP class can be used to separate out the logic for the model. Data from this class can be accessed and then bound to the local context. Sometimes people use the Assistance Class as a model. It is possible to share a single instance of an assistance class between a hierarchy of components - making it an efficient way to share data.
Of course there are the service call wizards. These aren't really models like in WDJ. Instead they are just shortcuts to generate context structures and code generators. However everything they generate can also be created by hand or altered after generation.
rgds,
amit -
Is there something wrong with with "Floorplan Manager for WebDynpro Abap"
Hi,
Seems like there may be something wrong with the forum
[SAP Community Network Forums » SAP Solutions » Floorplan Manager for WebDynpro Abap |;
no-one has got any p0ints (sorry for break but auto guideline logic is stopping the post) in the last 30 days - and it doesn't seem to be for lack of trying...
[ref to thread where person claims not to be able to r3ward|;
is this normal?
Cheers,
ChrisHello,
And another thread in the same forum,
[Thread: Change Close button translation in FPM screen |Change Close button translation in FPM screen;
where the person closing the thread has stated
P.S. I did not see radio buttons for rewarding points. I don't how to do it then
seems like there is some problem in this forum.
Could you please investigate?
Thanks,
Chris -
Display RSS flows in WebDynpro ABAP
Hi,
I was surprised that my search in this topic on "RSS" did not return any result.
I need for a customer to develop a couple of WebDynpro ABAP screens (without any portal) and to display information coming from a RSS flow inside these WD4A screens.
Any idea how to achieve this, standard solution preferred or via custom coding?
Thanks
YannYour question isn't really Web Dynpro ABAP centric. The process to consume and parse the RSS is indepent of the use of classic dynpro, BSP, or Web Dynpro ABAP as the UI. You are probably just going to use the CL_HTTP_CLIENT class to make the HTTP call from ABAP and then parse the RSS with XML or an XSLT. Brian McKellar wrote a nice blog on this some time ago.
/people/brian.mckellar/blog/2004/06/25/bsp-programming-rss-httpclient-xml-xslt
He does his output in BSP, but that part can easily be adapted to Web Dynpro. -
Display pdf file using webdynpro abap
Hi Friends,
My requirement is to display pdf file in the second page with the input text entered in the fisrt page when clicked on action
button( in the first page) using webdynpro abap.
Can anybody explain the step by step procedure as I am new to this area.
Thanks in advance.
Reagrds,
NagarajuHi,
Check this.,
Creating a PDF file in webdynpro abap.
Web Dynpro ABAP display pdf
hope this helps u.,
Thanks & Regards
Kiran -
Iview for Webdynpro ABAP application with TimedTrigger
Hello,
I created an IView for a WebDynpro ABAP application. This application uses a UI element TimedTrigger. Without portal integration this TimedTrigger works fine. Inside an IView this TimedTrigger element does not work anymore. Did anyone have a similar problem? Does anyone have a solution for this?
Thanks and regards
Marchi,
Go through this link
[****************/Tutorials/WebDynproABAP/TransactionCode/Create.htm]
Hope it will help you.
Regards,
Rohit -
Personalization data for WebDynpro ABAP application ?
Dear Experts,
We can personalize WebDYnpro ABAP application via right click , show hide buttons , columns etc.
Where is this personalization data stored or how can it be retrieved assuming my application is executing outside the portal ?
Greetings
PrashantHi Prashant,
it is stored in the ABAP system - not the portal, so no issues about running outside the portal.
This is different to WDJ pagebuilder configuration/personalisation - which is stored in the portal!
you can see some of the personalisation framework that is used for things like storing POWL user preferences etc in the backend via the IMG path
Cross-Application Components --> General Application Functions --> Generic SAP Business Suite Functions --> Personalization (sic) .
Hope this helps you,
Chris -
Getting Pernr for WebDynpro ABAP application
I am building a new WebDynpro ABAP application and I want to be able to get the PERNR for the user logged into the portal and this application.
I have read some information on this forum about getting the URL or application parameters in order to get the userid or similiar parameters and to handle this within the Window in the HANDLEDEFAULT method of a WebDynpro ABAP application.
I have looked into this and I don't think pulling information from the application parameters will work. For example, I checked one of our current services for "Personal Data" and when I go to the portal content administration, application parameters, I don't see any reference to userid..etc. I see Property ID, Property Category, Inheritance, End-User Personalization, and Property Description. In addition, I do not see any information from the URL itself that I could use.
Here is the scenario. The user logs into the portal using the 3 character Network id which in turn, I assume, gets their SAP userid and PERNR in order to retrieve all the HR infotype information for each service. By the way, the service I mentioned above, "Personal Data", is written in JAVA, so I am not able to see how this particular service works or handles getting the userid and PERNR.
Has anyone come across this scenario before and how was it handled in terms of getting the userid and PERNR?I was thinking that SY-UNAME would be available, but was not sure. For some reason, I was thinking I was going to have to pass something from the applicaton parameters or some other method to my WebDynpro ABAP program..
I am not the portal administrator so I have not yet added my WebDynpro ABAP program to the portal yet. Once, it's added, I will check out the availablility of sy-uname.
Thanks. -
Portal application parameters for webdynpro ABAP
I have read several posts that indicate we can get the portal user login id in WDA by adding:
userid=<User.LogonUid> to the application parameter property in the portal iview, and then adding a corresponding parameter in the Webdynpro ABAP method HANDLEDEFAULT of the Window.
I'd like to know if there are other such system parameters (besides <User.LogonUid>) that one can pass from Portal to a Webdynpro? A list of such parameters, or a link to such a list would be very helpful.
Best regards,
TarunHi,
In the Portal,
go to content Adminsittration ->Portal Content->PCD folder->Content Provided by SAP->Select your specifc folder->Select IView ->Select Application (Ex-Purchasing)->we can pass paramteres like Iviewid, IviewMode, SessionKeys Available. etc
Pls refer this if helpful.
Company.UserName
Company.UserSignature
Pls refer to this link -
http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/servlet/http/HttpServletRequest.html#getUserPrincipal
Reward if helpful.
Best Wishes,
Chandralekha -
Changing the text and the order of columns in ALV for WebDynpro
Hello experts, im using ALV in WebDynpro, and i have this code:
lr_column = lo_value->if_salv_wd_column_settings~get_column( 'ZNC_MONTO_LIQ' ).
lr_column_header = lr_column->get_header( )
lr_column_header->set_text( 'IMPORTE' ).
but this code, doesn't change the title of the column.
the same happens when i put the visibility in "none" or when i change the position of the column
Anyone can tell why this is happening?
Thanks!You can't set the text of the generated header directly. You have to first delete the standard header and create a new one. You can then override the header text.
l_column = l_table->if_salv_wd_column_settings~get_column( 'CREATED_AT' ).
l_column->delete_header( ).
l_header = l_column->create_header( ).
l_header->set_text( `Created At` ). -
About list dynamic images in ADS for WebDynPro ABAP
Hi All
I find a blog and try it on my server .
I had added theimage in se78, During debugging, everything seems to get filled correctly,
but r the image doesn't display in UI - Image file Q_Q
Please help
the blog is : ( How Tou2026 Integrate ADOBE form on WebdynPro for ABAP and Deploy it on portal )
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID0559322050DB00377446485733506510End?blog=/pub/wlg/7783Sorry I late >"<
My org. program used the method "cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp"
and i used ls_z_if_test_cv-im_photo ( type is Xstring) to receive export data
the program code is :
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = 'GRAPHICS'
p_name = 'ENJOY' " Sap logo
p_id = 'BMAP'
p_btype = 'BCOL'
RECEIVING
p_bmp = ls_z_if_test_cv-im_photo
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
in this case , i need using cl_http_utility=>encode_x_base64( ) to conver ls_z_if_test_cv-im_photo ???
and in my sap, i only found METHOD "cl_http_utility=>encode_base64( )" -
Configuring alv in webdynpro abap
Hi ,
i m trying to create meeting planner application , on one view i want to display location booking information in alv with columns havaing headings as dates like 1-APR-09 ,2-APR-09 ....ETC of week & rows names marked with time of day like 7:00 ,8:00 ...etc HOW I CAN SET THE FIELD CATALOG DYNAMINCALLY FOR THE ALV IN WEB DYNPRO ABAPHi,
Please check out this code.
Use the cl_alv_table_create=>create_dynamic_table
to cretate a dynamic FCAT.
DATA:
lt_fcat TYPE lvc_t_fcat, " Field Catalog
lt_table TYPE REF TO data, " Dynamic Internal Table
ls_line TYPE REF TO data, " Line Type of Dynamic Table
DATA:
lt_efforts TYPE REF TO data,
lr_s_eff TYPE REF TO cl_abap_typedescr,
lr_t_eff TYPE REF TO cl_abap_tabledescr,
lr_handler_eff TYPE REF TO data,
lr_strucdescr TYPE REF TO cl_abap_structdescr,
lr_nd_eff TYPE REF TO if_wd_context_node,
lr_nd_eff_info TYPE REF TO if_wd_context_node_info,
lr_nd_root_info TYPE REF TO if_wd_context_node_info,
lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
lv_value TYPE ref to cl_salv_wd_config_table.
FIELD-SYMBOLS:
<fs_table> TYPE STANDARD TABLE.
* fill the LV_T_FCAT to have your own fields
* To create a dynamic table importing field catalog table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_fcat
IMPORTING
ep_table = lt_efforts
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN lt_efforts->* TO <fs_table>.
**Get the structure
if sy-subrc eq 0.
MOVE cl_abap_structdescr=>describe_by_data_ref( lt_efforts ) ?TO lr_s_eff.
endif. "IF sy-subrc eq 0.
**Get the table type from the structure
lr_t_eff ?= lr_s_eff.
**Create handler for table type
CREATE DATA lr_handler_eff TYPE HANDLE lr_t_eff.
ASSIGN lr_handler_eff->* TO <fs_tab_efforts2>.
<fs_tab_efforts2> = <fs_tab_efforts1>.
**Get the Structure from the Table Object
lr_strucdescr ?= lr_t_eff->get_table_line_type( ).
** create node dynamically
lr_nd_root_info = wd_context->get_node_info( ).
lr_nd_eff_info = lr_nd_root_info->add_new_child_node(
name = wd_assist->gc_periodcost "PERIODCOST'
static_element_rtti = lr_strucdescr "RTTI structure
is_static = abap_false
is_mandatory = abap_false
is_mandatory_selection = abap_false
is_multiple = abap_true
is_multiple_selection = abap_true
is_singleton = abap_false ).
** bind table to node
lr_nd_eff = wd_context->get_child_node( NODENAME ).
lr_nd_eff->bind_table( <fs_tab_efforts2> ).
**If ALV component is initial, then create it
lo_cmp_usage = wd_this->wd_cpuse_u_alv_pwc( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif. "IF lo_cmp_usage->has_active_component( ) is initial.
** Get reference of ALV interface controller
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_u_alv_pwc( ).
if lo_interfacecontroller is not initial.
lo_interfacecontroller->set_data(
* only_if_new_descr = " wdy_boolean
r_node_data = lr_nd_eff " ref to if_wd_context_node
lv_value = lo_interfacecontroller->get_model( ).
Regards,
Lekha.
Maybe you are looking for
-
I'm trying to delete credit card information on the account and only have my son use itunes gift card, but I do not see a "None" button as payment options either on his phone or when I log onto account on the computer. It won't let me delete credit c
-
Header text not printed for scheduling agreement
Hi All, I have issue with header text print out for scheduling agreement (SA). In SA when I am manually writing some note and then taking print out, system is giving me correct output with maual note. I have one standard text (ST) which I need to be
-
I am so behind the times....sorry. I know Apple now has iCloud. So where does that leave me with an iWeb designed website and it's hosted on mobile me???? The iCal calendar is already not working for some reason. Is it true that the iWeb program
-
Payment voucher to be transporter
Hi.. I am preparing things for some taxtile Industry. My scenerio is as follows : Whenever we get Gray to our General Warehouse from where we send it to client's Dying Factory. When we issue challan for it, we are supposed to gererate Payment Vouche
-
Please help me. I try to uninstall and reinstall itune many times but it still show the same this sentense.