‎2008 Sep 17 8:30 AM
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
‎2008 Sep 17 10:10 AM
‎2008 Sep 17 10:27 AM
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.
‎2008 Sep 18 5:36 AM
‎2008 Sep 18 12:29 PM
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
‎2011 May 25 9:18 AM
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
‎2008 Sep 17 11:55 AM
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
‎2008 Sep 18 5:38 AM
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
‎2008 Sep 18 6:50 AM
hi ,
it's all about replicating the services for object functionality in my custom development
‎2008 Sep 18 11:41 AM
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