Using "Services for Object" to attach local files to SAP objects (POs)
As I understand creating an Attachment to a PO for example from local drive - is a standard SAP functionality that does not require configuration, but ... in our Development, Quality and Production systems any document type can be attached, but not in Training. In Training system only .txt documents can be attached and for others it give the error message "Database error with <INSERT INTO KPRO>, error message number SO 013".
1) Does it mean that there is a config for it so certain document types can only be attached? and where can I find it?
2) Is there a way to limit the size of documents that can be attached? since somebody can "accidentally" attach 2 Gig file ...
Thanks,
Paul.
Hi Pavel,
Yes for Standard SAP functionality that does not require configuration, but for coustomized Transaction if you want to attach any doc or txt file doc then you need to change some code. if iam worng plz correct me.
in you querry just check with the your basis person some times they may give restrictions or authorizations check.
this may be helpful to you.
Similar Messages
-
I am unable to use services for objects while creating a PO
Hi All,
I am unable to use services for objects while creating a PO ie in me21n / Me22n .
Our client wants to attach some doucument along with the PO, we want to use services for object for this. I use this services for objects in admin level , but unable to use this at user level.
System gives the following message
No service available
Message no. SGOS_MSG002
Regards
GsgHi,
Refer the following OSS notes 552127, 598073
For getting Object for services icon in ME21N and ME51N refer OSS note 913251 -
How to call GOS(Generic Object service) attachment ( BMP file ) into SAP
How to call GOS(Generic Object service) attachment ( BMP file ) into SAP script
Example: MM02 Service object there attaching the bmp file the same file i need to call script based on the material number
Please provide the procedure and coding.
Thanks in advance
RajuHi,
The following link may be useful to u.
help.sap.com/printdocu/.../BCSRVOBS.pdf -
Mass upload Create External doc URLs using Services for object-Inspmethod
Hi All,
Services for object is not active during SHDB recording or ECATT recording in order to mass update Create External doc URLs using Services for object.
Any body know how to Upload this for any master data 9Insp plan/Material master etc..)Developing the program
-
Mass upload Create External doc URLs using Services for object-Materialmast
Hi All,
Services for object is not active during SHDB recording or ECATT recording in order to mass update Create External doc URLs using Services for object.
Any body know how to Upload this for any master data ex.Material master.ok
-
It can't find URL when i use HLS for vod and the vod file name contain Chinese.
It can't find URL when i use HLS for vod and the vod file name contain Chinese。eg: http://127.0.0.1:8134/hls-vod/你好.mp4.m3u8.
How does it support Chinese path?To answer the post title FireFox save all downloads automatically in the download folder, which you can find in the Documents folder. If you want to choose where to save your downloads go to tools>options>check always ask me where to save files.
Secondly, I am assuming you have IE 8 installed as this is the only version that supports this fix that is currently not in beta. Go to control panel>internet options>advanced tab and reset the settings at the bottom. This may or may not fix the problem but it is a good first step. -
Unable to attach .mnt files in SAP
If the user tries to attach .mht files in SAP an error occurs. does anyone has solution for this
Regards
NarosaysHi,
I am also facing the same problem. I uploaded the .mht file in KM and when i open it (either directly from KM or through any iview), it gives code for the first time but when i open it second time, it opens correctly.
Any idea, why is it displaying code for the first time?
Thanks,
Ami. -
Attaching a document to notification using service for object
hellow members,
i look for a table to let me know if a document
is attached to specific object (in my case it"s
a notification).
best regards,
avi
Edited by: avi koren on Jul 16, 2008 9:40 AMHellow Johannes,
thank you for your repling.
i don"t think that this is the direction.
In lots of objects in the SAP like a notification or a material,a button call "service for object" is available provide
some functions like
document attaching.
How i can see this attachments?
I think that the answer should be close to the table SOOD.
regards,
avi -
Attachments to Notifications - using "Services for Object"
Hi All,
I have sucessfully created a VC application (7.0 sp13) to create a General Notification in R/3
using the BAPI - IQS4_CREATE_NOTIFICATION
Our users in R/3 4.7 use the button in the Top Left Hand corner of the Screen "Services for Object"
to attach MS Word documents to Notifcations. Using the Create Attachment option from the Services for Object toolbar that pops up when the button is clicked.
Has anyone else tried this or have any advice on how this can be done in VC - if you can recommend a BAPI that I can try or will this be a custom ABAP BAPI.
Thanks in advance for any advice you can offer.
- RobertFUNCTION z_pm_attachment_and_url.
*"*"Interface local:
*" IMPORTING
*" VALUE(I_QMNUM) TYPE QMNUM OPTIONAL
*" VALUE(I_AUFNR) TYPE AUFNR OPTIONAL
*" VALUE(I_URL) TYPE SO_URL OPTIONAL
*" VALUE(I_FILE) TYPE ZPMCT002 OPTIONAL
*" VALUE(I_FILENAME) TYPE STRING OPTIONAL
*" TABLES
*" T_RETURN STRUCTURE BAPIRET2
* Objetos locais
DATA:
vl_url TYPE so_url,
vl_path TYPE string, "#EC NEEDED
vl_loopc TYPE sy-loopc,
vl_lines TYPE sy-loopc,
vl_filename TYPE string,
vl_filelength TYPE i,
it_url TYPE STANDARD TABLE OF sood-objdes,
it_obj_cont TYPE STANDARD TABLE OF solix,
wa_obj TYPE borident,
wa_obj_cont TYPE soli,
wa_obj_data TYPE sood1,
wa_folder_id TYPE soodk,
wa_document_id TYPE sofmk.
DEFINE valida_retorno.
loop at t_return into t_return.
if t_return-type eq zgtpm_e.
exit.
endif.
endloop.
if t_return-type eq zgtpm_e.
exit.
endif.
END-OF-DEFINITION.
* === Valida parâmetros de entrada
IF i_qmnum IS INITIAL AND i_aufnr IS INITIAL.
* Nenhum objeto informado: Informe Nota ou Ordem de Manutenção
PERFORM mensagem_retorno_tab
USING
'ZPM_PORTAL' zgtpm_e '055' '' '' '' ''
CHANGING
t_return[].
EXIT.
ELSEIF NOT i_qmnum IS INITIAL AND NOT i_aufnr IS INITIAL.
* Informe apenas um objeto: Nota ou Ordem de Manutenção
PERFORM mensagem_retorno_tab
USING
'ZPM_PORTAL' zgtpm_e '054' '' '' '' ''
CHANGING
t_return[].
EXIT.
ENDIF.
IF i_url IS INITIAL
AND i_filename IS INITIAL.
* Informe Anexo e/ou URL
PERFORM mensagem_retorno_tab
USING
'ZPM_PORTAL' zgtpm_e '060' '' '' '' ''
CHANGING
t_return[].
EXIT.
ENDIF.
* === Define Categoria de objeto
IF NOT i_qmnum IS INITIAL.
wa_obj-objkey = i_qmnum.
wa_obj-objtype = 'BUS2038'. " Nota PM
ENDIF.
IF NOT i_aufnr IS INITIAL.
wa_obj-objkey = i_aufnr.
wa_obj-objtype = 'BUS2007'. " Ordem de manutenção
ENDIF.
* === Anexo
IF NOT i_filename IS INITIAL.
* Conteúdo do arquivo
IF NOT i_file[] IS INITIAL.
it_obj_cont[] = i_file[].
DESCRIBE TABLE it_obj_cont LINES vl_lines.
READ TABLE it_obj_cont INTO wa_obj_cont INDEX vl_lines.
vl_filelength =
( 255 * ( vl_lines - 1 ) ) + STRLEN( wa_obj_cont ).
ELSE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = i_filename
filetype = 'BIN'
IMPORTING
filelength = vl_filelength
TABLES
data_tab = it_obj_cont
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
PERFORM mensagem_retorno_tab
USING
sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
CHANGING
t_return[].
EXIT.
ENDIF.
ENDIF.
* Pasta de Destino
PERFORM get_folder CHANGING wa_folder_id t_return[].
valida_retorno.
* SAPoffice: definição do objeto, modificar atributos
wa_obj_data-objla = sy-langu. " Idioma
wa_obj_data-objsns = 'O'. " Objeto confidencial
wa_obj_data-objlen = vl_filelength. " Tamanho conteúdo documento
wa_obj_data-ownnam = sy-uname. " Nome proprietário
CALL METHOD cl_report_viewer=>split_path_filename
EXPORTING
i_filename = i_filename
IMPORTING
e_path = vl_path
e_filename = vl_filename.
SPLIT vl_filename AT '.' INTO
wa_obj_data-objdes " Descrição breve do conteúdo
wa_obj_data-file_ext. " Extensão de file de uma aplicação PC
CONDENSE wa_obj_data-file_ext NO-GAPS.
* Insere Objeto (Anexo)
PERFORM object_insert
USING
'EXT' " Anexo
wa_obj_data
wa_folder_id
it_obj_cont
CHANGING
wa_document_id
t_return[].
valida_retorno.
* Relacionamento Objeto PM x Anexo
PERFORM relation_create
USING
'ATTA'
wa_obj
wa_document_id
CHANGING
t_return[].
valida_retorno.
ENDIF.
* === URL
IF NOT i_url IS INITIAL.
* Inicializa estruturas comuns a Anexo e URL
CLEAR:
it_obj_cont,
wa_obj_cont,
wa_obj_data,
wa_folder_id,
wa_document_id.
* Conteúdo da URL
MOVE i_url TO vl_url.
WHILE NOT vl_url IS INITIAL.
CONCATENATE '&KEY&' vl_url(250) INTO wa_obj_cont.
APPEND wa_obj_cont TO it_obj_cont.
SHIFT vl_url LEFT BY 250 PLACES.
ENDWHILE.
* Pasta de Destino
PERFORM get_folder CHANGING wa_folder_id t_return[].
valida_retorno.
* SAPoffice: definição do objeto, modificar atributos
wa_obj_data-objla = sy-langu. " Idioma
wa_obj_data-objsns = 'O'. " Objeto confidencial
wa_obj_data-ownnam = sy-uname. " Nome proprietário
SPLIT i_url AT '/' INTO TABLE it_url.
DESCRIBE TABLE it_url LINES vl_loopc.
READ TABLE it_url INDEX vl_loopc
INTO wa_obj_data-objdes. " Descrição breve do conteúdo
* Insere Objeto (URL)
PERFORM object_insert
USING
'URL' " Link Inter/Intranet
wa_obj_data
wa_folder_id
it_obj_cont
CHANGING
wa_document_id
t_return[].
valida_retorno.
* Relacionamento Objeto PM x URL
PERFORM relation_create
USING
'URL'
wa_obj
wa_document_id
CHANGING
t_return[].
valida_retorno.
ENDIF.
* === Libera objetos locais
FREE:
vl_url,
vl_path,
vl_loopc,
vl_lines,
vl_filename,
vl_filelength,
it_url,
it_obj_cont,
wa_obj,
wa_obj_cont,
wa_obj_data,
wa_folder_id,
wa_document_id.
ENDFUNCTION.
***INCLUDE LZGPM0010F01 .
*& Form mensagem_retorno_tab
FORM mensagem_retorno_tab
USING
p_msgid TYPE symsgid
p_msgty TYPE symsgty
p_msgno TYPE symsgno
p_msgv1 TYPE any
p_msgv2 TYPE any
p_msgv3 TYPE any
p_msgv4 TYPE any
CHANGING
t_return TYPE ty_return.
DATA:
vl_msgty TYPE symsgty,
wa_return LIKE LINE OF t_return.
IF p_msgty IS INITIAL.
MOVE zgtpm_e TO vl_msgty.
ELSE.
MOVE p_msgty TO vl_msgty.
ENDIF.
IF p_msgno IS INITIAL.
EXIT.
ENDIF.
MOVE p_msgid TO wa_return-id.
MOVE vl_msgty TO wa_return-type.
MOVE p_msgno TO wa_return-number.
MOVE p_msgv1 TO wa_return-message_v1.
MOVE p_msgv2 TO wa_return-message_v2.
MOVE p_msgv3 TO wa_return-message_v3.
MOVE p_msgv4 TO wa_return-message_v4.
MESSAGE ID p_msgid TYPE vl_msgty NUMBER p_msgno
WITH p_msgv1 p_msgv2 p_msgv3 p_msgv4
INTO wa_return-message.
APPEND wa_return TO t_return.
FREE: vl_msgty, wa_return.
ENDFORM. " mensagem_retorno_tab
*& Form get_folder
FORM get_folder
CHANGING
w_folder_id TYPE soodk
t_return TYPE ty_return.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
region = 'B' " ?
IMPORTING
folder_id = w_folder_id
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
PERFORM mensagem_retorno_tab
USING
sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
CHANGING
t_return[].
ENDIF.
ENDFORM. " get_folder
*& Form object_insert
FORM object_insert USING
p_objtp TYPE so_obj_tp
w_obj_data TYPE sood1
w_folder_id TYPE soodk
t_obj_cont TYPE zpmct002
CHANGING
w_document_id TYPE sofmk
t_return TYPE ty_return.
* Objetos locais
DATA:
it_objcont TYPE STANDARD TABLE OF soli,
it_obj_head TYPE STANDARD TABLE OF soli,
wa_obj_id TYPE soodk,
wa_obj_cont LIKE LINE OF t_obj_cont.
* RAW to CHAR
LOOP AT t_obj_cont INTO wa_obj_cont.
APPEND wa_obj_cont TO it_objcont.
CLEAR wa_obj_cont.
ENDLOOP.
* Insere objeto
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
folder_id = w_folder_id
object_type = p_objtp
object_hd_change = w_obj_data
owner = sy-uname
IMPORTING
object_id = wa_obj_id
TABLES
objhead = it_obj_head
objcont = it_objcont
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
dl_name_exist = 4
folder_not_exist = 5
folder_no_authorization = 6
object_type_not_exist = 7
operation_no_authorization = 8
owner_not_exist = 9
parameter_error = 10
substitute_not_active = 11
substitute_not_defined = 12
system_failure = 13
x_error = 14
OTHERS = 15.
IF sy-subrc = 0.
w_document_id-foltp = w_folder_id-objtp.
w_document_id-folyr = w_folder_id-objyr.
w_document_id-folno = w_folder_id-objno.
w_document_id-doctp = wa_obj_id-objtp.
w_document_id-docyr = wa_obj_id-objyr.
w_document_id-docno = wa_obj_id-objno.
ELSE.
PERFORM mensagem_retorno_tab
USING
sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
CHANGING
t_return[].
ENDIF.
* Libera objetos locais
FREE:it_objcont, it_obj_head, wa_obj_id, wa_obj_cont.
ENDFORM. " object_insert
*& Form relation_create
FORM relation_create
USING
p_relationtype TYPE binreltyp
w_obj TYPE borident
w_document_id TYPE sofmk
CHANGING
t_return TYPE ty_return.
DATA wa_doc TYPE borident.
wa_doc-objtype = 'MESSAGE'.
CASE p_relationtype.
WHEN 'ATTA'.
wa_doc-objkey = w_document_id(34).
WHEN 'URL'.
wa_doc-objkey = w_document_id.
WHEN OTHERS.
ENDCASE.
CALL FUNCTION 'BINARY_RELATION_CREATE'
EXPORTING
obj_rolea = w_obj
obj_roleb = wa_doc
relationtype = p_relationtype
EXCEPTIONS
no_model = 1
internal_error = 2
unknown = 3
OTHERS = 4.
IF sy-subrc = 0.
COMMIT WORK AND WAIT.
CASE p_relationtype.
WHEN 'ATTA'.
* O anexo foi criado com êxito
PERFORM mensagem_retorno_tab
USING
'SGOS_MSG' zgtpm_s '043' '' '' '' ''
CHANGING
t_return[].
WHEN 'URL'.
* A URL foi criada com êxito
PERFORM mensagem_retorno_tab
USING
'ZPM_PORTAL' zgtpm_s '059' '' '' '' ''
CHANGING
t_return[].
WHEN OTHERS.
ENDCASE.
ELSE.
PERFORM mensagem_retorno_tab
USING
sy-msgid sy-msgty sy-msgno sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
CHANGING
t_return[].
ENDIF.
FREE wa_doc.
ENDFORM. " relation_create
Edited by: Fabrício Alves Vieira on Apr 8, 2008 3:08 PM -
How to use BAPIs for Infopackage execution : loading multiple files
Hello
I have been told that BAPIs can be used to load multiple csv files at once for which some BAPIs exists (BAPI_IPAK_CREATE_FROM_REF , BAPI_IPAK_CREATE , etc)
I have users who will be dropping their standard files in a directory (this should be a local one or server one ?) according to one of 3 types of formats defined.
As they wont be trigering the IP but instead plan to use a Process chain need a way to collect all files and trigger a IP that can process them all
Can somebody lead me into using the appropriate ones in the right way?
thanksFirst if you are using process chain then the files should be placed in Application Server only and process chain can not work with IPs which are using Local Files.
Instead of BAPI in the infopackage there is a feature to select the file using routines. May be you can pick the necessary file in the routine itself.
In the extraction tab you can find this option.
Regs
Gopi
Assign points if it is useful -
Settings for Purchase Order output using services for MM-SUS scenario?
Dear Gurus,
I am configuring the service procurement classic and plan driven procurement for MM-SUS
environment. We are on SAP SRM 7.01/ECC 6 EHP5.
I need to maintain the below settings for PO output:
1. RUN transaction SWETYPV
2. IN the object types field, enter CL_SE_PUR_WF_OUT.
3. In the event field, enter CREATED.
4. In the receiver type field, enter WS53800008.
5. In the receiver function module field, enter SWW_WI_CREATE_VIA_EVENT_IBF.
6. Select the 'Linkage Activated' checkbox.
7. Save your entries.
Similarly, one more entry for the event CHANGED.
However, the system is not allowing me to save the settings.
If I choose BOR Object Type 'CL_SE_PUR_WF_OUT', it gives an error message 'Object type CL_SE_PUR_WF_OUT is not defined'.
If I choose object category 'Business class for object type CL_SE_PUR_WF_OUT, it gives an error message 'Class CL_SE_PUR_WF_OUT is not a business class.'
There are similar entries in the table SWETYPV for object type CL_SE_PUR_PO_WF_OUT' with object category CL.If we copy the entries and tries to replace the
object type 'CL_SE_PUR_PO_WF_OUT' with CL_SE_PUR_WF_OUT and save it, it gives an error message 'CL is not used for workflow event'.
Could you please help me on how to configure the settings for PO output from ECC system using services?
Any input is highly appreciated.
Thanks and regards,
RanjanHi Ranjan,
Please add the value 'CL' in the table SWF_CATIDS
Then it will work.
With Regards,
Malay -
How to save object to a local file.
Hello all.
I need to save an object, i.e. an ABAP program, to a local file and then be able to "import" it into another system.
I am not talking about the lines of codes that can be saved as a local file, but the whole program including screens and so on. Something similar to releasing a transport with object R3TR PROG ZMYPROGRAM to another system, but instead to the local desktop.
Anyone would know if this can be done?
Regards
LandeHi,
Vist the Link for complete Download there are some utility programs.
http://www.dalestech.com
Regards
vijay -
Problem for PCs recieving attached SWF files from Mac Mail 2.1.3
Hi All,
When I send this file from my mac mail 2.1.3 (753.1) with a SWF (flash animation) attachment the file wont open on the PC client mail. Instead when I force the unknown attachment to open it says the below with a string of letters.
--Apple-Mail-37--496662089
Content-Transfer-Encoding: base64
Content-Type: application/applefile;
name=daft3.swf
Content-Disposition: attachment;
filename=daft3.swf
AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAJAAAAMgAAAAoAAAADAAAAPAAAAAlTV0ZMU1dG
MgBAZGFmdDMuc3dm
--Apple-Mail-37--496662089
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream;
x-mac-type=5357464C;
x-unix-mode=0744;
x-mac-creator=53574632;
name=daft3.swf
Content-Disposition: attachment;
filename=daft3.swfTry creating an archive of the SWF file (.zip) and email that instead. But the recipient needs to have an application on their PeeCee that will open SWF files; Outlook or Outlook Express will not do that.
Mulder -
Using a for loop to create multiple files ???
I have the below code. I want to make a file for every element stored in the array. How do I do this?
Vector files = new Vector();
for (int i = 0; i<files.size(); i++)
//System.out.println(files.elementAt(i));
}Not much. Are the files being created by processes on multiple hosts? If not, adding the host name and IP seem useless. Are the files being created by multiple processes and/or multiple threads on same host? If so, then the former isn't helpful. Is it possible for two threads or processes to create a file in the same millisecond - if not IMPOSSIBLE then it is possible and 99.99% chance that they won't isn't good enough. If so, then that won't work either. What if a single thread quickly creates two files in same millisecond - remember the millisecond value may not change for several milliseconds due to host system architecture.
So, I guess it depends on your requirements. -
Pls Help...for loading a selected word file in SAP B1
Hi...
Can I get the Code for loadig a selected Widows Word Document
(file) in SAP B1If you want to open .doc file...
Private Sub LoadFile(ByVal sFile As String)
Try
Dim startInfo As New ProcessStartInfo(sFile)
startInfo.WindowStyle = ProcessWindowStyle.Maximized
Process.Start(startInfo)
Catch ex As Exception
' log exception
Finally
System.GC.Collect() 'Release the handle to the table
End Try
End Sub
Regards
Sierdna S.
Maybe you are looking for
-
CRM TPM - Integration with R/3, APO and BW -Documentation
Hi, We are beggining a TPM Project in CRM 4.0. Do you have any documentation how to integrate with: - R/3 Project System (WBS elements)? - APO ? - BW ? Thanks and Best Regards, SF
-
EXTREMELY URGENT : Reinstalling Portal
By a twist of fate(actually screw-up of the 9iAS installer, wherein deinstalling Discoverer deinstalled everything under the sun), the Oracle Portal version that was installed was removed. The portlets and page-definitions are intact and safe in the
-
Help to reg. crystal report with java
hi friends, I have installed the crystal report and J-Integra also. but I am not able to find the crystl32.ocx in my c:\windows\system32 folder . So I downloaded it separately and use the J-Integra's com2java convertor to generate crystal package. Th
-
Need help on setting up my alarm
How can I extend the duration the alarm plays on a blackberry curve? I have a 25 minute song I want played every morning and have it come on as my alarm. How do I change the duration of the alarm in order to hear the whole song? As default setting
-
Installing SQL Server 2008 R2 via command line - setup100.exe returned exit code 0x84BC06B2
I am receiving an exit code 0x84BC06B2 when installing SQLExpress via the command line on a PC that also has SQL Server 2012 installed. Below is the log file generated: 11/18/2014 01:02:41.631 Help display: false 11/18/2014 01:02:41.642 Checking to