Quantcast
Channel: SCN : Unanswered Discussions - Web Dynpro ABAP
Viewing all 3637 articles
Browse latest View live

Issue while dowloading the contends to CSV file in webdynpro

$
0
0


Hi Frnds ,

 

In my scenario iam uploading CSV file trough file upload Ui elemenrt in sap webdynpro

 

FYI,

 

cotents in the file are

 

PlantSales OrganizationDistribution Channelcolor
2000100010red,yellow,green
1000100010

 

 

and i am using the below code to read the contends in the file

 

*data source is attribute  the trough which i have binded my data to file uplod ui element

 

  wd_context->get_attribute(    EXPORTING      name `DATASOURCE`    IMPORTING      value = l_xstring ).


  CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
      in_xstring = l_xstring
    IMPORTING
      out_string = l_string.

 

in debugging i found the data in the below format in i_string.

 

Plant,Sales Organization,Distribution Channel,color##2000,1000,10,"red,yellow,green"##1000,1000,10,##

 

 

my concern is if in case in debugging if i chnage the conted to

 

werks,Sales Organization,Distribution Channel,color##2000,1000,10,"red,yellow,green"##1000,1000,10,##

 

i have just chnaged plant to werks in debugging

 

     CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    EXPORTING
      text   = l_string

    IMPORTING
      buffer = xstr.

 

   CALL METHOD cl_wd_runtime_services=>attach_file_to_response
    EXPORTING
      i_filename      = 'Dashboard.csv'
      i_content       = xstr
      i_mime_type     = 'TEXT/CSV'
      i_in_new_window = abap_false
      i_inplace       = abap_false.

 

when i am dowloding it is showing output as

 

werksSales OrganizationDistribution Channelcolor##2000100010red,yellow,green##1000100010##

 

 

if i am not chnaging any thingh in debugging on the field l_string

 

then it is giving out as \

 

PlantSales OrganizationDistribution Channelcolor
2000100010red,yellow,green
1000100010

 

 

kindly let me know what was the reason

 

 

Is that we should not edit any thingh

 

 

Thanks,

Harish.

 

 

 

 

 

 


Raise Error Message in webdynpro

$
0
0

Hi Experts,

 

when i raise an Error Message , using    lo_message_manager->report_attribute_error_message ...its not allowing me to do any action further...

 

I have attached the screen shot for reference ...

 

I have written the code in "WDDOBEFOREACTION" method...

 

senario :

 

If the value is greater 8 hours, i need to through Error message individually...dates which is populating in header is dynamic one ...

 

Can u suggest an idea on it ..

 

code used :

 

   *        CALL METHOD lo_message_manager->report_attribute_error_message
*          EXPORTING
*            message_text              = l_string
*            element                   = lo_el_timesheet
*            attribute_name            = 'DATE1'
*            cancel_navigation         = abap_true
*            ENABLE_MESSAGE_NAVIGATION = abap_true .
*P_1.JPG

 

Regards,

KArthik S

enable wda ALV print pdf: node "SAP List Viewer (ALV)" not available in spro

$
0
0

hi all,

we are trying to use the standard print version pdf of WDA alv.

checked the blog: Webdynpro ABAP ALV  Print Version(PDF)

 

currently in my server it is giving the error as:

Print version System Failure: timeout during allocate / CPIC-CALL: 'ThSAPCMRCV', communication rc: CM_PRODUCT_SPECIFIC_ERROR (cmRc=20), taskhandler rc: C_TIM

s1.jpg

checked the notes:

 

1413938 - WD ABAP ALV - creating print version

1630587 - WD ABAP ALV: IMG paths for Customizing Settings

 

we are in 7.4, but the node SAP List Viewer (ALV) mentioned in 1630587 is not avaible in our system.


SAP_BASIS 7.40

  + SAP Customizing Implementation Guide

    + SAP NetWeaver

      + UI Technologies

        + SAP List Viewer (ALV)


in our system, the node is appearing as:

s2.jpg

 

our sap version is:

s3.jpg

