on 11-19-2008 8:29 AM
hi friends,
i am using webdynpro application and ADOBE forms. i designed adobe form with 3 fields. IM_VORNA, IM_NACHN, IM_PHOTO.
I created one interface of adobe form also with the 3 fields of which specified above.
And i am using webdynpro application to get the details of emplyee by passing pernr.
i created a view. in this, and i attached every thing interface context. And in methos tab, wddoinit method i wrote code like this...
DATA pernrid TYPE PERNR-PERNR. "tdobname.
DATA temp TYPE c.
DATA: p_connect_info TYPE TOAV0,
wa_p_connect_info TYPE TOAV0,
p_document_type TYPE TOAV0-RESERVE,
exists TYPE c.
DATA: url TYPE char255,
turl TYPE string,
turl1 TYPE xstring.
DATA lo_nd_z_if_test_cv TYPE REF TO if_wd_context_node.
DATA lo_el_z_if_test_cv TYPE REF TO if_wd_context_element.
DATA ls_z_if_test_cv TYPE wd_this->element_z_if_test_cv.
* navigate from <CONTEXT> to <Z_IF_TEST_CV> via lead selection
lo_nd_z_if_test_cv = wd_context->get_child_node( name = wd_this->wdctx_z_if_test_cv ).
* get element via lead selection
lo_el_z_if_test_cv = lo_nd_z_if_test_cv->get_element( ).
* get all declared attributes
lo_el_z_if_test_cv->get_static_attributes(
IMPORTING
static_attributes = ls_z_if_test_cv ).
* *** Vorna and Nachn.
ls_z_if_test_cv-im_vorna = 'shankar'.
ls_z_if_test_cv-im_nachn = 'chamala'.
***pernr
pernrid = '00000003'.
CALL FUNCTION 'HR_IMAGE_EXISTS'
EXPORTING
P_PERNR = PERNRID
* P_TCLAS = 'A'
* P_BEGDA = '18000101'
* P_ENDDA = '99991231'
IMPORTING
P_EXISTS = exists
P_CONNECT_INFO = P_CONNECT_INFO
EXCEPTIONS
ERROR_CONNECTIONTABLE = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
P_DOCUMENT_TYPE = P_CONNECT_INFO-RESERVE.
CALL FUNCTION 'SCMS_DOC_URL_READ'
EXPORTING
* MANDT = SY-MANDT
STOR_CAT = SPACE
CREP_ID = P_CONNECT_INFO-ARCHIV_ID
DOC_ID = P_CONNECT_INFO-ARC_DOC_ID
* PHIO_ID =
COMP_ID = 'DATA'
* SIGNATURE = 'X'
* SECURITY = ' '
* USE_LOCATION = 'A'
* LOCATION = ' '
* HTTP_URL_ONLY = ' '
DP_URL_ONLY = 'X'
* LIFETIME = ' '
* NO_CACHE = ' '
* EXPIRATION =
* PDF_MODE = ' '
* URL_EXTENTION = ' '
* FORCE_GET = ' '
IMPORTING
URL = URL
EXCEPTIONS
ERROR_CONFIG = 1
ERROR_PARAMETER = 2
ERROR_SIGNATURE = 3
HTTP_NOT_SUPPORTED = 4
DOCGET_NOT_SUPPORTED = 5
NOT_ACCESSABLE = 6
DATA_PROVIDER_ERROR = 7
TREE_NOT_SUPPORTED = 8
NOT_SUPPORTED = 9
OTHERS = 10
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
turl = url.
CALL FUNCTION 'HR_KR_STRING_TO_XSTRING'
EXPORTING
* CODEPAGE_TO = '8500'
UNICODE_STRING = turl
* OUT_LEN =
IMPORTING
XSTRING_STREAM = turl1
EXCEPTIONS
INVALID_CODEPAGE = 1
INVALID_STRING = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_z_if_test_cv-im_photo = turl1.
*** Get the Photographs
*
*CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
* EXPORTING
* p_object = 'GRAPHICS'
* p_name = pernrid
* p_id = 'BMAP'
* p_btype = 'BCOL'
* receiving
* p_bmp = ls_z_if_test_cv-im_photo
* EXCEPTIONS
* not_found = 1
* internal_error = 2
* others = 3
* .
*IF sy-subrc EQ 0.
** MOVE 'y' TO temp.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*** Send the values back to the node
lo_el_z_if_test_cv->set_static_attributes(
EXPORTING
static_attributes = ls_z_if_test_cv ).
But here the problem is when i executed this application i am able to see the VORNA and NACHN fields in ADOBE Form. But the employee photo is not appearing in adobe form.
Here employee photo i amretreving from archive link.
Even i set the Imagefield property URL in Adobe forms. i.e $record.IM_PHOTO.
Any solutions regarding this...
Regards,
Shankar.
Hi Shankar,
according to the sap documentation (inserting a graphic), I could imagine the following problems
1.) image file type is not supported (-> "see the online help in Adobe LiveCycle Designer under Defining Object Properties ® Image Fields ® About Image Fields" )
when you use "Graphic Reference"
2.) url could not be accessed.(-> "This means that you may have to configure appropriate access rights for Adobe Document Services (ADS)" ).
Maybe this will help you finding the problem.
Regards,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.