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: 

business document

pherrerom
Explorer
0 Kudos

When load photos with tx OAOR where are stored the Business documents and how can I configure this?

I would like to download all the attached photos to materials to a external directory with a background process.

have SAP a FM or class to download a photo attached as BO to a directory?.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Check the program : BDSFIND..

Table : BDS_LOCL..

Check the table : BDS*

Reward Points if it is helpful

Thanks

Seshu

2 REPLIES 2

Former Member
0 Kudos

Check the program : BDSFIND..

Table : BDS_LOCL..

Check the table : BDS*

Reward Points if it is helpful

Thanks

Seshu

0 Kudos

Obtain photos of Materials and save in a directory.

FUNCTION z18sdwsget_material_photo.

*"----


""Interfase local

*" IMPORTING

*" VALUE(PI_CLASSNAME) LIKE BAPIBDS01-CLASSNAME

*" VALUE(PI_CLASSTYPE) LIKE BAPIBDS01-CLASSTYPE

*" VALUE(PI_OBJECT_KEY) LIKE BAPIBDS01-OBJKEY

*" VALUE(PI_ALL) LIKE BAPIBDS01-X DEFAULT 'X'

*" VALUE(PI_DIRECTORY) LIKE BAPIBDS01-X OPTIONAL

*" VALUE(PI_DIRECTORY) TYPE SDOK_CHTRD OPTIONAL

*" VALUE(PI_ALIAS_NAME) TYPE SDOK_FILNM OPTIONAL

*"----


*

*Constantes

CONSTANTS: c_logobject LIKE sdokrecl-re_class VALUE 'LOGOBJECT'.

  • Varaibales locales

DATA: l_matnr LIKE mara-matnr,

l_classname LIKE bapibds01-classname,

l_objkey LIKE bapibds01-objkey.

  • Areas de trabajo

DATA: wa_connections LIKE bapiconnec,

wa_result LIKE sdokrelist.

  • Tablas internas locales

DATA: i_infoobjects LIKE bapiinfobj OCCURS 1 WITH HEADER LINE,

i_signature LIKE bapisignat OCCURS 1 WITH HEADER LINE,

i_components LIKE sdokcomcho OCCURS 1 WITH HEADER LINE,

i_sdokerrkey LIKE sdokerrkey OCCURS 1 WITH HEADER LINE.

----


REFRESH: i_signature,

i_sdokerrkey,

i_components.

l_classname = pi_classname.

IF l_classname+0(7) = PI_CLASSNAME. "'BUS1001'.

l_matnr = pi_object_key.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = l_matnr

IMPORTING

output = l_matnr.

l_objkey = l_matnr.

ELSE.

l_objkey = pi_object_key.

ENDIF.

CALL FUNCTION 'BDS_PHIOS_GET_RIGHT'

EXPORTING

  • LOGICAL_SYSTEM =

classname = pi_classname

classtype = pi_classtype

client = sy-mandt

object_key = l_objkey

  • ALL = 'X'

check_state = 'X'

TABLES

infoobjects = i_infoobjects

signature = i_signature

EXCEPTIONS

nothing_found = 1

parameter_error = 2

not_allowed = 3

error_kpro = 4

internal_error = 5

not_authorized = 6

OTHERS = 7.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ELSE.

LOOP AT i_infoobjects.

MOVE: i_infoobjects-ph_objid TO i_components-objid,

i_infoobjects-ph_class TO i_components-class,

PI_DIRECTORY TO i_components-directory,

PI_ALIAS TO i_components-alias.

APPEND i_components.

ENDLOOP.

CALL FUNCTION 'SDOK_PHIOS_GET_COPY'

EXPORTING

client = sy-mandt

TABLES

components = i_components

bad_objects = i_sdokerrkey.

ENDIF.

ENDFUNCTION.