Application Development and Automation 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: 
Read only

Display Image from Table im Smartform

Former Member
0 Likes
4,969

Hi,

I have to select an image from a transparent table & then to display it in a smartform. Does any one have an idea?

Cheers,

Hi,

I have to select an image from a transparent table & then to display it in a smartform. Does any one have an idea?

Cheers,

14 REPLIES 14
Read only

FredericGirod
Active Contributor
0 Likes
4,036

Hi,

what do you means with "image from a transparent table"  ?    a table containing picture ?  a picture of a table ????

regards

Fred

Read only

0 Likes
4,036

Yes, picking image from a z table.

According to the requirement, I can not use SE78 here.

Read only

0 Likes
4,036

May I know, why don't you use se78?

Even you can write BDC for it.

Read only

0 Likes
4,036

Giving user the option to upload / change images. They don't want like SE78.

Read only

0 Likes
4,036

By using BDC for se78 you may have to create a new interface for user.

Simply have a field for file path and image name.

Read only

former_member202818
Active Contributor
0 Likes
4,036

HI Aftab,

1.Upload images using SE78.

2.Save image names in a table rather than saving image.

3.Use element graphics in smartform to display image.

To display image dynamically, give image name using a variable in between '&&'.

Regards

SP

Read only

Former Member
0 Likes
4,036

This message was moderated.

Read only

0 Likes
4,036

I think, you are right. I have not found doc to upload images from ztable in smartform, but in Adobe forms.

Can we upload iimages other than BMP in STXBITMAPS?

Read only

0 Likes
4,036

Hi Vishnu,

I have made the form in adobe. But when I execute it I get the following error.

   When calling the function module "/1BCDWB/SM00000133", one of the parameters

   needed according to the interface description was not specified.

   This parameter was "GRAPHIC".

I didn't see anywhere in the tutorial, if the parameter "GRAPHIC" was sent from driver program to the adobe.  Is there any other way to specify the GRAPHIC parameter?

Thanks,

Read only

Former Member
0 Likes
4,036

hi aftab,

i don't think in the table STXBITMAPS v can save image in other format other than BMP.

Read only

Former Member
0 Likes
4,036

Hi Aftab,

You can do one thing.

create a graphic node. then in General attributes of Graphic node you see a radio button Determine Dynamicaly (BMON, BCOL) . For this radio button fill any variable value, say lv_image.

Now you can read the custom table and pass the values of graphics you want to display from your table to this variable through code in initialization or program.

Read only

0 Likes
4,036

Hi Rahul,

I put url of the image at the radio button Determine Dynamicaly (BMON, BCOL). this url, I got from the following FM.

CALL FUNCTION 'DP_CREATE_URL'
       EXPORTING
         TYPE                 = 'IMAGE'
         SUBTYPE              = GV_IMAGE_FORMAT "'JPG'
       TABLES
         DATA                 = XML_TAB[]    "itab of the images
       CHANGING
         URL                  = GRAPHIC_URL
       EXCEPTIONS
         DP_INVALID_PARAMETER = 1
         DP_ERROR_PUT_TABLE   = 2
         DP_ERROR_GENERAL     = 3
         OTHERS               = 4.

But got the error, "Graphic cannot be displayed."

Cheers,

Read only

0 Likes
4,036

Hi Aftab,

Why using FM?

What is the format of your image.

You can only use .BMP format images.

Further more i am attaching some screen shots that may be useful.

Decleare string type variable in global def.

NOw in initialization I have assigned the name of graphic image to this variable. You can read the custom table and assign the grapics image name to this varaible.

At last for Graphics element do below.

1. Name = & variable name & and see the triagle icon on side of it click it so that it points to reverse as shown in screen shot.

2. Object and ID need to be populated as these are mandatory.

3. In case you are not sure the image will be color or black and white select the radio button Determine Dynamically and decleare another variable say &lv_var& and do as done for name to assign the value to lv_var.

Now when i activated and executed my Smarform i got the image displayed.

Hope this solves your problem.

Read only

0 Likes
4,036

Rahoul,

I am using only JPEG only.  The image comprises several lines, so the FM returns path to the image.

Thanks for detailed description.