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: 

Attach document from server to delivery in VL03N in automatic way.

Former Member
0 Kudos

Hello experts,

In Vl03n i have the option to attach document to delivery in this way : service button -


> create attachment

And choose the file that will be attach to this delivery.

After this operation i can display in this document like this way: service button -


> Attachment list.

I want to attach one document that exist in server "
Cilaff01\data$\Sap\Sela\Delivery_Note\file_name" to delivery.

Every time , that the user create or change the delivery in VL02N tcode , will be create attachment from this delivery

To suitable document that exist in server "
Cilaff01\data$\Sap\Sela\Delivery_Note\file_name".

After this operation i will be can display this document like this way: service button -


> Attachment list.

          • File_name = delivery number. ********

Thanks for the help,

Avi.

1 ACCEPTED SOLUTION

brad_bohn
Active Contributor

Do you have a specific question? Have you traced the process or read about BDS processing or searched on the topic here?

13 REPLIES 13

brad_bohn
Active Contributor

Do you have a specific question? Have you traced the process or read about BDS processing or searched on the topic here?

Former Member
0 Kudos

Hello,

My Question is how can i do this process , when the user create or change the delivery .

I want that user not will be should to create attachment to the delivery in manual , if the user it will be in VL02N

He can see the attachment that was created automatic .

Thanks for the help,

Avi.

Former Member
0 Kudos

cl_gos_document_service - look for this

Former Member
0 Kudos

Hello,

Thanks , but can you give me example that suitable in my case ?

Avi.

Former Member
0 Kudos

/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background

hope this helps

brad_bohn
Active Contributor
0 Kudos

Thanks , but can you give me example that suitable in my case ?

Is the 'where-used' button broken in your GUI? Why don't you search the forum, the help files, or for actual applications that use the process? OSS has many notes that document the process from config to development objects as well.

Former Member
0 Kudos

Thanks, but it is very details , i don't know what can be suitable in my case.

Avi.

Former Member
0 Kudos

Hello,

I was search, but i wasn't find suitable case to my case.

Avi.

Edited by: avi azulay on Mar 2, 2011 7:07 PM

Former Member
0 Kudos

This is the place where you need to read your file contents:

  • In case of File attachments

WHEN 'EXT'.

  • Upload the file contents using open dataset in lt_doc_content .

  • Some conversion ( Compress ) might be required.

  • Not sure at this point

Then for the object key - debug to find what is being passed when you attach something to a delivery - alternately look in table SRGBTBREL for details

Here is a typical example:

Rel. type ATTA

Instance ID (INSTID A) <delivery number>

Object Type (TYPEID A) LIKP

Object Category (CATID A) BO

Instance ID (INSTID B) FOL30000000000024EXT36000000000789

Object Type (TYPEID B) MESSAGE

Object Category (CATID B) BO

Former Member
0 Kudos

Hello,

Thanks but i can't to apply this.

i don't understand what is this:

SWC_SET_TABLE LT_MESSAGE_CONTAINER 'DocumentContent' LT_BINARY.

SWC_SET_ELEMENT LT_MESSAGE_CONTAINER 'DOCUMENTSIZE' LV_DOC_SIZE.

SWC_REFRESH_OBJECT LO_MESSAGE.

SWC_CALL_METHOD LO_MESSAGE 'CREATE' LT_MESSAGE_CONTAINER.

  • Refresh to get the reference of create 'MESSAGE' object for attachment

  • swc_refresh_object lo_message.

  • Get Key of new object

SWC_GET_OBJECT_KEY LO_MESSAGE LV_MESSAGE_KEY.

?

Avi.

Edited by: avi azulay on Mar 2, 2011 8:08 PM

Former Member
0 Kudos

Hello,

Somebody can help me in this case?

Thanks for the help,

Avi.

Former Member
0 Kudos

>

> Hello experts,

>

> In Vl03n i have the option to attach document to delivery in this way : service button -


> create attachment

>

> And choose the file that will be attach to this delivery.

>

> After this operation i can display in this document like this way: service button -


> Attachment list.

>

> I want to attach one document that exist in server "
Cilaff01\data$\Sap\Sela\Delivery_Note\file_name" to delivery.

>

> Every time , that the user create or change the delivery in VL02N tcode , will be create attachment from this delivery

>

> To suitable document that exist in server "
Cilaff01\data$\Sap\Sela\Delivery_Note\file_name".

>

> After this operation i will be can display this document like this way: service button -


> Attachment list.

>

>

> ***** File_name = delivery number. ********

-->you dont even know delivery number at the time of Delivery Creation , so which file you are going to pick from the file server ?

> Thanks for the help,

>

> Avi.

0 Kudos

Hello,

I know the delivery number when the user make change in VL02N tcode, this what i mean in my description.

Thanks for the help,

Avi.