also checked the blog Please Run it Simpler before it Drives us Mad... we could not find.

 

what are the steps we need to follow, to enable print version pdf for standard alv in WDA.

 

 

 

thanks,

Madhu_1980.

Determine portal system alias in WebDynpro application

$
0
0

Hello experts,

 

I created an FPM OVP application that lauches an FPM GAF application, from there it's possible to go back to the OVP application. I'm using the suspend resume functionality to achieve this:


DATA lo_nav TYPE REF TO if_fpm_navigate_to.
DATA ls_webdynpro_fields TYPE fpm_s_launch_webdynpro.
DATA ls_additional_params TYPE apb_lpd_s_add_wd_parameters.


lo_nav = wd_this->go_fpm->get_navigate_to( ).
ls_webdynpro_fields-system_alias     = 'SAP_DUMMY'.
ls_webdynpro_fields-wd_namespace     = 'SAP'.
ls_webdynpro_fields-wd_application   = 'ABC'.
ls_webdynpro_fields-wd_configuration = 'DEF'.
ls_additional_params-navigation_mode    = cl_apb_launchpad_api=>e_nav_mode-inplace.
ls_additional_params-use_suspend_resume = abap_true.

 

lo_nav->launch_webdynpro_abap(

  EXPORTING is_webdynpro_fields      = ls_webdynpro_fields
            is_additional_parameters = ls_additional_params
  IMPORTING et_messages              = lt_message
            ev_error                 = lv_error ).


The scenario works fine if the application is called directly. But when the application is called in a portal environment, I get a portal exception:

 

[EXCEPTION]
com.sapportals.portal.appintegrator.ApplicationIntegratorException: Unknown system alias.
System Alias:  'SAP_DUMMY'


If I leave the field SYSTEM_ALIAS blank, I get the error message that the field is mandatory. I could ask the portal administrator for the correct system alias, but if it changes, I have to update my program code.

 

Is it possible to determine the given portal system id for the system the application is running on if an application is called from the portal? I found example code for WebDynpro Java, but not for WebDynpro ABAP.

HIDE SECONDS OF INPUT FIELDS TIMES

$
0
0

Hi to all, could you help me?

 

I have an input field which refers to domain TIMES, but my customer asked me to hide seconds, since i must change the domain in a lot of contexts and structures and tables there is a better way to hide the seconds in web dynpro not changing the input field domain?

Office Control with Word Documents: Add pages / Merge two documents

$
0
0

Hello,

 

we are trying to work with an Web Dynpro ABAP application that handles Word documents.

 

We have two Word documents and we want to add the second one as a new page to the first Word document. Is this possible somehow?

 

Thanks for any hints in advance,

André

FPM Tutorial for NW7.3

$
0
0

Hi All,

 

I am trying to learn Web dynpro FPM. I have NW7.3, but all the learning tutorials I could get are for NW7.0 and the configuration screen is very much different from the NW7.3.

As I am a beginner I am finding it very difficult to understand. Could you please share with me if anyone has any tutorial for NW7.3 or advise me how can I be able to learn.

 

Thank you for your time.

List with sub-headers using List ATS UIBB

$
0
0

Hi Experts,

 

     I have a requirement to achieve the following layout using List ATS UIBB. i.e with headers and sub-headers. Since I am new to FPM I am not sure if it is possible using the list ATS UIBB or not. If Yes, Could somebody please guide me through the steps to achieve the same.

 

list.PNG

Thanks & Regards

Anoop


Displaying DMS document in .DOC using abap webdynpro

$
0
0

Dear Experts,

 

        TO dispay the DMS stored document Iam using below code,It is successfully displaying the stored Document

in .doc but here the problem is the same code is not working in when we execute the application EP(portal).

 

     Anyone could you please give the suitable solution for this is grately appreciated..thanx in advance     

 

                      ls_input-DOKAR = 'TST'.

                       ls_input-dokvr = '00'.

                       ls_input-doktl = '000'.

                       ls_input-doknr =  LS_docnum .

