cancel
Showing results for 
Search instead for 
Did you mean: 

formatting_error exception for Graphic in SF

rnb86
Participant
0 Kudos

Hi experts,

  In my smartform, i am showing a digital sign (.bmp uploaded into se78).This graphic will be displayed based on plant and user id combination fetched from a custom table. I have added a Program Lines (CODE) node before the graphic node.

Plant concatenated with approverid = graphic name.

Code:

   SELECT SINGLE approver_id
  FROM table  INTO lv_approver
  WHERE plant = lv_plant.
  IF sy-subrc = 0.
    CLEAR lv_tdname.
    CONCATENATE lv_plant lv_approver
    INTO lv_tdname.

    SELECT SINGLE tdname FROM stxbitmaps
    INTO lv_digital_sign
    WHERE tdname = lv_tdname
    AND tdid = 'BMAP'
    AND tdbtype = 'BMON'.
  ENDIF.

i am then passing &lv_digital_sign& to the graphic name. The issue is when the &lv_digital_sign& is blank for any reason, the smartform is throwing the formatting_error exception.

How to avoid the formatting_error when the graphic is not existing?? 

Accepted Solutions (0)

Answers (3)

Answers (3)

rnb86
Participant
0 Kudos

Thanks Venkateswaran and Harshad for your suggestions. I created a blank image and uploaded it.

former_member213851
Active Contributor
0 Kudos

Hi RnB,

Please add condition to blank Logo inside condition Tab such that it will be printed only when Sign lv_digital_sign is SPACE,

former_member209818
Active Contributor
0 Kudos

While calling the bmp image put the condition in the conditions tab of the image node as shown in the screenshot... ie. if your BMP image  name is not blank, then only print the image

venkateswaran_k
Active Contributor
0 Kudos

Hi

In the Graphics Field, there is  a another tab called Conditions.

In that you specify that &lv_digital_sign& NE SPACE

OR

Create on Default Image with Blank in the SE78.

Keep this fied as default to that image id.   So whenever your exception comes, this blank image will be printed

Then it will not give any error.

Regards,

Venkat