Application Development and Automation 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: 
Read only

how to get attachment opened

Former Member
0 Likes
1,282

hi everybody,

i have to design such that when user presses a button, it should open the attachment concerned to particular purchase requsition ( i.e. attachements available to Purchase requsition service for objects, in me53n transaction. )

how do i do this.

can any one tell me how to use below class......to get this done....what r the inputs to pass to below class which i found. will this work..

class -


> cl_gos_attachment_list

regards,

krishna

9 REPLIES 9
Read only

Former Member
0 Likes
1,164

can anybody out there help me please

Read only

Former Member
0 Likes
1,164

u can use this function Module

' EXPORTING

DOKAR =

DOKNR =

DOKTEIL =

DOKVR =

  • CAD_INSERT = ' '

  • DATEI_NAME = ' '

  • ONLY_DATA =

  • PRINT =

  • ONLY_APPLICATIONS = ' '

  • ORIGINAL_NUMBER =

  • ONLY_URL =

  • IMPORTING

  • DATEI_NAME_E =

  • APPLTXT1 =

  • APPLTXT2 =

  • ARCHIV_EXIST =

  • E_URL =

  • EXCEPTIONS

  • NOT_FOUND = 1

  • NO_AUTH = 2

  • NO_ORIGINAL = 3

  • OTHERS = 4

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Read only

0 Likes
1,164

alpesh , it's not clear

could u brief a little more

Read only

0 Likes
1,164

u will find the attached document in DRAD and DRAW table

only this four thing are mendatory.

DOKAR =

DOKNR =

DOKTEIL =

DOKVR =

u will have to pass document no , Version, Type

And automatically this function module will display document

u can go to se37 and press where used list for function module

Regards,

Alpesh

Edited by: Alpesh on Sep 18, 2008 5:00 PM

Read only

0 Likes
1,164

Posted: Sep 17, 2008 11:27 AM by Alpesh Chovatiya

u can use this function Module

' EXPORTING

DOKAR =

DOKNR =

DOKTEIL =

DOKVR =

  • CAD_INSERT = ' '

  • DATEI_NAME = ' '

  • ONLY_DATA =

  • PRINT =

  • ONLY_APPLICATIONS = ' '

  • ORIGINAL_NUMBER =

  • ONLY_URL =

  • IMPORTING

  • DATEI_NAME_E =

  • APPLTXT1 =

  • APPLTXT2 =

  • ARCHIV_EXIST =

  • E_URL =

  • EXCEPTIONS

  • NOT_FOUND = 1

  • NO_AUTH = 2

  • NO_ORIGINAL = 3

  • OTHERS = 4

.

IF SY-SUBRC 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LoL FM with no head

Read only

Former Member
0 Likes
1,164

Hi Krishna,

Class which you mentioned will not work.

Use this function module.

CALL FUNCTION 'DOCUMENT_ASSIGNMENT'

EXPORTING

dokob = 'EBAN'

objky = (Concatenate ekpo-ebeln + ekpo-ebelp)

include_dynpro = '9000'

program_name = sy-repid

opcode = '3'

IMPORTING

vb_flag = ' '

TABLES

tabdrad = lt_documents.

Create screen 9000 in yr main program(sy-repid).

when this fuction executes it will show the documents which you maintained for respected ebeln(purchase document ) and item(ebelp).

Thanks,

Nitin

Read only

0 Likes
1,164

hi nitin,

what i want is Purchse requsition attached documents.

but you are talking about PO.

i.e Services for objects which has got attachements in me52n or me53n transaction.

regards,

krishna

Read only

0 Likes
1,164

hi ,

it's all about replicating the services for object functionality in my custom development

Read only

0 Likes
1,164

Hi Krishna,

what you want is documents related to Purchase requisition

should open.

If requirement is like above, then solution which i have given

will work

sorry i used the wrong table,

but firstly get value of purcahse requisition and item

and concatenate it in parameter l_objkey.

l_objkey = Concatenate EBAN-BANFN EBAN-BNFPO

create screen 9000.

On click of attachment button.

call this below fuction 'DOCUMENT_ASSIGNMENT' it will attach the subscreen of attach document in screen 9000 same as it is in standard transaction ME53N

CALL FUNCTION 'DOCUMENT_ASSIGNMENT'

EXPORTING

dokob = 'EBAN'

objky = l_objkey

include_dynpro = '9000'

program_name = sy-repid

opcode = '3'

IMPORTING

vb_flag = ' '

TABLES

tabdrad = lt_documents.

EBAN is table for purchase requsition.

thanks,

nitin