*

             CALL FUNCTION 'CVAPI_DOC_CHECKOUTVIEW_DIALOG'

               EXPORTING

                 PF_DOKAR                 = ls_input-dokar

                 PF_DOKNR                 = ls_input-doknr

                 PF_DOKVR                 = ls_input-dokvr

                 PF_DOKTL                  = ls_input-doktl

                PF_FTP_DEST             =  'SAPFTPA'

                PF_HOSTNAME              = 'DEFAULT '

                PF_CONTENT_PROVIDE       = 'TBL'

              IMPORTING

                PSX_MESSAGE              =  ls_message

              TABLES

                PTX_CONTENT              =  LT_DRAO .

 

 

             LOOP AT lt_drao INTO wa_drao.

               wa_bin = wa_drao-orblk.

               APPEND wa_bin TO lt_bin.

             ENDLOOP.

 

 

            DESCRIBE TABLE lt_drao LINES v_line.

            size = 2550 * v_line.

 

 

            CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'

            EXPORTING

               input_length       = size

            IMPORTING

               buffer             = file_data

            TABLES

               binary_tab         = lt_bin .

 

 

           CONCATENATE lv_lettername '.DOC' INTO LV_FILENAME .

           CALL METHOD cl_wd_runtime_services=>attach_file_to_response

           EXPORTING

               i_filename      = LV_FILENAME

               i_content       = file_data

               i_mime_type     = 'application/doc'.

Wiring data is not working in Feeder class

$
0
0

Hello All,

 

We have recently moved from EHP 6 to EHP 7.In the older version we have created a custom feeder class with Super class as /BOFU/CL_FBI_GUIBB_LIST . We have used the same Get data code also and modified as per our requirement in our custom feeder class.

 

But after the EHP7 upgrade , the data is not displayed in the Screen. And as per my initial analysis I found out that  the below code part is not able fill the lt_keys in our custom  feeder.

 

if Lo_entity_collection IS BOUND.

lt_keys = lo_entity_collection->get_self_keys( ).

 

Endif.

 

I have checked and cross verified with our old version that all the wiring is also correct. EV_DATA_CHANGED is also consider correctly for data change.My  port identifier is CO now.

 

Can  any one let me know what should be the done in EHP7 from EHP6 so that I will get the values displayed in my LIST.

 

Regards,

Partha

 

 

 

How to display Key and description in table field

$
0
0

Hello Experts,

 

I have a requirement where I have to show Price group field (VBKD-KONDA) in one of the table field in output with key and description in webdynpro.

 

I analyzed that description is coming in T118 customizing table and search help assigned in table as H_T188.

 

Currently only key value is coming and not its description.

 

Please advise how to fill this requirement.

 

Regards,

Shiv

Messages not getting displayed

$
0
0

Hi Gurus,

 

Messages in my web dynpro application are not getting displayed.

 

I used an if condition so that if any of the condition is not satisfied will display the message,for the first condition message is getting triggered and for the next conditions its not displaying any messages.

 

i am using raise_error_message for message handling.

 

I want simple message to be thrown just like normal ABAP. Here is the code below.

 

* get message manager

   DATA:lo_api_controller     TYPE REF TO if_wd_controller,

        lo_message_manager    TYPE REF TO if_wd_message_manager.

 

   lo_api_controller ?= wd_this->wd_get_api( ).

 

   CALL METHOD lo_api_controller->get_message_manager

     RECEIVING

       message_manager = lo_message_manager.

 

 

IF ( iv_parvw = 'AG').

 

       REFRESH wd_this->gt_partners.

 

       lv_msg  = wd_assist->if_wd_component_assistance~get_text( key = '003' ).

 

       "report message

       CALL METHOD lo_message_manager->raise_error_message

         EXPORTING

           message_text = lv_msg.

 

     ELSEIF ( iv_parvw = 'AP' ).

 

 

         CLEAR lv_msg.

 

         lv_msg  = wd_assist->if_wd_component_assistance~get_text( key = '005' ).

 

        "report message

       CALL METHOD lo_message_manager->raise_error_message

         EXPORTING

           message_text = lv_msg.

 

       ENDIF.

