04-25-2006 8:27 AM
Hi,
I am facing a problem. I have to go to transaction ME33k and click the GOS toolbar. Then click on the attachment list. After the attachment list arrives, I need to transfer the files to the local system. The issue is that I need to do all this using a custom program. The custom program will transfer the files into the local system and then mail them to specified recipients.
The custom program has been made but I am unable to download files from the SAP internal location to the local PC. Please advise.
04-25-2006 8:42 AM
04-25-2006 9:06 AM
Welcome to SDN
you can use BDS_GOS_CONNECTIONS_GET or
BDS_ALL_CONNECTIONS_GET to get the list of attachments.
and to read the content of the attachment (so that you can download it to local PC) use FM BDS_DOCUMENT_GET_TABLE or BDS_BUSINESSDOCUMENT_GET_TAB
Regards
Raja
05-11-2006 2:08 PM
Hi,
I tried to use these functions but not able to find specific input parameters.
Is there any documentation available for using these function modules or could you please provide certain test scenario.
05-15-2006 5:04 AM
Hi,
I would like to have the parameters for the follwing function modules.
1> BDS_BUSINESSDOCUMENT_GET_TABLE
2> BDS_GOS_CONNECTION_GET
If possible, could you also provide the parameters for BDS_DOCUMENT_GET_TABLE.
Thanks,
Jayanta
05-15-2006 6:43 AM
1. BDS_GOS_CONNECTIONS_GET
LOGICAL_SYSTEM = pass your systems logical system id - if you dont know the logical system id you can run FM OWN_LOGICAL_SYSTEM_GET to get the logical system name.
CLASSNAME = the business object name (for example BUS0012 is the class for cost center)
OBJKEY = the key of the business object's object for example for cost center it will be <controllingarea>+<costcenternumber>
CLIENT = sy-mandt
2. BDS_BUSINESSDOCUMENT_GET_TAB its almost similar
Regards
Raja
05-15-2006 12:07 PM
Hi,
Thanks for the update. The BDS_GOS_CONNECTIONS_GET is working fine but the BDS_BUSINESSDOCUMENT_GET_TAB has some problem. I entered all the inputs as specified by you but it states 'NOTHING FOUND'. Actually when I debugged the FM, I found that a FM BDS_CONNECTIONS_GET is called by it with exactly the same parameters as we passed in the BDS_GOS_CONNECTIONS_GET but, here it returs the error message 'NOTHING FOUND'.
Please help.
Thanks,
Jayanta
01-03-2014 11:16 AM
Hi,
Can you give me the test data of BDS_DOCUMENT_GET_TABLE.
Regards,
Sankar
11-17-2006 8:56 PM
Hello Jayanta Biswas,
I am experiencing your issue with FM BDS_BUSINESSDOCUMENT_GET_TAB.
Were you able to figure out why its throwing the "Nothing Found" exception?
Thanks for your help,
12-31-2008 11:36 AM
Please try the next abap code to download all applicant attachments. SAP system 6.40
in this - OBJECT_ID - applicant SAP number
------------------------------------------------
data: i_connections type BDN_CON occurs 0,
i_connections_rec type BDN_CON .
data fol_id like soodk.
data doc_id like soodk.
data: OBJCONT type SOLI occurs 0 .
DATA: PATH TYPE CHAR255,
COMP_ID TYPe CHAR255 .
CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
EXPORTING
CLASSNAME = 'APPLICANT'
OBJKEY = OBJECT_ID
CLIENT = SY-MANDT
TABLES
GOS_CONNECTIONS = i_connections
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT i_connections INTO i_connections_rec .
move i_connections_rec-LOIO_ID to FOL_ID .
move i_connections_rec-LOIO_ID+17(25) to doc_id .
CALL FUNCTION 'SO_OBJECT_READ'
EXPORTING
FOLDER_ID = FOL_ID
OBJECT_ID = doc_id
TABLES
OBJCONT = OBJCONT .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT i_connections INTO i_connections_rec .
move i_connections_rec-LOIO_ID to FOL_ID .
move i_connections_rec-LOIO_ID+17(25) to doc_id .
CALL FUNCTION 'SO_OBJECT_READ'
EXPORTING
FOLDER_ID = FOL_ID
OBJECT_ID = doc_id
TABLES
OBJCONT = OBJCONT .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CONCATENATE 'D:\GOS\' i_connections_rec-DESCRIPT '.' i_connections_rec-DOCUCLASS into PATH .
CONCATENATE i_connections_rec-DESCRIPT '.' i_connections_rec-DOCUCLASS into COMP_ID .
CALL FUNCTION 'SO_OBJECT_DOWNLOAD'
EXPORTING
DEFAULT_FILENAME = COMP_ID
FILETYPE = 'BIN'
PATH_AND_FILE = PATH
EXTCT = 'K'
NO_DIALOG = 'X'
TABLES
OBJCONT = objcont .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP .
01-03-2014 10:56 AM
Hi Jayanta,
Did you find any solution???
Please reply
Regards,
Sankar