Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need a maintainable Table with Large Field for URL String

sap_cohort
Active Contributor
0 Kudos

Hi, I need to have a table where I can maintain a Web URL of an unspecified length. I have some URLs longer than 500 char. Is it possible to create a maintainable Data Dictionary Table with a couple of fields for a key and 1 last field that is of type string? I would need to be able to maintain this table manually and be able to access the contents via ABAP...

Is this possible? If not is there another possiblity?

Thanks!

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

if you are on WAS6.40 you can use filed type <b>string</b>

if you are in a lower version , you should define a table with the following strucure.

URLLENG		INT2	5	
URL		LCHR	8000

when you use LCHR type you should have another field of type i and the same should be filled with the length of the lchr field.

for example if you are going to store http://www.google.com

you should pass '21' to urlleng and

'http://www.google.com' to url

Hope this is clear

Regards

Raja

10 REPLIES 10

suresh_datti
Active Contributor
0 Kudos

Yes it is possible.. Pl take a look at the table SDURL.

Regards,

Suresh Datti

athavanraja
Active Contributor
0 Kudos

if you are on WAS6.40 you can use filed type <b>string</b>

if you are in a lower version , you should define a table with the following strucure.

URLLENG		INT2	5	
URL		LCHR	8000

when you use LCHR type you should have another field of type i and the same should be filled with the length of the lchr field.

for example if you are going to store http://www.google.com

you should pass '21' to urlleng and

'http://www.google.com' to url

Hope this is clear

Regards

Raja

0 Kudos

Hi, yes I'm able to create a table with the last field of type string, but I'm not able to maintain it. How could I maintain it? Any ideas?

Thanks!

0 Kudos

you cannot use normal table maintenance generator for this. you have to code the maintenance program.

Raja

0 Kudos

Hi, OK I need to code a small app to maintain the URL somehow.

Anyone have any ideas or examples? I would have a key field and just one long field type to hold the url.

0 Kudos

Create a <b>Dynpro</b> using Tx. SE51, put some Text Fields and make the INSERTS, UPDATES or DELETES to the DB.

Greetings,

Blag.

0 Kudos

Any simpler ideas? Maybe an editable ALV list is possible? Also, if anyone knows of any examples they can point me to that would be greatly appreciated!

Thanks again!

Ken Murray

0 Kudos

Check the example programs.....

BCALV_EDIT_01

BCALV_EDIT_02

BCALV_EDIT_03

BCALV_EDIT_04

Regards.

Rich Heilman

sap_cohort
Active Contributor
0 Kudos

Got it working with the following solution I found in another discussion thread... The screen layout is really bad.. Can any of you ABAP experts suggest a way to improve the layout? The text box consumes the entire screen with the parameters way over to the right.. I'd at least like the parameters at the top of the screen.


REPORT  ZBW_WRC_TEMPLATE_LINKS.

DATA: DOCKINGLEFT TYPE REF TO CL_GUI_DOCKING_CONTAINER.
DATA: TEXT_EDITOR TYPE REF TO CL_GUI_TEXTEDIT.
DATA: REPID       TYPE SYREPID.
DATA: TEXTLINES   TYPE TABLE OF TLINE-TDLINE.
DATA: WA_TEXT     TYPE TLINE-TDLINE.
DATA: REPORT_URL  TYPE STRING.
DATA: TEXT_ITAB   TYPE TABLE OF SOLISTI1.
DATA: TEXT_ITAB2  LIKE LINE OF TEXT_ITAB.

PARAMETERS: P_REPORT TYPE /BIC/OIZREPORT.  " Report
PARAMETERS: P_REPQUA TYPE /BIC/OIZREPQUA.  " Report Qualifier
PARAMETERS: P_ACTION TYPE C.               " Action

AT SELECTION-SCREEN OUTPUT.
***
  REPID = SY-REPID.
  CREATE OBJECT DOCKINGLEFT
     EXPORTING REPID = REPID
     DYNNR           = SY-DYNNR
     SIDE            = DOCKINGLEFT->DOCK_AT_LEFT
     EXTENSION       = 1070.

  CREATE OBJECT TEXT_EDITOR
     EXPORTING PARENT     = DOCKINGLEFT.

START-OF-SELECTION.
***
  CALL METHOD TEXT_EDITOR->GET_TEXT_AS_STREAM
    IMPORTING
      TEXT   = TEXT_ITAB
    EXCEPTIONS
      OTHERS = 1.

  LOOP AT TEXT_ITAB INTO TEXT_ITAB2.
    CONCATENATE REPORT_URL TEXT_ITAB2-LINE INTO REPORT_URL.
  ENDLOOP.

  DATA: S_URL TYPE ZREP_URLS.

  S_URL-REPORT     = P_REPORT.
  S_URL-REPORT_QUA = P_REPQUA.
  S_URL-REPORT_URL = REPORT_URL.
  CASE P_ACTION.
    WHEN 'I'.
      INSERT ZREP_URLS FROM S_URL.
    WHEN 'D'.
      DELETE FROM ZREP_URLS WHERE REPORT = S_URL-REPORT.
    WHEN 'U'.
      UPDATE ZREP_URLS FROM S_URL.
  ENDCASE.

0 Kudos

you need to change this value (1070) to a appropriate value

EXTENSION = 1070.

Regards

Raja