Upload the Any Format of Multiple Attachments from Web Dynpro Application

$
0
0

Dear WD Developers,

 

                    I have a requirement from my client that is add a multiple attachments(those attachments are any file type like .doc,png,.PDF and .Excel)   from the web dynpro ALV table. if i click the any link of the output alv contents then the pop up has to come and in that popup there is a facilitate of add the attachment from that those file are saved saved any ztable and also it's also possible to open the those documents from WD or Either those can be download to local desktop to view those.

 

Please give me your valuable Suggestions And U r Input to achieve my requirements.

 

Thanks & Regards,

Suresh Reddy

design the webdynpro layout

$
0
0

Dear Webdynpro Experts,

 

        i have a requirement from the my client that is able to see the webdynpro application is to show the output like the Quotation Comparison screen out put(i.e ME49) i'm attach the sample output at the below of this discussion by programatically i done the code able to see the output at classical report. Please help me that how can i'm able to display it on browser through webdynpro application.

getting ouput.PNG

 

require.PNG

Thanks & Regards,

Suresh Reddy

scheduling Web dynpro in background ?

$
0
0

Hello Experts,

 

when I came across this situation (scheduling wd component in background) I've gone through some threads hear in scn, In that process I found this Background Scheduling for a webdynpro component . But as a beginner I'm not able to understand the what it exactly means. Can any body provide me a sample example so that I could get clear vision on this. Thank you

 

 

Reagards

Nagendra.


Problem in downloading the DMS document in .DOC format using webydnpro abap

$
0
0

Dear Experts,

 

        I am storing the Document no,created data,etc…along with some standard text (this text is comman) in DMS server.while creating standard text for alignment purpose of paragraph n fontsize I used below HTMl code,after that I read this standard text n stored in DMS.

 

************************************************************************

<html>
<body>
<font face="Times New Roman" font size="3">
<br><br>
<p><CENTER><p style="text-align:justify">
&nbsp&nbsp&nbsp&nbsp&nbsp
<u>D.O.LETTER NO. &CURRENT&  /DCM III/2013 ,Dated: &SYDATUM&
</u></P></CENTER>
Dear
<p>   
&nbsp &nbsp
Sub:- Market Borrowings &#8722 consent under Article 293(3) of the
Constitution of India<br>&nbsp&nbsp

**********************************************************************

  

Now I am using below code to download the DMS document in .doc format

 

**********************************************************************

                       ls_input-DOKAR = 'TST'.

                       ls_input-dokvr = '00'.

                       ls_input-doktl = '000'.

                       ls_input-doknr =  LS_docnum .

*

             CALL FUNCTION 'CVAPI_DOC_CHECKOUTVIEW_DIALOG'

               EXPORTING

                 PF_DOKAR                 = ls_input-dokar

                 PF_DOKNR                 = ls_input-doknr

                 PF_DOKVR                 = ls_input-dokvr

                 PF_DOKTL                  = ls_input-doktl

                PF_FTP_DEST             =  'SAPFTPA'

                PF_HOSTNAME              = 'DEFAULT '

                PF_CONTENT_PROVIDE       = 'TBL'

              IMPORTING

                PSX_MESSAGE              =  ls_message

              TABLES

                PTX_CONTENT              =  LT_DRAO .

 

             LOOP AT lt_drao INTO wa_drao.

               wa_bin = wa_drao-orblk.

               APPEND wa_bin TO lt_bin.

             ENDLOOP.

 

 

            DESCRIBE TABLE lt_drao LINES v_line.

            size = 2550 * v_line.

 

            CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'

            EXPORTING

               input_length       = size

            IMPORTING

               buffer             = file_data

            TABLES

               binary_tab         = lt_bin .

 

           CONCATENATE lv_lettername '.DOC' INTO LV_FILENAME .

           CALL METHOD cl_wd_runtime_services=>attach_file_to_response

           EXPORTING

               i_filename      = LV_FILENAME

               i_content       = file_data

               i_mime_type     = 'application/doc'.

 

