I have the following problem:
I have the URL to a picture 'HTTP://WWW.ROLANDSCHWAIGER.AT/DURCHBLICK.JPG' saved in my database. I think you see the problem here: The URL is in uppercase. Now I want to display the picture in the SAP GUI, but for that, I have to convert it to lowercase.
I have the following code from a tutorial, but without the conversion:
*&---------------------------------------------------------------------*
*& Report ZDURCHBLICK_24035
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zdurchblick_24035.
TABLES: zproject_24035.
PARAMETERS pa_proj TYPE zproject_24035-projekt OBLIGATORY.
DATA gs_project TYPE zproject_24035.
*Controls
DATA: go_container TYPE REF TO cl_gui_custom_container.
DATA: go_picture TYPE REF TO cl_gui_picture.
START-OF-SELECTION.
WRITE: / 'Durchblick 3.0'.
SELECT SINGLE * FROM zproject_24035 INTO @gs_project WHERE projekt =
@pa_proj.
WRITE gs_project.
IF sy-subrc = 0.
WRITE 'Wert im System gefunden'.
ELSE.
WRITE 'Kein Wert gefunden'.
ENDIF.
WRITE : /'Es wurden', sy-dbcnt, 'Werte gefunden'.
AT LINE-SELECTION.
zproject_24035 = gs_project.
CALL SCREEN 9100.
*&---------------------------------------------------------------------*
*& Module CREATE_CONROLS OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
MODULE create_conrols OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
IF go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'BILD'.
CREATE OBJECT go_picture
EXPORTING
parent = go_container.
CALL METHOD go_picture->load_picture_from_url
EXPORTING
url = gs_project-bild.
ENDIF.
ENDMODULE.
1.Way: Integrated Functions to convert it after Executing the Report
2.Way: Use the Keyword
LOWER CASEon your Parameter. This way your input will be transported like its entered instead of translated to upper case. Only works if you get it from the Parameters. If its from yourSELECT, use Way 1.Btw: Try not to use
TABLES. In 95 % of the Cases its obsolete and not recommended to use. UseDATAinstead. For the few cases where its needed, look up the F1 Help in ABAP :) There is also a very good documented german Version of it, judging from your Code which hints you're from Austria.