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: 

photos of Employees to the Adobe Forms..

Former Member
0 Kudos

Hello all,

We have uploaded the photos of Employees in HR server and it is stored in TOAHR table.

Now in the Adobe Forms, we needs to fetch these photo's and display.

Thanks,

Raj

3 REPLIES 3

peng_wen
Active Participant
0 Kudos


Hello,

Are you using a content server for storing the photos?
You can increase the ICM trace level to 3, reproduce the issue and see if any error in dev_icm.

Regards,
Wen Peng

Former Member
0 Kudos

Hi peng wen,

Thanks for you reply..

In tcode-pa30 we can see the photo of the employee, if we upload the photo through tcode- OAAD.

i finded that employee photo will store in toahr database table..

now how to fetch employee photo from database table And how can i bind the string to image field in adobe form.

Help me out...

0 Kudos

Final i resolved.

From toahr table pass value to ARCHIV_ID , RESERVE & ARC_DOC_ID.

DATA:

         lv_lengt            TYPE sapb-length,

         lv_binlength        TYPE sapb-length,

         lt_archivobject     TYPE TABLE OF docs,

         lt_binarchivobject  TYPE TABLE OF tbl1024.

   REFRESH: lt_archivobject,

            lt_binarchivobject.

   CLEAR: lv_lengt,

          lv_binlength.

*  BREAK-POINT.

   CALL FUNCTION 'ARCHIVOBJECT_GET_TABLE'

     EXPORTING

       archiv_id                = 'ZA'

       document_type            = 'JPG'

       archiv_doc_id            = '00155D0B70091ED4BA8425EE2D2A4258'

       all_components           = space

       signature                = space

       compid                   = space

     IMPORTING

       length                   = lv_lengt

       binlength                = lv_binlength

     TABLES

       archivobject             = lt_archivobject

       binarchivobject          = lt_binarchivobject

     EXCEPTIONS

       error_archiv             = 1

       error_communicationtable = 2

       error_kernel             = 3

       OTHERS                   = 4.

   IF sy-subrc NE 0.

     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   ENDIF.

*  BREAK-POINT.

   IF lt_archivobject[] IS NOT INITIAL.

     DESCRIBE TABLE lt_archivobject LINES lv_rowcount.

     lv_rowcount = lv_rowcount * 1024.

     CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'

       EXPORTING

         input_length       = lv_rowcount

        first_line         = 1

        last_line          = lv_rowcount

      IMPORTING

        buffer             = lv_xstring

       TABLES

         binary_tab         = lt_binarchivobject

*     EXCEPTIONS

*       FAILED             = 1

*       OTHERS             = 2

               .

     IF sy-subrc <> 0.

* Implement suitable error handling here

     ENDIF.

CALL FUNCTION 'SSFC_BASE64_ENCODE'

   EXPORTING

     bindata                        = lv_xstring

*   BINLENG                        =

  IMPORTING

    B64DATA                        = ls_table-lv_string

* EXCEPTIONS

*   SSF_KRN_ERROR                  = 1

*   SSF_KRN_NOOP                   = 2

*   SSF_KRN_NOMEMORY               = 3

*   SSF_KRN_OPINV                  = 4

*   SSF_KRN_INPUT_DATA_ERROR       = 5

*   SSF_KRN_INVALID_PAR            = 6

*   SSF_KRN_INVALID_PARLEN         = 7

*   OTHERS                         = 8

           .

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.

endif.

IN adobe form 1 - Leave image string contents into context attribute IMAGE.

2 - Map IMAGE context attribute into your form to an IMAGE FIELD and check "Embed image data".