**********************************************************************

 

The above code is successfullyworking in ECC and downloading the Document in .doc format.

But when we integrate this webdynpro appl. in portal and execute the document is downloading but

Instead of the specified alignments and fontsizes it display the HTML tags which I used in standard text.

 

 

      Please anyone could you help me in this is rately appreciated...thanx in advance.

Webdynpr to DMS pdf file upload ( File cant open in DMS )

$
0
0

Hello Gurus

 

A, trying to upload pdf file from webdynpro to DMS...somehow i can able to upload it to DMS..i can able to view the uploaded pdf file in DMS..but i cant able to open it..it says u cant open error message..

 

 

 

 

 

 

 

 

 

Here is my code :

 

DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.

   DATA lo_el_n_upload TYPE REF TO if_wd_context_element.

   DATA lt_n_upload TYPE TABLE OF wd_this->element_n_upload. " Internal Table

   DATA ls_n_upload TYPE wd_this->element_n_upload. " Work Area

   DATA lv_fileupload TYPE wd_this->element_n_upload-file_contents.

 

   TYPES: BEGIN OF zst_ts_raw_line,

 

            line(2550) TYPE x,

          END OF zst_ts_raw_line.

 

   DATA: ls_draw TYPE draw,

         ls_api_ctrl TYPE cvapi_api_control,

         ls_message TYPE messages,

         lv_documentnumber TYPE draw-doknr,

         lv_storage_cat TYPE cv_storage_cat,

         lv_size TYPE i,

         lt_bindata TYPE STANDARD TABLE OF zst_ts_raw_line, "STANDARD TABLE OF zst_ts_raw_line,

         ls_bindata TYPE sdokcntbin, "SOLISTI1," sdokcntbin,

         ls_drao TYPE drao,

         lt_drao TYPE TABLE OF drao,

         lt_files TYPE cvapi_tbl_doc_files,

         ls_files TYPE cvapi_doc_file,

         l_string TYPE string,

         lv_dokar TYPE draw-dokar,

         lv_dokvr TYPE draw-dokvr

         .

 

   DATA: it_drat TYPE TABLE OF dms_db_drat,

         wa_drat TYPE dms_db_drat.

 

* navigate from <CONTEXT> to <N_UPLOAD> via lead selection

   lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).

 

 

 

 

*  get element via lead selection

   lo_el_n_upload = lo_nd_n_upload->get_element( ).

 

 

* @TODO handle not set lead selection

   IF lo_el_n_upload IS NOT INITIAL.

 

*     get single attribute

     lo_el_n_upload->get_attribute(

     EXPORTING

       name = `FILE_CONTENTS`

     IMPORTING

       value = lv_fileupload ).

 

*     get all declared attributes

     lo_el_n_upload->get_static_attributes(

       IMPORTING

         static_attributes = ls_n_upload ).

 

     IF ls_n_upload IS NOT INITIAL.

 

 

       ls_draw-dokar = 'TS2'.

       ls_draw-dokvr = 'AA'.

       ls_draw-doktl = '000'.

       ls_draw-doknr = '000020000491-I'.

       ls_draw-dwnam = sy-uname.

       ls_draw-begru = '1000'.

       lv_storage_cat = 'DMS_C1_ST'.

       ls_api_ctrl-tcode = 'CV01N'.

 

       wa_drat-dktxt = 'Description'.

       APPEND wa_drat TO it_drat.

 

