How to do this in WebDynpro ABAP?
Hi!
I'm new to WD ABAP, and I need to create a webdynpro with the same funcionality as the User Management Administration available in the Portal, ie:
1. AN ALV list with a search criteria: OK, created on view VLIST.
2. When the user selects one line of the ALV, it would open another view below the view VLIST, not replacing the view VLIST (as it happens when using navigation link).
3. Inside this second view, there is a tabstrip, and one of the tabs display another ALV list, with a <b>Modify</b> button. When the user clicks on <b>Modify</b>, another ALV will "appear" side by side with the first one (inside the tab), so that the user can move items from one ALV to the other (just like the role assignment in the user management administration of the portal).
Can it be done in ABAP WebDynpro? If yes, how can I do it?
Thank you very much.
Andre
Hi Andre,
I think what you are looking for is the EMPTY view.
Since a naviagtion event (fire plug) can result in multiple views being changed.
So you can have
VIEW COMBI
with 2 UI View containers
VC1
VIEW1
VC2
VIEW2
Event X can be mapped to result in
VIEW COMBI
VC1
VIEW4
VC2
VIEW5
or
VIEW COMBI
VC1
VIEW4
VC2
EMPTY VIEW
So you can controller exactly which views are visible when easily
See right click embed empty view in the WINDOW
regards
Phil
Similar Messages
-
How to use messages in WebDynpro-ABAP
Hi,
How to use messages in WebDynpro-ABAP.
Does it has any class to manage messages like IWDMessageManager or we can just use standard SAP Message types.. like E,W,X,I,S..
I hope it have a message container to display messages.
Thank U for Ur time.
Cheers,
SamHi Sam,
U can hard code the message or u can use the Assistance class's text elements to store the messages.
1) Code to display hard coded message:
report message
CALL METHOD l_message_manager->report_attribute_error_message
EXPORTING
message_text = "Enter the correct Connection ID"
element = elem_flightinfo
attribute_name = 'CONNID'.
2) Code to display message from text element of assistance class:
lv_text = wd_assist->if_wd_component_assistance~get_text( key = '002' ).
report message
CALL METHOD l_message_manager->report_attribute_error_message
EXPORTING
message_text = lv_text
element = elem_flightinfo
attribute_name = 'CONNID'.
Where Message "Enter the Correct Connection ID" is stored in Text Element with key '002'
Hope this helps, -
How to exit from a WebDynpro ABAP application and open another url
Hi Friends,
How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button?
Regards,
XavierHi,
First of all you should create outbound plug in the window you are trying to exit with plufg type "Exit"
Then create method handler in the view with this code
data lo_view_cntr type ref to if_wd_view_controller.
data lo_win_cntr type ref to if_wd_window_controller.
data: l_parameter_list type wdr_event_parameter_list,
l_parameter type wdr_event_parameter,
l_val type ref to data,
l_val_url type REF TO data.
field-symbols: <fs> type any,
<fs_url> type any.
lo_view_cntr = wd_this->wd_get_api( ).
lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).
CREATE DATA l_val type c.
CREATE DATA l_val_url type string.
ASSIGN l_val->* to <fs>.
ASSIGN l_val_url->* to <fs_url>.
<fs> = 'X'.
<fs_url> = 'http://your-link.com'.
l_parameter-name = 'URL'.
l_parameter-value = l_val_url.
INSERT l_parameter INTO TABLE l_parameter_list.
lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING plug_name = 'EXIT_PLUG'
parameters = l_parameter_list ).
You can easily change this logic to exit application instead of redirecting to the site
just changing to
l_parameter-name = 'CLOSE_WINDOW'. -
How to upload file in webdynpro abap alv
Hello Friends,
how to upload file in webdynpro abap alv
Regards
Narendra
Moderator message: please search for available information, post in correct "Web Dynpro ABAP" forum if still required.
Edited by: Thomas Zloch on Jun 6, 2011 11:55 AMHi Narendra,
You ahve to search before posting. This discussed many times.
You need to use file upload ui element to upload data. and display in alv.
Please go thorugh this..
http://wiki.sdn.sap.com/wiki/display/WDABAP/UploadandDownloadfilesinWebdynproABAP
Re: Upload .xls file in WDABAP
http://forums.sdn.sap.com/click.jspa?searchID=72307893&messageID=5425671
Cheers,
Kris. -
How to create Radiobutton in webdynpro abap
Hi experts,
I am new to webdynpro abap.I have been given 1 scnario in webdynpro abap to develope:the scnario is as follows:
In first screen there are n no of user are present, i hv to select any user using radiobutton then that user will able to write some text or message in second screen or view( i hv to decide where user can write text or message).similarly other user which has been selected by radiobutton will able to write text in screen or view belongs to them respectbly. Then if user click on save or delete button the text should be saved or deleted from ztable.
I think i hv to create TEXTVIEW or TEXTEDIT so that respective user can write text or message in their view or screen. Please suggest me how to prossed.How to create TEXTVIEW & TEXTEDIT & what is its use.
Secondly please give me steps to create Radiobutton in webdynpro abap.
Thanks In advance,
SanjayHi,
Refer the Standard comp : wdr_test_events . View - Radiobutton.
SAP Online help : http://help.sap.com/saphelp_erp2005/helpdata/EN/c0/e8884118aa1709e10000000a155106/frameset.htm
For TextView and TextEdit :
Refer this : http://help.sap.com/saphelp_erp2005/helpdata/EN/6a/a6884121a41c09e10000000a155106/frameset.htm.
This will give a clear idea with diagram about both these UI element.
Edited by: Saurav Mago on Aug 21, 2009 8:35 AM -
How to use Webservice in Webdynpro ABAP?
I tried searching option for importing WSDL file in WebDynpro ABAP. But I am unable to upload it in my component. In service call wizard I can see only one option i.e. to import Function module.
We cant use Webservice in ABAP webdynpro?
Thanks
Nitesh ShelarThanks Rich for quick answer.
But my problem is, I have a stand alone WAS without any RFC Function modules and dictionary structures, of backend R/3, on WAS which I wanted to map in my component.
I strongly believe that in case of stand alone WAS I need to have at least backend dictionary structures to begin with my design. I cant use wizard, as I dont have function modules on this system. I have to code for that manually..
So that is why, I was looking for Webservice option..
Thanks,
Nitesh Shelar. -
How to call webservices in webdynpro abap
Hi Experts,
My requirement is I have to call an URL by exporting an XML file to that URL I have to import an XML file again i .e nothing but I have to send request file in the form of XML and need to get response in the form of XML file from the URL .This total execution should be finished by clicking a button in webdynpro ABAP.
Regards,
Satya.Hello Satya,
You may try to find the sample code as follows:
1. Goto Transaction se80
2. Select "package" --> enter "SWDP"
3. goto "embedded packages" --> "SWDP_DEMO" --> Web Dynpro
Here, you will get demo applications. Find the most appropriate demo application and try to customize the code according to your requirement.
Best Regards,
Raju MJRK -
How to handle events in webdynpro abap
Hi,
can any body explain how to handle the events in webdynpro abap.
i want to know some concepts in general.
Thanks,Hi Mahesh,
you can create event handlers under the actions tab in you view. evry event handler has an importing parameter wdevent of type ref to cl_wd_custom_event.
you can also create events in your component controller and they can be handled within your views
check cl_wd_custom_event class for details about what all information you get when an event occurs.
for further details you can check out the following links
http://help.sap.com/saphelp_nw04s/helpdata/en/eb/ed6f4169e25858e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/a9/c751415e3b6532e10000000a1550b0/frameset.htm
also you can try the tutorial at the following link for further clarity
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2eb11b59-0a01-0010-dfa3-8292abdf9c4f
Regards,
Shweta
Message was edited by:
Shweta R Shanbhag -
Sha256 - how to do this javascript in ABAP. Is it possible?
Hello,
I would like to use the amazon product advertising api. For this my requests need to be "signed". In an example I found the following javaScript for signing requests:
function sign(secret, message) {
var messageBytes = str2binb(message);
var secretBytes = str2binb(secret);
if (secretBytes.length > 16) {
secretBytes = core_sha256(secretBytes, secret.length * chrsz);
var ipad = Array(16), opad = Array(16);
for (var i = 0; i < 16; i++) {
ipad<i> = secretBytes<i> ^ 0x36363636;
opad<i> = secretBytes<i> ^ 0x5C5C5C5C;
var imsg = ipad.concat(messageBytes);
var ihash = core_sha256(imsg, 512 + message.length * chrsz);
var omsg = opad.concat(ihash);
var ohash = core_sha256(omsg, 512 + 256);
var b64hash = binb2b64(ohash);
var urlhash = encodeURIComponent(b64hash);
return urlhash;
Could someone please tell me if this is also possible with ABAP and if yes, how?
Thanks a lot in advance. Unfortunatley I don't get it done by myself.
bye, VanessaHi
You can code JavaScript directly in your ABAP code.
data: l_JS_PROCESSOR type ref to CL_JAVA_SCRIPT,
l_RETURN_VALUE type STRING,
l_SOURCE type STRING.
Create a new javaScript
l_JS_PROCESSOR = CL_JAVA_SCRIPT=>CREATE( ).
Your Javascript code
concatenate
'var l_source = "Hello,"; '
'l_source += " World"; '
into l_SOURCE separated by CL_ABAP_CHAR_UTILITIES=>CR_LF.
compile the code
l_JS_PROCESSOR->COMPILE( SCRIPT_NAME = 'MYSCRIPT.JS' SCRIPT = L_SOURCE ).
syntax errors ?
if l_JS_PROCESSOR->LAST_CONDITION_CODE <> 0.
write: / 'Error', l_JS_PROCESSOR->LAST_ERROR_MESSAGE.
exit.
else.
write / 'compiled'.
endif.
execute
l_JS_PROCESSOR->EXECUTE( SCRIPT_NAME = 'MYSCRIPT.JS' ).
Errors ?
if l_JS_PROCESSOR->LAST_CONDITION_CODE <> 0.
write: / 'Error in execution',l_JS_PROCESSOR->LAST_ERROR_MESSAGE.
exit.
else.
write / 'Script was executed'.
endif.
return the output variable
l_RETURN_VALUE = l_JS_PROCESSOR->EVALUATE( JAVA_SCRIPT = 'l_source;' ).
write : / l_RETURN_VALUE. -
How to upload images on WebDynpro(ABAP) screens
Hello All,
Could any one please help on how to create/change the image (jpeg/any file) dynamically on WebDynpro screen. I have seen couple of examples for uploading the text files in WDR_TEST_EVENTS, WDR_TEST_WEB_ICONS, but not found any standard program that explains about uploading images.
Requirement: User has to select any image/thumbnail from local PC and it should be displayed on main screen, it's not only from MIME directory.
We have the same logic in BSP Application (CFX_RFC_UI) to upload the thumbnail but am not sure whether we can use the same logic in WDC or not?
I have seen the same logic for WebDynpro (JAVA) here:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
I would really appreciate if you could provide me the code/process ASAP.
Thanks & Regards,
Hari.Hi,
I have written the code as per given logic with no errors, after selecting jpeg file from local PC when I click on 'upload' button it is giving a following short dump.
Could you please let me know how to rectify it.
Error when processing your request
What has happened?
The URL http://rocpld02.wwwint.corp:8000/sap/bc/webdynpro/sap/zms_image_01/ was not called due to an error.
Note
The following error text was processed in the system PLD : Exception condition "CNTL_ERROR" raised.
The error occurred on the application server rocpld02_PLD_00 and in the work process 1 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: CONSTRUCTOR of program CL_GUI_CUSTOM_CONTAINER=======CP
Method: ONACTIONONBUTTONCLICK of program /1BCWDY/1I6RRYQYFWRI2HBZ5MAK==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/1I6RRYQYFWRI2HBZ5MAK==CP
Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Regards,
Hari. -
How to download file from Webdynpro ABAP?
Hello,
What is the best way to download a file from ABAP Webdynpro?
I tried calling method *cl_gui_frontend_services=>gui_download*
from within an Action of my WDA, but it got an error 06, which is "Unknown Error" (not very helpful).
The same code works when I execute it from a regular ABAP program.
I am not using ALV. I just created a file by reading a database with WDA selection fields, then transformed it to XML using CALL TRANSFORMATION.
Thanks,
ColleenYou can't use the GUI_DOWNLOAD, because you have no GUI present, which is the reason why you are getting the error. You will want to take a look at the class/method cl_wd_runtime_services=>attach_file_to_response
Regards,
Rich Heilman -
PCA_PLANDATA_POST -How to use this FM in ABAP
Hi,
I want to update Plan data using this FM.
How do we proceed?
data: begin of i_glpct occurs 0.
include structure glpct.
data: end of i_glpct.
SELECT * FROM glpct
INTO CORRESPONDING FIELDS OF table i_glpct
WHERE rldnr = '8A'
and RRCTY = '1'
and Racct = '0000801020'
and rvers = '001'.
LOOP AT i_glpct.
i_glpct-HSl01 = '33'.
CALL FUNCTION 'PCA_PLANDATA_POST'
EXPORTING
I_DOCTY = 'P0'
I_PLACT = '1'
I_BATCH = ' '
IMPORTING
E_RECORDS = '1'
TABLES
t_glpct = i_glpct
T_DOCUMENTS =
EXCEPTIONS
POSTING_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.
else.
write:/10 'Sucessfully updated'.
ENDIF.
ENDLOOP.It works but my t-code data is not update in R/3.
I used commit work.
What else could be the problem?
REPORT x.
data: begin of i_glpct occurs 0.
include structure glpct.
data: end of i_glpct.
data: begin of t_glpct occurs 0.
include structure glpct.
data: end of t_glpct.
data: l_wait type BAPITA-WAIT,
is_return_com like bapiret2.
SELECT * FROM glpct
INTO CORRESPONDING FIELDS OF TABLE i_glpct
WHERE rldnr = '8A'
and RRCTY = '1'
and Racct = '0000801020'
and rvers = '001'.
LOOP AT i_glpct.
i_glpct-HSl01 = '33'.
modify i_glpct.
ENDLOOP.
read table i_glpct.
CALL FUNCTION 'PCA_PLANDATA_POST'
EXPORTING
I_DOCTY = 'P0'
I_PLACT = '1'
I_BATCH = ' '
IMPORTING
E_RECORDS =
TABLES
t_glpct = i_glpct
T_DOCUMENTS =
EXCEPTIONS
POSTING_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.
else.
commit WORK.
write:/10 'Sucessfully updated'.
ENDIF. -
How to refresh interal table in Webdynpro ABAP
Hi all,
I want to delete/free/refresh interal table in webdynpro abap.
One of the form gave solution to pass blank internal table?
I cleared node and itab in webdynpro, but internally SAP doesn't delete the context node and itab values.
Please help me in how to refresh itab in webdynpro abap.
Regards,
PrasadHi Srinivas,
it doesn't work.
I wrote like this in action list method.
method lta_task.
if not lcontext_node_task is intial.
context_node_task->invalidate().
endif.
select.......
populate data into internal table lt_task_output_table .
if not lt_task_output_table is inital.
context_node_task = wd_context->get_child_node( name = 'TASK_PER').
context_node_task->bind_table( wd_this->lt_task_output_table ).
endif.
endmethod.
Starting of the mehod i have written to inavlidate, before upating the itab
but donesn;t work. Where should I write the code
Reagards,
Prasad -
How to call a radiobutton from radiobutton and how to add in webdynpro abap
first i have created my first radio buttonkey rgp and nrgp.my requirement is that when i selected RGP radiobutton then then another radiobutton group PO and NON PO is opened..how to do that in webdynpro abap..Please its very urgent ..see the attached photo
DEAR HAWKINS,
how can i solve it..pleasee help me to resolve this
select of first radio buttoon rgp method,
method ONACTIONON_SELECT .
DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.
DATA lo_el_radio_a TYPE REF TO if_wd_context_element.
DATA ls_radio_a TYPE wd_this->Element_radio_a.
DATA lv_radio1 TYPE wd_this->Element_radio_a-radio1.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_visibility TYPE wd_this->Element_context-visibility.
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
* alternative access via index
* lo_el_radio_a = lo_nd_radio_a->get_element( index = 1 ).
* @TODO handle not set lead selection
** IF lo_el_radio_a IS INITIAL.
** ENDIF.
* get single attribute
lo_el_radio_a->get_attribute(
EXPORTING
name = `RADIO1`
IMPORTING
value = lv_radio1 ).
* get element via lead selection
lo_el_context = wd_context->get_element( ).
IF lv_radio1 = 'x'.
lv_visibility = 02.
else.
lv_visibility = 01.
ENDIF.
* @TODO handle not set lead selection
** IF lo_el_context IS INITIAL.
** ENDIF.
* @TODO fill attribute
* lv_visibility = 1.
* set single attribute
lo_el_context->set_attribute(
name = `VISIBILITY`
value = lv_visibility ).
endmethod.
select of second radio button nrgp
method ONACTIONON_SELECT1 .
DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.
DATA lo_el_radio_a TYPE REF TO if_wd_context_element.
DATA ls_radio_a TYPE wd_this->Element_radio_a.
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
ls_radio_A-key_to_select = ' x '.
ls_radio_A-radio1 = ' '.
ls_radio_A-radio2 = ' x '.
* @TODO handle not set lead selection
** IF lo_el_radio_a IS INITIAL.
** ENDIF.
* @TODO fill static attributes
* ls_radio_a = xxx->get_yyy( ).
* set all declared attributes
lo_el_radio_a->set_static_attributes(
static_attributes = ls_radio_a ).
endmethod.
and THE WDDOINIT METHOD
method WDDOINIT .
DATA lo_nd_radio_a TYPE REF TO if_wd_context_node.
DATA lo_el_radio_a TYPE REF TO if_wd_context_element.
DATA ls_radio_a TYPE wd_this->Element_radio_a.
DATA lv_radio1 TYPE wd_this->Element_radio_a-radio1.
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
ls_radio_A-key_to_select = ' x '.
ls_radio_A-radio1 = ' x '.
ls_radio_A-radio2 = ' '.
* @TODO handle not set lead selection
** IF lo_el_radio_a IS INITIAL.
** ENDIF.
* @TODO fill static attributes
* ls_radio_a = xxx->get_yyy( ).
* set all declared attributes
lo_el_radio_a->set_static_attributes(
static_attributes = ls_radio_a ).
* navigate from <CONTEXT> to <RADIO_A> via lead selection
lo_nd_radio_a = wd_context->get_child_node( name = wd_this->wdctx_radio_a ).
* @TODO handle non existant child
* IF lo_nd_radio_a IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_radio_a = lo_nd_radio_a->get_element( ).
* alternative access via index
* lo_el_radio_a = lo_nd_radio_a->get_element( index = 1 ).
* @TODO handle not set lead selection
* IF lo_el_radio_a IS INITIAL.
* ENDIF.
* get single attribute
lo_el_radio_a->get_attribute(
EXPORTING
name = `RADIO1`
IMPORTING
value = lv_radio1 ).
endmethod... -
Upload from clipboard option in webdynpro abap selection screen
Hello Gurus,
We have a requirement in select-options in webdynpro.i have implimented select-options successfully using
WDR_SELECT_OPTIONS used component.now i need to impliment 'upload from clipboard' option when ever i click on advance options arrow mark. this option we can get in normal abp from selection screen.in selection screen against select-option field we have multiple options arrow mark.when ever we click this arrow mark we can able to see the upload from clipboard button at lowe level.exact same option how can we impliment in webdynpro abap selection screen.
Could anyone please suggest solutions?
if possible could you send me the sample code or relevent links for the same.
Thanks in Advance for your replies.
Regards,
babuHi,
Which server version are you working on...Is it ECC6 or nwetweaver 7..
I guess that option is avaialbel in Netweaver 7.0..Need to check there is an option for Clipboard in select-options..
Regards,
Lekha.
Maybe you are looking for
-
Blue Screen when Downolading TV Shows
So I get the blue screen of death when I try to download any video file (I've tried video podcasts and TV Shows). I have tried EVERYTHING! I even done a complete system restore to restore my computer to factory state. Help!
-
Populating all the columns in a form based on LOV
Hi people, I got a forms which has around 20 fields ...i created this using the data block wizard.... when i compile and run the form... i get the form screen... and when i click the default execute_query button i get the records the way i want ....
-
Hi Gurus!! I will soon be working on SRM MDM business scenario,so i want to be prepared beforehand. Please guide me about the integration details from SRM as well as MDM side,and also important documentation\link regarding the same. Thanks, Ravi
-
Dear all, I need a help in webdynpro using bapi scenario -> my form has 6 input fields, in that 4 are drop down boxes which gets the value from respective 4 bapis. -> 2 input fields should be in date picker which didnt get value from bapi
-
Cant save or save as or export in motion 3!!!
this ***** I cant save or save as or export in motion 3!!! what is the deal anyone know how to fix this problem???