cancel
Showing results for 
Search instead for 
Did you mean: 

Link document to salesorder

0 Kudos

Hi,

i created a document and linked it to the materialmaster. (CV01N, MM02).

While creating a new sales order for the material i want that

sap creates a link between the document which is attached to the materialmaster

and the salesorder im creating.

Is this possible?

how? with customizing?

if not, does somebody has an idea how to solve this via userexits?

We need our product informations of the DVS in our order confirmation

and further in the deliverynote, attached as pdf.

help apprechiated!

thanks, regards.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi santosh,

thats what im doing:

ls_draw2-documenttype    = 'Z01'.
ls_draw2-documentnumber  = 'SZ7066'.
ls_draw2-documentversion = '01'.
ls_draw2-documentpart    = '000'.
ls_draw2-description     = 'Test'.

ls_drad-objecttype = 'VBAP'.
ls_drad-objectkey  = '0000114312000020'.
APPEND ls_drad TO lt_drad.

   CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
     EXPORTING
       documentdata               = ls_draw2
*     HOSTNAME                   =
*     DOCBOMCHANGENUMBER         =
*     DOCBOMVALIDFROM            =
*     DOCBOMREVISIONLEVEL        =
*     CAD_MODE                   = ' '
*     PF_FTP_DEST                = ' '
*     PF_HTTP_DEST               = ' '
    IMPORTING
*     DOCUMENTTYPE               =
*     DOCUMENTNUMBER             =
*     DOCUMENTPART               =
*     DOCUMENTVERSION            =
      return                     = ls_return
    TABLES
*     CHARACTERISTICVALUES       =
*     CLASSALLOCATIONS           =
*     DOCUMENTDESCRIPTIONS       =
      objectlinks                = lt_drad
*     DOCUMENTSTRUCTURE          =
*     DOCUMENTFILES              =
*     LONGTEXTS                  =
*     COMPONENTS                 =
             .


Unfortunately i get an entry in drad and draw with version 02.

documentdata is mandatory.


any ideas?

thx

0 Kudos

Hi santosh!

Perfect -its working,.... but:

can you advice me how to fill the parameters - only to create the object link?

unfortunately i created a new document version (at least its linked... )

-> i need only the link...

thanks in advance!

regards

former_member186385
Active Contributor
0 Kudos

Hi,

under object links

Maintain Object type as Sales order header type as VBAK ( if you want to attach to sales order item enter VBAP)

enter the Object key as sales order number

check and revert

thanks

santosh

0 Kudos

hi,

as already described i can attach documents (DMS) to the salesorder manually.

i need to attach the document automatically to the salesorder - via the materialnumber.

regards

former_member186385
Active Contributor
0 Kudos

Hi T H,

There is a Function module " 'BAPI_DOCUMENT_CREATE2'" which is used to automatically attach Document to Sales order while processing

Please check with your developer on how to fill this Function module

regards,

santosh

former_member1249468
Contributor
0 Kudos

Hi,

Please note that, to attach the document and to see/populate the same during order creation, we need to have DMS (Document management system) at place .Please get in touch with basis team and ask them to configure the DMS and later, once we attach the document to either any of the masters or transaction, the same can be verified/viewed at transaction.

Thanks,

Pasapula.