cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Delimeters(WhiteSpaces) in Webdynpro.

Former Member
0 Kudos

Hi Experts,

Iam getting problem with delimeters.My requirement i need to display the .Alf file(Printlist) data on webApplication.

First we have to pass Content repository Id and Document Id to the Url.

It display the Total No of pages.

Once user click on Any Page It displays Particular page number information on Content area.

These files contain data with unknown tags.

Wha i done is:1)first i wrote the code for fetching data from File to one itab(string table).

after that i replace entire tags in this internal table And bibd it.----


>1st step:

Link Is:1) http://xxxxxxxxxx.com:1090/contentserver.dll?get&pVersion=0046&contRep=LK&docId=4AD91B7C0D8E3CB1E100....

Once i passed Cont Rep Id and Docu ID to the Url,It displays below screen with details.----->2nd step:

Document Details:

Document Id:4AD91B7C0D8E3CB1E10000009B7D1E6D

pagenumber:1----


>3rd step

once user click on page number1--->it displays below formate.

Table : NAST

Displayed fields: 7 of 7 Fixed columns: 6 List width 0250

-


Application

Object key

Message type

Partner

Created on

Created at

Process.status


v3

0300830218

ZVGL

0001124934

18.09.2002

23:47:56

0

V

0300838584

ZVGL

0001124934

19.09.2002

05:17:27

0

V3

0300838585

ZVGL

0001124934

19.09.2002

05:17:27

0

V3

0300838586

ZVGL

0001124934

19.09.2002

05:17:27

0

V3

0300859542

ZVGL

0001133621

18.09.2002

22:43:33

0

-


|

But Actual Data is below formate.

Table : NAST

Displayed fields: 7 of 7 Fixed columns: 6 List width 0250

-


Application

Object key

Message type

Partner

Created on

Created at

Process.status


V3

0300830218

ZVGL

0001124934

18.09.2002

23:47:56

0

V3

0300838584

ZVGL

0001124934

19.09.2002

05:17:27

0

V3

0300838585

ZVGL

0001124934

19.09.2002

05:17:27

0

V3

0300838586

ZVGL

0001124934

19.09.2002

05:17:27

0

V3

0300859542

ZVGL

0001133621

18.09.2002

22:43:33

0

-


Any body can help to resolve this.if any quries regarding this plz reply me.

i used cl_abap_char_utilities and some parameters.

Thanks In advance

Satya

Edited by: satyasapabap on Dec 21, 2009 9:12 PM

Edited by: satyasapabap on Dec 21, 2009 9:14 PM

Edited by: satyasapabap on Dec 22, 2009 9:33 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

refer this WIKI , for similar solution

http://wiki.sdn.sap.com/wiki/display/WDABAP/ExcelFileUploadAndDisplayDataUsingWebDynPro+ABAP


TYPES :
       BEGIN OF str_itab,
       name(10) TYPE c,
       age(10) TYPE c,
       END OF str_itab.
  DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
         i_data TYPE STANDARD TABLE OF string,
         lo_nd_data TYPE REF TO if_wd_context_node,
         lo_el_data TYPE REF TO if_wd_context_element,
         l_string TYPE string,
         fs_table TYPE str_itab,
         l_xstring TYPE xstring,
         fields TYPE string_table,
         lv_field TYPE string.
  DATA : t_table TYPE if_main=>elements_data_tab,
         data_table TYPE if_main=>elements_data_tab.
* get single attribute
  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.
  SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
* Bind With table Element.
  LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
    READ TABLE fields INTO lv_field INDEX 1.
    fs_table-name = lv_field.
    READ TABLE fields INTO lv_field INDEX 2.
    fs_table-age = lv_field.
    APPEND fs_table TO t_table1.
  ENDLOOP.
lo_nd_data = wd_context->get_child_node( 'DATA_TAB' ).
lo_nd_data->bind_table( T_TABLE1 ). 

regards,

amit

Former Member
0 Kudos

HI Amit,

Thanks A lot.

I have a doubt.How to provide white space b.w fields.

Please go thru the CL_ABAP_CHAR_UTILITIES class.In that one attribute(space_str) with description like White space.

How to pass the attribute?y iam asking u is that class is private and attribute visibily is also private.?

so How use that attribute in method?

Actually my requirement is not uploading the Exceel file data into table on webapplication.

Thanks

Satya

Former Member
0 Kudos

hi ,

u can use ALT+0160 to give space between ur fields

in the text property of ur UI , press alt key together with 0160

this wud give some space

wud this fix ur problem , I am not able to understood ur query ..

wud it help

regards,

amit

Answers (1)

Answers (1)

Former Member
0 Kudos

hi ,

u can proceed like this :

1 use file upload UI and make a action for the same , use the OnAction property of the UI

2 create a context attribute under the Context tab , say DATASOURCE of type XSRTING

3 bind the DATA property of the fileupload UI to this attribute DATASOURCE

4 read the context attribute using code wizard using get_attribute , press control F7 and choose read context node/attribute

5 use the FM HR_KR_XSTRING_TO_STRING to convert the xstring u got using get_attribute

6 Now split the string at new line so as to make an internal table .


 SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE it_table.

here it_table is type table of string.

7 .now loop at the internal table and separate the content of this table separated by tab.


DATA : it_new type string_table.
SPLIT wa_table AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_new.

regards,

amit