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: 

USE OF THIS fUNCTION MODULE

Former Member
0 Kudos

BINARY_RELATION_CREATE_COMMIT

can anybody tell me what is the use of this FM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

BINARY_RELATION_CREATE_COMMIT function module is used to link the object id to the invoice document.

please refer the series of the steps below which will explain it better.....

1. Read the file into memory. For that we can use OPEN DATASET if the file is on a server or FM GUI_DOWNLOAD if the file is on a local PC (e.g. on your laptop's C: drive). Don't worry that it's a Word file - if you use the binary mode, it will be OK.

2. Get a "folder ID" by calling SO_FOLDER_ROOT_ID_GET. Now this part is rather confusing (does this FM actually create a folder somewhere?), but just look at it this way - you're getting an address of where your file contents will be stored in SAP, that's all.

3. Put the file into that "folder" by calling SO_OBJECT_INSERT. The content of the file is passed to this function module in a table.

4. The FM SO_OBJECT_INSERT will give you the "object ID" for your file. At this point your file is already stored somewhere in the depths of SAP Office and the last step is to link this "object ID" to the invoice. To do so, we call the FM BINARY_RELATION_CREATE_COMMIT.

regards,

Alpa.

5 REPLIES 5

KK07
Contributor
0 Kudos

hi,

try pressing documentation tab.

Former Member
0 Kudos

no documentation available for that

thats why i have posted

if you know that pls tell me

0 Kudos

check with the following link

http://friendlyabaper.blogspot.com/2008/07/oh-my-gos.html

i hope it will help u.

Former Member
0 Kudos

i think the use of this FM is

Attach Documents to Any Custom Program Using Generic Object Services (i am not sure)

check this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de...

Edited by: srinivasu bv on Oct 17, 2008 7:42 AM

Former Member
0 Kudos

hi,

BINARY_RELATION_CREATE_COMMIT function module is used to link the object id to the invoice document.

please refer the series of the steps below which will explain it better.....

1. Read the file into memory. For that we can use OPEN DATASET if the file is on a server or FM GUI_DOWNLOAD if the file is on a local PC (e.g. on your laptop's C: drive). Don't worry that it's a Word file - if you use the binary mode, it will be OK.

2. Get a "folder ID" by calling SO_FOLDER_ROOT_ID_GET. Now this part is rather confusing (does this FM actually create a folder somewhere?), but just look at it this way - you're getting an address of where your file contents will be stored in SAP, that's all.

3. Put the file into that "folder" by calling SO_OBJECT_INSERT. The content of the file is passed to this function module in a table.

4. The FM SO_OBJECT_INSERT will give you the "object ID" for your file. At this point your file is already stored somewhere in the depths of SAP Office and the last step is to link this "object ID" to the invoice. To do so, we call the FM BINARY_RELATION_CREATE_COMMIT.

regards,

Alpa.