*       For Generate Document Number in DMS

       CALL FUNCTION 'CVAPI_DOC_CREATE'

         EXPORTING

           ps_draw              = ls_draw " wa_documentfiles

 

           ps_api_control       = ls_api_ctrl

 

         IMPORTING

           psx_message          = ls_message

 

           pfx_doknr            = lv_documentnumber

 

         TABLES

 

           pt_drat_x            = it_drat

 

         .

       IF sy-subrc NE 0.

         WRITE: 'no number'.

       ENDIF.

       IF ls_message-msg_type CA 'EA'.

 

       ELSE.

         ls_draw-doknr = lv_documentnumber.

 

         CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

           EXPORTING

             buffer          = lv_fileupload

 

           IMPORTING

             output_length   = lv_size

           TABLES

             binary_tab      = lt_bindata.

 

         LOOP AT lt_bindata INTO ls_bindata.

           CLEAR ls_drao.

           ls_drao-orblk = ls_bindata-line.

           ls_drao-orln = lv_size.

           ls_drao-dokar = ls_draw-dokar.

           ls_drao-doknr = lv_documentnumber.

           ls_drao-dokvr = ls_draw-dokvr.

           ls_drao-doktl = ls_draw-doktl.

           ls_drao-appnr = '1 '.

           APPEND ls_drao TO lt_drao.

         ENDLOOP.

 

*         For Application Determined on the basis of file extension.

         CALL FUNCTION 'CV120_DOC_GET_APPL'

         

EXPORTING

             pf_file          = ls_n_upload-file_name " 'C:\Documents and Settings\AUTH.PDF'

 

          IMPORTING

            pfx_dappl        = ls_files-dappl

 

                   .

 

         ls_files-appnr = '1'.

         ls_files-filename = ls_n_upload-file_name. " 'C:\Documents and Settings\AUTH.PDF'

         ls_files-updateflag 'I'.

         ls_files-langu = sy-langu.

         ls_files-storage_cat = 'DMS_C1_ST'.

         ls_files-description 'Doc Description'.

 

         APPEND ls_files TO lt_files.

 

*         For Execute external Commit when using BAPIs

         CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

           EXPORTING

             wait = 'X'.

*         Document Check.

         CALL FUNCTION 'CVAPI_DOC_CHECKIN'

           EXPORTING

             pf_dokar           = ls_draw-dokar

             pf_doknr           = lv_documentnumber

             pf_dokvr           = ls_draw-dokvr

             pf_doktl           = ls_draw-doktl

*           PS_DOC_STATUS      =

             pf_ftp_dest        = 'SAPFTPA'

             pf_http_dest       = 'SAPHTTPA'

*           PF_HOSTNAME        = ' '

             ps_api_control     = ls_api_ctrl

*           PF_REPLACE         = ' '

             pf_content_provide = 'TBL'

           IMPORTING

             psx_message        = ls_message

           TABLES

             pt_files_x         = lt_files

*           PT_COMP_X          =

             pt_content         = lt_drao.

 

         COMMIT WORK.

       ENDIF.

Attaching search help to dynamically created input field

$
0
0

Hi all,

 

I have a table having certain attributes and corresponding dictionary search help names. Based on the attribute name I create input fields at runtime and I want to attach the search helps selected from the former table to the dynamically created input field. I would appreciate any help.

 

lr_input_field = cl_wd_input_field=>new_input_field(                                       bind_value             = lv_bind_value_context                                       enabled                = 'X'                                       id                     = lv_input_field_id
*                            on_enter               = co_on_enter                                       state                  = lv_state                                       visible                = if_wdl_core=>visibility_visible                                       tooltip                = lv_tooltip                                       view                   = ir_view
).

Thanks!

 

Best regards,

Royce

File Upload UI element is not working in IE11

$
0
0

We have a Webdynpro ABAP application running in the Portal. The FileUpload UI element used in this application is not working in IE11. After browsing a file and clicking on the Upload button, a blank page is opened and the popup which has the FileUpload UI element is hanging.

How can this issue be resolved? Appreciate your help. Thanks.

Dynamic table with header column groups

$
0
0

Hi Experts,

 

I have a requirement to create a dynamic table with multiple header column groups just as like shown below.

list.PNG

I created the same in layout with UI table element but I need to generate it dynamically. Could anybody please provide me some example programs or documents I can follow to achieve the same.

 

Any input would be appreciated.

 

Thanks and Regards

Anoop

Viewing all 3637 articles
Browse latest View live