Skip to Content

Custom Screen Attach Document like Standard Purchase Order Attachment(GOS)

Need Small information.
My Requirement is i need to Attach and view the Documents from Desktop Like Standard Purchase order attach documents.

By using the class , i was created two menus and completed the task.

manager TYPE REF TO cl_gos_manager,

CALL METHOD manager->start_service_direct
EXPORTING
ip_service = 'PCATTA_CREA'
is_object = obj
EXCEPTIONS
no_object = 1
object_invalid = 2
execution_failed = 3
OTHERS = 4.
ENDIF.

IF ok_code EQ 'DISPLAY'.

CREATE OBJECT manager
EXPORTING
ip_no_commit = 'R'
EXCEPTIONS
others = 1.

obj-objtype = 'ZGOSUPLOAD'.
obj-objkey = t_docno.

CALL METHOD manager->start_service_direct
EXPORTING
ip_service = 'VIEW_ATTA'
is_object = obj
EXCEPTIONS
no_object = 1
object_invalid = 2
execution_failed = 3
OTHERS = 4.
ENDIF.

In the above obj means ,Module pool is generating one unique document number for every document,I need to pass that document number.

Presently i am attaching the files only in module pol change mode only.So, In change mode i am getting the module pool zscreen unique number,So, No problem.

My problem is. How could i do the same operation at creation mode. Because there is no number is generating at Creation mode(While saving only i can get the document no), How could i provide the Document number to above obj class.

Any suggestion please update me.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 09, 2016 at 09:52 AM

    Work in the transaction with some dummy number (like some of the standard application who generates some temporary %0000001, %0000002 numbers) then at commit, transfer document from the dummy to the final one and delete dummy records.

    But note that many standard creation transactions only allow attachment if some "early number assignment" is in use (so no temp. number requirement but gaps in number ranges)

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded